summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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) {
291 return Operation(OperationCode::IAdd, NO_PRECISE, GetRegister(instr.gpr8), immediate); 291 return Operation(OperationCode::IAdd, NO_PRECISE, GetRegister(instr.gpr8), immediate);
292 }; 292 };
293 293
294 const auto set_memory = opcode->get().GetId() == OpCode::Id::ST_L 294 const bool is_local = opcode->get().GetId() == OpCode::Id::ST_L;
295 ? &ShaderIR::SetLocalMemory 295 const auto set_memory = is_local ? &ShaderIR::SetLocalMemory : &ShaderIR::SetSharedMemory;
296 : &ShaderIR::SetSharedMemory; 296 const auto get_memory = is_local ? &ShaderIR::GetLocalMemory : &ShaderIR::GetSharedMemory;
297 297
298 switch (instr.ldst_sl.type.Value()) { 298 switch (instr.ldst_sl.type.Value()) {
299 case StoreType::Bits128: 299 case StoreType::Bits128:
@@ -306,6 +306,13 @@ u32 ShaderIR::DecodeMemory(NodeBlock& bb, u32 pc) {
306 case StoreType::Bits32: 306 case StoreType::Bits32:
307 (this->*set_memory)(bb, GetAddress(0), GetRegister(instr.gpr0)); 307 (this->*set_memory)(bb, GetAddress(0), GetRegister(instr.gpr0));
308 break; 308 break;
309 case StoreType::Signed16: {
310 Node address = GetAddress(0);
311 Node memory = (this->*get_memory)(address);
312 (this->*set_memory)(
313 bb, address, InsertUnaligned(memory, GetRegister(instr.gpr0), address, 0b10, 16));
314 break;
315 }
309 default: 316 default:
310 UNIMPLEMENTED_MSG("{} unhandled type: {}", opcode->get().GetName(), 317 UNIMPLEMENTED_MSG("{} unhandled type: {}", opcode->get().GetName(),
311 static_cast<u32>(instr.ldst_sl.type.Value())); 318 static_cast<u32>(instr.ldst_sl.type.Value()));