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 af9696059c
commit 8d8ce24f20
9 changed files with 185 additions and 98 deletions

View file

@ -58,13 +58,13 @@ std::string FormatFloat(std::string_view value, IR::Type type) {
// TODO: Confirm FP64 nan/inf
if (type == IR::Type::F32) {
if (value == "nan") {
return "uintBitsToFloat(0x7fc00000)";
return "utof(0x7fc00000)";
}
if (value == "inf") {
return "uintBitsToFloat(0x7f800000)";
return "utof(0x7f800000)";
}
if (value == "-inf") {
return "uintBitsToFloat(0xff800000)";
return "utof(0xff800000)";
}
}
if (value.find_first_of('e') != std::string_view::npos) {