Mesa (main): radeonsi: use ac_build_load_to_sgpr in gfx10_emit_ngg_culling_epilogue

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Nov 16 02:41:11 UTC 2021


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

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Sat Nov  6 14:07:49 2021 -0400

radeonsi: use ac_build_load_to_sgpr in gfx10_emit_ngg_culling_epilogue

This is more correct because we are loading constants into an SGPR even
though there is no effect on behavior in this case.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13700>

---

 src/gallium/drivers/radeonsi/gfx10_shader_ngg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/radeonsi/gfx10_shader_ngg.c b/src/gallium/drivers/radeonsi/gfx10_shader_ngg.c
index 46ad2520f7a..71a14a5f721 100644
--- a/src/gallium/drivers/radeonsi/gfx10_shader_ngg.c
+++ b/src/gallium/drivers/radeonsi/gfx10_shader_ngg.c
@@ -974,7 +974,7 @@ void gfx10_emit_ngg_culling_epilogue(struct ac_shader_abi *abi)
 
       /* Load the viewport state for small prim culling. */
       LLVMValueRef ptr = ac_get_arg(&ctx->ac, ctx->small_prim_cull_info);
-      LLVMValueRef vp = ac_build_load_invariant(&ctx->ac, ptr, ctx->ac.i32_0);
+      LLVMValueRef vp = ac_build_load_to_sgpr(&ctx->ac, ptr, ctx->ac.i32_0);
       vp = LLVMBuildBitCast(builder, vp, ctx->ac.v4f32, "");
       LLVMValueRef vp_scale[2], vp_translate[2];
       vp_scale[0] = ac_llvm_extract_elem(&ctx->ac, vp, 0);



More information about the mesa-commit mailing list