summaryrefslogtreecommitdiffstats
path: root/src/glsl/builtins
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl/builtins')
-rw-r--r--src/glsl/builtins/ir/EmitVertex.ir5
-rw-r--r--src/glsl/builtins/ir/EndPrimitive.ir5
-rw-r--r--src/glsl/builtins/profiles/150.geom3
-rwxr-xr-xsrc/glsl/builtins/tools/generate_builtins.py6
4 files changed, 17 insertions, 2 deletions
diff --git a/src/glsl/builtins/ir/EmitVertex.ir b/src/glsl/builtins/ir/EmitVertex.ir
new file mode 100644
index 00000000000..8ffb6c4df11
--- /dev/null
+++ b/src/glsl/builtins/ir/EmitVertex.ir
@@ -0,0 +1,5 @@
+((function EmitVertex
+ (signature void
+ (parameters)
+ ((emit-vertex)))
+))
diff --git a/src/glsl/builtins/ir/EndPrimitive.ir b/src/glsl/builtins/ir/EndPrimitive.ir
new file mode 100644
index 00000000000..ed7e12ab450
--- /dev/null
+++ b/src/glsl/builtins/ir/EndPrimitive.ir
@@ -0,0 +1,5 @@
+((function EndPrimitive
+ (signature void
+ (parameters)
+ ((end-primitive)))
+))
diff --git a/src/glsl/builtins/profiles/150.geom b/src/glsl/builtins/profiles/150.geom
new file mode 100644
index 00000000000..d2ab89113c4
--- /dev/null
+++ b/src/glsl/builtins/profiles/150.geom
@@ -0,0 +1,3 @@
+#version 150
+void EmitVertex();
+void EndPrimitive();
diff --git a/src/glsl/builtins/tools/generate_builtins.py b/src/glsl/builtins/tools/generate_builtins.py
index 85bd5dddc73..54c5a49fb23 100755
--- a/src/glsl/builtins/tools/generate_builtins.py
+++ b/src/glsl/builtins/tools/generate_builtins.py
@@ -125,7 +125,7 @@ def write_profiles():
def get_profile_list():
profile_files = []
- for extension in ['glsl', 'frag', 'vert']:
+ for extension in ['glsl', 'frag', 'vert', 'geom']:
path_glob = path.join(
path.join(builtins_dir, 'profiles'), '*.' + extension)
profile_files.extend(glob(path_glob))
@@ -279,10 +279,12 @@ _mesa_glsl_initialize_functions(struct _mesa_glsl_parse_state *state)
check = 'state->target == vertex_shader && '
elif profile.endswith('_frag'):
check = 'state->target == fragment_shader && '
+ elif profile.endswith('_geom'):
+ check = 'state->target == geometry_shader && '
else:
check = ''
- version = re.sub(r'_(glsl|vert|frag)$', '', profile)
+ version = re.sub(r'_(glsl|vert|frag|geom)$', '', profile)
if version[0].isdigit():
is_es = version.endswith('es')
if is_es: