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

Ian Romanick idr at freedesktop.org
Thu Dec 5 17:28:52 PST 2013


On 12/03/2013 11:05 PM, Zhao, William (SRDC SW GR) wrote:
> 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.

I think you are correct.  That subtest should generate two query objects
and use a separate object for each of the two glBeginQuery calls.

It sounds like we also need a subtest for a glBeginQuery / glEndQuery
followed by a glBeginQuery with the same id but a different target.

Can you provide patches for those?

> 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 booltest_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
> 
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit



More information about the Piglit mailing list