[Mesa-dev] [Bug 109532] ir_variable has maximum access out of bounds -- but it's not out of bounds

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Mar 1 14:20:52 UTC 2019


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

--- Comment #51 from asimiklit <andrey.simiklit at gmail.com> ---
We have one more answer from Piers Daniell:
  "We discussed this in the OpenGL/ES working group meeting and agreed that
   eliminating unused elements from the interface block array is not desirable. 
   There is no statement in the spec that this takes place and it would be
highly 
   implementation dependent if it happens. If the application has an
"interface" in
   the shader they need to match up with the API it would be quite confusing to
have
   the binding point get compacted. So the answer is no, the binding points
aren't 
   affected by unused elements in the interface block array."

So looks like according to it we should remove this optimization at all.
Regardless whether explicit or implicit case we should not optimize it.
I guess we can remove this optimization for 'packed' blocks by
removing this exclusive cases and just handle it like 'std140' and 'shared'
layouts:

https://gitlab.freedesktop.org/mesa/mesa/blob/master/src/compiler/glsl/link_uniform_block_active_visitor.cpp#L254-261

and

https://gitlab.freedesktop.org/mesa/mesa/blob/master/src/compiler/glsl/link_uniform_block_active_visitor.cpp#L170-171

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20190301/8c0dcde4/attachment-0001.html>


More information about the mesa-dev mailing list