glsl: Fix "reg" allocing

based on glasm with some tweaks
This commit is contained in:
ameerj 2021-05-20 23:38:38 -04:00
parent fda83fe3c5
commit 3355c467e0
10 changed files with 938 additions and 898 deletions

View file

@ -35,7 +35,7 @@ void SetDefinition(EmitContext& ctx, IR::Inst* inst, Args... args) {
template <typename ArgType>
ArgType Arg(EmitContext& ctx, const IR::Value& arg) {
if constexpr (std::is_same_v<ArgType, std::string_view>) {
if constexpr (std::is_same_v<ArgType, std::string>) {
return ctx.reg_alloc.Consume(arg);
} else if constexpr (std::is_same_v<ArgType, IR::Inst&>) {
return *arg.Inst();