mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-11 22:10:30 +01:00
radeonsi: fix NGG VS primitive ID load
When NGG VS need to export primitive ID, it will load it in GS threads, so need to use gs_prim_id arg. Current nir to llvm translator check vs_prim_id present to use vs_prim_id first. Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> 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/17109>
This commit is contained in:
parent
7e1b804992
commit
3542d5ce6b
1 changed files with 2 additions and 1 deletions
|
|
@ -334,7 +334,8 @@ static void declare_vs_input_vgprs(struct si_shader_context *ctx, unsigned *num_
|
|||
} else if (ctx->screen->info.gfx_level >= GFX10) {
|
||||
ac_add_arg(&ctx->args, AC_ARG_VGPR, 1, AC_ARG_INT, NULL); /* user VGPR */
|
||||
ac_add_arg(&ctx->args, AC_ARG_VGPR, 1, AC_ARG_INT,
|
||||
&ctx->args.vs_prim_id); /* user vgpr or PrimID (legacy) */
|
||||
/* user vgpr or PrimID (legacy) */
|
||||
shader->key.ge.as_ngg ? NULL : &ctx->args.vs_prim_id);
|
||||
ac_add_arg(&ctx->args, AC_ARG_VGPR, 1, AC_ARG_INT, &ctx->args.instance_id);
|
||||
} else {
|
||||
ac_add_arg(&ctx->args, AC_ARG_VGPR, 1, AC_ARG_INT, &ctx->args.instance_id);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue