[Mesa-dev] [PATCH 06/10] i965/gen7: Move tex gather format override into common dispatcher

Topi Pohjolainen topi.pohjolainen at intel.com
Wed Jul 1 04:46:36 PDT 2015


Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
---
 src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 4 ++++
 1 file changed, 4 insertions(+)

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 c14f00a..b68b136 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -832,6 +832,10 @@ update_stage_texture_surfaces(struct brw_context *brw,
       uint32_t format = translate_tex_format(brw, itex->_Format,
                                              sampler->sRGBDecode);
 
+      if (brw->gen == 7 && for_gather &&
+          format == BRW_SURFACEFORMAT_R32G32_FLOAT)
+         format = BRW_SURFACEFORMAT_R32G32_FLOAT_LD;
+
       if (tex->StencilSampling && first_img->_BaseFormat == GL_DEPTH_STENCIL) {
          mt = mt->stencil_mt;
          format = BRW_SURFACEFORMAT_R8_UINT;
-- 
1.9.3



More information about the mesa-dev mailing list