diff options
| author | bunnei <bunneidev@gmail.com> | 2020-02-01 20:41:40 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-01 20:41:40 -0500 |
| commit | b5bbe7e752d5d36839a86638bfaa4b4c348497cd (patch) | |
| tree | b16b3f8ce5ec6233f9f822ad56418d74f0cd47ae /src/video_core/shader/shader_ir.cpp | |
| parent | 2916c1bc2588cc189080dc87818f57875ae1d4a4 (diff) | |
| parent | bb8eb15d392d69693f8cda0427669d011e23db97 (diff) | |
Merge pull request #3282 from FernandoS27/indexed-samplers
Partially implement Indexed samplers in general and specific code in GLSL
Diffstat (limited to 'src/video_core/shader/shader_ir.cpp')
| -rw-r--r-- | src/video_core/shader/shader_ir.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/video_core/shader/shader_ir.cpp b/src/video_core/shader/shader_ir.cpp index 31eecb3f4..3a5d280a9 100644 --- a/src/video_core/shader/shader_ir.cpp +++ b/src/video_core/shader/shader_ir.cpp @@ -27,6 +27,7 @@ ShaderIR::ShaderIR(const ProgramCode& program_code, u32 main_offset, CompilerSet ConstBufferLocker& locker) : program_code{program_code}, main_offset{main_offset}, settings{settings}, locker{locker} { Decode(); + PostDecode(); } ShaderIR::~ShaderIR() = default; @@ -38,6 +39,10 @@ Node ShaderIR::GetRegister(Register reg) { return MakeNode<GprNode>(reg); } +Node ShaderIR::GetCustomVariable(u32 id) { + return MakeNode<CustomVarNode>(id); +} + Node ShaderIR::GetImmediate19(Instruction instr) { return Immediate(instr.alu.GetImm20_19()); } @@ -452,4 +457,8 @@ std::size_t ShaderIR::DeclareAmend(Node new_amend) { return id; } +u32 ShaderIR::NewCustomVariable() { + return num_custom_variables++; +} + } // namespace VideoCommon::Shader |
