[Mesa-dev] [PATCH] nir/glsl: Use shader_prog->Name for naming the NIR shader

Neil Roberts neil at linux.intel.com
Thu Oct 15 06:03:39 PDT 2015


Ping, could you please push this patch? It's a pain to use the optimise
debug output without it. Thanks.

Reviewed-by: Neil Roberts <neil at linux.intel.com>

- Neil

Jason Ekstrand <jason at jlekstrand.net> writes:

> This has the better name to use. Aparently, sh->Name is usually 0.
> ---
>  src/glsl/nir/glsl_to_nir.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/glsl/nir/glsl_to_nir.cpp b/src/glsl/nir/glsl_to_nir.cpp
> index 6e1dd84..3284bdc 100644
> --- a/src/glsl/nir/glsl_to_nir.cpp
> +++ b/src/glsl/nir/glsl_to_nir.cpp
> @@ -150,7 +150,7 @@ glsl_to_nir(const struct gl_shader_program *shader_prog,
>        if (sh->Program->SamplersUsed & (1 << i))
>           num_textures = i;
>  
> -   shader->info.name = ralloc_asprintf(shader, "GLSL%d", sh->Name);
> +   shader->info.name = ralloc_asprintf(shader, "GLSL%d", shader_prog->Name);
>     if (shader_prog->Label)
>        shader->info.label = ralloc_strdup(shader, shader_prog->Label);
>     shader->info.num_textures = num_textures;
> -- 
> 2.5.0.400.gff86faf
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list