[Mesa-dev] [PATCH 00/74] ARB_shader_storage_buffer_object (mesa, i965)

Iago Toral itoral at igalia.com
Mon May 18 23:09:41 PDT 2015


On Mon, 2015-05-18 at 15:49 -0700, Jordan Justen wrote:
> On 2015-05-14 07:06:03, Iago Toral Quiroga wrote:
> > Because SSBOs are very similar to UBOs the implementation attempts to
> > reuse the code we already have for UBOs wherever we can. There is a lot
> > of code in the GLSL compiler to deal with UBOs, so we do not want to
> > exactly duplicate that. An "is buffer" flag is added if needed when
> 
> Isn't UBO uniform buffer object?
> https://www.opengl.org/registry/specs/ARB/uniform_buffer_object.txt
> 
> So, maybe 'is uniform' or 'is shared storage' would be better?

Yeah, we can use is_shader_storage instead of is_buffer.

> > reusing UBO data structures so we can tell if a given instance
> > represents uniforms or buffers.
> 
> Yeah, I guess 'interface blocks' are what UBO's generalized into.
> 
> This series leverages the UBO code for SSBO, but I think it would be
> nice to rename shared data structures to reflect the common interface
> block name.
> 
> For example:
> struct gl_uniform_block => struct gl_iblk_buffer
> 
> struct gl_shader::UniformBlocks => IblkBuffers
> 
> lower_ubo_reference => lower_iblk_buffer_reference
> 
> Regarding sharing gl_shader::UniformBlocks with UBO and SSBOs, is this
> a good idea? I guess I can't see a problem using the same array for
> both, but it would be less confusing if we renamed it to a more
> generic name.
> 
> I think this series could get stuck in rebase hell unless we all agree
> beforehand what names make sense. Maybe based on that we should just
> leave a potential rename until after SSBO lands.

Right, I thought about it but decided not to change anything in the end
because of this. I think it would be much easier to do this after the
series lands and once we have an agreement on the new naming.

Iago

> Ian,
> 
> What do you think?
> 
> -Jordan
> 




More information about the mesa-dev mailing list