SPIR-V: Go to next instr if cexece did not execute and is not the last instruction.

This commit is contained in:
Dr. Chat 2017-03-07 12:25:36 -06:00
parent cbab45c4b7
commit 3046df2415
1 changed files with 2 additions and 2 deletions

View File

@ -804,7 +804,7 @@ void SpirvShaderTranslator::ProcessExecInstructionBegin(
b.createConditionalBranch(cond, body, exec_skip_block_);
b.setBuildPoint(exec_skip_block_);
if (!instr.is_end) {
if (!instr.is_end || cf_blocks_.size() > instr.dword_index + 1) {
assert_true(cf_blocks_.size() > instr.dword_index + 1);
b.createBranch(cf_blocks_[instr.dword_index + 1].block);
} else {
@ -826,7 +826,7 @@ void SpirvShaderTranslator::ProcessExecInstructionBegin(
b.createConditionalBranch(cond, body, exec_skip_block_);
b.setBuildPoint(exec_skip_block_);
if (!instr.is_end) {
if (!instr.is_end || cf_blocks_.size() > instr.dword_index + 1) {
assert_true(cf_blocks_.size() > instr.dword_index + 1);
b.createBranch(cf_blocks_[instr.dword_index + 1].block);
} else {