[Mesa-dev] More UBOs: std140 layout test works.

Ian Romanick idr at freedesktop.org
Thu Jul 5 14:40:16 PDT 2012


On 07/02/2012 05:38 PM, Eric Anholt wrote:
> Here's a new pile of UBO stuff.  It gets things through the linker and
> answers some more API queries.  It doesn't include the driver backend
> yet.  I have some WIP code that's getting a lot of rendering to work,
> so I'm pretty convinced that this chunk of code won't require a lot of
> work.  However, I'm thinking I want to do a lowering pass in the
> middle that simplifies the driver implementation.
>
> Check out the ubo branches of my trees if you just can't get enough
> and want to look ahead at what's coming.  That branch passes all the
> piglit, except for row_major rendering tests, rendering failures on
> maxblocks, and I haven't updated piglit for the conclusion about
> GenBuffers vs BindBufferBase/Range.

Patches 2 through 5 (and Ken's 3.5) are

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

I'm still working through the others.

> There are a couple of things I'm not sure about in the current
> implementation:
>
> - struct gl_uniform_buffer_variable.
>
> There is one of these per ir_variable.  My theory was that we wanted
> something that doesn't get dead-code eliminated (due to std140
> requirements) and was easy to walk over for doing layout at link time.
> But we could potentially pull std140 layout to ast_to_hir time, make
> sure the ir_variables stayed around, and reference those from the
> struct gl_uniform_buffer.  I ended up preventing dead code elimination
> because it was part of making std140 layout work, anyway
>
> - struct gl_uniform_buffer in the linked program.
>
> This is an extra copy of the uniform buffer layouts mostly used to
> answer the getters.  We could potentially just have references to the
> gl_uniform_buffers in one of the linked shaders instead of keeping an
> extra copy in the program.


More information about the mesa-dev mailing list