Module: Mesa Branch: staging/20.0 Commit: f27e8fc0b3f5b0becf05991253af0ed131708e5d URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f27e8fc0b3f5b0becf05991253af0ed131708e5d
Author: Jason Ekstrand <ja...@jlekstrand.net> Date: Sun Apr 26 09:48:16 2020 -0500 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: mesa-sta...@lists.freedesktop.org Reviewed-by: Kenneth Graunke <kenn...@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5243> (cherry picked from commit 94aa7997e45b5314d169bbee5bf22ad368c2fd25) --- .pick_status.json | 2 +- src/intel/compiler/brw_fs.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 86b9c48a6db..ef71127380a 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -337,7 +337,7 @@ "description": "intel/fs: Fix unused texture coordinate zeroing on Gen4-5", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": null }, diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp index 6f7f5f02706..3b6ddfa7c4e 100644 --- a/src/intel/compiler/brw_fs.cpp +++ b/src/intel/compiler/brw_fs.cpp @@ -4669,7 +4669,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); _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit