On 02/08/2018 05:59 PM, Marek Olšák wrote:
From: Marek Olšák <marek.ol...@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 <bri...@vmware.com>
_______________________________________________
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to