diff options
| author | 2021-05-20 23:38:38 -0400 | |
|---|---|---|
| committer | 2021-07-22 21:51:35 -0400 | |
| commit | 64337f004d9249c4408fec75bd1bbcc0f2a1408d (patch) | |
| tree | 401c988bd203d3b69f005640d31b154702888c6c /src/shader_recompiler/backend/glsl/reg_alloc.h | |
| parent | glsl: Initial backend (diff) | |
| download | yuzu-64337f004d9249c4408fec75bd1bbcc0f2a1408d.tar.gz yuzu-64337f004d9249c4408fec75bd1bbcc0f2a1408d.tar.xz yuzu-64337f004d9249c4408fec75bd1bbcc0f2a1408d.zip | |
glsl: Fix "reg" allocing
based on glasm with some tweaks
Diffstat (limited to 'src/shader_recompiler/backend/glsl/reg_alloc.h')
| -rw-r--r-- | src/shader_recompiler/backend/glsl/reg_alloc.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/shader_recompiler/backend/glsl/reg_alloc.h b/src/shader_recompiler/backend/glsl/reg_alloc.h index 850a93d6a..a777cbbd2 100644 --- a/src/shader_recompiler/backend/glsl/reg_alloc.h +++ b/src/shader_recompiler/backend/glsl/reg_alloc.h | |||
| @@ -29,6 +29,12 @@ public: | |||
| 29 | 29 | ||
| 30 | std::string Consume(const IR::Value& value); | 30 | std::string Consume(const IR::Value& value); |
| 31 | 31 | ||
| 32 | /// Returns true if the instruction is expected to be aliased to another | ||
| 33 | static bool IsAliased(const IR::Inst& inst); | ||
| 34 | |||
| 35 | /// Returns the underlying value out of an alias sequence | ||
| 36 | static IR::Inst& AliasInst(IR::Inst& inst); | ||
| 37 | |||
| 32 | private: | 38 | private: |
| 33 | static constexpr size_t NUM_REGS = 4096; | 39 | static constexpr size_t NUM_REGS = 4096; |
| 34 | static constexpr size_t NUM_ELEMENTS = 4; | 40 | static constexpr size_t NUM_ELEMENTS = 4; |