summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorJordan Justen <[email protected]>2016-06-11 18:16:47 -0700
committerJordan Justen <[email protected]>2016-06-26 10:49:34 -0700
commit367cf3a2e3e51466429a6446ef14ed398a5fb948 (patch)
tree330635187f45b7e7e47af40af50b17d0831c9821 /src/mesa/drivers
parent1f5f64b91f23a311043a15f898db19ed0711f37c (diff)
i965: Use miptree to decide format on multi-plane images for gen < 7
This wasn't handled correctly for multi-plane images on gen < 7 in 727a9b24933d384f5440ed4318fb720ed11d6dd1. Reported-by: Mark Janes <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96674 Signed-off-by: Jordan Justen <[email protected]> Cc: "12.0" <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_surface_state.c3
1 files changed, 2 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 d241ec94fd6..eed16acf31c 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -316,7 +316,8 @@ brw_update_texture_surface(struct gl_context *ctx,
surf = brw_state_batch(brw, AUB_TRACE_SURFACE_STATE,
6 * 4, 32, surf_offset);
- uint32_t tex_format = translate_tex_format(brw, intelObj->_Format,
+ mesa_format mesa_fmt = plane == 0 ? intelObj->_Format : mt->format;
+ uint32_t tex_format = translate_tex_format(brw, mesa_fmt,
sampler->sRGBDecode);
if (for_gather) {