[Bug 104360] Specifying an explicit location for an array output messes up transform feedback

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Jan 9 15:02:13 UTC 2018


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

--- Comment #1 from Neil Roberts <nroberts at igalia.com> ---
I think the problem is that the XFB linking code assumes that float arrays are
packed into components of a varying location. So for example an array like
float[6] will end up generating two XFB outputs, one reading from a vec4
varying and the other from a vec2 varying. This mostly works because
lower_packed_varyings usually lowers the varying arrays to floats. However it
doesn’t do this if the varying has an explicit location so the generated
outputs read from the wrong varyings. It looks like link_varyings only takes
into account the types of varyings before the optimisation so it doesn’t know
if the varyings have been packed or not. Maybe a way to fix it would be to get
it to look out the optimised varyings.

Incidentally for the SPIR-V linker it is already using the nir_variables to
determine the XFB outputs so it already has the optimised types and this is
easier to fix. (I was previously planning to fix this bug for GLSL and do the
same thing for SPIR-V, but now I think fixing it for GLSL is harder).

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


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