<div dir="ltr">On 17 August 2013 00:37, Ian Romanick <span dir="ltr"><<a href="mailto:idr@freedesktop.org" target="_blank">idr@freedesktop.org</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

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

<br></div><div>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 :)<br></div></div></div>
</div>