Fixed signed/unsigned types comparison
BUG=18368388
Change-Id: I3f2927fd68e75a8fb5abde1b25e81416862076fc
Reviewed-on: https://swiftshader-review.googlesource.com/1474
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
diff --git a/src/Shader/PixelRoutine.cpp b/src/Shader/PixelRoutine.cpp
index 20ddc8f..c866fb7 100644
--- a/src/Shader/PixelRoutine.cpp
+++ b/src/Shader/PixelRoutine.cpp
@@ -3584,7 +3584,7 @@
int pad = 0; // Count number of texm3x3pad instructions
Vector4i dPairing; // Destination for first pairing instruction
- for(int i = 0; i < shader->getLength(); i++)
+ for(size_t i = 0; i < shader->getLength(); i++)
{
const Shader::Instruction *instruction = shader->getInstruction(i);
Shader::Opcode opcode = instruction->opcode;
@@ -3786,7 +3786,7 @@
bool out[4][4] = {false};
// Create all call site return blocks up front
- for(int i = 0; i < shader->getLength(); i++)
+ for(size_t i = 0; i < shader->getLength(); i++)
{
const Shader::Instruction *instruction = shader->getInstruction(i);
Shader::Opcode opcode = instruction->opcode;
@@ -3800,7 +3800,7 @@
}
}
- for(int i = 0; i < shader->getLength(); i++)
+ for(size_t i = 0; i < shader->getLength(); i++)
{
const Shader::Instruction *instruction = shader->getInstruction(i);
Shader::Opcode opcode = instruction->opcode;
@@ -5740,7 +5740,7 @@
if(localShaderConstants) // Constant may be known at compile time
{
- for(int j = 0; j < shader->getLength(); j++)
+ for(size_t j = 0; j < shader->getLength(); j++)
{
const Shader::Instruction &instruction = *shader->getInstruction(j);