KhronosGroup / glslang

Khronos-reference front end for GLSL/ESSL, partial front end for HLSL, and a SPIR-V generator.
Other
3.09k stars 847 forks source link

Unsupported types in HLSL: float16_t2 and float16_t3 #3093

Open TheJackiMonster opened 1 year ago

TheJackiMonster commented 1 year ago

When trying to compile the shader from here I got the following compilation error:

ERROR: 0:21: 'scalar or vector type' : Expected 
ERROR: 0:21: 'declaration' : Expected 
(21): error at column 22, HLSL parsing failed.

So these types (float16_t2 and float16_t3) don't get treated as actual types by the compiler while float16_t exists. As a workaround it is possible to make a typedef before the actual code using them. But a proper solution would be better.

To clarify I have tried whether it just depends on the 16bit type feature but independent of me enabling it, the vector types are not treated as existing types.

greg-lunarg commented 1 year ago

Yes, unfortunately it appears that these types are not supported at this time.