From 838e899580ee2ef0d458ccbb5e6a0b2a259bdb6c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jarkko=20P=C3=B6yry?= Date: Thu, 21 May 2015 20:18:45 -0700 Subject: [PATCH] Fix -Wconversion warnings in depth range tests. Bug: 21161908 Change-Id: I389d33d1d785326a94b428daa821bad6883684a4 --- modules/gles2/functional/es2fDepthRangeTests.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/gles2/functional/es2fDepthRangeTests.cpp b/modules/gles2/functional/es2fDepthRangeTests.cpp index 4668d17..a59b1a0 100644 --- a/modules/gles2/functional/es2fDepthRangeTests.cpp +++ b/modules/gles2/functional/es2fDepthRangeTests.cpp @@ -228,7 +228,7 @@ DepthRangeCompareCase::IterateResult DepthRangeCompareCase::iterate (void) // Render reference. for (int y = 0; y < referenceFrame.getHeight(); y++) { - float yf = ((float)y + 0.5f) / referenceFrame.getHeight(); + float yf = ((float)y + 0.5f) / (float)referenceFrame.getHeight(); int half = de::clamp((int)((float)referenceFrame.getWidth()*0.5f + 0.5f), 0, referenceFrame.getWidth()); // Fill left half - comparison to constant 0.5 @@ -245,7 +245,7 @@ DepthRangeCompareCase::IterateResult DepthRangeCompareCase::iterate (void) for (int x = half; x < referenceFrame.getWidth(); x++) { float xf = ((float)x + 0.5f) / (float)referenceFrame.getWidth(); - float xh = ((float)x - half + 0.5f) / (float)(referenceFrame.getWidth()-half); + float xh = ((float)(x - half) + 0.5f) / (float)(referenceFrame.getWidth()-half); float rd = 1.0f - (xh + yf) * 0.5f; float d = depthRangeTransform(triQuadInterpolate(xf, yf, m_depthCoord), m_zNear, m_zFar); bool dpass = compare(m_compareFunc, d, rd); -- 2.7.4