summaryrefslogtreecommitdiffstats
path: root/src/video_core/shader/shader_ir.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2019-09-18 22:26:05 +0200
committerGitHub <noreply@github.com>2019-09-18 22:26:05 +0200
commitb31880dc5e0d9aab1171d3476453ad2db00cfd3a (patch)
treeb1ec38b1d4be6f1f61d987608d99d1f6ee428a83 /src/video_core/shader/shader_ir.cpp
parentMerge pull request #2851 from ReinUsesLisp/srgb (diff)
parentgl_shader_decompiler: Implement shared memory (diff)
downloadyuzu-b31880dc5e0d9aab1171d3476453ad2db00cfd3a.tar
yuzu-b31880dc5e0d9aab1171d3476453ad2db00cfd3a.tar.gz
yuzu-b31880dc5e0d9aab1171d3476453ad2db00cfd3a.tar.bz2
yuzu-b31880dc5e0d9aab1171d3476453ad2db00cfd3a.tar.lz
yuzu-b31880dc5e0d9aab1171d3476453ad2db00cfd3a.tar.xz
yuzu-b31880dc5e0d9aab1171d3476453ad2db00cfd3a.tar.zst
yuzu-b31880dc5e0d9aab1171d3476453ad2db00cfd3a.zip
Diffstat (limited to 'src/video_core/shader/shader_ir.cpp')
-rw-r--r--src/video_core/shader/shader_ir.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/video_core/shader/shader_ir.cpp b/src/video_core/shader/shader_ir.cpp
index 1e5c7f660..bbbab0bca 100644
--- a/src/video_core/shader/shader_ir.cpp
+++ b/src/video_core/shader/shader_ir.cpp
@@ -137,6 +137,10 @@ Node ShaderIR::GetLocalMemory(Node address) {
return MakeNode<LmemNode>(std::move(address));
}
+Node ShaderIR::GetSharedMemory(Node address) {
+ return MakeNode<SmemNode>(std::move(address));
+}
+
Node ShaderIR::GetTemporary(u32 id) {
return GetRegister(Register::ZeroIndex + 1 + id);
}
@@ -378,6 +382,11 @@ void ShaderIR::SetLocalMemory(NodeBlock& bb, Node address, Node value) {
Operation(OperationCode::Assign, GetLocalMemory(std::move(address)), std::move(value)));
}
+void ShaderIR::SetSharedMemory(NodeBlock& bb, Node address, Node value) {
+ bb.push_back(
+ Operation(OperationCode::Assign, GetSharedMemory(std::move(address)), std::move(value)));
+}
+
void ShaderIR::SetTemporary(NodeBlock& bb, u32 id, Node value) {
SetRegister(bb, Register::ZeroIndex + 1 + id, std::move(value));
}