mirror of
https://gitlab.com/suyu-emu/suyu.git
synced 2024-03-15 23:15:44 +00:00
ShaderGen: Implemented the KIL instruction, which is equivalent to 'discard'.
This commit is contained in:
parent
c3a8ea76f1
commit
17a0ef1e1e
|
@ -566,10 +566,16 @@ private:
|
|||
default: {
|
||||
switch (instr.opcode.EffectiveOpCode()) {
|
||||
case OpCode::Id::EXIT: {
|
||||
ASSERT_MSG(instr.pred.pred_index == static_cast<u64>(Pred::UnusedIndex),
|
||||
"Predicated exits not implemented");
|
||||
shader.AddLine("return true;");
|
||||
offset = PROGRAM_END - 1;
|
||||
break;
|
||||
}
|
||||
case OpCode::Id::KIL: {
|
||||
shader.AddLine("discard;");
|
||||
break;
|
||||
}
|
||||
case OpCode::Id::IPA: {
|
||||
const auto& attribute = instr.attribute.fmt28;
|
||||
std::string dest = GetRegister(instr.gpr0);
|
||||
|
@ -589,7 +595,7 @@ private:
|
|||
}
|
||||
|
||||
// Close the predicate condition scope.
|
||||
if (instr.pred != Pred::UnusedIndex) {
|
||||
if (instr.pred.pred_index != static_cast<u64>(Pred::UnusedIndex)) {
|
||||
--shader.scope;
|
||||
shader.AddLine('}');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue