summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/state.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/state.c')
-rw-r--r--src/mesa/main/state.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index e56f6e136d3..2a926a182b9 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -135,9 +135,8 @@ update_program(struct gl_context *ctx)
if (fsProg && fsProg->data->LinkStatus
&& fsProg->_LinkedShaders[MESA_SHADER_FRAGMENT]) {
/* Use GLSL fragment shader */
- _mesa_reference_shader_program(ctx,
- &ctx->_Shader->_CurrentFragmentProgram,
- fsProg);
+ _mesa_reference_program(ctx, &ctx->_Shader->_CurrentFragmentProgram,
+ fsProg->_LinkedShaders[MESA_SHADER_FRAGMENT]->Program);
_mesa_reference_program(ctx, &ctx->FragmentProgram._Current,
fsProg->_LinkedShaders[MESA_SHADER_FRAGMENT]->Program);
_mesa_reference_program(ctx, &ctx->FragmentProgram._TexEnvProgram,
@@ -145,9 +144,8 @@ update_program(struct gl_context *ctx)
}
else if (ctx->FragmentProgram._Enabled) {
/* Use user-defined fragment program */
- _mesa_reference_shader_program(ctx,
- &ctx->_Shader->_CurrentFragmentProgram,
- NULL);
+ _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,
@@ -156,9 +154,8 @@ 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_shader_program(ctx,
- &ctx->_Shader->_CurrentFragmentProgram,
- NULL);
+ _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,
@@ -168,9 +165,8 @@ 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_shader_program(ctx,
- &ctx->_Shader->_CurrentFragmentProgram,
- f);
+ _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,