From f0ccc5457aa7302960f1c43e2e8243edab61991d Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Wed, 31 Jul 2019 21:33:37 -0400 Subject: compiler: add shader_info.cs.user_data_components_amd --- src/compiler/shader_info.h | 1 + src/gallium/auxiliary/nir/tgsi_to_nir.c | 3 +++ src/gallium/drivers/radeonsi/si_shader_nir.c | 1 + 3 files changed, 5 insertions(+) (limited to 'src') diff --git a/src/compiler/shader_info.h b/src/compiler/shader_info.h index 15150aa9b2e..bd5d2fa0b6c 100644 --- a/src/compiler/shader_info.h +++ b/src/compiler/shader_info.h @@ -261,6 +261,7 @@ typedef struct shader_info { unsigned local_size[3]; bool local_size_variable; + char user_data_components_amd; /** * Size of shared variables accessed by the compute shader. diff --git a/src/gallium/auxiliary/nir/tgsi_to_nir.c b/src/gallium/auxiliary/nir/tgsi_to_nir.c index 1195d522239..a23ed4d685f 100644 --- a/src/gallium/auxiliary/nir/tgsi_to_nir.c +++ b/src/gallium/auxiliary/nir/tgsi_to_nir.c @@ -2455,6 +2455,9 @@ ttn_compile_init(const void *tgsi_tokens, case TGSI_PROPERTY_CS_FIXED_BLOCK_DEPTH: s->info.cs.local_size[2] = value; break; + case TGSI_PROPERTY_CS_USER_DATA_COMPONENTS_AMD: + s->info.cs.user_data_components_amd = value; + break; default: if (value) { fprintf(stderr, "tgsi_to_nir: unhandled TGSI property %u = %u\n", diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c b/src/gallium/drivers/radeonsi/si_shader_nir.c index 0f3a11268f7..524af0e0a19 100644 --- a/src/gallium/drivers/radeonsi/si_shader_nir.c +++ b/src/gallium/drivers/radeonsi/si_shader_nir.c @@ -491,6 +491,7 @@ void si_nir_scan_shader(const struct nir_shader *nir, info->properties[TGSI_PROPERTY_CS_FIXED_BLOCK_WIDTH] = nir->info.cs.local_size[0]; info->properties[TGSI_PROPERTY_CS_FIXED_BLOCK_HEIGHT] = nir->info.cs.local_size[1]; info->properties[TGSI_PROPERTY_CS_FIXED_BLOCK_DEPTH] = nir->info.cs.local_size[2]; + info->properties[TGSI_PROPERTY_CS_USER_DATA_COMPONENTS_AMD] = nir->info.cs.user_data_components_amd; } i = 0; -- cgit v1.2.3