compiler: Combine duplicated implementation of is_gl_identifier into glsl_types.h

As glsl_types.cpp also called is_gl_identifier, so move it into glsl_types.h,
this will help the decouple glsl_types.h from src/compiler/glsl/*

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23420>
This commit is contained in:
Yonggang Luo
2023-06-04 13:52:55 +08:00
committed by Marge Bot
parent 340311dac9
commit f9860a84b3
6 changed files with 9 additions and 45 deletions

View File

@@ -198,15 +198,6 @@ can_remove_uniform(nir_variable *var, UNUSED void *data)
return true;
}
/**
* Built-in / reserved GL variables names start with "gl_"
*/
static inline bool
is_gl_identifier(const char *s)
{
return s && s[0] == 'g' && s[1] == 'l' && s[2] == '_';
}
static bool
inout_has_same_location(const nir_variable *var, unsigned stage)
{