Commit 903e025f by Alexis Hetu Committed by Alexis Hétu

Fixed signed/unsigned types comparison

BUG=18368388 Change-Id: I3f2927fd68e75a8fb5abde1b25e81416862076fc Reviewed-on: https://swiftshader-review.googlesource.com/1474Tested-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent 5b5d562c
......@@ -1905,7 +1905,7 @@ namespace sw
size_t count = vertexShader->getLength();
for(int i = 0; i < count; i++)
for(size_t i = 0; i < count; i++)
{
const Shader::Instruction *instruction = vertexShader->getInstruction(i);
......@@ -1949,7 +1949,7 @@ namespace sw
size_t count = pixelShader->getLength();
for(int i = 0; i < count; i++)
for(size_t i = 0; i < count; i++)
{
const Shader::Instruction *instruction = pixelShader->getInstruction(i);
......
......@@ -3584,7 +3584,7 @@ namespace sw
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 @@ namespace sw
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 @@ namespace sw
}
}
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 @@ namespace sw
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);
......
......@@ -26,7 +26,7 @@ namespace sw
if(ps) // Make a copy
{
for(int i = 0; i < ps->getLength(); i++)
for(size_t i = 0; i < ps->getLength(); i++)
{
append(new sw::Shader::Instruction(*ps->getInstruction(i)));
}
......
......@@ -1457,7 +1457,7 @@ namespace sw
instruction[0]->opcode = OPCODE_NULL;
instruction[1]->opcode = OPCODE_NULL;
for(int i = 2; i < instruction.size(); i++)
for(size_t i = 2; i < instruction.size(); i++)
{
if(instruction[i]->opcode == OPCODE_LABEL || instruction[i]->opcode == OPCODE_RET)
{
......@@ -1470,8 +1470,8 @@ namespace sw
void Shader::removeNull()
{
int size = 0;
for(int i = 0; i < instruction.size(); i++)
size_t size = 0;
for(size_t i = 0; i < instruction.size(); i++)
{
if(instruction[i]->opcode != OPCODE_NULL)
{
......
......@@ -76,7 +76,7 @@ namespace sw
}
// 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;
......@@ -90,7 +90,7 @@ namespace sw
}
}
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;
......@@ -726,7 +726,7 @@ namespace sw
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);
......
......@@ -31,7 +31,7 @@ namespace sw
if(vs) // Make a copy
{
for(int i = 0; i < vs->getLength(); i++)
for(size_t i = 0; i < vs->getLength(); i++)
{
append(new sw::Shader::Instruction(*vs->getInstruction(i)));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment