[Piglit] [PATCH] direct_state_access/queries: add a subtest checking QUERY_TARGET

Martin Peres martin.peres at linux.intel.com
Mon May 4 04:35:44 PDT 2015


Tested on NVIDIA's proprietary driver version 346.35.

Reported-by: Ilia Mirkin <imirkin at alum.mit.edu>
Signed-off-by: Martin Peres <martin.peres at linux.intel.com>
---
 tests/spec/arb_direct_state_access/create-queries.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tests/spec/arb_direct_state_access/create-queries.c b/tests/spec/arb_direct_state_access/create-queries.c
index 5112f3b..4f10cd4 100644
--- a/tests/spec/arb_direct_state_access/create-queries.c
+++ b/tests/spec/arb_direct_state_access/create-queries.c
@@ -102,6 +102,12 @@ piglit_display(void)
 	piglit_check_gl_error(GL_NO_ERROR);
 	SUBTESTCONDITION(param == 0, pass, "default RESULT(%d) == 0", param);
 
+	/* test the target */
+	glGetQueryObjectiv(ids[2], GL_QUERY_TARGET, &param);
+	piglit_check_gl_error(GL_NO_ERROR);
+	SUBTESTCONDITION(param == GL_SAMPLES_PASSED, pass, "TARGET(%s) == "
+			 "GL_SAMPLES_PASSED", piglit_get_gl_enum_name(param));
+
 	/* clean up */
 	glDeleteQueries(10, ids);
 
-- 
2.3.7



More information about the Piglit mailing list