forked from eden-emu/eden
[shader_recompiler/ Maxwell] ISBERD initial implementation
Adds the initial support for Internal Stage Buffer Entry Read - ISBERD, a mechanism used to read internal stage buffer entries with accurate per-stage synchronization. This enables more precise tracking of GPU buffer accesses, improving compatibility with games relying on fine-grained intermediate rendering stages (especially UE4 titles and post-processing heavy engines). Reviewed-on: eden-emu/eden#124 Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
This commit is contained in:
parent
7617f743f9
commit
bdfcb6c950
1 changed files with 11 additions and 2 deletions
|
@ -22,11 +22,14 @@ enum class Shift : u64 {
|
|||
|
||||
} // Anonymous namespace
|
||||
|
||||
// Valid only for GS, TI, VS and trap
|
||||
void TranslatorVisitor::ISBERD(u64 insn) {
|
||||
union {
|
||||
u64 raw;
|
||||
BitField<0, 8, IR::Reg> dest_reg;
|
||||
BitField<8, 8, IR::Reg> src_reg;
|
||||
BitField<8, 8, u32> src_reg_num;
|
||||
BitField<24, 8, u32> imm;
|
||||
BitField<31, 1, u64> skew;
|
||||
BitField<32, 1, u64> o;
|
||||
BitField<33, 2, Mode> mode;
|
||||
|
@ -45,8 +48,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));
|
||||
//LOG_DEBUG(Shader, "(STUBBED) called {}", insn);
|
||||
if (isberd.src_reg_num == 0xFF) {
|
||||
IR::U32 src_imm{ir.Imm32(static_cast<u32>(isberd.imm))};
|
||||
IR::U32 result{ir.IAdd(X(isberd.src_reg), src_imm)};
|
||||
X(isberd.dest_reg, result);
|
||||
} else {
|
||||
X(isberd.dest_reg, X(isberd.src_reg));
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Shader::Maxwell
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue