vkCreateGraphicsPipelines fails with:
NVVM compilation failed: 1
WARNING:
GENERAL [NVIDIA (2)] : CreatePipeline: failed to compile internal representation
WARNING:
GENERAL [NVIDIA (2)] : CreatePipeline: unexpected compilation failure
WARNING:
GENERAL [NVIDIA (2)] : CreateGraphicsPipeline: unexpected failure compiling SPIR-V shader
For shader code:
#version 460
#extension GL_EXT_shader_explicit_arithmetic_types : require
precision highp float;
layout (set = 0, binding = 0) uniform U {
float16_t hue;
float16_t _pad0;
float _pad1;
vec2 _pad2;
};
layout (location = 0) out mediump vec4 colour;
float16_t f(float16_t n, float16_t h, float16_t s, float16_t v) {
float16_t k = mod(n + h / 60.0hf, 6.0hf);
return fma(-v, s * max(0.0hf, min(k, min(4.0hf - k, 1.0hf))), v);
}
f16vec4 hsv2rgb(float16_t h, float16_t s, float16_t v) {
return f16vec4(f(5.0hf, h, s, v), f(3.0hf, h, s, v), f(1.0hf, h, s, v), 1.0hf);
}
const f16vec2 A = f16vec2(0, 1);
const f16vec2 B = f16vec2(1, 1);
const f16vec2 C = f16vec2(0, 0);
void main() {
f16vec2 sv = mix(mix(C,
B,
bvec2(gl_VertexIndex == 1)),
A,
bvec2(gl_VertexIndex == 0));
gl_Position = vec4(vec3(0), 1);
colour = hsv2rgb(hue, sv.x, sv.y);
}
Please fix.