diff options
| author | bunnei <bunneidev@gmail.com> | 2020-01-04 14:05:17 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-01-04 14:05:17 -0500 |
| commit | cd0a7dfdbc3ed3ce83a2ad5bb143f46e4f92dfb8 (patch) | |
| tree | e60c9786f929a2b35c7f23ee7a7dbebcc14eb7a7 /src/video_core/shader/shader_ir.h | |
| parent | 624a0f7f3f4100fc56e3d70603a30384a21e7dc6 (diff) | |
| parent | 3dd6b55851978440f39487a6ad06b30b792b3b36 (diff) | |
Merge pull request #3258 from FernandoS27/shader-amend
Shader_IR: add the ability to amend code in the shader ir.
Diffstat (limited to 'src/video_core/shader/shader_ir.h')
| -rw-r--r-- | src/video_core/shader/shader_ir.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/video_core/shader/shader_ir.h b/src/video_core/shader/shader_ir.h index baed06ccd..aacd0a0da 100644 --- a/src/video_core/shader/shader_ir.h +++ b/src/video_core/shader/shader_ir.h @@ -176,6 +176,10 @@ public: /// Returns a condition code evaluated from internal flags Node GetConditionCode(Tegra::Shader::ConditionCode cc) const; + const Node& GetAmendNode(std::size_t index) const { + return amend_code[index]; + } + private: friend class ASTDecoder; @@ -392,6 +396,9 @@ private: Tegra::Shader::Instruction instr, bool is_write); + /// Register new amending code and obtain the reference id. + std::size_t DeclareAmend(Node new_amend); + const ProgramCode& program_code; const u32 main_offset; const CompilerSettings settings; @@ -406,6 +413,7 @@ private: std::map<u32, NodeBlock> basic_blocks; NodeBlock global_code; ASTManager program_manager{true, true}; + std::vector<Node> amend_code; std::set<u32> used_registers; std::set<Tegra::Shader::Pred> used_predicates; |
