[Piglit] [PATCH] gen_delete_while_active: glEndQuery can be called even if the query has been deleted.

Corentin Wallez corentin at wallez.net
Tue Apr 22 15:08:57 PDT 2014


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(-)

diff --git a/tests/spec/arb_occlusion_query/gen_delete_while_active.c
b/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
error).\n");
+       printf ("Testing glEndQuery on deleted query.\n");
        {
                /* And ensure that we get an error if we try to end a
deleted
                 * query. */
                glEndQuery(GL_SAMPLES_PASSED);

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

--
1.7.9
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20140422/a457b289/attachment.html>


More information about the Piglit mailing list