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:
Paul Berry 2012-08-04 10:43:53 -07:00 committed by Ian Romanick
parent 8dec1bfedd
commit 4d6d22100a
4 changed files with 5 additions and 1 deletions

View file

@ -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'