[Mesa-dev] [PATCH 2/2] glsl: Use alignment of container record for its first field

Paul Berry stereotype441 at gmail.com
Mon Aug 19 11:26:47 PDT 2013


On 17 August 2013 00:37, Ian Romanick <idr at freedesktop.org> wrote:

> From: Ian Romanick <ian.d.romanick at intel.com>
>
> The first field of a record in a UBO has the aligment of the record
> itself.
>
> Fixes piglit vs-struct-pad, fs-struct-pad, and (with the patch posted to
> the piglit list that extends the test) layout-std140.
>
> NOTE: The bit of strangeness with the version of visit_field without the
> record_type poitner is because that method is pure virtual in the base
> class.  The original implementation of the class did this to ensure
> derived classes remembered to implement that flavor.  Now they can
> implement either flavor but not both.  I don't know a C++ way to enforce
> that.
>
> Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68195
>

Series is:

Reviewed-by: Paul Berry <stereotype441 at gmail.com>

My gut tells me there is some way to rewrite this code to more closely
follow the algorihtm described in the spec.  But I'm having trouble
fleshing that out into a concrete proposal :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130819/63c0dd4d/attachment.html>


More information about the mesa-dev mailing list