summaryrefslogtreecommitdiff
path: root/src/video_core/shader/node.h
diff options
context:
space:
mode:
authorGravatar Fernando Sahmkow2019-12-10 08:01:41 -0400
committerGravatar GitHub2019-12-10 08:01:41 -0400
commit6edadef96d57cb021d0131929d5a122ae102ad9e (patch)
treee7f42fb2af3b1d83665725db9034d8fb6f3d6c78 /src/video_core/shader/node.h
parentMerge pull request #3205 from ReinUsesLisp/vk-device (diff)
parentvk_shader_decompiler: Fix build issues on old gcc versions (diff)
downloadyuzu-6edadef96d57cb021d0131929d5a122ae102ad9e.tar.gz
yuzu-6edadef96d57cb021d0131929d5a122ae102ad9e.tar.xz
yuzu-6edadef96d57cb021d0131929d5a122ae102ad9e.zip
Merge pull request #3208 from ReinUsesLisp/vk-shader-decompiler
vk_shader_decompiler: Add tessellation and misc changes
Diffstat (limited to 'src/video_core/shader/node.h')
-rw-r--r--src/video_core/shader/node.h21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/video_core/shader/node.h b/src/video_core/shader/node.h
index b2576bdd6..1a4d28ae9 100644
--- a/src/video_core/shader/node.h
+++ b/src/video_core/shader/node.h
@@ -172,6 +172,7 @@ enum class OperationCode {
172 EmitVertex, /// () -> void 172 EmitVertex, /// () -> void
173 EndPrimitive, /// () -> void 173 EndPrimitive, /// () -> void
174 174
175 InvocationId, /// () -> int
175 YNegate, /// () -> float 176 YNegate, /// () -> float
176 LocalInvocationIdX, /// () -> uint 177 LocalInvocationIdX, /// () -> uint
177 LocalInvocationIdY, /// () -> uint 178 LocalInvocationIdY, /// () -> uint
@@ -213,13 +214,14 @@ class PredicateNode;
213class AbufNode; 214class AbufNode;
214class CbufNode; 215class CbufNode;
215class LmemNode; 216class LmemNode;
217class PatchNode;
216class SmemNode; 218class SmemNode;
217class GmemNode; 219class GmemNode;
218class CommentNode; 220class CommentNode;
219 221
220using NodeData = 222using NodeData = std::variant<OperationNode, ConditionalNode, GprNode, ImmediateNode,
221 std::variant<OperationNode, ConditionalNode, GprNode, ImmediateNode, InternalFlagNode, 223 InternalFlagNode, PredicateNode, AbufNode, PatchNode, CbufNode,
222 PredicateNode, AbufNode, CbufNode, LmemNode, SmemNode, GmemNode, CommentNode>; 224 LmemNode, SmemNode, GmemNode, CommentNode>;
223using Node = std::shared_ptr<NodeData>; 225using Node = std::shared_ptr<NodeData>;
224using Node4 = std::array<Node, 4>; 226using Node4 = std::array<Node, 4>;
225using NodeBlock = std::vector<Node>; 227using NodeBlock = std::vector<Node>;
@@ -542,6 +544,19 @@ private:
542 u32 element{}; 544 u32 element{};
543}; 545};
544 546
547/// Patch memory (used to communicate tessellation stages).
548class PatchNode final {
549public:
550 explicit PatchNode(u32 offset) : offset{offset} {}
551
552 u32 GetOffset() const {
553 return offset;
554 }
555
556private:
557 u32 offset{};
558};
559
545/// Constant buffer node, usually mapped to uniform buffers in GLSL 560/// Constant buffer node, usually mapped to uniform buffers in GLSL
546class CbufNode final { 561class CbufNode final {
547public: 562public: