glsl: Implement Load/WriteGlobal

along with some other misc changes and fixes
This commit is contained in:
ameerj 2021-06-03 19:15:36 -04:00
parent d19a49485a
commit 2e8da9d3be
9 changed files with 185 additions and 98 deletions

View file

@ -39,7 +39,7 @@ void SsboCasFunctionF32(EmitContext& ctx, IR::Inst& inst, const IR::Value& bindi
ctx.var_alloc.Consume(offset))};
const auto ret{ctx.var_alloc.Define(inst, GlslVarType::U32)};
ctx.Add(cas_loop.data(), ssbo, ret, ssbo, function, ssbo, value, ret);
ctx.AddF32("{}=uintBitsToFloat({});", inst, ret);
ctx.AddF32("{}=utof({});", inst, ret);
}
} // namespace