[Mesa-dev] [PATCH 1/6] glsl: make use of separate UBO and SSBO lists

Timothy Arceri timothy.arceri at collabora.com
Mon Apr 4 08:23:44 UTC 2016


On Sun, 2016-04-03 at 23:27 -0700, Kenneth Graunke wrote:
> On Sunday, April 3, 2016 9:16:28 PM PDT Timothy Arceri wrote:
> [snip]
> > 
> > @@ -3295,8 +3296,8 @@ should_add_buffer_variable(struct
> > gl_shader_program 
> *shProg,
> > 
> >     if (type != GL_BUFFER_VARIABLE)
> >        return true;
> >  
> > -   for (unsigned i = 0; i < shProg->NumBufferInterfaceBlocks; i++)
> > {
> > -      const char *block_name = shProg-
> > >BufferInterfaceBlocks[i].Name;
> > +   for (unsigned i = 0; i < shProg->NumShaderStorageBlocks; i++) {
> > +      const char *block_name = shProg-
> > >ShaderStorageBlocks[i].Name;
> >        block_name_len = strlen(block_name);
> It looks like should_add_buffer_variable() is used for both uniform
> blocks and shader storage blocks.  I don't think this is correct.
> 
> The other hunks look fine.

    if (type != GL_BUFFER_VARIABLE)
       return true;

Above returns true for uniform blocks


More information about the mesa-dev mailing list