diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2020-01-07 19:53:46 +0100 |
---|---|---|
committer | FernandoS27 <fsahmkow27@gmail.com> | 2020-01-24 21:43:31 +0100 |
commit | 3c34678627eeb1b48375cf70ec38b72691fedd1e (patch) | |
tree | 4a1ceb51da3946c9551e62f2bea6163db361ae48 /src/video_core/shader/shader_ir.h | |
parent | GL Backend: Introduce indexed samplers into the GL backend (diff) | |
download | yuzu-3c34678627eeb1b48375cf70ec38b72691fedd1e.tar yuzu-3c34678627eeb1b48375cf70ec38b72691fedd1e.tar.gz yuzu-3c34678627eeb1b48375cf70ec38b72691fedd1e.tar.bz2 yuzu-3c34678627eeb1b48375cf70ec38b72691fedd1e.tar.lz yuzu-3c34678627eeb1b48375cf70ec38b72691fedd1e.tar.xz yuzu-3c34678627eeb1b48375cf70ec38b72691fedd1e.tar.zst yuzu-3c34678627eeb1b48375cf70ec38b72691fedd1e.zip |
Diffstat (limited to 'src/video_core/shader/shader_ir.h')
-rw-r--r-- | src/video_core/shader/shader_ir.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/video_core/shader/shader_ir.h b/src/video_core/shader/shader_ir.h index 121528346..2fe14e815 100644 --- a/src/video_core/shader/shader_ir.h +++ b/src/video_core/shader/shader_ir.h @@ -180,6 +180,10 @@ public: return amend_code[index]; } + u32 GetCustomVariablesAmount() const { + return num_custom_variables; + } + private: friend class ASTDecoder; @@ -236,6 +240,8 @@ private: /// Generates a node for a passed register. Node GetRegister(Tegra::Shader::Register reg); + /// Generates a node for a custom variable + Node GetCustomVariable(u32 id); /// Generates a node representing a 19-bit immediate value Node GetImmediate19(Tegra::Shader::Instruction instr); /// Generates a node representing a 32-bit immediate value @@ -403,6 +409,8 @@ private: /// Register new amending code and obtain the reference id. std::size_t DeclareAmend(Node new_amend); + u32 NewCustomVariable(); + const ProgramCode& program_code; const u32 main_offset; const CompilerSettings settings; @@ -418,6 +426,7 @@ private: NodeBlock global_code; ASTManager program_manager{true, true}; std::vector<Node> amend_code; + u32 num_custom_variables{}; std::set<u32> used_registers; std::set<Tegra::Shader::Pred> used_predicates; |