summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/backend/glsl/reg_alloc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/shader_recompiler/backend/glsl/reg_alloc.cpp')
-rw-r--r--src/shader_recompiler/backend/glsl/reg_alloc.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/shader_recompiler/backend/glsl/reg_alloc.cpp b/src/shader_recompiler/backend/glsl/reg_alloc.cpp
index 8db1391fd..58c2c408e 100644
--- a/src/shader_recompiler/backend/glsl/reg_alloc.cpp
+++ b/src/shader_recompiler/backend/glsl/reg_alloc.cpp
@@ -74,6 +74,23 @@ std::string RegAlloc::Define(IR::Inst& inst, Type type) {
return type_str + Representation(id);
}
+std::string RegAlloc::Define(IR::Inst& inst, IR::Type type) {
+ switch (type) {
+ case IR::Type::U1:
+ return Define(inst, Type::U1);
+ case IR::Type::U32:
+ return Define(inst, Type::U32);
+ case IR::Type::F32:
+ return Define(inst, Type::F32);
+ case IR::Type::U64:
+ return Define(inst, Type::U64);
+ case IR::Type::F64:
+ return Define(inst, Type::F64);
+ default:
+ throw NotImplementedException("IR type {}", type);
+ }
+}
+
std::string RegAlloc::Consume(const IR::Value& value) {
return value.IsImmediate() ? MakeImm(value) : Consume(*value.InstRecursive());
}