aco/gfx11: export mrtz in discard early exit for non-color shaders
authorRhys Perry <pendingchaos02@gmail.com>
Thu, 15 Dec 2022 20:31:52 +0000 (20:31 +0000)
committerEric Engestrom <eric@engestrom.ch>
Thu, 29 Dec 2022 19:25:30 +0000 (19:25 +0000)
commite6e692e19a918b30fe3a191def9c68998348c714
tree4e82f8325c544c8a7aa14665ca1c57035e3ca965
parent7a9c1e17feea161e22386542eb145bc84ea76924
aco/gfx11: export mrtz in discard early exit for non-color shaders

If a shader doesn't export any color targets and instead only exports
mrtz, the discard early exit block should match.

Fixes artifacts on Lara in Rise of the Tomb Raider benchmark and hair in
The Witcher 3 (classic).

https://reviews.llvm.org/D128185

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Fixes: bc8da20dda6 ("aco: export MRT0 instead of NULL on GFX11")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20345>
(cherry picked from commit 192486b7aa5ef3b24516e16b0e219fad7032fb7c)
.pick_status.json
src/amd/compiler/aco_instruction_selection.cpp
src/amd/compiler/aco_ir.h
src/amd/compiler/aco_lower_to_hw_instr.cpp