diff options
| author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2019-12-30 13:54:53 -0400 |
|---|---|---|
| committer | FernandoS27 <fsahmkow27@gmail.com> | 2019-12-30 15:31:48 -0400 |
| commit | b3371ed09e6866e235141119f9eecc2bb962dc8d (patch) | |
| tree | 06619df9bd72cc0d73a3869b040b20804e2d3109 /src/video_core/shader/shader_ir.h | |
| parent | f846e3d6d0e973485a53bb87b913059060dcfdbc (diff) | |
Shader_IR: add the ability to amend code in the shader ir.
This commit introduces a mechanism by which shader IR code can be
amended and extended. This useful for track algorithms where certain
information can derived from before the track such as indexes to array
samplers.
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..52f130e1b 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(u32 index) const { + return amend_code[index]; + } + private: friend class ASTDecoder; @@ -392,6 +396,9 @@ private: Tegra::Shader::Instruction instr, bool is_write); + /// Amends + u32 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}; + NodeBlock amend_code; std::set<u32> used_registers; std::set<Tegra::Shader::Pred> used_predicates; |
