nir/print: add compute shader info
authorRob Clark <robdclark@gmail.com>
Thu, 6 Apr 2017 15:56:23 +0000 (11:56 -0400)
committerRob Clark <robdclark@gmail.com>
Fri, 14 Apr 2017 16:46:12 +0000 (12:46 -0400)
Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
src/compiler/nir/nir_print.c

index af105557123836b0e908666e7b65304575442e36..e6c5c9c830df060a72ef10923b5271664d392551 100644 (file)
@@ -1169,6 +1169,19 @@ nir_print_shader_annotated(nir_shader *shader, FILE *fp,
    if (shader->info->label)
       fprintf(fp, "label: %s\n", shader->info->label);
 
+   switch (shader->stage) {
+   case MESA_SHADER_COMPUTE:
+      fprintf(fp, "local-size: %u, %u, %u%s\n",
+              shader->info->cs.local_size[0],
+              shader->info->cs.local_size[1],
+              shader->info->cs.local_size[2],
+              shader->info->cs.local_size_variable ? " (variable)" : "");
+      fprintf(fp, "shared-size: %u\n", shader->info->cs.shared_size);
+      break;
+   default:
+      break;
+   }
+
    fprintf(fp, "inputs: %u\n", shader->num_inputs);
    fprintf(fp, "outputs: %u\n", shader->num_outputs);
    fprintf(fp, "uniforms: %u\n", shader->num_uniforms);