diff options
author | Jason Ekstrand <[email protected]> | 2014-10-15 15:25:10 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2015-01-15 07:18:59 -0800 |
commit | b092bc9805f0f28209fc70fb367e0dc26e294317 (patch) | |
tree | e5c25a937ae2fad95c42f15450580e30736d22c7 /src/mesa | |
parent | c181ff268e4787056fdee417d30d52b1098fe211 (diff) |
i965/fs_nir: Use the correct texture offset immediate
Reviewed-by: Connor Abbott <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 7 |
1 files 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 2f2ebe80cf5..2b746728a28 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp @@ -1625,11 +1625,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; } } @@ -1671,7 +1670,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); |