diff options
author | Eric Anholt <eric@anholt.net> | 2016-07-15 13:41:45 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2016-08-10 10:55:30 -0700 |
commit | 6561a9e4dd39ab166b1f331d15756007c4054b50 (patch) | |
tree | c472976f560a0304b238840118df6d56fbf6441d | |
parent | 1312e80738db18607d5f7b5e1c0016d6271f938b (diff) |
KHR_debug/object-label: Improve query object label testing.
The test was trying to use timer queries on any desktop GL, even
though timer queries were a fairly late extension. Instead, check for
occlusion queries and use those, which should work on much more
hardware (GL 2.0).
Fixes test failure on vc4.
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
-rw-r--r-- | tests/spec/khr_debug/debug-object-label.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/spec/khr_debug/debug-object-label.c b/tests/spec/khr_debug/debug-object-label.c index ad4c9fc3d..7e89bd50f 100644 --- a/tests/spec/khr_debug/debug-object-label.c +++ b/tests/spec/khr_debug/debug-object-label.c @@ -230,11 +230,12 @@ test_object_label_types() } /* GLES >= 3.0 or GL compat */ - if (!piglit_is_gles() || piglit_get_gl_version() >= 30) { + if (piglit_is_extension_supported("GL_ARB_occlusion_query") || + piglit_get_gl_version() >= 30) { /* Test QUERY */ glGenQueries(1, &query); - glBeginQuery(GL_TIME_ELAPSED, query); - glEndQuery(GL_TIME_ELAPSED); + 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]); |