[Mesa-dev] [PATCH 026/133] i965/fs_nir: Use the correct texture offset immediate
Jason Ekstrand
jason at jlekstrand.net
Mon Dec 15 22:04:36 PST 2014
---
src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
index 97fb0b7..aab5b0d 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
@@ -1628,11 +1628,10 @@ fs_visitor::nir_emit_texture(nir_tex_instr *instr)
mcs = fs_reg(0u);
}
- for (unsigned i = 0; i < 4; i++) {
+ for (unsigned i = 0; i < 3; i++) {
if (instr->const_offset[i] != 0) {
assert(offset_components == 0);
- offset = fs_reg(instr->const_offset[i]);
- offset_components = 1;
+ offset = fs_reg(brw_texture_offset(ctx, instr->const_offset, 3));
break;
}
}
@@ -1674,7 +1673,7 @@ fs_visitor::nir_emit_texture(nir_tex_instr *instr)
emit_texture(op, dest_type, coordinate, instr->coord_components,
shadow_comparitor, lod, lod2, lod_components, sample_index,
- offset,offset_components, mcs, gather_component,
+ offset, offset_components, mcs, gather_component,
is_cube_array, is_rect, sampler, fs_reg(sampler), texunit);
fs_reg dest = get_nir_dest(instr->dest);
--
2.2.0
More information about the mesa-dev
mailing list