[Bug 92909] Offset/alignment issue with layout std140 and vec3

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Nov 11 14:57:03 PST 2015


https://bugs.freedesktop.org/show_bug.cgi?id=92909

--- Comment #1 from Kenneth Graunke <kenneth at whitecape.org> ---
Tracked this down.

The vec4 backend's UBO loading code is broken for indirect offsets that are not
vec4 aligned (multiples of 16 bytes).  Notably, the scalar backend shifts right
by 2 (bytes / 4 -> DWords), while the vector backend shifts right by 4 (bytes /
4 -> DWords, DWords / 4 -> vec4 blocks).  It tries to load a vec4, then swizzle
the result...based on const_offset.  But we don't have any swizzling to
compensate for offset % 16 != 0.

The app's second UBO load uses offsets of 12 and 44, which are not
vec4-aligned, so it hits this bug.

Unfortunately, the fix isn't terribly simple.  One option is to try and add
that swizzling...but this means having to do indirect addressing.  Another is
to convert the vec4 backend to use DWord aligned surfaces, which is a pretty
big change as well.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20151111/a92c2a56/attachment.html>


More information about the intel-3d-bugs mailing list