Fixed Fractal shader The issue was with continue and break, where a previous loop was decrementing the breakDepth/continueDepth before we started incrementing it. BUG=18069149 Change-Id: I39fa9c07ea373cd9dab4997bfb8a9e621bf48b29 Reviewed-on: https://swiftshader-review.googlesource.com/1473 Tested-by: Alexis Hétu <sugoi@google.com> Reviewed-by: Nicolas Capens <nicolascapens@google.com>
diff --git a/src/Shader/Shader.cpp b/src/Shader/Shader.cpp index aa5b30d..88bb4b0 100644 --- a/src/Shader/Shader.cpp +++ b/src/Shader/Shader.cpp
@@ -1595,10 +1595,6 @@ { breakDepth++; } - else if(instruction[i]->isEndLoop()) - { - breakDepth--; - } if(breakDepth > 0) { @@ -1606,6 +1602,10 @@ { breakDepth++; } + else if(instruction[i]->isEndLoop()) + { + breakDepth--; + } instruction[i]->analysisBreak = true; @@ -1620,10 +1620,6 @@ { continueDepth++; } - else if(instruction[i]->isEndLoop()) - { - continueDepth--; - } if(continueDepth > 0) { @@ -1631,6 +1627,10 @@ { continueDepth++; } + else if(instruction[i]->isEndLoop()) + { + continueDepth--; + } instruction[i]->analysisContinue = true;