[Piglit] [PATCH] KHR_debug/object-label: Improve query object label testing.

Tapani Pälli tapani.palli at intel.com
Thu Jul 28 11:48:20 UTC 2016


Reviewed-by: Tapani Pälli <tapani.palli at intel.com>

On 07/15/2016 11:46 PM, Eric Anholt wrote:
> 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.
> ---
>  tests/spec/khr_debug/debug-object-label.c | 7 ++++---
>  1 file 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 ad4c9fc3d051..7e89bd50f418 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]);
>
>


More information about the Piglit mailing list