Mesa (master): i965/vec4: Use UD rather than D for uniform indirects

Jason Ekstrand jekstrand at kemper.freedesktop.org
Thu Apr 14 21:25:52 UTC 2016


Module: Mesa
Branch: master
Commit: cb372b39ea15729caf8491f4fd9f12c37a2840df
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=cb372b39ea15729caf8491f4fd9f12c37a2840df

Author: Jason Ekstrand <jason.ekstrand at intel.com>
Date:   Fri Apr  8 10:49:02 2016 -0700

i965/vec4: Use UD rather than D for uniform indirects

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/mesa/drivers/dri/i965/brw_vec4_nir.cpp     |  2 +-
 src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
index d24cdea..80845dc 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
@@ -709,7 +709,7 @@ vec4_visitor::nir_emit_intrinsic(nir_intrinsic_instr *instr)
          assert(const_offset->u32[0] % 16 == 0);
          src.reg_offset = const_offset->u32[0] / 16;
       } else {
-         src_reg tmp = get_nir_src(instr->src[0], BRW_REGISTER_TYPE_D, 1);
+         src_reg tmp = get_nir_src(instr->src[0], BRW_REGISTER_TYPE_UD, 1);
          src.reladdr = new(mem_ctx) src_reg(tmp);
       }
 
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
index a06d696..c7cf33f 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
@@ -758,7 +758,7 @@ vec4_visitor::emit_pull_constant_load_reg(dst_reg dst,
       pull->mlen = 2;
       pull->header_size = 1;
    } else if (devinfo->gen >= 7) {
-      dst_reg grf_offset = dst_reg(this, glsl_type::int_type);
+      dst_reg grf_offset = dst_reg(this, glsl_type::uint_type);
 
       grf_offset.type = offset_reg.type;
 
@@ -1594,14 +1594,14 @@ vec4_visitor::emit_pull_constant_load(bblock_t *block, vec4_instruction *inst,
 
    src_reg offset;
    if (orig_src.reladdr) {
-      offset = src_reg(this, glsl_type::int_type);
+      offset = src_reg(this, glsl_type::uint_type);
 
       emit_before(block, inst, ADD(dst_reg(offset), *orig_src.reladdr,
-                                   brw_imm_d(reg_offset * 16)));
+                                   brw_imm_ud(reg_offset * 16)));
    } else if (devinfo->gen >= 8) {
       /* Store the offset in a GRF so we can send-from-GRF. */
-      offset = src_reg(this, glsl_type::int_type);
-      emit_before(block, inst, MOV(dst_reg(offset), brw_imm_d(reg_offset * 16)));
+      offset = src_reg(this, glsl_type::uint_type);
+      emit_before(block, inst, MOV(dst_reg(offset), brw_imm_ud(reg_offset * 16)));
    } else {
       offset = brw_imm_d(reg_offset * 16);
    }




More information about the mesa-commit mailing list