From 394f9060442a94dd9d4da143e88edb5c0a48acdb Mon Sep 17 00:00:00 2001
From: ReinUsesLisp <reinuseslisp@airmail.cc>
Date: Thu, 20 Dec 2018 22:51:38 -0300
Subject: [PATCH] shader_ir: Add local memory getters

---
 src/video_core/shader/shader_ir.cpp | 4 ++++
 src/video_core/shader/shader_ir.h   | 3 +++
 2 files changed, 7 insertions(+)

diff --git a/src/video_core/shader/shader_ir.cpp b/src/video_core/shader/shader_ir.cpp
index 62a139e56e..42695149fe 100644
--- a/src/video_core/shader/shader_ir.cpp
+++ b/src/video_core/shader/shader_ir.cpp
@@ -117,6 +117,10 @@ Node ShaderIR::GetInternalFlag(InternalFlag flag, bool negated) {
     return node;
 }
 
+Node ShaderIR::GetLocalMemory(Node address) {
+    return StoreNode(LmemNode(address));
+}
+
 /*static*/ OperationCode ShaderIR::SignedToUnsignedCode(OperationCode operation_code,
                                                         bool is_signed) {
     if (is_signed) {
diff --git a/src/video_core/shader/shader_ir.h b/src/video_core/shader/shader_ir.h
index d839d1f1b4..64c30bb6a2 100644
--- a/src/video_core/shader/shader_ir.h
+++ b/src/video_core/shader/shader_ir.h
@@ -631,6 +631,9 @@ private:
     Node GetOutputAttribute(Tegra::Shader::Attribute::Index index, u64 element, Node buffer);
     /// Generates a node representing an internal flag
     Node GetInternalFlag(InternalFlag flag, bool negated = false);
+    /// Generates a node representing a local memory address
+    Node GetLocalMemory(Node address);
+
 
     template <typename... T>
     inline Node Operation(OperationCode code, const T*... operands) {