glsl: WIP var forward declaration

to fix Loop control flow.
This commit is contained in:
ameerj
2021-05-28 13:54:09 -04:00
parent 2a71333716
commit f6bbc76336
6 changed files with 60 additions and 49 deletions

View File

@ -74,7 +74,9 @@ std::string RegAlloc::Define(IR::Inst& inst, Type type) {
std::string type_str = "";
if (!register_defined[id.index]) {
register_defined[id.index] = true;
type_str = GetGlslType(type);
// type_str = GetGlslType(type);
reg_types.push_back(GetGlslType(type));
++num_used_registers;
}
inst.SetDefinition<Id>(id);
return type_str + Representation(id);