[Mesa-dev] [PATCH] nir/print: add compute shader info

Alejandro Piñeiro apinheiro at igalia.com
Fri Apr 14 14:43:51 UTC 2017


Reviewed-by: Alejandro Piñeiro <apinheiro at igalia.com>

On 14/04/17 16:25, Rob Clark wrote:
> Signed-off-by: Rob Clark <robdclark at gmail.com>
> ---
> noticed this hanging out on a branch.. guess I forgot to send it
> to list..
>
>  src/compiler/nir/nir_print.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
>
> diff --git a/src/compiler/nir/nir_print.c b/src/compiler/nir/nir_print.c
> index af10555..e6c5c9c 100644
> --- a/src/compiler/nir/nir_print.c
> +++ b/src/compiler/nir/nir_print.c
> @@ -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);



More information about the mesa-dev mailing list