summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2018-02-07 21:25:55 +0100
committerMarek Olšák <marek.olsak@amd.com>2018-02-13 01:08:22 +0100
commit8671bb82416e5fb085ea477c5910de69d2bef2a9 (patch)
tree86f06bd883a7616783e98b7d4cf0998f9ae52688 /tests
parent5153c0bd89ca78e4dd56cc0917930909fa085eb0 (diff)
arb_viewport_array/viewport_indices: allow float precision instead of double
Mesa will not use doubles for this state. Reviewed-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/spec/arb_viewport_array/viewport_indices.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/spec/arb_viewport_array/viewport_indices.c b/tests/spec/arb_viewport_array/viewport_indices.c
index 0088828c3..567f83d36 100644
--- a/tests/spec/arb_viewport_array/viewport_indices.c
+++ b/tests/spec/arb_viewport_array/viewport_indices.c
@@ -201,7 +201,9 @@ test_preserve_invalid_index(GLint maxVP)
#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;