Fix -Wconversion warnings in vertex texture tests.
authorJarkko Pöyry <jpoyry@google.com>
Fri, 22 May 2015 02:45:46 +0000 (19:45 -0700)
committerJarkko Pöyry <jpoyry@google.com>
Fri, 22 May 2015 18:13:22 +0000 (11:13 -0700)
Bug: 21161908

Change-Id: I2539c2cbcf9bedd1b1c38bacd7855a29eae818b4

modules/gles2/functional/es2fVertexTextureTests.cpp
modules/gles3/functional/es3fVertexTextureTests.cpp

index 8d46665..432b2a4 100644 (file)
@@ -248,13 +248,13 @@ PosTexCoordQuadGrid<TexType>::PosTexCoordQuadGrid (int gridSize, const IVec2& re
                for (int i = 0; i < DE_LENGTH_OF_ARRAY(quadVertices); i++)
                        m_positions.push_back(safeCoords(quadVertices[i], renderSize, Vec2(0.0f)) * 2.0f - 1.0f);
 
-               m_indices.push_back(firstNdx + 0);
-               m_indices.push_back(firstNdx + 1);
-               m_indices.push_back(firstNdx + 2);
+               m_indices.push_back(deUint16(firstNdx + 0));
+               m_indices.push_back(deUint16(firstNdx + 1));
+               m_indices.push_back(deUint16(firstNdx + 2));
 
-               m_indices.push_back(firstNdx + 1);
-               m_indices.push_back(firstNdx + 3);
-               m_indices.push_back(firstNdx + 2);
+               m_indices.push_back(deUint16(firstNdx + 1));
+               m_indices.push_back(deUint16(firstNdx + 3));
+               m_indices.push_back(deUint16(firstNdx + 2));
        }
 
        m_texCoords.reserve(m_gridSize*m_gridSize*4);
index 8fc1eef..a2cd1c0 100644 (file)
@@ -298,13 +298,13 @@ PosTexCoordQuadGrid<TexType>::PosTexCoordQuadGrid (int gridSize, const IVec2& re
                for (int i = 0; i < DE_LENGTH_OF_ARRAY(quadVertices); i++)
                        m_positions.push_back(safeCoords(quadVertices[i], renderSize, Vec2(0.0f)) * 2.0f - 1.0f);
 
-               m_indices.push_back(firstNdx + 0);
-               m_indices.push_back(firstNdx + 1);
-               m_indices.push_back(firstNdx + 2);
+               m_indices.push_back(deUint16(firstNdx + 0));
+               m_indices.push_back(deUint16(firstNdx + 1));
+               m_indices.push_back(deUint16(firstNdx + 2));
 
-               m_indices.push_back(firstNdx + 1);
-               m_indices.push_back(firstNdx + 3);
-               m_indices.push_back(firstNdx + 2);
+               m_indices.push_back(deUint16(firstNdx + 1));
+               m_indices.push_back(deUint16(firstNdx + 3));
+               m_indices.push_back(deUint16(firstNdx + 2));
        }
 
        m_texCoords.reserve(m_gridSize*m_gridSize*4);