summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texstate.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-09-27 13:17:21 +0200
committerMarek Olšák <[email protected]>2017-09-28 17:48:33 +0200
commit9d54025cd1eee3f42b80c062d1f644904bf2ba41 (patch)
treeb87470e6faf66814fe199b961f8502b07a424c9e /src/mesa/main/texstate.c
parent15e3657e433f0e370632fdb70889eb6dfafeba34 (diff)
mesa: fix texture updates for ATI_fragment_shader
Cc: 17.1 17.2 <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/main/texstate.c')
-rw-r--r--src/mesa/main/texstate.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c
index 269e29194d6..edd22537319 100644
--- a/src/mesa/main/texstate.c
+++ b/src/mesa/main/texstate.c
@@ -840,9 +840,11 @@ _mesa_update_texture_state(struct gl_context *ctx)
memcpy(prog, ctx->_Shader->CurrentProgram, sizeof(prog));
- if (prog[MESA_SHADER_FRAGMENT] == NULL &&
- _mesa_arb_fragment_program_enabled(ctx)) {
- prog[MESA_SHADER_FRAGMENT] = ctx->FragmentProgram.Current;
+ if (prog[MESA_SHADER_FRAGMENT] == NULL) {
+ if (_mesa_arb_fragment_program_enabled(ctx))
+ prog[MESA_SHADER_FRAGMENT] = ctx->FragmentProgram.Current;
+ else if (_mesa_ati_fragment_shader_enabled(ctx))
+ prog[MESA_SHADER_FRAGMENT] = ctx->ATIFragmentShader.Current->Program;
}
/* TODO: only set this if there are actual changes */