diff options
author | Nicolai Hähnle <[email protected]> | 2018-08-31 19:58:35 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2019-07-03 15:51:13 -0400 |
commit | 591537c7fa2aedb7c6dca3c2dd76a3810c94728b (patch) | |
tree | afd9d46b1467ad4667369b366bbc4baf93c466cd | |
parent | f3b9a372781b092334d82c29d8c687e90ca0a7cd (diff) |
radeonsi/gfx10: use correct VGPR for instance ID in LS shader
Acked-by: Bas Nieuwenhuizen <[email protected]>
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 7f4fc22f175..a99a58e5675 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -4547,8 +4547,13 @@ static void declare_vs_input_vgprs(struct si_shader_context *ctx, add_arg_assign(fninfo, ARG_VGPR, ctx->i32, &ctx->abi.vertex_id); if (shader->key.as_ls) { ctx->param_rel_auto_id = add_arg(fninfo, ARG_VGPR, ctx->i32); - add_arg_assign(fninfo, ARG_VGPR, ctx->i32, &ctx->abi.instance_id); - add_arg(fninfo, ARG_VGPR, ctx->i32); /* unused */ + if (ctx->screen->info.chip_class >= GFX10) { + add_arg(fninfo, ARG_VGPR, ctx->i32); /* user VGPR */ + 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); + 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 */ |