diff options
author | Jason Ekstrand <[email protected]> | 2020-04-26 09:48:16 -0500 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2020-05-30 01:08:50 -0500 |
commit | 94aa7997e45b5314d169bbee5bf22ad368c2fd25 (patch) | |
tree | 9ee8912b654b9f0af700d2e6ef87fb5f9956c373 | |
parent | a7c8811fe4012b60a9bcdb2ea2ef6ab79e402809 (diff) |
intel/fs: Fix unused texture coordinate zeroing on Gen4-5
We were inserting the right number of MOVs but, thanks to the way we
advanced msg_end earlier in the function, were often writing the zeros
past the end of where we actually read in the register file.
Cc: [email protected]
Reviewed-by: Kenneth Graunke <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5243>
-rw-r--r-- | src/intel/compiler/brw_fs.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp index ab97a07d0d1..3894217c045 100644 --- a/src/intel/compiler/brw_fs.cpp +++ b/src/intel/compiler/brw_fs.cpp @@ -4754,7 +4754,8 @@ lower_sampler_logical_send_gen4(const fs_builder &bld, fs_inst *inst, opcode op, if (coord_components > 0 && (has_lod || shadow_c.file != BAD_FILE || (op == SHADER_OPCODE_TEX && bld.dispatch_width() == 8))) { - for (unsigned i = coord_components; i < 3; i++) + assert(coord_components <= 3); + for (unsigned i = 0; i < 3 - coord_components; i++) bld.MOV(offset(msg_end, bld, i), brw_imm_f(0.0f)); msg_end = offset(msg_end, bld, 3 - coord_components); |