From 6d7660cf4b7c0c73b4394f09dd149c6b0386115c Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Wed, 10 May 2017 10:37:35 +1000 Subject: mesa: remove _CurrentFragmentProgram from gl_pipeline_object This was added in b527dd65c830a as a work around because fixed function fragment shaders were tracked in ctx->FragmentProgram._Current as a gl_program rather than gl_shader_program. However after my refactoring of the program and shader structs at the end of 2016 which culminated in c505d6d85222, we no longer need gl_shader_program to track the current program making _CurrentFragmentProgram obsolete. Reviewed-by: Kenneth Graunke --- src/mesa/main/shaderapi.c | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'src/mesa/main/shaderapi.c') diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index 681b7306d13..7430cfeeb8d 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -155,7 +155,6 @@ _mesa_free_shader_state(struct gl_context *ctx) for (int i = 0; i < MESA_SHADER_STAGES; i++) { _mesa_reference_program(ctx, &ctx->Shader.CurrentProgram[i], NULL); } - _mesa_reference_program(ctx, &ctx->Shader._CurrentFragmentProgram, NULL); _mesa_reference_shader_program(ctx, &ctx->Shader.ActiveProgram, NULL); /* Extended for ARB_separate_shader_objects */ @@ -1261,27 +1260,6 @@ use_program(struct gl_context *ctx, gl_shader_stage stage, FLUSH_VERTICES(ctx, _NEW_PROGRAM | _NEW_PROGRAM_CONSTANTS); } - /* If the shader is also bound as the current rendering shader, unbind - * it from that binding point as well. This ensures that the correct - * semantics of glDeleteProgram are maintained. - */ - switch (stage) { - case MESA_SHADER_VERTEX: - case MESA_SHADER_TESS_CTRL: - case MESA_SHADER_TESS_EVAL: - case MESA_SHADER_GEOMETRY: - case MESA_SHADER_COMPUTE: - /* Empty for now. */ - break; - case MESA_SHADER_FRAGMENT: - if (*target == ctx->_Shader->_CurrentFragmentProgram) { - _mesa_reference_program(ctx, - &ctx->_Shader->_CurrentFragmentProgram, - NULL); - } - break; - } - _mesa_reference_shader_program(ctx, &shTarget->ReferencedPrograms[stage], shProg); -- cgit v1.2.3