From 00d63aafc6d938f13acc9b136ff210fb0bbb15f9 Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 3 Feb 2007 11:35:02 -0700 Subject: [PATCH] added FLUSH_VERTICES() in _mesa_use_program() --- src/mesa/shader/shader_api.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index 1914adb54ca..842960099ea 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -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--; -- 2.30.2