diff options
| author | 2019-09-18 16:26:05 -0400 | |
|---|---|---|
| committer | 2019-09-18 16:26:05 -0400 | |
| commit | b31880dc5e0d9aab1171d3476453ad2db00cfd3a (patch) | |
| tree | b1ec38b1d4be6f1f61d987608d99d1f6ee428a83 /src/video_core/shader/node.h | |
| parent | Merge pull request #2851 from ReinUsesLisp/srgb (diff) | |
| parent | gl_shader_decompiler: Implement shared memory (diff) | |
| download | yuzu-b31880dc5e0d9aab1171d3476453ad2db00cfd3a.tar.gz yuzu-b31880dc5e0d9aab1171d3476453ad2db00cfd3a.tar.xz yuzu-b31880dc5e0d9aab1171d3476453ad2db00cfd3a.zip | |
Merge pull request #2784 from ReinUsesLisp/smem
shader_ir: Implement shared memory
Diffstat (limited to 'src/video_core/shader/node.h')
| -rw-r--r-- | src/video_core/shader/node.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/video_core/shader/node.h b/src/video_core/shader/node.h index b47b201cf..425111cc4 100644 --- a/src/video_core/shader/node.h +++ b/src/video_core/shader/node.h | |||
| @@ -206,12 +206,13 @@ class PredicateNode; | |||
| 206 | class AbufNode; | 206 | class AbufNode; |
| 207 | class CbufNode; | 207 | class CbufNode; |
| 208 | class LmemNode; | 208 | class LmemNode; |
| 209 | class SmemNode; | ||
| 209 | class GmemNode; | 210 | class GmemNode; |
| 210 | class CommentNode; | 211 | class CommentNode; |
| 211 | 212 | ||
| 212 | using NodeData = | 213 | using NodeData = |
| 213 | std::variant<OperationNode, ConditionalNode, GprNode, ImmediateNode, InternalFlagNode, | 214 | std::variant<OperationNode, ConditionalNode, GprNode, ImmediateNode, InternalFlagNode, |
| 214 | PredicateNode, AbufNode, CbufNode, LmemNode, GmemNode, CommentNode>; | 215 | PredicateNode, AbufNode, CbufNode, LmemNode, SmemNode, GmemNode, CommentNode>; |
| 215 | using Node = std::shared_ptr<NodeData>; | 216 | using Node = std::shared_ptr<NodeData>; |
| 216 | using Node4 = std::array<Node, 4>; | 217 | using Node4 = std::array<Node, 4>; |
| 217 | using NodeBlock = std::vector<Node>; | 218 | using NodeBlock = std::vector<Node>; |
| @@ -583,6 +584,19 @@ private: | |||
| 583 | Node address; | 584 | Node address; |
| 584 | }; | 585 | }; |
| 585 | 586 | ||
| 587 | /// Shared memory node | ||
| 588 | class SmemNode final { | ||
| 589 | public: | ||
| 590 | explicit SmemNode(Node address) : address{std::move(address)} {} | ||
| 591 | |||
| 592 | const Node& GetAddress() const { | ||
| 593 | return address; | ||
| 594 | } | ||
| 595 | |||
| 596 | private: | ||
| 597 | Node address; | ||
| 598 | }; | ||
| 599 | |||
| 586 | /// Global memory node | 600 | /// Global memory node |
| 587 | class GmemNode final { | 601 | class GmemNode final { |
| 588 | public: | 602 | public: |