mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2025-06-16 11:28:15 -05:00
Shader_IR: Implement Injectable Custom Variables to the IR.
This commit is contained in:
committed by
FernandoS27
parent
2b02f29a2d
commit
3c34678627
@ -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:
|
||||
|
Reference in New Issue
Block a user