diff options
author | Brian <[email protected]> | 2007-02-03 11:35:02 -0700 |
---|---|---|
committer | Brian <[email protected]> | 2007-02-03 11:35:02 -0700 |
commit | 00d63aafc6d938f13acc9b136ff210fb0bbb15f9 (patch) | |
tree | 5b3191c0f5749e7fe978c24f9d3fc13eadfba405 /src/mesa | |
parent | 8e0c6fc0be503bc13a2817c7a86c83d1e67e72b0 (diff) |
added FLUSH_VERTICES() in _mesa_use_program()
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/shader/shader_api.c | 8 |
1 files changed, 8 insertions, 0 deletions
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--; |