I'm trying to run some really basic shaders using half/min16Float/mediump float/... through glslangValidator, spirv-opt, spriv-cross. The shaders, script, and results are over here:
Was this work completed for GLSL? Was this work completed for HLSL? The best results regarding inputs/outputs was using HLSL. The results I was able to get were better, but it seemed like there were no "half" definitions of functions for either syntax, and that resulted in tons of casting being needed even in HSLSL. On the GLSL side, no support for float16_t, fp16vec/2/3/4 was found. "mediump float" isn't the same since it can't be used in casts like a type/typedef like half/2/3/4.
And other than this effort, what is the recommended way to generate half shaders for mobile platforms? There's very little docs, examples, etc of dealing with this case for Vulkan.
I'm trying to run some really basic shaders using half/min16Float/mediump float/... through glslangValidator, spirv-opt, spriv-cross. The shaders, script, and results are over here:
https://github.com/google/shaderc/issues/1177
This is all based on the work detailed here by Greg Fischer found here. https://www.lunarg.com/wp-content/uploads/2019/09/Automatic-RelaxedPrecision-Decoration-and-Conversion-in-Spirv-Opt_r1.pdf
Was this work completed for GLSL? Was this work completed for HLSL? The best results regarding inputs/outputs was using HLSL. The results I was able to get were better, but it seemed like there were no "half" definitions of functions for either syntax, and that resulted in tons of casting being needed even in HSLSL. On the GLSL side, no support for float16_t, fp16vec/2/3/4 was found. "mediump float" isn't the same since it can't be used in casts like a type/typedef like half/2/3/4.
And other than this effort, what is the recommended way to generate half shaders for mobile platforms? There's very little docs, examples, etc of dealing with this case for Vulkan.