mirror of
https://github.com/KhronosGroup/SPIRV-Cross.git
synced 2024-11-09 22:00:05 +00:00
GLSL: Require mesh shader when using perprimitiveEXT in frag shader.
This commit is contained in:
parent
637c211c6f
commit
5ffc813dc4
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
@ -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))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user