Avoid needless branch.

This commit is contained in:
Themaister 2014-05-16 18:11:47 +02:00
parent 59c64f9c5a
commit 96c324da08

View File

@ -559,9 +559,7 @@ static void find_uniforms(unsigned pass, GLuint prog, struct shader_uniforms *un
find_uniforms_frame(prog, &uni->orig, frame_base);
}
if (pass)
{
for (i = 0; i < pass - 1; i++)
for (i = 0; i + 1 < pass; i++)
{
snprintf(frame_base, sizeof(frame_base), "Pass%u", i + 1);
clear_uniforms_frame(&uni->pass[i]);
@ -578,7 +576,6 @@ static void find_uniforms(unsigned pass, GLuint prog, struct shader_uniforms *un
clear_uniforms_frame(&uni->prev[i]);
find_uniforms_frame(prog, &uni->prev[i], frame_base);
}
}
glUseProgram(0);
}