mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-23 03:10:14 +00:00
Add sanity check for Cg/GLSL attrib indices.
This commit is contained in:
parent
115758a09f
commit
f1db922c26
@ -149,6 +149,9 @@ static char cg_alias_define[GFX_MAX_SHADERS][128];
|
||||
static void gl_cg_reset_attrib(void)
|
||||
{
|
||||
unsigned i;
|
||||
// Add sanity check that we did not overflow.
|
||||
rarch_assert(cg_attrib_index <= ARRAY_SIZE(cg_attribs));
|
||||
|
||||
for (i = 0; i < cg_attrib_index; i++)
|
||||
cgGLDisableClientState(cg_attribs[i]);
|
||||
cg_attrib_index = 0;
|
||||
|
@ -459,6 +459,9 @@ static bool compile_programs(GLuint *gl_prog)
|
||||
static void gl_glsl_reset_attrib(void)
|
||||
{
|
||||
unsigned i;
|
||||
// Add sanity check that we did not overflow.
|
||||
rarch_assert(gl_attrib_index <= ARRAY_SIZE(gl_attribs));
|
||||
|
||||
for (i = 0; i < gl_attrib_index; i++)
|
||||
glDisableVertexAttribArray(gl_attribs[i]);
|
||||
gl_attrib_index = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user