[Piglit] [PATCH 1/2] arb_viewport_array/viewport_indices: allow float precision instead of double

Brian Paul brianp at vmware.com
Mon Feb 12 21:55:45 UTC 2018


On 02/08/2018 05:59 PM, Marek Olšák wrote:
> From: Marek Olšák <marek.olsak at amd.com>
> 
> Mesa will not use doubles for this state.
> ---
>   tests/spec/arb_viewport_array/viewport_indices.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/spec/arb_viewport_array/viewport_indices.c b/tests/spec/arb_viewport_array/viewport_indices.c
> index 0088828..567f83d 100644
> --- a/tests/spec/arb_viewport_array/viewport_indices.c
> +++ b/tests/spec/arb_viewport_array/viewport_indices.c
> @@ -194,21 +194,23 @@ test_preserve_invalid_index(GLint maxVP)
>   		    || vpGet[3] != vp[3]) {
>   			printf("Viewport index %d got erroneously changed\n",
>   			       i);
>   			pass = false;
>   		}
>   #ifdef PIGLIT_USE_OPENGL
>   		glGetDoublei_v(GL_DEPTH_RANGE, i, drGet);
>   #else
>   		glGetFloati_vOES(GL_DEPTH_RANGE, i, drGet);
>   #endif
> -		if (drGet[0] != dr[0] || drGet[1] != dr[1]) {
> +		/* Allow float precisions instead of double for desktop GL. */
> +		if ((float)drGet[0] != (float)dr[0] ||
> +		    (float)drGet[1] != (float)dr[1]) {
>   			printf("DepthRange index %d got erroneously changed\n",
>   			       i);
>   			pass = false;
>   		}
>   		glGetIntegeri_v(GL_SCISSOR_BOX, i, scGet);
>   		if (scGet[0] != sc[0] || scGet[1] != sc[1] || scGet[2] != sc[2]
>   		    || scGet[3] != sc[3]) {
>   			printf("Scissor Box for index %d got erroneously changed\n",
>   			       i);
>   			pass = false;
> 

Reviewed-by: Brian Paul <brianp at vmware.com>


More information about the Piglit mailing list