Commit c228c994 by Ben Clayton

SpirvShader: Restore the current block ID after emitting loop blocks

If we don't do this then calls to StorePhi() will assume the instruction belongs to the wrong block. Bug: b/133212545 Change-Id: If8436dcc677847a86fd629d6354e437ef46ba048 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/31833 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by: 's avatarBen Clayton <bclayton@google.com> Reviewed-by: 's avatarChris Forbes <chrisforbes@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent c77a18aa
...@@ -2169,6 +2169,9 @@ namespace sw ...@@ -2169,6 +2169,9 @@ namespace sw
} }
} }
// Restore current block id after emitting loop blocks.
state->currentBlock = blockId;
// Rebuild the loopActiveLaneMask from the loop back edges. // Rebuild the loopActiveLaneMask from the loop back edges.
loopActiveLaneMask = SIMD::Int(0); loopActiveLaneMask = SIMD::Int(0);
for (auto in : block.ins) for (auto in : block.ins)
......
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