[Piglit] [piglit] should error be generated in spec/ARB_occlusion_query2/api

Zhao, William (SRDC SW GR) William1.Zhao at amd.com
Tue Dec 3 23:05:57 PST 2013


I have a question about "spec/arb_occlusion_query2/api.c", in function test_error_end_wrong_target(), it goes through the following sequence.
When the second glBeginQuery() is called, it expects GL_NO_ERROR to be generated afterward, but I think GL_INVALID_OPERATION should be generated.
See 4.4 core profile spec, October 18th 2013, p.41. it says:  An INVALID_OPERATION error is generated if id is any of: the name of an existing query object whose type does not match target or an active query object name for any target and index.

    static bool test_error_end_wrong_target(void)
    {
        glGenQueries(1, &oq);

        glBeginQuery(GL_SAMPLES_PASSED, oq);
        glEndQuery(GL_SAMPLES_PASSED);
        piglit_reset_gl_error();

        glBeginQuery(GL_ANY_SAMPLES_PASSED, oq);
        if (!piglit_check_gl_error(0))
            pass = false;
        glEndQuery(GL_ANY_SAMPLES_PASSED);

        glDeleteQueries(1, &oq);
    }

Best Regards!
William
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20131204/3b6e1344/attachment-0001.html>


More information about the Piglit mailing list