ac/llvm: vs_rel_patch_id can also be fixed up

It's currently used when LS store output to LDS.
The LS/HS bug fix seems does not affect this case.
But we'd better treat it as other fixed args.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22045>
This commit is contained in:
Qiang Yu
2023-03-20 11:49:20 +08:00
committed by Marge Bot
parent 7ab7eccddd
commit 297f97a42b
4 changed files with 8 additions and 7 deletions

View File

@@ -56,8 +56,6 @@ struct radv_shader_context {
LLVMValueRef descriptor_sets[MAX_SETS];
LLVMValueRef vs_rel_patch_id;
LLVMValueRef gs_wave_id;
uint64_t output_mask;
@@ -626,9 +624,9 @@ ac_nir_fixup_ls_hs_input_vgprs(struct radv_shader_context *ctx)
ctx->abi.instance_id =
LLVMBuildSelect(ctx->ac.builder, hs_empty, ac_get_arg(&ctx->ac, ctx->args->ac.vertex_id),
ctx->abi.instance_id, "");
ctx->vs_rel_patch_id =
ctx->abi.vs_rel_patch_id =
LLVMBuildSelect(ctx->ac.builder, hs_empty, ac_get_arg(&ctx->ac, ctx->args->ac.tcs_rel_ids),
ctx->vs_rel_patch_id, "");
ctx->abi.vs_rel_patch_id, "");
ctx->abi.vertex_id =
LLVMBuildSelect(ctx->ac.builder, hs_empty, ac_get_arg(&ctx->ac, ctx->args->ac.tcs_patch_id),
ctx->abi.vertex_id, "");
@@ -744,7 +742,7 @@ ac_translate_nir_to_llvm(struct ac_llvm_compiler *ac_llvm,
if (args->ac.vertex_id.used)
ctx.abi.vertex_id = ac_get_arg(&ctx.ac, args->ac.vertex_id);
if (args->ac.vs_rel_patch_id.used)
ctx.vs_rel_patch_id = ac_get_arg(&ctx.ac, args->ac.vs_rel_patch_id);
ctx.abi.vs_rel_patch_id = ac_get_arg(&ctx.ac, args->ac.vs_rel_patch_id);
if (args->ac.instance_id.used)
ctx.abi.instance_id = ac_get_arg(&ctx.ac, args->ac.instance_id);