summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/api_validate.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/api_validate.c')
-rw-r--r--src/mesa/main/api_validate.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c
index 33e80863842..2f9980e7e6c 100644
--- a/src/mesa/main/api_validate.c
+++ b/src/mesa/main/api_validate.c
@@ -197,8 +197,8 @@ _mesa_valid_to_render(struct gl_context *ctx, const char *where)
gl_shader_stage i;
for (i = 0; i < MESA_SHADER_STAGES; i++) {
- if (shProg[i] == NULL || shProg[i]->_Used
- || shProg[i]->_LinkedShaders[i] == NULL)
+ if (shProg[i] == NULL || shProg[i]->_LinkedShaders[i] == NULL ||
+ shProg[i]->_LinkedShaders[i]->Program->_Used)
continue;
/* This is the first time this shader is being used.
@@ -214,8 +214,8 @@ _mesa_valid_to_render(struct gl_context *ctx, const char *where)
}
for (i = 0; i < MESA_SHADER_STAGES; i++) {
- if (shProg[i] != NULL)
- shProg[i]->_Used = GL_TRUE;
+ if (shProg[i] != NULL && shProg[i]->_LinkedShaders[i] != NULL)
+ shProg[i]->_LinkedShaders[i]->Program->_Used = GL_TRUE;
}
}
#endif