glsl: Add a more robust fp formatter

This commit is contained in:
ameerj 2021-05-22 23:31:30 -04:00
parent ac7b0ebcb7
commit cdde730219
4 changed files with 14 additions and 9 deletions

View file

@ -31,11 +31,11 @@ void EmitIMul32(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::strin
}
void EmitINeg32(EmitContext& ctx, IR::Inst& inst, std::string_view value) {
ctx.AddU32("{}=-{};", inst, value);
ctx.AddU32("{}=-({});", inst, value);
}
void EmitINeg64(EmitContext& ctx, IR::Inst& inst, std::string_view value) {
ctx.AddU64("{}=-{};", inst, value);
ctx.AddU64("{}=-({});", inst, value);
}
void EmitIAbs32(EmitContext& ctx, IR::Inst& inst, std::string_view value) {