added FLUSH_VERTICES() in _mesa_use_program()
This commit is contained in:
@@ -842,6 +842,14 @@ _mesa_link_program(GLcontext *ctx, GLuint program)
|
|||||||
void
|
void
|
||||||
_mesa_use_program(GLcontext *ctx, GLuint program)
|
_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 */
|
/* unbind old */
|
||||||
if (ctx->Shader.CurrentProgram) {
|
if (ctx->Shader.CurrentProgram) {
|
||||||
ctx->Shader.CurrentProgram->RefCount--;
|
ctx->Shader.CurrentProgram->RefCount--;
|
||||||
|
Reference in New Issue
Block a user