diff options
author | Kenneth Graunke <[email protected]> | 2016-11-02 13:35:30 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2016-11-03 01:42:37 -0700 |
commit | 8df4aebc94337983194cc72c817c08ee938117a1 (patch) | |
tree | f0606834e9e1cf4f8d14560ffa061a4a80b672d7 /src/compiler/glsl/lower_ubo_reference.cpp | |
parent | d2861d682a235993844989f7742c9539c3e10245 (diff) |
glsl: Update deref types when resizing implicitly sized arrays.
At link time, we resolve the size of implicitly sized arrays.
When doing so, we update the type of the ir_variables. However,
we neglected to update the type of ir_dereference nodes which
reference those variables.
It turns out array_resize_visitor (for GS/TCS/TES interface array
handling) already did 2/3 of the cases for this, so we can simply
refactor the code and reuse it.
This fixes:
GL45-CTS.shader_storage_buffer_object.basic-syntax
GL45-CTS.shader_storage_buffer_object.basic-syntaxSSO
which have an SSBO containing an implicitly sized array, followed
by some other members. setup_buffer_access uses the dereference
types to compute offsets to fields, and it had a stale type where
the implicitly sized array's length was still 0 instead of the
actual length.
While we're here, we can also fix update_array_sizes to properly
update deref types as well, fixing a FINISHME from 2010.
Cc: [email protected]
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/compiler/glsl/lower_ubo_reference.cpp')
0 files changed, 0 insertions, 0 deletions