summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/backend/glsl/reg_alloc.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/shader_recompiler/backend/glsl/reg_alloc.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/shader_recompiler/backend/glsl/reg_alloc.cpp b/src/shader_recompiler/backend/glsl/reg_alloc.cpp
index 9f529c358..8db1391fd 100644
--- a/src/shader_recompiler/backend/glsl/reg_alloc.cpp
+++ b/src/shader_recompiler/backend/glsl/reg_alloc.cpp
@@ -61,6 +61,12 @@ std::string MakeImm(const IR::Value& value) {
}
} // Anonymous namespace
+std::string RegAlloc::Define(IR::Inst& inst) {
+ const Id id{Alloc()};
+ inst.SetDefinition<Id>(id);
+ return Representation(id);
+}
+
std::string RegAlloc::Define(IR::Inst& inst, Type type) {
const Id id{Alloc()};
const auto type_str{GetType(type, id.index)};