On 27 December 2011 13:03, Eric Anholt <span dir="ltr"><<a href="mailto:eric@anholt.net">eric@anholt.net</a>></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="im">On Mon, 19 Dec 2011 15:52:35 -0800, Paul Berry <<a href="mailto:stereotype441@gmail.com">stereotype441@gmail.com</a>> wrote:<br>
> This patch modifies the transform feedback tessellation test to check<br>
> that the query GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN counts the<br>
> correct number of primitives for all primitive types. Previously, we<br>
> were only testing correct behavior of GL_TRANSFORM_FEEDBACK_PRIMITIVES<br>
> in the "position" test, which always draws triangles.<br>
><br>
> Verified that these tests still pass on the nVidia proprietary Linux<br>
> driver.<br>
> ---<br>
><br>
> This patch depends on "[PATCH v3] Add a test of tessellation of<br>
> transform feedback primitives.", which is still under review on the<br>
> Piglit mailing list, pending an investigation into why some of the<br>
> tests fail on an AMD system.<br>
<br>
</div>This test seems like a relevant one to be testing the primitives<br>
queries. But why only WRITTEN and not GENERATED as well?<br>
</blockquote></div><br>Just trying to save myself some time. Prior to this patch, we already had tests that verify that when drawing GL_TRIANGLES, there is agreement among GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN, GL_PRIMITIVES_GENERATED, and the number of vertices written into the transform feedback buffer. And the tessellation test already verified that the correct number of vertices were written into the transform feedback buffer in all drawing modes. That really should be adequate for verifying correct operation on most hardware. However, on Mesa i965, since we implement the GL_TRANSFORM_FEEDBACK_PRIMITIVES and GL_PRIMITIVES_GENERATED queries in software, it was important to test that the software path for counting vertices was correct in all drawing modes. Since Mesa i965 uses the same software path for computing GL_TRANSFORM_FEEDBACK_PRIMITIVES and GL_PRIMITIVES_GENERATED, I know that this test is adequate for testing Mesa i965.<br>
<br>I am still discovering and fixing transform feedback bugs on Mesa i965, so making the tests perfect isn't my top priority yet. Once I've written all the tests I need, and fixed all the bugs they discover, I'll loop back and revise patches like this one.<br>