radeonsi/gfx10: fix input VGPRs for legacy VS
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
This commit is contained in:
parent
8d90157d49
commit
a232f5e07c
|
@ -4594,10 +4594,9 @@ static void declare_vs_input_vgprs(struct si_shader_context *ctx,
|
|||
add_arg_assign(fninfo, ARG_VGPR, ctx->i32, &ctx->abi.instance_id);
|
||||
add_arg(fninfo, ARG_VGPR, ctx->i32); /* unused */
|
||||
}
|
||||
} else if (ctx->screen->info.chip_class == GFX10 &&
|
||||
!shader->is_gs_copy_shader) {
|
||||
add_arg(fninfo, ARG_VGPR, ctx->i32); /* user vgpr */
|
||||
} else if (ctx->screen->info.chip_class >= GFX10) {
|
||||
add_arg(fninfo, ARG_VGPR, ctx->i32); /* user vgpr */
|
||||
ctx->param_vs_prim_id = add_arg(fninfo, ARG_VGPR, ctx->i32); /* user vgpr or PrimID (legacy) */
|
||||
add_arg_assign(fninfo, ARG_VGPR, ctx->i32, &ctx->abi.instance_id);
|
||||
} else {
|
||||
add_arg_assign(fninfo, ARG_VGPR, ctx->i32, &ctx->abi.instance_id);
|
||||
|
|
|
@ -1354,11 +1354,15 @@ static void si_shader_vs(struct si_screen *sscreen, struct si_shader *shader,
|
|||
vgpr_comp_cnt = 0; /* only VertexID is needed for GS-COPY. */
|
||||
num_user_sgprs = SI_GSCOPY_NUM_USER_SGPR;
|
||||
} else if (shader->selector->type == PIPE_SHADER_VERTEX) {
|
||||
/* VGPR0-3: (VertexID, InstanceID / StepRate0, PrimID, InstanceID)
|
||||
* If PrimID is disabled. InstanceID / StepRate1 is loaded instead.
|
||||
* StepRate0 is set to 1. so that VGPR3 doesn't have to be loaded.
|
||||
*/
|
||||
vgpr_comp_cnt = enable_prim_id ? 2 : (shader->info.uses_instanceid ? 1 : 0);
|
||||
if (sscreen->info.chip_class >= GFX10) {
|
||||
vgpr_comp_cnt = shader->info.uses_instanceid ? 3 : (enable_prim_id ? 2 : 0);
|
||||
} else {
|
||||
/* VGPR0-3: (VertexID, InstanceID / StepRate0, PrimID, InstanceID)
|
||||
* If PrimID is disabled. InstanceID / StepRate1 is loaded instead.
|
||||
* StepRate0 is set to 1. so that VGPR3 doesn't have to be loaded.
|
||||
*/
|
||||
vgpr_comp_cnt = enable_prim_id ? 2 : (shader->info.uses_instanceid ? 1 : 0);
|
||||
}
|
||||
|
||||
if (info->properties[TGSI_PROPERTY_VS_BLIT_SGPRS]) {
|
||||
num_user_sgprs = SI_SGPR_VS_BLIT_DATA +
|
||||
|
|
Loading…
Reference in New Issue