summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spirv_glsl.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/spirv_glsl.cpp b/spirv_glsl.cpp
index 4b22d47e..de6cc0a0 100644
--- a/spirv_glsl.cpp
+++ b/spirv_glsl.cpp
@@ -1249,7 +1249,15 @@ string CompilerGLSL::to_interpolation_qualifiers(const Bitset &flags)
if (flags.get(DecorationFlat))
res += "flat ";
if (flags.get(DecorationNoPerspective))
+ {
+ if (options.es)
+ {
+ if (options.version < 300)
+ SPIRV_CROSS_THROW("noperspective requires ESSL 300.");
+ require_extension_internal("GL_NV_shader_noperspective_interpolation");
+ }
res += "noperspective ";
+ }
if (flags.get(DecorationCentroid))
res += "centroid ";
if (flags.get(DecorationPatch))