diff options
author | Hans-Kristian Arntzen <post@arntzen-software.no> | 2023-01-17 12:02:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-17 12:02:22 +0100 |
commit | 4212eef67ed0ca048cb726a6767185504e7695e5 (patch) | |
tree | ba2893fa4e0298d4d974e899449f37458e5b8470 | |
parent | b52faf8a17ccb676e29dd937d64d407afab368a6 (diff) | |
parent | 09dd11be964d44235b1190bf36be6655eb59b902 (diff) | |
download | SPIRV-Cross-upstream/1.3.239.tar.gz SPIRV-Cross-upstream/1.3.239.tar.bz2 SPIRV-Cross-upstream/1.3.239.zip |
Merge pull request #2087 from rdb/patch-1upstream/1.3.239
GLSL: Support GL_NV_shader_noperspective_interpolation in GLES
-rw-r--r-- | spirv_glsl.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spirv_glsl.cpp b/spirv_glsl.cpp index c4597952..ef9ffde3 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)) |