aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_shader.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2019-11-06 19:06:09 -0500
committerMarek Olšák <[email protected]>2019-11-27 19:28:23 -0500
commit756fc9f1bb09910e65509b522aa0dbc04fb13642 (patch)
treecbcfef0cc948bd829aff2784d34d6230a280bde2 /src/gallium/drivers/radeonsi/si_shader.c
parent42318f9197c3a5e6c715c1b8260275717251848f (diff)
radeonsi/nir: implement subgroup system values for SPIR-V
Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_shader.c')
-rw-r--r--src/gallium/drivers/radeonsi/si_shader.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index bad2bfdf130..b9a70a382cd 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -4904,13 +4904,17 @@ static void create_function(struct si_shader_context *ctx)
&ctx->cs_user_data);
}
+ /* Hardware SGPRs. */
for (i = 0; i < 3; i++) {
if (shader->selector->info.uses_block_id[i]) {
ac_add_arg(&ctx->args, AC_ARG_SGPR, 1, AC_ARG_INT,
&ctx->args.workgroup_ids[i]);
}
}
+ if (shader->selector->info.uses_subgroup_info)
+ ac_add_arg(&ctx->args, AC_ARG_SGPR, 1, AC_ARG_INT, &ctx->args.tg_size);
+ /* Hardware VGPRs. */
ac_add_arg(&ctx->args, AC_ARG_VGPR, 3, AC_ARG_INT,
&ctx->args.local_invocation_ids);
break;