Explorar el Código

shader_ir: Add local memory getters

ReinUsesLisp hace 7 años
padre
commit
12a95ff453
Se han modificado 2 ficheros con 7 adiciones y 0 borrados
  1. 4 0
      src/video_core/shader/shader_ir.cpp
  2. 3 0
      src/video_core/shader/shader_ir.h

+ 4 - 0
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) {

+ 3 - 0
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) {