summaryrefslogtreecommitdiffstats
path: root/src/video_core/shader/shader_ir.cpp
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2019-07-30 05:21:46 +0200
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-09-05 06:38:37 +0200
commitf17415d431777bb234714a3c6a97072872b2cc71 (patch)
treecb6d6fea921dc9609d2537976a8cbb4c4cb7811c /src/video_core/shader/shader_ir.cpp
parentMerge pull request #2797 from FearlessTobi/port-4877 (diff)
downloadyuzu-f17415d431777bb234714a3c6a97072872b2cc71.tar
yuzu-f17415d431777bb234714a3c6a97072872b2cc71.tar.gz
yuzu-f17415d431777bb234714a3c6a97072872b2cc71.tar.bz2
yuzu-f17415d431777bb234714a3c6a97072872b2cc71.tar.lz
yuzu-f17415d431777bb234714a3c6a97072872b2cc71.tar.xz
yuzu-f17415d431777bb234714a3c6a97072872b2cc71.tar.zst
yuzu-f17415d431777bb234714a3c6a97072872b2cc71.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));
}