From 4d6d22100abf4512865c316f3ad6a3bd25dd28c1 Mon Sep 17 00:00:00 2001 From: Paul Berry Date: Sat, 4 Aug 2012 10:43:53 -0700 Subject: [PATCH] glsl: Make builtin function profiles for GLSL ES use "es" in the filename. Reviewed-by: Ian Romanick Reviewed-by: Kenneth Graunke Reviewed-by: Eric Anholt Acked-by: Carl Worth --- src/glsl/builtins/profiles/{100.frag => 100es.frag} | 0 src/glsl/builtins/profiles/{100.glsl => 100es.glsl} | 0 src/glsl/builtins/profiles/{100.vert => 100es.vert} | 0 src/glsl/builtins/tools/generate_builtins.py | 6 +++++- 4 files changed, 5 insertions(+), 1 deletion(-) rename src/glsl/builtins/profiles/{100.frag => 100es.frag} (100%) rename src/glsl/builtins/profiles/{100.glsl => 100es.glsl} (100%) rename src/glsl/builtins/profiles/{100.vert => 100es.vert} (100%) diff --git a/src/glsl/builtins/profiles/100.frag b/src/glsl/builtins/profiles/100es.frag similarity index 100% rename from src/glsl/builtins/profiles/100.frag rename to src/glsl/builtins/profiles/100es.frag diff --git a/src/glsl/builtins/profiles/100.glsl b/src/glsl/builtins/profiles/100es.glsl similarity index 100% rename from src/glsl/builtins/profiles/100.glsl rename to src/glsl/builtins/profiles/100es.glsl diff --git a/src/glsl/builtins/profiles/100.vert b/src/glsl/builtins/profiles/100es.vert similarity index 100% rename from src/glsl/builtins/profiles/100.vert rename to src/glsl/builtins/profiles/100es.vert diff --git a/src/glsl/builtins/tools/generate_builtins.py b/src/glsl/builtins/tools/generate_builtins.py index 3e8d4485580..2cfb1a36e20 100755 --- a/src/glsl/builtins/tools/generate_builtins.py +++ b/src/glsl/builtins/tools/generate_builtins.py @@ -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' -- 2.30.2