Revert "[shader_recompiler/Maxwell] Unstub ISBERD completely (#160)"
This reverts commit 3f12ae1e6e
.
This commit is contained in:
parent
8c6018e378
commit
d81deeb775
1 changed files with 4 additions and 47 deletions
|
@ -1,6 +1,3 @@
|
||||||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
|
||||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
||||||
|
|
||||||
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
@ -40,56 +37,16 @@ void TranslatorVisitor::ISBERD(u64 insn) {
|
||||||
} const isberd{insn};
|
} const isberd{insn};
|
||||||
|
|
||||||
if (isberd.skew != 0) {
|
if (isberd.skew != 0) {
|
||||||
IR::U32 current_lane_id{ir.LaneId()};
|
throw NotImplementedException("SKEW");
|
||||||
IR::U32 result{ir.IAdd(X(isberd.src_reg), current_lane_id)};
|
|
||||||
X(isberd.dest_reg, result);
|
|
||||||
}
|
}
|
||||||
if (isberd.o != 0) {
|
if (isberd.o != 0) {
|
||||||
IR::U32 address{};
|
throw NotImplementedException("O");
|
||||||
IR::F32 result{};
|
|
||||||
if (isberd.src_reg_num == 0xFF) {
|
|
||||||
address = ir.Imm32(isberd.imm);
|
|
||||||
result = ir.GetAttributeIndexed(address);
|
|
||||||
} else {
|
|
||||||
IR::U32 offset = ir.Imm32(isberd.imm);
|
|
||||||
address = ir.IAdd(X(isberd.src_reg), offset);
|
|
||||||
result = ir.GetAttributeIndexed(address);
|
|
||||||
}
|
|
||||||
X(isberd.dest_reg, ir.BitCast<IR::U32>(result));
|
|
||||||
}
|
}
|
||||||
if (isberd.mode != Mode::Default) {
|
if (isberd.mode != Mode::Default) {
|
||||||
IR::F32 result{};
|
throw NotImplementedException("Mode {}", isberd.mode.Value());
|
||||||
IR::U32 index{};
|
|
||||||
if (isberd.src_reg_num == 0xFF) {
|
|
||||||
index = ir.Imm32(isberd.imm);
|
|
||||||
} else {
|
|
||||||
index = ir.IAdd(X(isberd.src_reg), ir.Imm32(isberd.imm));
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (static_cast<u64>(isberd.mode.Value())) {
|
|
||||||
case static_cast<u64>(Mode::Patch):
|
|
||||||
result = ir.GetPatch(index.Patch());
|
|
||||||
break;
|
|
||||||
case static_cast<u64>(Mode::Prim):
|
|
||||||
result = ir.GetAttribute(index.Attribute());
|
|
||||||
break;
|
|
||||||
case static_cast<u64>(Mode::Attr):
|
|
||||||
result = ir.GetAttributeIndexed(index);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
X(isberd.dest_reg, ir.BitCast<IR::U32>(result));
|
|
||||||
}
|
}
|
||||||
if (isberd.shift != Shift::Default) {
|
if (isberd.shift != Shift::Default) {
|
||||||
IR::U32 result{};
|
throw NotImplementedException("Shift {}", isberd.shift.Value());
|
||||||
switch (static_cast<u64>(isberd.shift.Value())) {
|
|
||||||
case static_cast<u64>(Shift::U16):
|
|
||||||
result = ir.ShiftLeftLogical(result, static_cast<IR::U32>(ir.Imm16(1)));
|
|
||||||
break;
|
|
||||||
case static_cast<u64>(Shift::B32):
|
|
||||||
result = ir.ShiftLeftLogical(result, ir.Imm32(1));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
X(isberd.dest_reg, result);
|
|
||||||
}
|
}
|
||||||
//LOG_DEBUG(Shader, "(STUBBED) called {}", insn);
|
//LOG_DEBUG(Shader, "(STUBBED) called {}", insn);
|
||||||
if (isberd.src_reg_num == 0xFF) {
|
if (isberd.src_reg_num == 0xFF) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue