added FLUSH_VERTICES() in _mesa_use_program()

This commit is contained in:
Brian
2007-02-03 11:35:02 -07:00
parent 8e0c6fc0be
commit 00d63aafc6

View File

@@ -842,6 +842,14 @@ _mesa_link_program(GLcontext *ctx, GLuint program)
void
_mesa_use_program(GLcontext *ctx, GLuint program)
{
if (ctx->Shader.CurrentProgram &&
ctx->Shader.CurrentProgram->Name == program) {
/* no-op */
return;
}
FLUSH_VERTICES(ctx, _NEW_PROGRAM);
/* unbind old */
if (ctx->Shader.CurrentProgram) {
ctx->Shader.CurrentProgram->RefCount--;