aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/texstate.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c
index ada0dfdb660..aa99b0667cb 100644
--- a/src/mesa/main/texstate.c
+++ b/src/mesa/main/texstate.c
@@ -704,13 +704,14 @@ _mesa_update_texture_state(struct gl_context *ctx)
if (ctx->_Shader->CurrentProgram[i]) {
prog[i] = ctx->_Shader->CurrentProgram[i];
} else {
- if (i == MESA_SHADER_FRAGMENT && ctx->FragmentProgram._Enabled)
- prog[i] = ctx->FragmentProgram.Current;
- else
- prog[i] = NULL;
+ prog[i] = NULL;
}
}
+ if (prog[MESA_SHADER_FRAGMENT] == NULL && ctx->FragmentProgram._Enabled) {
+ prog[MESA_SHADER_FRAGMENT] = ctx->FragmentProgram.Current;
+ }
+
/* TODO: only set this if there are actual changes */
ctx->NewState |= _NEW_TEXTURE_OBJECT | _NEW_TEXTURE_STATE;