From c46a630000a2539e38a448f24a456397ce201a2e Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Fri, 4 Nov 2016 09:25:36 +1100 Subject: mesa: make _CurrentFragmentProgram a gl_program struct pointer Making this point to a gl_program struct rather than a gl_shader_program struct will allow use to later also make the CurrentProgram array hold gl_program structs which in turn will allow for code simpilifcation. Reviewed-by: Eric Anholt --- src/mesa/main/api_validate.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/mesa/main/api_validate.c') 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, -- cgit v1.2.3