mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 15:48:36 +02:00
glsl: Make builtin function profiles for GLSL ES use "es" in the filename.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net> Acked-by: Carl Worth <cworth@cworth.org>
This commit is contained in:
parent
8dec1bfedd
commit
4d6d22100a
4 changed files with 5 additions and 1 deletions
|
|
@ -279,8 +279,12 @@ _mesa_glsl_initialize_functions(struct _mesa_glsl_parse_state *state)
|
|||
check = ''
|
||||
|
||||
version = re.sub(r'_(glsl|vert|frag)$', '', profile)
|
||||
if version.isdigit():
|
||||
if version[0].isdigit():
|
||||
is_es = version.endswith('es')
|
||||
if is_es:
|
||||
version = version[:-2]
|
||||
check += 'state->language_version == ' + version
|
||||
check += ' && {0}state->es_shader'.format('' if is_es else '!')
|
||||
else: # an extension name
|
||||
check += 'state->' + version + '_enable'
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue