KhronosGroup / SPIRV-Cross

SPIRV-Cross is a practical tool and library for performing reflection on SPIR-V and disassembling SPIR-V back to high level languages.
Apache License 2.0
2.09k stars 569 forks source link

[GLSL] Packing functions emulation #1997

Open konstantinegorov opened 2 years ago

konstantinegorov commented 2 years ago

It would be nice if spirv-cross would emulate packing functions (like packHalf2x16) if glsl doesn't support them. Google angle project do that (BuiltInFunctionEmulatorGLSL.cpp).

HansKristian-Work commented 2 years ago

How would that work? packHalf2x16 is supported on targets that support proper integer math, and you'd need that to do FP32 -> FP16 in software.