nir/glsl: Use shader_prog->Name for naming the NIR shader
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 9 Oct 2015 01:36:27 +0000 (18:36 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 15 Oct 2015 14:31:09 +0000 (07:31 -0700)
This has the better name to use. Aparently, sh->Name is usually 0.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Neil Roberts <neil@linux.intel.com>
src/glsl/nir/glsl_to_nir.cpp

index 0e4289b32eb801a4a922752d0cd7696843d35c1f..5aba8f80b6b002bb5a47b94ea52dc6b838b5aa75 100644 (file)
@@ -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);
    shader->info.num_textures = num_textures;
    shader->info.num_ubos = sh->NumBufferInterfaceBlocks;
    shader->info.num_abos = shader_prog->NumAtomicBuffers;