mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-22 02:38:11 +00:00
Fix crash in GLSL shader driver
This commit is contained in:
parent
f185c1ef1f
commit
54b5d289b0
@ -1433,10 +1433,10 @@ static bool gl_glsl_set_coords(void *handle_data, void *shader_data,
|
||||
/* Avoid hitting malloc on every single regular quad draw. */
|
||||
|
||||
size_t elems = 0;
|
||||
elems += (uni->color) * 4;
|
||||
elems += (uni->tex_coord) * 2;
|
||||
elems += (uni->vertex_coord) * 2;
|
||||
elems += (uni->lut_tex_coord) * 2;
|
||||
elems += (uni->color >= 0) * 4;
|
||||
elems += (uni->tex_coord >= 0) * 2;
|
||||
elems += (uni->vertex_coord >= 0) * 2;
|
||||
elems += (uni->lut_tex_coord >= 0) * 2;
|
||||
|
||||
elems *= coords->vertices * sizeof(GLfloat);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user