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

Tapani Pälli tapani.palli at intel.com
Fri Nov 9 05:44:17 UTC 2018


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

On 11/8/18 12:09 PM, Erik Faye-Lund wrote:
> 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]);
>   
> 


More information about the Piglit mailing list