diff options
author | Timothy Arceri <[email protected]> | 2016-10-31 22:08:24 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2016-12-30 10:57:16 +1100 |
commit | 29d70f5de966c18d563475bc5f60f252e9a900a3 (patch) | |
tree | 283d560bac4d13d8066aa3b4d0d1989e8108539b /src/mesa/main/api_validate.c | |
parent | 8a69ae5345045af4642145ad0bcfd1314d4d949e (diff) |
mesa: move _Used to gl_program
We no longer need to initialise it because gl_program is never reused.
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/main/api_validate.c')
-rw-r--r-- | src/mesa/main/api_validate.c | 8 |
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 |