From 3046df2415c6588d39e1673edfc0507456c5c2c7 Mon Sep 17 00:00:00 2001 From: "Dr. Chat" Date: Tue, 7 Mar 2017 12:25:36 -0600 Subject: [PATCH] SPIR-V: Go to next instr if cexece did not execute and is not the last instruction. --- src/xenia/gpu/spirv_shader_translator.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xenia/gpu/spirv_shader_translator.cc b/src/xenia/gpu/spirv_shader_translator.cc index a03788d53..69af65c35 100644 --- a/src/xenia/gpu/spirv_shader_translator.cc +++ b/src/xenia/gpu/spirv_shader_translator.cc @@ -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 {