[Piglit] [PATCH] khr_debug: fix invalid enum usage on gles3

Erik Faye-Lund erik.faye-lund at collabora.com
Thu Nov 8 10:09:17 UTC 2018


GL_SAMPLES_PASSED isn't allowed on gles3, so doing a quiery with it
isn't going to work. But GL_ANY_SAMPLES_PASSED is allowed, so so let's
use that one instead on gles.

Signed-off-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
---
This bug came up while testing this mesa patch-series:
https://patchwork.freedesktop.org/series/52169/

 tests/spec/khr_debug/debug-object-label.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/tests/spec/khr_debug/debug-object-label.c b/tests/spec/khr_debug/debug-object-label.c
index e9617d719..f9c7eac5a 100644
--- a/tests/spec/khr_debug/debug-object-label.c
+++ b/tests/spec/khr_debug/debug-object-label.c
@@ -236,8 +236,13 @@ test_object_label_types()
 	    piglit_get_gl_version() >= 30) {
 		/* Test QUERY */
 		glGenQueries(1, &query);
-		glBeginQuery(GL_SAMPLES_PASSED, query);
-		glEndQuery(GL_SAMPLES_PASSED);
+		if (piglit_is_gles()) {
+			glBeginQuery(GL_ANY_SAMPLES_PASSED, query);
+			glEndQuery(GL_ANY_SAMPLES_PASSED);
+		} else {
+			glBeginQuery(GL_SAMPLES_PASSED, query);
+			glEndQuery(GL_SAMPLES_PASSED);
+		}
 		ObjectLabel(GL_QUERY, query, -1, TestLabel);
 		GetObjectLabel(GL_QUERY, query, TestLabelLen + 1, &length[QUERY_IDX], label[QUERY_IDX]);
 
-- 
2.19.1



More information about the Piglit mailing list