diff options
-rw-r--r-- | reference/shaders-no-opt/frag/mesh-shader-perprimitive.spv14.nocompat.vk.frag.vk | 11 | ||||
-rw-r--r-- | shaders-no-opt/frag/mesh-shader-perprimitive.spv14.nocompat.vk.frag | 10 | ||||
-rw-r--r-- | spirv_glsl.cpp | 5 |
3 files changed, 25 insertions, 1 deletions
diff --git a/reference/shaders-no-opt/frag/mesh-shader-perprimitive.spv14.nocompat.vk.frag.vk b/reference/shaders-no-opt/frag/mesh-shader-perprimitive.spv14.nocompat.vk.frag.vk new file mode 100644 index 00000000..7ab0e950 --- /dev/null +++ b/reference/shaders-no-opt/frag/mesh-shader-perprimitive.spv14.nocompat.vk.frag.vk @@ -0,0 +1,11 @@ +#version 450 +#extension GL_EXT_mesh_shader : require + +layout(location = 0) out vec4 FragColor; +layout(location = 0) flat perprimitiveEXT in uvec4 v; + +void main() +{ + FragColor = vec4(v); +} + diff --git a/shaders-no-opt/frag/mesh-shader-perprimitive.spv14.nocompat.vk.frag b/shaders-no-opt/frag/mesh-shader-perprimitive.spv14.nocompat.vk.frag new file mode 100644 index 00000000..8dffccc2 --- /dev/null +++ b/shaders-no-opt/frag/mesh-shader-perprimitive.spv14.nocompat.vk.frag @@ -0,0 +1,10 @@ +#version 450 +#extension GL_EXT_mesh_shader : require + +layout(location = 0) perprimitiveEXT flat in uvec4 v; +layout(location = 0) out vec4 FragColor; + +void main() +{ + FragColor = vec4(v); +} diff --git a/spirv_glsl.cpp b/spirv_glsl.cpp index 690bc9d3..09d019bd 100644 --- a/spirv_glsl.cpp +++ b/spirv_glsl.cpp @@ -1295,7 +1295,10 @@ string CompilerGLSL::to_interpolation_qualifiers(const Bitset &flags) if (flags.get(DecorationInvariant) && (options.es || options.version >= 120)) res += "invariant "; if (flags.get(DecorationPerPrimitiveEXT)) - res += "perprimitiveEXT "; + { + res += "perprimitiveEXT "; + require_extension_internal("GL_EXT_mesh_shader"); + } if (flags.get(DecorationExplicitInterpAMD)) { |