Skip to content

Commit

Permalink
Fixed wrong assert; triggered if there were no vertex shader uniforms.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Aug 9, 2009
1 parent 46e2c16 commit 4189f56
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions mojoshader_opengl.c
Expand Up @@ -632,9 +632,6 @@ static void impl_ARB1_PushUniforms(void)

assert(count > 0); // shouldn't call this with nothing to do!

// These should be ordered vertex, then pixel, then geometry.
assert(program->uniforms[0].uniform->type == MOJOSHADER_TYPE_VERTEX);

for (i = 0; i < count; i++)
{
UniformMap *map = &program->uniforms[i];
Expand All @@ -658,6 +655,7 @@ static void impl_ARB1_PushUniforms(void)
} // if
else
{
// These should be ordered vertex, then pixel, then geometry.
assert(0 && "Unexpected shader type");
} // else

Expand Down Expand Up @@ -1753,9 +1751,6 @@ void MOJOSHADER_glProgramReady(void)
GLint *dstb = program->vs_uniforms_bool;
uint32 i;

// These should be ordered vertex, then pixel, then geometry.
assert(program->uniforms[0].uniform->type == MOJOSHADER_TYPE_VERTEX);

for (i = 0; i < count; i++)
{
UniformMap *map = &program->uniforms[i];
Expand All @@ -1782,6 +1777,7 @@ void MOJOSHADER_glProgramReady(void)
} // if
else
{
// Should be ordered vertex, then pixel, then geometry.
assert(0 && "Unexpected shader type");
} // else

Expand Down

0 comments on commit 4189f56

Please sign in to comment.