KhronosGroup / GLSL

GLSL Shading Language Specification and Extensions
Other
337 stars 98 forks source link

halfBitsToUInt16 is missing #215

Closed Novum closed 8 months ago

Novum commented 1 year ago

GL_EXT_shader_explicit_arithmetic_types should provide genU16Type halfBitsToUInt16(genF16Type value)

Minimal test:

#version 460
#extension GL_EXT_shader_explicit_arithmetic_types : enable

void main()
{
    halfBitsToUInt16(0.0hf);
}

Results in 'halfBitsToUInt16' : no matching overloaded function found

pdaniell-nv commented 1 year ago

What GLSL compiler are you using?

azhirnov commented 1 year ago

glslang: halfBitsToUInt16 - same error halfBitsToUint16 - ok

Novum commented 1 year ago

I now wonder if this is a spelling mistake in the extension text instead?

    | genI16Type halfBitsToInt16(genF16Type value)    | Returns a signed or unsigned |
    | genU16Type halfBitsToUInt16(genF16Type value)   | integer value representing   |
    | genI32Type floatBitsToInt(genF32Type value)     | the encoding of a floating   |
    | genU32Type floatBitsToUint(genF32Type value)    | point value.  The floating   |
    | genI64Type doubleBitsToInt64(genDType value)    | point value's bit-level      |
    | genU64Type doubleBitsToUint64(genDType value)   | representation is preserved. |
    | genI16Type float16BitsToInt16(genF16Type value) |                              |
    | genU16Type float16BitsToUint16(genF16Type value)|                              |

All the other ones are Uint instead of UInt. I was just copy/pasting the names directly from the extension spec.

Novum commented 1 year ago

https://github.com/KhronosGroup/GLSL/issues/217