glsl: Respect std430 layout in lower_buffer_access
authorFlorian Will <florian.will@gmail.com>
Fri, 5 Jan 2018 14:33:31 +0000 (15:33 +0100)
committerTimothy Arceri <tarceri@itsqueeze.com>
Mon, 8 Jan 2018 02:42:09 +0000 (13:42 +1100)
commit7e025def6d7d3d6bf94facd6ec6d956f40cbb31e
tree19ec8925eb7eb3ae4f8e4241226f5881ebf12090
parentefd2169c1a40f552b3a6a0b03bb787255b8febf6
glsl: Respect std430 layout in lower_buffer_access

Respect the std430 rules for determining offset and size of struct
members when using a std430 buffer. std140 rules lead to wrong buffer
offsets in that case.

Fixes my test case attached in Bugzilla. No piglit changes.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104492
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/compiler/glsl/lower_buffer_access.cpp