Transform Feedback and gl_PrimitiveID
Sven-Kristofer Pilz <[email protected]>
| Newsgroups | gmane.comp.video.mesa3d.user |
|---|---|
| Message-ID | <CAHa4YkxuF9BChRLimLps5JPAV=gV7R=NZ6549NGCaKJD8PpDXQ@mail.gmail.com> |
Hi everybody!
I'm trying to use transform feedback on a program whose fragment
shader is using gl_PrimitiveID. Without transform feedback it works as
expected, but if it's enabled, gl_PrimitiveID always seems to be 0.
It's a 3.3 core profile context with Mesa 11.0.5 on Intel Sandybridge.
When running the same with NVIDIA's official blob on a Fermi card, it
works as expected.
Example vertex and fragment shader:
> void main() {
> gl_Position = camera * vertex;
> }
> layout(location = 0) out uint id;
> void main() {
> id = uint(gl_PrimitiveID + 1);
> }
Where gl_Position is captured and glDrawElements(GL_TRIANGLES, ...)
is used.
Is there something with transform feedback and gl_PrimitiveID, is this
maybe undefined behavior in 3.3?
What is going on? :-)
Thanks!
Sven
_______________________________________________
mesa-users mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-users