gen_delete_while_active: glEndQuery can be called even if the query has been deleted.

Submitted by Corentin Wallez on April 22, 2014, 10:08 p.m.


Message ID
State New
Headers show

Not browsing as part of any series.

Commit Message

Corentin Wallez April 22, 2014, 10:08 p.m.
Section 5.1.3 of the spec specifies that the underlying query object is
freed when
it is not longer the active query object for a target. glDeleteQueries
doesn't specify
that the query is no longer the active query for the target (if it was). So
when doing
glEndQuery after having deleted the query name there still is an active
query for the
target with a "non 0 name" even if the name has been deleted.
 .../arb_occlusion_query/gen_delete_while_active.c  |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)



Patch hide | download patch | download mbox

diff --git a/tests/spec/arb_occlusion_query/gen_delete_while_active.c
index dd3c7c8..53fbbff 100644
--- a/tests/spec/arb_occlusion_query/gen_delete_while_active.c
+++ b/tests/spec/arb_occlusion_query/gen_delete_while_active.c
@@ -87,13 +87,13 @@  piglit_display(void)
                        return PIGLIT_FAIL;

-       printf ("Testing that glEndQuery on deleted query (expecting
+       printf ("Testing glEndQuery on deleted query.\n");
                /* And ensure that we get an error if we try to end a
                 * query. */

-               if (!piglit_check_gl_error(GL_INVALID_OPERATION))
+               if (!piglit_check_gl_error(GL_NO_ERROR))
                        return PIGLIT_FAIL;