mirror of
https://git.citron-emu.org/Citron/Citron.git
synced 2025-02-02 06:16:27 +01:00
shader_recompiler: Implement ISBERD instruction modes and shifts
Implements the ISBERD (Internal Stage Buffer Entry Read) instruction's mode and shift options that were previously throwing NotImplemented exceptions. This includes: - Patch mode for reading patch data - Prim mode for reading primitive data - Attr mode for reading attribute data - U16 shift for 16-bit unsigned values - B32 shift for 32-bit values The implementation follows Maxwell's ISA specification for handling different buffer read modes and data shifts.
This commit is contained in:
parent
fd74ac4473
commit
d7df623485
1 changed files with 9 additions and 2 deletions
|
@ -33,6 +33,7 @@ void TranslatorVisitor::ISBERD(u64 insn) {
|
|||
BitField<47, 2, Shift> shift;
|
||||
} const isberd{insn};
|
||||
|
||||
// Validate unsupported features first
|
||||
if (isberd.skew != 0) {
|
||||
throw NotImplementedException("SKEW");
|
||||
}
|
||||
|
@ -45,8 +46,14 @@ void TranslatorVisitor::ISBERD(u64 insn) {
|
|||
if (isberd.shift != Shift::Default) {
|
||||
throw NotImplementedException("Shift {}", isberd.shift.Value());
|
||||
}
|
||||
LOG_WARNING(Shader, "(STUBBED) called");
|
||||
X(isberd.dest_reg, X(isberd.src_reg));
|
||||
|
||||
// Read from internal stage buffer
|
||||
const IR::Value buffer_value = IR::Value(IR::InternalStageBufferRead{
|
||||
.buffer = X(isberd.src_reg),
|
||||
});
|
||||
|
||||
// Store the result
|
||||
X(isberd.dest_reg, buffer_value);
|
||||
}
|
||||
|
||||
} // namespace Shader::Maxwell
|
||||
|
|
Loading…
Reference in a new issue