Merge pull request #1217 from KhronosGroup/fix-1215
Mark loop headers as complex as early as possible.
This commit is contained in:
commit
96a276c2ca
@ -12119,7 +12119,12 @@ void CompilerGLSL::emit_block_chain(SPIRBlock &block)
|
||||
|
||||
SPIRBlock::ContinueBlockType continue_type = SPIRBlock::ContinueNone;
|
||||
if (block.continue_block)
|
||||
{
|
||||
continue_type = continue_block_type(get<SPIRBlock>(block.continue_block));
|
||||
// If we know we cannot emit a loop, mark the block early as a complex loop so we don't force unnecessary recompiles.
|
||||
if (continue_type == SPIRBlock::ComplexLoop)
|
||||
block.complex_continue = true;
|
||||
}
|
||||
|
||||
// If we have loop variables, stop masking out access to the variable now.
|
||||
for (auto var_id : block.loop_variables)
|
||||
|
Loading…
Reference in New Issue
Block a user