[Piglit] [PATCH v3] Add a test of tessellation of transform feedback primitives.

Paul Berry stereotype441 at gmail.com
Tue Dec 20 13:06:20 PST 2011

On 17 December 2011 10:07, Paul Berry <stereotype441 at gmail.com> wrote:

> On 16 December 2011 17:03, Ian Romanick <idr at freedesktop.org> wrote:
>> On 12/16/2011 03:33 PM, Paul Berry wrote:
>>> According to the OpenGL 3.0 spec (section 2.15: Transform Feedback):
>>>     "When quads and polygons are provided to transform feedback with a
>>>     primitive mode of TRIANGLES, they will be tessellated and recorded
>>>     as triangles (the order of tessellation within a primitive is
>>>     undefined). Individual lines or triangles of a strip or fan
>>>     primitive will be extracted and recorded separately."
>>> This test verifies the correctness of the tessellation and extraction
>>> from strips and fans.  It does so by feeding the output of transform
>>> feedback back into the GL pipeline and verifying that the rendered
>>> image is the same.
>>> Verified using the nVidia proprietary driver for Linux.  The nVidia
>>> driver passes all tests except "tessellation polygon flat_last",
>>> "tessellation quad_strip flat_last", and "tessellation quads
>>> flat_last".  These tests fail because the order in which the driver
>>> tessellates polygons and quads fails to preserve the correct provoking
>>> vertex, leading to different results from flatshading.  However, this
>>> is unlikely to cause problems in practice (since transform feedback is
>>> a new feature, and quads and polygons are deprecated), and besides,
>>> the spec does caution that "the order of tessellation within a
>>> primitive is undefined".  So failures with flatshading on deprecated
>>> primitive types are reported as mere warnings.
>> I tried this on an AMD system, and I got some odd results.  On all of the
>> polygon tests, the second time it goes into draw() GL_INVALID_OPERATION is
>> generated.  It looks like the only difference between the two invocations
>> is the program used to draw.  I haven't had a chance to dig into it deeply.
> Weird.  Maybe I can have a look when I'm over there on Tuesday.  The only
> thing I can think of at the moment is that maybe the AMD implementation of
> polygons isn't compatible with transform feedback for some reason, and
> since polygons are a deprecated drawing mode, they decided that it wasn't
> worth getting them to work, so they just generate an error instead.

Ok, I've investigated the machine, and I'm pretty convinced that the AMD
implementation of transform feedback is buggy.  When the drawing mode is
GL_POLYGON and transform feedback is active, it raises GL_INVALID_OPERATION
on the DrawArrays() call.  Perhaps they messed up the check that's supposed
to validate that transform feedback is in GL_TRIANGLES mode when rendering

Since the tests work fine on nVidia (except where noted) and on Sandy
Bridge (except where there are known bugs) I'm going to call them good.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20111220/46be1429/attachment.htm>

More information about the Piglit mailing list