Skip to content
Snippets Groups Projects
Commit 6cf6fa28 authored by Subv's avatar Subv
Browse files

GPU: Implement predicated exit instructions in the shader programs.

parent d2727909
No related branches found
No related tags found
No related merge requests found
......@@ -1093,9 +1093,6 @@ private:
default: {
switch (opcode->GetId()) {
case OpCode::Id::EXIT: {
ASSERT_MSG(instr.pred.pred_index == static_cast<u64>(Pred::UnusedIndex),
"Predicated exits not implemented");
// Final color output is currently hardcoded to GPR0-3 for fragment shaders
if (stage == Maxwell3D::Regs::ShaderStage::Fragment) {
shader.AddLine("color.r = " + regs.GetRegisterAsFloat(0) + ';');
......@@ -1105,7 +1102,12 @@ private:
}
shader.AddLine("return true;");
offset = PROGRAM_END - 1;
if (instr.pred.pred_index == static_cast<u64>(Pred::UnusedIndex)) {
// If this is an unconditional exit then just end processing here, otherwise we
// have to account for the possibility of the condition not being met, so
// continue processing the next instruction.
offset = PROGRAM_END - 1;
}
break;
}
case OpCode::Id::KIL: {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment