diff options
Diffstat (limited to 'src/3rdparty/angle/src/compiler/UnfoldShortCircuit.cpp')
-rw-r--r-- | src/3rdparty/angle/src/compiler/UnfoldShortCircuit.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/3rdparty/angle/src/compiler/UnfoldShortCircuit.cpp b/src/3rdparty/angle/src/compiler/UnfoldShortCircuit.cpp index 1782ebc90c..47f0afca6a 100644 --- a/src/3rdparty/angle/src/compiler/UnfoldShortCircuit.cpp +++ b/src/3rdparty/angle/src/compiler/UnfoldShortCircuit.cpp @@ -1,5 +1,5 @@ // -// Copyright (c) 2002-2012 The ANGLE Project Authors. All rights reserved. +// Copyright (c) 2002-2013 The ANGLE Project Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // @@ -95,9 +95,9 @@ bool UnfoldShortCircuit::visitBinary(Visit visit, TIntermBinary *node) mTemporaryIndex = i + 1; } return false; + default: + return true; } - - return true; } bool UnfoldShortCircuit::visitSelection(Visit visit, TIntermSelection *node) @@ -111,6 +111,8 @@ bool UnfoldShortCircuit::visitSelection(Visit visit, TIntermSelection *node) out << mOutputHLSL->typeString(node->getType()) << " s" << i << ";\n"; + out << "{\n"; + mTemporaryIndex = i + 1; node->getCondition()->traverse(this); out << "if("; @@ -135,6 +137,8 @@ bool UnfoldShortCircuit::visitSelection(Visit visit, TIntermSelection *node) out << ";\n" "}\n"; + out << "}\n"; + mTemporaryIndex = i + 1; } |