Commit f14891d7 by Alexis Hetu Committed by Alexis Hétu

Fragment output fix

Fragment outputs weren't given a proper index, so a fragment output array has been added to fix this. Change-Id: Id9be21f60cc23528bf1af078a8b3ca2df28e7ee4 Reviewed-on: https://swiftshader-review.googlesource.com/4295Tested-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <capn@google.com>
parent 77dfab49
......@@ -2199,7 +2199,7 @@ namespace glsl
case EvqVaryingIn: return varyingRegister(operand);
case EvqVaryingOut: return varyingRegister(operand);
case EvqVertexIn: return attributeRegister(operand);
case EvqFragmentOut: return 0;
case EvqFragmentOut: return fragmentOutputRegister(operand);
case EvqVertexOut: return varyingRegister(operand);
case EvqFragmentIn: return varyingRegister(operand);
case EvqInvariantVaryingIn: return varyingRegister(operand);
......@@ -2527,6 +2527,11 @@ namespace glsl
return index;
}
int OutputASM::fragmentOutputRegister(TIntermTyped *fragmentOutput)
{
return allocate(fragmentOutputs, fragmentOutput);
}
int OutputASM::samplerRegister(TIntermTyped *sampler)
{
ASSERT(IsSampler(sampler->getType().getBasicType()));
......
......@@ -199,6 +199,7 @@ namespace glsl
void declareVarying(TIntermTyped *varying, int reg);
int uniformRegister(TIntermTyped *uniform);
int attributeRegister(TIntermTyped *attribute);
int fragmentOutputRegister(TIntermTyped *fragmentOutput);
int samplerRegister(TIntermTyped *sampler);
int samplerRegister(TIntermSymbol *sampler);
......@@ -228,6 +229,7 @@ namespace glsl
VariableArray varyings;
VariableArray attributes;
VariableArray samplers;
VariableArray fragmentOutputs;
Scope emitScope;
Scope currentScope;
......
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