glsl: fix lowering of UBO references of named blocks
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Mon, 31 Oct 2016 13:03:10 +0000 (14:03 +0100)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Thu, 3 Nov 2016 08:57:25 +0000 (09:57 +0100)
commit37d646c1b3626ad54ed93a784824af7b5abe8a99
tree4622f4a354e8a0f2e4017f859b745299ff653559
parent8df4aebc94337983194cc72c817c08ee938117a1
glsl: fix lowering of UBO references of named blocks

When a UBO reference has the form block_name.foo where block_name refers
to a block where the first member has a non-zero offset, the base offset
was incorrectly added to the reference.

Fixes an assertion triggered in debug builds by
GL45-CTS.enhanced_layouts.uniform_block_layout_qualifier_conflict. That test
doesn't properly check for correct execution in this case, so I am also
going to send out a piglit test.

Cc: 13.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
src/compiler/glsl/lower_ubo_reference.cpp