summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2020-01-25 06:30:20 +0100
committerReinUsesLisp <reinuseslisp@airmail.cc>2020-01-25 07:16:10 +0100
commitd26e74f0a3af0e015f7d33f06d1381d8f0d21e93 (patch)
treebb61633d3ad8401d03e62569f50b506fa8e1e7fc /src/video_core
parentshader/memory: Implement unaligned LDL.S16 and LDS.S16 (diff)
downloadyuzu-d26e74f0a3af0e015f7d33f06d1381d8f0d21e93.tar
yuzu-d26e74f0a3af0e015f7d33f06d1381d8f0d21e93.tar.gz
yuzu-d26e74f0a3af0e015f7d33f06d1381d8f0d21e93.tar.bz2
yuzu-d26e74f0a3af0e015f7d33f06d1381d8f0d21e93.tar.lz
yuzu-d26e74f0a3af0e015f7d33f06d1381d8f0d21e93.tar.xz
yuzu-d26e74f0a3af0e015f7d33f06d1381d8f0d21e93.tar.zst
yuzu-d26e74f0a3af0e015f7d33f06d1381d8f0d21e93.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/shader/decode/memory.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/video_core/shader/decode/memory.cpp b/src/video_core/shader/decode/memory.cpp
index 8cd0e7d96..58744d29a 100644
--- a/src/video_core/shader/decode/memory.cpp
+++ b/src/video_core/shader/decode/memory.cpp
@@ -291,9 +291,9 @@ u32 ShaderIR::DecodeMemory(NodeBlock& bb, u32 pc) {
return Operation(OperationCode::IAdd, NO_PRECISE, GetRegister(instr.gpr8), immediate);
};
- const auto set_memory = opcode->get().GetId() == OpCode::Id::ST_L
- ? &ShaderIR::SetLocalMemory
- : &ShaderIR::SetSharedMemory;
+ const bool is_local = opcode->get().GetId() == OpCode::Id::ST_L;
+ const auto set_memory = is_local ? &ShaderIR::SetLocalMemory : &ShaderIR::SetSharedMemory;
+ const auto get_memory = is_local ? &ShaderIR::GetLocalMemory : &ShaderIR::GetSharedMemory;
switch (instr.ldst_sl.type.Value()) {
case StoreType::Bits128:
@@ -306,6 +306,13 @@ u32 ShaderIR::DecodeMemory(NodeBlock& bb, u32 pc) {
case StoreType::Bits32:
(this->*set_memory)(bb, GetAddress(0), GetRegister(instr.gpr0));
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:
UNIMPLEMENTED_MSG("{} unhandled type: {}", opcode->get().GetName(),
static_cast<u32>(instr.ldst_sl.type.Value()));