compiler: add shader_info.cs.user_data_components_amd

This commit is contained in:
Marek Olšák
2019-07-31 21:33:37 -04:00
parent 155789c8e7
commit f0ccc5457a
3 changed files with 5 additions and 0 deletions

View File

@@ -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.

View File

@@ -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",

View File

@@ -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;