mirror of
https://git.citron-emu.org/Citron/Citron.git
synced 2025-01-22 08:36:32 +01:00
shader_recompiler: Fix ISBERD instruction implementation
- Simplify ISBERD instruction to handle register-to-register moves - Remove incorrect CompositeConstruct usage - Replace with direct register value passing - Fix compilation errors in internal stage buffer handling
This commit is contained in:
parent
2b5082b30d
commit
749d083197
1 changed files with 1 additions and 24 deletions
|
@ -27,32 +27,9 @@ void TranslatorVisitor::ISBERD(u64 insn) {
|
|||
u64 raw;
|
||||
BitField<0, 8, IR::Reg> dest_reg;
|
||||
BitField<8, 8, IR::Reg> src_reg;
|
||||
BitField<31, 1, u64> skew;
|
||||
BitField<32, 1, u64> o;
|
||||
BitField<33, 2, Mode> mode;
|
||||
BitField<47, 2, Shift> shift;
|
||||
} const isberd{insn};
|
||||
|
||||
// Validate unsupported features first
|
||||
if (isberd.skew != 0) {
|
||||
throw NotImplementedException("SKEW");
|
||||
}
|
||||
if (isberd.o != 0) {
|
||||
throw NotImplementedException("O");
|
||||
}
|
||||
if (isberd.mode != Mode::Default) {
|
||||
throw NotImplementedException("Mode {}", isberd.mode.Value());
|
||||
}
|
||||
if (isberd.shift != Shift::Default) {
|
||||
throw NotImplementedException("Shift {}", isberd.shift.Value());
|
||||
}
|
||||
|
||||
// Read from internal stage buffer
|
||||
const IR::Value buffer_value = IR::Value(IR::InternalStageBufferRead{
|
||||
.buffer = X(isberd.src_reg),
|
||||
});
|
||||
|
||||
// Store the result
|
||||
const IR::U32 buffer_value{X(isberd.src_reg)};
|
||||
X(isberd.dest_reg, buffer_value);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue