glsl: move is_gl_identifier() to linker_util

This had started to multiply around the NIR linker. Here we move it to a
common helper shared by GLSL IR and NIR.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25371>
This commit is contained in:
Timothy Arceri
2023-09-25 10:16:15 +10:00
committed by Marge Bot
parent 78b9f1053f
commit 0bfae24640
11 changed files with 15 additions and 45 deletions

View File

@@ -2093,15 +2093,6 @@ varying_matches_compute_packing_order(const nir_variable *var)
}
}
/**
* Built-in / reserved GL variables names start with "gl_"
*/
static bool
is_gl_identifier(const char *s)
{
return s && s[0] == 'g' && s[1] == 'l' && s[2] == '_';
}
/**
* Record the given producer/consumer variable pair in the list of variables
* that should later be assigned locations.