diff options
Diffstat (limited to 'src/glsl/ir.h')
-rw-r--r-- | src/glsl/ir.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/glsl/ir.h b/src/glsl/ir.h index ef4a12d60ef..80609829ebc 100644 --- a/src/glsl/ir.h +++ b/src/glsl/ir.h @@ -2342,6 +2342,15 @@ prototype_string(const glsl_type *return_type, const char *name, const char * mode_string(const ir_variable *var); +/** + * 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] == '_'; +} + extern "C" { #endif /* __cplusplus */ |