summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_surface_state.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
index 5e0fcafbce1..b62d1e22a12 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -456,6 +456,7 @@ brw_update_texture_surface(struct gl_context *ctx,
unsigned unit,
uint32_t *surf_offset,
bool for_gather,
+ bool for_txf,
uint32_t plane)
{
struct brw_context *brw = brw_context(ctx);
@@ -501,6 +502,7 @@ brw_update_texture_surface(struct gl_context *ctx,
mesa_format mesa_fmt = plane == 0 ? intel_obj->_Format : mt->format;
enum isl_format format = translate_tex_format(brw, mesa_fmt,
+ for_txf ? GL_DECODE_EXT :
sampler->sRGBDecode);
/* Implement gen6 and gen7 gather work-around */
@@ -1152,10 +1154,12 @@ update_stage_texture_surfaces(struct brw_context *brw,
if (prog->SamplersUsed & (1 << s)) {
const unsigned unit = prog->SamplerUnits[s];
+ const bool used_by_txf = prog->info.textures_used_by_txf & (1 << s);
/* _NEW_TEXTURE */
if (ctx->Texture.Unit[unit]._Current) {
- brw_update_texture_surface(ctx, unit, surf_offset + s, for_gather, plane);
+ brw_update_texture_surface(ctx, unit, surf_offset + s, for_gather,
+ used_by_txf, plane);
}
}
}