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.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c
index 42eeeba1414..5f051dbec6f 100644
--- a/src/mesa/main/api_validate.c
+++ b/src/mesa/main/api_validate.c
@@ -99,10 +99,8 @@ check_blend_func_error(struct gl_context *ctx)
* the blend equation or "blend_support_all_equations", the error
* INVALID_OPERATION is generated [...]"
*/
- const struct gl_shader_program *sh_prog =
- ctx->_Shader->_CurrentFragmentProgram;
- const GLbitfield blend_support = !sh_prog ? 0 :
- sh_prog->_LinkedShaders[MESA_SHADER_FRAGMENT]->Program->sh.fs.BlendSupport;
+ const struct gl_program *prog = ctx->_Shader->_CurrentFragmentProgram;
+ const GLbitfield blend_support = !prog ? 0 : prog->sh.fs.BlendSupport;
if ((blend_support & ctx->Color._AdvancedBlendMode) == 0) {
_mesa_error(ctx, GL_INVALID_OPERATION,