aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/api_validate.c2
-rw-r--r--src/mesa/main/mtypes.h2
-rw-r--r--src/mesa/main/pipelineobj.c2
-rw-r--r--src/mesa/main/shaderapi.c22
-rw-r--r--src/mesa/main/state.c8
5 files changed, 1 insertions, 35 deletions
diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c
index 4694c36e8d1..cbb2361552e 100644
--- a/src/mesa/main/api_validate.c
+++ b/src/mesa/main/api_validate.c
@@ -99,7 +99,7 @@ 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_program *prog = ctx->_Shader->_CurrentFragmentProgram;
+ const struct gl_program *prog = ctx->FragmentProgram._Current;
const GLbitfield blend_support = !prog ? 0 : prog->sh.fs.BlendSupport;
if ((blend_support & ctx->Color._AdvancedBlendMode) == 0) {
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 79f50130e73..28d3d948fcd 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -3003,8 +3003,6 @@ struct gl_pipeline_object
struct gl_shader_program *ReferencedPrograms[MESA_SHADER_STAGES];
- struct gl_program *_CurrentFragmentProgram;
-
/**
* Program used by glUniform calls.
*
diff --git a/src/mesa/main/pipelineobj.c b/src/mesa/main/pipelineobj.c
index f7c911f2e44..67a8fc8cb95 100644
--- a/src/mesa/main/pipelineobj.c
+++ b/src/mesa/main/pipelineobj.c
@@ -58,8 +58,6 @@ _mesa_delete_pipeline_object(struct gl_context *ctx,
{
unsigned i;
- _mesa_reference_program(ctx, &obj->_CurrentFragmentProgram, NULL);
-
for (i = 0; i < MESA_SHADER_STAGES; i++) {
_mesa_reference_program(ctx, &obj->CurrentProgram[i], NULL);
_mesa_reference_shader_program(ctx, &obj->ReferencedPrograms[i], NULL);
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);
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index 5a760f5e5d0..73872b822a6 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -133,16 +133,12 @@ update_program(struct gl_context *ctx)
if (fsProg) {
/* Use GLSL fragment shader */
- _mesa_reference_program(ctx, &ctx->_Shader->_CurrentFragmentProgram,
- fsProg);
_mesa_reference_program(ctx, &ctx->FragmentProgram._Current, fsProg);
_mesa_reference_program(ctx, &ctx->FragmentProgram._TexEnvProgram,
NULL);
}
else if (ctx->FragmentProgram._Enabled) {
/* Use user-defined fragment program */
- _mesa_reference_program(ctx, &ctx->_Shader->_CurrentFragmentProgram,
- NULL);
_mesa_reference_program(ctx, &ctx->FragmentProgram._Current,
ctx->FragmentProgram.Current);
_mesa_reference_program(ctx, &ctx->FragmentProgram._TexEnvProgram,
@@ -151,8 +147,6 @@ update_program(struct gl_context *ctx)
else if (ctx->ATIFragmentShader._Enabled &&
ctx->ATIFragmentShader.Current->Program) {
/* Use the enabled ATI fragment shader's associated program */
- _mesa_reference_program(ctx, &ctx->_Shader->_CurrentFragmentProgram,
- NULL);
_mesa_reference_program(ctx, &ctx->FragmentProgram._Current,
ctx->ATIFragmentShader.Current->Program);
_mesa_reference_program(ctx, &ctx->FragmentProgram._TexEnvProgram,
@@ -162,8 +156,6 @@ update_program(struct gl_context *ctx)
/* Use fragment program generated from fixed-function state */
struct gl_shader_program *f = _mesa_get_fixed_func_fragment_program(ctx);
- _mesa_reference_program(ctx, &ctx->_Shader->_CurrentFragmentProgram,
- f->_LinkedShaders[MESA_SHADER_FRAGMENT]->Program);
_mesa_reference_program(ctx, &ctx->FragmentProgram._Current,
f->_LinkedShaders[MESA_SHADER_FRAGMENT]->Program);
_mesa_reference_program(ctx, &ctx->FragmentProgram._TexEnvProgram,