From 3c34678627eeb1b48375cf70ec38b72691fedd1e Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Tue, 7 Jan 2020 14:53:46 -0400 Subject: Shader_IR: Implement Injectable Custom Variables to the IR. --- src/video_core/shader/node.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src/video_core/shader/node.h') diff --git a/src/video_core/shader/node.h b/src/video_core/shader/node.h index 2f29b9506..db06767f6 100644 --- a/src/video_core/shader/node.h +++ b/src/video_core/shader/node.h @@ -212,6 +212,7 @@ enum class MetaStackClass { class OperationNode; class ConditionalNode; class GprNode; +class CustomVarNode; class ImmediateNode; class InternalFlagNode; class PredicateNode; @@ -223,7 +224,7 @@ class SmemNode; class GmemNode; class CommentNode; -using NodeData = std::variant; using Node = std::shared_ptr; @@ -550,6 +551,20 @@ private: Tegra::Shader::Register index{}; }; +/// A custom variable +class CustomVarNode final { +public: + explicit constexpr CustomVarNode(u32 index) : index{index} {} + + u32 GetIndex() const { + return index; + } + +private: + u32 index{}; +}; + + /// A 32-bits value that represents an immediate value class ImmediateNode final { public: -- cgit v1.2.3