aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_vec4_nir.cpp')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_nir.cpp18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
index b2adb9aaea5..23b2fabd98e 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
@@ -660,20 +660,12 @@ vec4_visitor::nir_emit_intrinsic(nir_intrinsic_instr *instr)
unsigned const_offset = instr->const_index[0];
src_reg offset;
- if (devinfo->gen <= 6) {
- if (!has_indirect) {
- offset = src_reg(const_offset & ~15);
- } else {
- offset = get_nir_src(instr->src[1], nir_type_int, 1);
- }
+ if (!has_indirect) {
+ offset = src_reg(const_offset / 16);
} else {
- if (!has_indirect) {
- offset = src_reg(const_offset & ~15);
- } else {
- offset = src_reg(this, glsl_type::uint_type);
- emit(SHR(dst_reg(offset), get_nir_src(instr->src[1], nir_type_int, 1),
- src_reg(4u)));
- }
+ offset = src_reg(this, glsl_type::uint_type);
+ emit(SHR(dst_reg(offset), get_nir_src(instr->src[1], nir_type_int, 1),
+ src_reg(4u)));
}
src_reg packed_consts = src_reg(this, glsl_type::vec4_type);