Mesa (main): radv/llvm: always emit a null export even if the FS doesn't discard

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jun 22 07:17:38 UTC 2022


Module: Mesa
Branch: main
Commit: ad3d6d9c6e3f96ec44573e8d9044a24988cc44e5
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ad3d6d9c6e3f96ec44573e8d9044a24988cc44e5

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Tue Jun 21 17:52:29 2022 +0200

radv/llvm: always emit a null export even if the FS doesn't discard

Even with a noop FS, the color blend state can still be non-zero, and
then SPI color related registers won't be 0 and this would hang.

Fixes: bdf3797aeb7 ("ac,radeonsi: don't export null from PS if it has no effect on gfx10+")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17169>

---

 src/amd/vulkan/radv_nir_to_llvm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/amd/vulkan/radv_nir_to_llvm.c b/src/amd/vulkan/radv_nir_to_llvm.c
index 9aaf6287edf..a542af035ba 100644
--- a/src/amd/vulkan/radv_nir_to_llvm.c
+++ b/src/amd/vulkan/radv_nir_to_llvm.c
@@ -1797,7 +1797,7 @@ handle_fs_outputs_post(struct radv_shader_context *ctx)
    if (depth || stencil || samplemask)
       radv_export_mrt_z(ctx, depth, stencil, samplemask);
    else if (!index)
-      ac_build_export_null(&ctx->ac, ctx->shader_info->ps.can_discard);
+      ac_build_export_null(&ctx->ac, true);
 }
 
 static void



More information about the mesa-commit mailing list