[Mesa-dev] [PATCH 2/2] i965/fs: Fix type of header register for sampler messages
Chris Forbes
chrisf at ijw.co.nz
Sun Oct 13 03:24:33 CEST 2013
Previously this was float, which caused the copy from g0 to mangle
everything.
Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
---
src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
index 6a1e8f7..746c873 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
@@ -519,7 +519,7 @@ fs_generator::generate_tex(fs_inst *inst, struct brw_reg dst, struct brw_reg src
struct brw_reg header_reg;
if (brw->gen >= 7) {
- header_reg = src;
+ header_reg = retype(src, BRW_REGISTER_TYPE_UD);
} else {
assert(inst->base_mrf != -1);
header_reg = retype(brw_message_reg(inst->base_mrf),
@@ -542,7 +542,7 @@ fs_generator::generate_tex(fs_inst *inst, struct brw_reg dst, struct brw_reg src
brw_push_insn_state(p);
brw_set_mask_control(p, BRW_MASK_DISABLE);
brw_set_compression_control(p, BRW_COMPRESSION_NONE);
- brw_MOV(p, src, retype(brw_vec8_grf(0, 0), BRW_REGISTER_TYPE_UD));
+ brw_MOV(p, retype(src, BRW_REGISTER_TYPE_UD), retype(brw_vec8_grf(0, 0), BRW_REGISTER_TYPE_UD));
brw_pop_insn_state(p);
} else {
/* Set up an implied move from g0 to the MRF. */
--
1.8.4
More information about the mesa-dev
mailing list