diff options
| -rw-r--r-- | src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index c802532db..6391f1ad4 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp | |||
| @@ -1093,9 +1093,6 @@ private: | |||
| 1093 | default: { | 1093 | default: { |
| 1094 | switch (opcode->GetId()) { | 1094 | switch (opcode->GetId()) { |
| 1095 | case OpCode::Id::EXIT: { | 1095 | case OpCode::Id::EXIT: { |
| 1096 | ASSERT_MSG(instr.pred.pred_index == static_cast<u64>(Pred::UnusedIndex), | ||
| 1097 | "Predicated exits not implemented"); | ||
| 1098 | |||
| 1099 | // Final color output is currently hardcoded to GPR0-3 for fragment shaders | 1096 | // Final color output is currently hardcoded to GPR0-3 for fragment shaders |
| 1100 | if (stage == Maxwell3D::Regs::ShaderStage::Fragment) { | 1097 | if (stage == Maxwell3D::Regs::ShaderStage::Fragment) { |
| 1101 | shader.AddLine("color.r = " + regs.GetRegisterAsFloat(0) + ';'); | 1098 | shader.AddLine("color.r = " + regs.GetRegisterAsFloat(0) + ';'); |
| @@ -1105,7 +1102,12 @@ private: | |||
| 1105 | } | 1102 | } |
| 1106 | 1103 | ||
| 1107 | shader.AddLine("return true;"); | 1104 | shader.AddLine("return true;"); |
| 1108 | offset = PROGRAM_END - 1; | 1105 | if (instr.pred.pred_index == static_cast<u64>(Pred::UnusedIndex)) { |
| 1106 | // If this is an unconditional exit then just end processing here, otherwise we | ||
| 1107 | // have to account for the possibility of the condition not being met, so | ||
| 1108 | // continue processing the next instruction. | ||
| 1109 | offset = PROGRAM_END - 1; | ||
| 1110 | } | ||
| 1109 | break; | 1111 | break; |
| 1110 | } | 1112 | } |
| 1111 | case OpCode::Id::KIL: { | 1113 | case OpCode::Id::KIL: { |