diff options
author | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-05-28 19:54:09 +0200 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:36 +0200 |
commit | f6bbc76336942454a862280e5b2158ceab49a173 (patch) | |
tree | b81e925154bfa7dbbd1aedc50d167fa87905b3db /src/shader_recompiler/backend/glsl/reg_alloc.h | |
parent | glsl: Fix bindings, add some CC ops (diff) | |
download | yuzu-f6bbc76336942454a862280e5b2158ceab49a173.tar yuzu-f6bbc76336942454a862280e5b2158ceab49a173.tar.gz yuzu-f6bbc76336942454a862280e5b2158ceab49a173.tar.bz2 yuzu-f6bbc76336942454a862280e5b2158ceab49a173.tar.lz yuzu-f6bbc76336942454a862280e5b2158ceab49a173.tar.xz yuzu-f6bbc76336942454a862280e5b2158ceab49a173.tar.zst yuzu-f6bbc76336942454a862280e5b2158ceab49a173.zip |
Diffstat (limited to '')
-rw-r--r-- | src/shader_recompiler/backend/glsl/reg_alloc.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/shader_recompiler/backend/glsl/reg_alloc.h b/src/shader_recompiler/backend/glsl/reg_alloc.h index 2dc506c58..6c293f9d1 100644 --- a/src/shader_recompiler/backend/glsl/reg_alloc.h +++ b/src/shader_recompiler/backend/glsl/reg_alloc.h @@ -5,6 +5,7 @@ #pragma once #include <bitset> +#include <vector> #include "common/bit_field.h" #include "common/common_types.h" @@ -61,19 +62,21 @@ public: std::string Define(IR::Inst& inst, IR::Type type); std::string Consume(const IR::Value& value); + std::string Consume(IR::Inst& inst); + std::string GetGlslType(Type type); std::string GetGlslType(IR::Type type); + size_t num_used_registers{}; + std::vector<std::string> reg_types; + private: static constexpr size_t NUM_REGS = 4096; - static constexpr size_t NUM_ELEMENTS = 4; - std::string Consume(IR::Inst& inst); Type RegType(IR::Type type); Id Alloc(); void Free(Id id); - size_t num_used_registers{}; std::bitset<NUM_REGS> register_use{}; std::bitset<NUM_REGS> register_defined{}; }; |