compiler: add shader_info.cs.user_data_components_amd
authorMarek Olšák <marek.olsak@amd.com>
Thu, 1 Aug 2019 01:33:37 +0000 (21:33 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Mon, 12 Aug 2019 18:52:17 +0000 (14:52 -0400)
src/compiler/shader_info.h
src/gallium/auxiliary/nir/tgsi_to_nir.c
src/gallium/drivers/radeonsi/si_shader_nir.c

index 15150aa9b2e0f060ad01e403965455c72c0d57eb..bd5d2fa0b6ca75d34e230f356a42ac41df9ea549 100644 (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.
index 1195d522239b792af4b4f2741c4e8780ed3c3d1d..a23ed4d685fccd76003174c875565d8d7ccf180d 100644 (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",
index 0f3a11268f710e4f7d2c4226c5b369578ce17bb7..524af0e0a193066d879985b9f29ee654bf31adc5 100644 (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;