Summary: |
Transform feedback uses incorrect interleaving if a previous draw did not write gl_Position |
Product: |
Mesa
|
Reporter: |
James Legg <lankyleggy> |
Component: |
Mesa core | Assignee: |
Carl Worth <cworth> |
Status: |
RESOLVED
FIXED
|
QA Contact: |
mesa-dev |
Severity: |
normal
|
|
|
Priority: |
medium
|
CC: |
chrisf, felix.schwarz
|
Version: |
git | |
|
Hardware: |
x86-64 (AMD64) | |
|
OS: |
Linux (All) | |
|
Whiteboard: |
|
i915 platform:
|
|
i915 features:
|
|
Attachments: |
Reproducer
|
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.
Created attachment 112993 [details] Reproducer After a draw with a shader program that has transform feedback varyings set, and has a geometry shader that does not write to gl_Position, subsequent uses of transform feedback with interleaved transform feedback attributes can out write attributes in the wrong order, or with some missing. In every case of this I've seen, the space used for each vertex's attributes was correct but the offset within the vertex's data is wrong for some attributes. The attached program demonstrates the problem. The second draw call writes three transform feedback attributes. They are a float, a vec3, and another float. When the transform feedback buffer is read back, the last component of the vec3 has the value that should have been written to the second float, and the second float ends up with 0. The output is in the correct order if the first draw call is removed, if the first draw's geometry shader is changed to write to gl_Position, or if the geometry shader for the second draw writes only compile time constants to the transform feedback attributes. I this bug is consistently reproducible for me. I am using Intel Haswell graphics, x86_64 architecture, with Fedora 21 and mesa git b930ef1ce8222156464cfd1e744c9598ace5efbb master branch. The Fedora 21 mesa 10.4.1 and 10.4.2 packages also reproduce the bug.