[Mesa-dev] [PATCH 2/4] i965/fs: Fix Broadwell texture header setup to be uncompressed.

Kenneth Graunke kenneth at whitecape.org
Thu Jan 23 13:13:22 PST 2014


MOV_RAW disables masking, but doesn't force the instruction to be
uncompressed.  That needs to be done by hand.

Fixes textureGather and texture offset tests.

Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
 src/mesa/drivers/dri/i965/gen8_fs_generator.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp b/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp
index 6c710bc..62b1e02 100644
--- a/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp
+++ b/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp
@@ -243,6 +243,9 @@ gen8_fs_generator::generate_tex(fs_inst *ir,
       if (dispatch_width == 16)
          src.nr++;
 
+      unsigned save_exec_size = default_state.exec_size;
+      default_state.exec_size = BRW_EXECUTE_8;
+
       MOV_RAW(src, brw_vec8_grf(0, 0));
 
       if (ir->texture_offset) {
@@ -250,6 +253,8 @@ gen8_fs_generator::generate_tex(fs_inst *ir,
          MOV_RAW(retype(brw_vec1_grf(src.nr, 2), BRW_REGISTER_TYPE_UD),
                  brw_imm_ud(ir->texture_offset));
       }
+
+      default_state.exec_size = save_exec_size;
    }
 
    uint32_t surf_index =
-- 
1.8.5.2



More information about the mesa-dev mailing list