Commit c62fad3b by Nicolas Capens Committed by Nicolas Capens

Remove unnecessary pointer checks.

VertexProgram and PixelProgram always have a shader. Bug chromium:805881 Change-Id: I0a27b4e7a0bc0ae591d89eb295e215bd421416fb Reviewed-on: https://swiftshader-review.googlesource.com/16749Tested-by: 's avatarNicolas Capens <nicolascapens@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent aa02848b
......@@ -24,7 +24,7 @@ namespace sw
{
public:
PixelProgram(const PixelProcessor::State &state, const PixelShader *shader) :
PixelRoutine(state, shader), r(shader && shader->dynamicallyIndexedTemporaries),
PixelRoutine(state, shader), r(shader->dynamicallyIndexedTemporaries),
loopDepth(-1), ifDepth(0), loopRepDepth(0), currentLabel(-1), whileTest(false)
{
for(int i = 0; i < 2048; ++i)
......@@ -34,12 +34,12 @@ namespace sw
enableStack[0] = Int4(0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF);
if(shader && shader->containsBreakInstruction())
if(shader->containsBreakInstruction())
{
enableBreak = Int4(0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF);
}
if(shader && shader->containsContinueInstruction())
if(shader->containsContinueInstruction())
{
enableContinue = Int4(0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF);
}
......
......@@ -39,12 +39,12 @@ namespace sw
loopDepth = -1;
enableStack[0] = Int4(0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF);
if(shader && shader->containsBreakInstruction())
if(shader->containsBreakInstruction())
{
enableBreak = Int4(0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF);
}
if(shader && shader->containsContinueInstruction())
if(shader->containsContinueInstruction())
{
enableContinue = Int4(0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF);
}
......
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