diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2020-01-07 19:53:46 +0100 |
---|---|---|
committer | FernandoS27 <fsahmkow27@gmail.com> | 2020-01-24 21:43:31 +0100 |
commit | 3c34678627eeb1b48375cf70ec38b72691fedd1e (patch) | |
tree | 4a1ceb51da3946c9551e62f2bea6163db361ae48 /src/video_core/shader/node.h | |
parent | GL Backend: Introduce indexed samplers into the GL backend (diff) | |
download | yuzu-3c34678627eeb1b48375cf70ec38b72691fedd1e.tar yuzu-3c34678627eeb1b48375cf70ec38b72691fedd1e.tar.gz yuzu-3c34678627eeb1b48375cf70ec38b72691fedd1e.tar.bz2 yuzu-3c34678627eeb1b48375cf70ec38b72691fedd1e.tar.lz yuzu-3c34678627eeb1b48375cf70ec38b72691fedd1e.tar.xz yuzu-3c34678627eeb1b48375cf70ec38b72691fedd1e.tar.zst yuzu-3c34678627eeb1b48375cf70ec38b72691fedd1e.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/shader/node.h | 17 |
1 files changed, 16 insertions, 1 deletions
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<OperationNode, ConditionalNode, GprNode, ImmediateNode, +using NodeData = std::variant<OperationNode, ConditionalNode, GprNode, CustomVarNode, ImmediateNode, InternalFlagNode, PredicateNode, AbufNode, PatchNode, CbufNode, LmemNode, SmemNode, GmemNode, CommentNode>; using Node = std::shared_ptr<NodeData>; @@ -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: |