Commit c557bf99 by Alexis Hetu Committed by Alexis Hétu

Fixed Temporary issues

Some issues, like failures using the do-while command, were caused by the assembler being unable to assign registers consistently for a single temporary variable. For example, in the do-while case, the "iterate" Temporary object was not being assigned to the same register between it's initial declaration and it's usage inside the loop condition later on, causing the do-while to behave weirdly. Other instances where multiple Temporary objects ended up being used simultaneously of where a single object was references in multiple parts of the code could have failed because of this. The fix is simply to assign Temporary objects a unique ID. Change-Id: Ie48c596b4c6570853702cab71497b3e00a40c2a0 Reviewed-on: https://swiftshader-review.googlesource.com/4015Tested-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <capn@google.com>
parent 83dfdcb0
......@@ -33,7 +33,7 @@ namespace glsl
class Temporary : public TIntermSymbol
{
public:
Temporary(OutputASM *assembler) : TIntermSymbol(0, "tmp", TType(EbtFloat, EbpHigh, EvqTemporary, 4, 1, false)), assembler(assembler)
Temporary(OutputASM *assembler) : TIntermSymbol(TSymbolTableLevel::nextUniqueId(), "tmp", TType(EbtFloat, EbpHigh, EvqTemporary, 4, 1, false)), assembler(assembler)
{
}
......
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