diff options
| author | 2019-12-10 08:01:41 -0400 | |
|---|---|---|
| committer | 2019-12-10 08:01:41 -0400 | |
| commit | 6edadef96d57cb021d0131929d5a122ae102ad9e (patch) | |
| tree | e7f42fb2af3b1d83665725db9034d8fb6f3d6c78 /src/video_core/shader/node.h | |
| parent | Merge pull request #3205 from ReinUsesLisp/vk-device (diff) | |
| parent | vk_shader_decompiler: Fix build issues on old gcc versions (diff) | |
| download | yuzu-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.h | 21 |
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; | |||
| 213 | class AbufNode; | 214 | class AbufNode; |
| 214 | class CbufNode; | 215 | class CbufNode; |
| 215 | class LmemNode; | 216 | class LmemNode; |
| 217 | class PatchNode; | ||
| 216 | class SmemNode; | 218 | class SmemNode; |
| 217 | class GmemNode; | 219 | class GmemNode; |
| 218 | class CommentNode; | 220 | class CommentNode; |
| 219 | 221 | ||
| 220 | using NodeData = | 222 | using 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>; |
| 223 | using Node = std::shared_ptr<NodeData>; | 225 | using Node = std::shared_ptr<NodeData>; |
| 224 | using Node4 = std::array<Node, 4>; | 226 | using Node4 = std::array<Node, 4>; |
| 225 | using NodeBlock = std::vector<Node>; | 227 | using 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). | ||
| 548 | class PatchNode final { | ||
| 549 | public: | ||
| 550 | explicit PatchNode(u32 offset) : offset{offset} {} | ||
| 551 | |||
| 552 | u32 GetOffset() const { | ||
| 553 | return offset; | ||
| 554 | } | ||
| 555 | |||
| 556 | private: | ||
| 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 |
| 546 | class CbufNode final { | 561 | class CbufNode final { |
| 547 | public: | 562 | public: |