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@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13700>
This commit is contained in:
Marek Olšák 2021-11-06 14:07:49 -04:00 committed by Marge Bot
parent f8a0aa6852
commit 963b7475a9

View file

@ -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);