[Piglit] [PATCH] Test interaction of primitive restart and transform feedback.

Paul Berry stereotype441 at gmail.com
Mon Apr 8 10:54:43 PDT 2013


On 8 April 2013 10:18, Eric Anholt <eric at anholt.net> wrote:

> Paul Berry <stereotype441 at gmail.com> writes:
> > +     switch (test_mode) {
> > +     case TEST_MODE_GENERATED:
> > +             glBeginQuery(GL_PRIMITIVES_GENERATED, query);
> > +             glBeginTransformFeedback(GL_TRIANGLES);
> > +             glDrawElements(GL_TRIANGLE_STRIP, 9, GL_UNSIGNED_BYTE,
> NULL);
> > +             glEndTransformFeedback();
> > +             glEndQuery(GL_PRIMITIVES_GENERATED);
> > +             pass = check_query_result(query, 4);
> > +             break;
> > +     case TEST_MODE_WRITTEN:
> > +             glBeginQuery(GL_PRIMITIVES_GENERATED, query);
>

Crap, I just noticed that the line above is supposed to be
GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN.  I'll fix that.


> > +             glBeginTransformFeedback(GL_TRIANGLES);
> > +             glDrawElements(GL_TRIANGLE_STRIP, 9, GL_UNSIGNED_BYTE,
> NULL);
> > +             glEndTransformFeedback();
> > +             glEndQuery(GL_PRIMITIVES_GENERATED);
>

Same fix here too.


> > +             pass = check_query_result(query, 4);
> > +             break;
> > +     case TEST_MODE_FLUSH:
> > +             glBeginTransformFeedback(GL_TRIANGLES);
> > +             glDrawElements(GL_TRIANGLE_STRIP, 9, GL_UNSIGNED_BYTE,
> NULL);
> > +             glFlush();
> > +             glDrawElements(GL_TRIANGLE_STRIP, 4, GL_UNSIGNED_BYTE,
> > +                            (void *) (9 * sizeof(GLubyte)));
> > +             glEndTransformFeedback();
> > +             pass = check_xfb_result();
> > +             break;
>
> I'd like to see this path also check_query_result -- I think we've got a
> better way to change the driver, but I worry about messing up the
> queries.  Other than that, looks good to me.
>
>
(We talked about this in person, just keeping the list up to date).
Unfortunately, there's a snag with that: this test is trying to exercise a
Mesa/i965 bug which only occurs when transform feedback is active and no
queries are in progress.  So if we made that change the bug would go into
hiding again.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20130408/bc67b645/attachment.html>


More information about the Piglit mailing list