Bug 96421

Summary: gl_VertexID sequence is not correct in non-index drawing
Product: Mesa Reporter: Dongseong Hwang <dongseong.hwang>
Component: Drivers/DRI/i965Assignee: Dongseong Hwang <dongseong.hwang>
Status: RESOLVED INVALID QA Contact: Intel 3D Bugs Mailing List <intel-3d-bugs>
Severity: major    
Priority: medium CC: kenneth
Version: 11.2   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: gl_VertexID sequence is not correct in non-index drawing
gl_vertexID pic

Description Dongseong Hwang 2016-06-07 08:46:13 UTC
Created attachment 124384 [details]
gl_VertexID sequence is not correct in non-index drawing

OpenGL ES 3.0 Mesa 11.2.0 in HSW generates incorrect gl_VertexID sequence.

e.g. when I draw as follows
glDrawArrays(GL_POINTS, 0, 1000);

max gl_VertexID is not 999, but about 1200, while total vertext number is 1000.
It means gl_VertexID skips some number.

In the attachment, red points are inside max gl_VertexID, while green points are outside max gl_VertexID. You can see lots of skipped gl_VertexID also.
Comment 1 Dongseong Hwang 2016-06-07 08:47:04 UTC
Created attachment 124385 [details]
gl_vertexID pic
Comment 2 Dongseong Hwang 2016-06-08 12:48:15 UTC
https://bugs.freedesktop.org/attachment.cgi?id=124401 patch is needed to create real GLES3 context, according to https://bugs.freedesktop.org/show_bug.cgi?id=96420

you can compile by
$ g++ -lGLESv2 -lglfw -Wall -g cpp-tutorial-4-gles3-pointcloud.cpp

By the way, this gl_VertexID issue still exists in GLES3 context.
Comment 3 Mark Janes 2016-06-08 16:11:47 UTC
Mesa 12.0 passes dEQP for GLES3.0.  For that reason, it seems likely that the sample program is incorrect, not the driver.

Before driver developers spend time debugging this program, I think it is sensible to ask the following questions:

 1) is this a regression?
 2) do GLES3.0 drivers for other hardware render the program differently?
Comment 4 Dongseong Hwang 2016-06-08 17:37:08 UTC
Let me answer
1) I don't know. Probably nobody never raise this issue.
2) Unfortunately, I have only Intel GPU.

I can say it's bug as far as I understand gl_VertexID
Comment 5 Annie 2017-02-10 22:38:38 UTC
Dear Reporter,

This Mesa bug has been in the "NEEDINFO" status for over 60 days. I am closing this bug based on lack of response but feel free to reopen if resolution is still needed. Please ensure you're supplying the correct information as requested.

Thank you.

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.