early-access version 2557

This commit is contained in:
pineappleEA 2022-03-16 18:37:36 +01:00
parent 1c0f61c9bb
commit 20dd5dc3b6
2 changed files with 13 additions and 3 deletions

View file

@ -1,7 +1,7 @@
yuzu emulator early access yuzu emulator early access
============= =============
This is the source code for early-access 2555. This is the source code for early-access 2557.
## Legal Notice ## Legal Notice

View file

@ -11,10 +11,20 @@ namespace Shader::Maxwell {
using namespace LDC; using namespace LDC;
namespace { namespace {
std::pair<IR::U32, IR::U32> Slot(IR::IREmitter& ir, Mode mode, const IR::U32& imm_index, std::pair<IR::U32, IR::U32> Slot(IR::IREmitter& ir, Mode mode, const IR::U32& imm_index,
const IR::U32& reg, const IR::U32& imm) { const IR::U32& reg, const IR::U32& imm_offset) {
switch (mode) { switch (mode) {
case Mode::Default: case Mode::Default:
return {imm_index, ir.IAdd(reg, imm)}; return {imm_index, ir.IAdd(reg, imm_offset)};
case Mode::IS: {
// Segmented addressing mode
// Ra+imm_offset points into a flat mapping of const buffer
// address space
const IR::U32 address{ir.IAdd(reg, imm_offset)};
const IR::U32 index{ir.BitFieldExtract(address, ir.Imm32(16), ir.Imm32(16))};
const IR::U32 offset{ir.BitFieldExtract(address, ir.Imm32(0), ir.Imm32(16))};
return {ir.IAdd(index, imm_index), offset};
}
default: default:
break; break;
} }