mesa/glsl: Add support for NV_shader_noperspective_interpolation

With EXT_gpu_shader4 the support is already in place, we just
have to allow it in glsl and expose the extension name.

v2: Check whether the extension is enabled in the shader (Adam Jackson)
v3: Don't check GLES version in lexer (mareko)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18460>
This commit is contained in:
Gert Wollny
2022-09-07 12:44:27 +02:00
committed by Marge Bot
parent c26e0e5070
commit 762d377292
4 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -448,7 +448,7 @@ centroid KEYWORD_WITH_ALT(120, 300, 120, 300, yyextra->EXT_gpu_shader4_enable, C
invariant KEYWORD(120, 100, 120, 100, INVARIANT);
flat KEYWORD_WITH_ALT(130, 100, 130, 300, yyextra->EXT_gpu_shader4_enable, FLAT);
smooth KEYWORD(130, 300, 130, 300, SMOOTH);
noperspective KEYWORD_WITH_ALT(130, 300, 130, 0, yyextra->EXT_gpu_shader4_enable, NOPERSPECTIVE);
noperspective KEYWORD_WITH_ALT(130, 300, 130, 0, yyextra->EXT_gpu_shader4_enable || yyextra->NV_shader_noperspective_interpolation_enable, NOPERSPECTIVE);
patch KEYWORD_WITH_ALT(0, 300, 400, 320, yyextra->has_tessellation_shader(), PATCH);
sampler1D DEPRECATED_ES_TYPE(glsl_type::sampler1D_type);
+1
View File
@@ -782,6 +782,7 @@ static const _mesa_glsl_extension _mesa_glsl_supported_extensions[] = {
EXT(NV_image_formats),
EXT(NV_shader_atomic_float),
EXT(NV_shader_atomic_int64),
EXT(NV_shader_noperspective_interpolation),
EXT(NV_viewport_array2),
};
+2
View File
@@ -908,6 +908,8 @@ struct _mesa_glsl_parse_state {
bool NV_shader_atomic_float_warn;
bool NV_shader_atomic_int64_enable;
bool NV_shader_atomic_int64_warn;
bool NV_shader_noperspective_interpolation_enable;
bool NV_shader_noperspective_interpolation_warn;
bool NV_viewport_array2_enable;
bool NV_viewport_array2_warn;
/*@}*/
+1
View File
@@ -417,6 +417,7 @@ EXT(NV_read_stencil , dummy_true
EXT(NV_sample_locations , ARB_sample_locations , GLL, GLC, x , ES2, 2015)
EXT(NV_shader_atomic_float , NV_shader_atomic_float , GLL, GLC, x , x , 2012)
EXT(NV_shader_atomic_int64 , NV_shader_atomic_int64 , GLL, GLC, x , x , 2014)
EXT(NV_shader_noperspective_interpolation , EXT_gpu_shader4 , x , x , x , 30, 2014)
EXT(NV_texgen_reflection , dummy_true , GLL, x , x , x , 1999)
EXT(NV_texture_barrier , NV_texture_barrier , GLL, GLC, x , x , 2009)
EXT(NV_texture_env_combine4 , NV_texture_env_combine4 , GLL, x , x , x , 1999)