Bug 50925 - GL_PRIMITIVES_GENERATED query incorrectly includes primitive restart index
Summary: GL_PRIMITIVES_GENERATED query incorrectly includes primitive restart index
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Jordan Justen
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-09 19:06 UTC by Kenneth Graunke
Modified: 2012-07-09 04:17 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Kenneth Graunke 2012-06-09 19:06:11 UTC
Our software implementation of the GL_PRIMITIVES_GENERATED query (from EXT_transform_feedback or GL 3.0) incorrectly includes the primitive restart index as a primitive generated.

For example, calling glDrawElements(GL_POINTS, 10, GL_UNSIGNED_SHORT, ...) with elements [0, 1, 2, 0xffff, 3, 4, 5, 0xffff, 6, 7] will cause GL_PRIMITIVES_GENERATED to report 10 rather than the correct value of 8.

The count_tessellated_primitives() in vbo_exec.c is responsible for coming up with this count.  For GL_POINTS, this is return prim->count.

This can be tested with:
./bin/oglconform -s -minFmt -v 4 -suite all -test primitive-restart basic.drawelements.points

Fixing this will probably fix a number of oglconform test cases.
Comment 1 Jordan Justen 2012-07-09 04:17:37 UTC
Fixed in 8aa78c


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.