From 6ba9faf025982c9eeab3f469a1581a047f20465a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jarkko=20P=C3=B6yry?= Date: Thu, 21 May 2015 19:11:36 -0700 Subject: [PATCH] Fix -Wconversion warnings in depth stencil tests. Bug: 21161908 Change-Id: I116367e2801446f9a350499ed8f04d20e5fbe565 --- modules/gles2/functional/es2fDepthStencilClearTests.cpp | 4 ++-- modules/gles2/functional/es2fDepthStencilTests.cpp | 8 ++++---- modules/gles3/functional/es3fDepthStencilClearTests.cpp | 4 ++-- modules/gles3/functional/es3fDepthStencilTests.cpp | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/modules/gles2/functional/es2fDepthStencilClearTests.cpp b/modules/gles2/functional/es2fDepthStencilClearTests.cpp index f1671dd..cbbcf99 100644 --- a/modules/gles2/functional/es2fDepthStencilClearTests.cpp +++ b/modules/gles2/functional/es2fDepthStencilClearTests.cpp @@ -324,7 +324,7 @@ void DepthStencilClearCase::renderGL (tcu::Surface& dst, const vector& cl if (m_testDepth) { int numSteps = DEPTH_STEPS; - float step = 2.0f / numSteps; + float step = 2.0f / (float)numSteps; gl.enable (GL_DEPTH_TEST); gl.depthFunc(GL_LESS); @@ -333,7 +333,7 @@ void DepthStencilClearCase::renderGL (tcu::Surface& dst, const vector& cl for (int ndx = 0; ndx < numSteps; ndx++) { - float d = -1.0f + step*ndx; + float d = -1.0f + step*(float)ndx; float c = (float)ndx / (float)(numSteps-1); float pos[] = { diff --git a/modules/gles2/functional/es2fDepthStencilTests.cpp b/modules/gles2/functional/es2fDepthStencilTests.cpp index c7cb9ca..793c7a3 100644 --- a/modules/gles2/functional/es2fDepthStencilTests.cpp +++ b/modules/gles2/functional/es2fDepthStencilTests.cpp @@ -271,10 +271,10 @@ void generateBaseClearAndDepthCommands (const TestRenderTarget& target, vector& cl if (m_testDepth) { int numSteps = DEPTH_STEPS; - float step = 2.0f / numSteps; + float step = 2.0f / (float)numSteps; gl.enable (GL_DEPTH_TEST); gl.depthFunc(GL_LESS); @@ -336,7 +336,7 @@ void DepthStencilClearCase::renderGL (tcu::Surface& dst, const vector& cl for (int ndx = 0; ndx < numSteps; ndx++) { - float d = -1.0f + step*ndx; + float d = -1.0f + step*(float)ndx; float c = (float)ndx / (float)(numSteps-1); float pos[] = { diff --git a/modules/gles3/functional/es3fDepthStencilTests.cpp b/modules/gles3/functional/es3fDepthStencilTests.cpp index 861d2a0..09958d8 100644 --- a/modules/gles3/functional/es3fDepthStencilTests.cpp +++ b/modules/gles3/functional/es3fDepthStencilTests.cpp @@ -271,10 +271,10 @@ void generateBaseClearAndDepthCommands (const TestRenderTarget& target, vector