mirror of
https://github.com/yuzu-emu/yuzu-mainline.git
synced 2024-12-23 20:15:35 +00:00
shader/memory: Implement STL.S16 and STS.S16
This commit is contained in:
parent
9a2cdf8520
commit
d26e74f0a3
|
@ -291,9 +291,9 @@ u32 ShaderIR::DecodeMemory(NodeBlock& bb, u32 pc) {
|
||||||
return Operation(OperationCode::IAdd, NO_PRECISE, GetRegister(instr.gpr8), immediate);
|
return Operation(OperationCode::IAdd, NO_PRECISE, GetRegister(instr.gpr8), immediate);
|
||||||
};
|
};
|
||||||
|
|
||||||
const auto set_memory = opcode->get().GetId() == OpCode::Id::ST_L
|
const bool is_local = opcode->get().GetId() == OpCode::Id::ST_L;
|
||||||
? &ShaderIR::SetLocalMemory
|
const auto set_memory = is_local ? &ShaderIR::SetLocalMemory : &ShaderIR::SetSharedMemory;
|
||||||
: &ShaderIR::SetSharedMemory;
|
const auto get_memory = is_local ? &ShaderIR::GetLocalMemory : &ShaderIR::GetSharedMemory;
|
||||||
|
|
||||||
switch (instr.ldst_sl.type.Value()) {
|
switch (instr.ldst_sl.type.Value()) {
|
||||||
case StoreType::Bits128:
|
case StoreType::Bits128:
|
||||||
|
@ -306,6 +306,13 @@ u32 ShaderIR::DecodeMemory(NodeBlock& bb, u32 pc) {
|
||||||
case StoreType::Bits32:
|
case StoreType::Bits32:
|
||||||
(this->*set_memory)(bb, GetAddress(0), GetRegister(instr.gpr0));
|
(this->*set_memory)(bb, GetAddress(0), GetRegister(instr.gpr0));
|
||||||
break;
|
break;
|
||||||
|
case StoreType::Signed16: {
|
||||||
|
Node address = GetAddress(0);
|
||||||
|
Node memory = (this->*get_memory)(address);
|
||||||
|
(this->*set_memory)(
|
||||||
|
bb, address, InsertUnaligned(memory, GetRegister(instr.gpr0), address, 0b10, 16));
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
UNIMPLEMENTED_MSG("{} unhandled type: {}", opcode->get().GetName(),
|
UNIMPLEMENTED_MSG("{} unhandled type: {}", opcode->get().GetName(),
|
||||||
static_cast<u32>(instr.ldst_sl.type.Value()));
|
static_cast<u32>(instr.ldst_sl.type.Value()));
|
||||||
|
|
Loading…
Reference in a new issue