2ed171e525
Storage was in place already, so mostly just dealing with bitcasts and constants. Simplies some of the bitcasting logic, and this exposed some bugs in the implementation. Refactor to use correct width integers with explicit bitcast opcodes.
26 lines
548 B
GLSL
26 lines
548 B
GLSL
#version 450
|
|
#if defined(GL_AMD_gpu_shader_half_float)
|
|
#extension GL_AMD_gpu_shader_half_float : require
|
|
#elif defined(GL_NV_gpu_shader5)
|
|
#extension GL_NV_gpu_shader5 : require
|
|
#else
|
|
#error No extension available for FP16.
|
|
#endif
|
|
#if defined(GL_AMD_gpu_shader_int16)
|
|
#extension GL_AMD_gpu_shader_int16 : require
|
|
#else
|
|
#error No extension available for Int16.
|
|
#endif
|
|
|
|
layout(location = 0) out float16_t foo;
|
|
layout(location = 1) out int16_t bar;
|
|
layout(location = 2) out uint16_t baz;
|
|
|
|
void main()
|
|
{
|
|
foo = 1.0hf;
|
|
bar = 2s;
|
|
baz = 3us;
|
|
}
|
|
|