Module: Mesa Branch: master Commit: 3a72044ece27f6a06d7819bcd6ba3fcc2f786d0c URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3a72044ece27f6a06d7819bcd6ba3fcc2f786d0c
Author: Rhys Perry <[email protected]> Date: Fri Feb 26 16:05:40 2021 +0000 aco: add missing usable_read2 check A Hitman 2 shader does: read64(local_invocation_index() * 4 - 4). This was likely emitting a ds_read2_b32 on GFX6. For local_invocation_index()=0, because the first dword was out-of-bounds, the second was likely also considered out-of-bounds (even though it's not, at offset 0). Likely fixes https://gitlab.freedesktop.org/mesa/mesa/-/issues/3882 Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Daniel Schürmann <[email protected]> Fixes: 57e6886f981 ("aco: refactor load_lds to use new helpers") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9332> --- src/amd/compiler/aco_instruction_selection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp index 3e49c88ea64..0446870db8d 100644 --- a/src/amd/compiler/aco_instruction_selection.cpp +++ b/src/amd/compiler/aco_instruction_selection.cpp @@ -3483,7 +3483,7 @@ Temp lds_load_callback(Builder& bld, const LoadEmitInfo &info, } else if (bytes_needed >= 8 && align % 8 == 0) { size = 8; op = aco_opcode::ds_read_b64; - } else if (bytes_needed >= 8 && align % 4 == 0 && const_offset % 4 == 0) { + } else if (bytes_needed >= 8 && align % 4 == 0 && const_offset % 4 == 0 && usable_read2) { size = 8; read2 = true; op = aco_opcode::ds_read2_b32; _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
