On 17 December 2011 10:07, Paul Berry <span dir="ltr">&lt;<a href="mailto:stereotype441@gmail.com">stereotype441@gmail.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="gmail_quote"><div class="im">On 16 December 2011 17:03, Ian Romanick <span dir="ltr">&lt;<a href="mailto:idr@freedesktop.org" target="_blank">idr@freedesktop.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div>On 12/16/2011 03:33 PM, Paul Berry wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
According to the OpenGL 3.0 spec (section 2.15: Transform Feedback):<br>
<br>
     &quot;When quads and polygons are provided to transform feedback with a<br>
     primitive mode of TRIANGLES, they will be tessellated and recorded<br>
     as triangles (the order of tessellation within a primitive is<br>
     undefined). Individual lines or triangles of a strip or fan<br>
     primitive will be extracted and recorded separately.&quot;<br>
<br>
This test verifies the correctness of the tessellation and extraction<br>
from strips and fans.  It does so by feeding the output of transform<br>
feedback back into the GL pipeline and verifying that the rendered<br>
image is the same.<br>
<br>
Verified using the nVidia proprietary driver for Linux.  The nVidia<br>
driver passes all tests except &quot;tessellation polygon flat_last&quot;,<br>
&quot;tessellation quad_strip flat_last&quot;, and &quot;tessellation quads<br>
flat_last&quot;.  These tests fail because the order in which the driver<br>
tessellates polygons and quads fails to preserve the correct provoking<br>
vertex, leading to different results from flatshading.  However, this<br>
is unlikely to cause problems in practice (since transform feedback is<br>
a new feature, and quads and polygons are deprecated), and besides,<br>
the spec does caution that &quot;the order of tessellation within a<br>
primitive is undefined&quot;.  So failures with flatshading on deprecated<br>
primitive types are reported as mere warnings.<br>
</blockquote>
<br></div>
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&#39;t had a chance to dig into it deeply.<br>

</blockquote><div><br></div></div><div>Weird.  Maybe I can have a look when I&#39;m over there on Tuesday.  The only thing I can think of at the moment is that maybe the AMD implementation of polygons isn&#39;t compatible with transform feedback for some reason, and since polygons are a deprecated drawing mode, they decided that it wasn&#39;t worth getting them to work, so they just generate an error instead.</div>
</div></blockquote><div><br>Ok, I&#39;ve investigated the machine, and I&#39;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&#39;s supposed to validate that transform feedback is in GL_TRIANGLES mode when rendering polygons.<br>
<br>Since the tests work fine on nVidia (except where noted) and on Sandy Bridge (except where there are known bugs) I&#39;m going to call them good.<br></div></div>