aboutsummaryrefslogtreecommitdiffstats
path: root/src/mapi
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2020-02-20 19:28:56 -0500
committerMarge Bot <[email protected]>2020-03-06 01:06:14 +0000
commit28a2ad7ddf76702a5de56a7bc0d8754b7dbd66a0 (patch)
tree15e77758d8169b01a7dc20761ca7c575f2994093 /src/mapi
parentd510e652d46f471a93eae5a07f7e7508633d1040 (diff)
glthread: track for each VAO whether the user has set a user pointer
This commit mainly adds basic infrastructure for tracking vertex array state. If glthread gets a non-VBO pointer, this commit delays disabling glthread until glDraw is called. The next will change that to "sync" instead of "disable". Reviewed-by: Timothy Arceri <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>
Diffstat (limited to 'src/mapi')
-rw-r--r--src/mapi/glapi/gen/ARB_base_instance.xml3
-rw-r--r--src/mapi/glapi/gen/ARB_draw_instanced.xml3
-rw-r--r--src/mapi/glapi/gen/ARB_indirect_parameters.xml7
-rw-r--r--src/mapi/glapi/gen/ARB_vertex_array_object.xml8
-rw-r--r--src/mapi/glapi/gen/ARB_vertex_attrib_64bit.xml2
-rw-r--r--src/mapi/glapi/gen/EXT_direct_state_access.xml2
-rw-r--r--src/mapi/glapi/gen/GL3x.xml2
-rw-r--r--src/mapi/glapi/gen/es_EXT.xml2
-rw-r--r--src/mapi/glapi/gen/gl_API.xml38
9 files changed, 38 insertions, 29 deletions
diff --git a/src/mapi/glapi/gen/ARB_base_instance.xml b/src/mapi/glapi/gen/ARB_base_instance.xml
index 92892c29078..22c57167fd5 100644
--- a/src/mapi/glapi/gen/ARB_base_instance.xml
+++ b/src/mapi/glapi/gen/ARB_base_instance.xml
@@ -8,7 +8,8 @@
<category name="GL_ARB_base_instance" number="107">
- <function name="DrawArraysInstancedBaseInstance" exec="dynamic" marshal="draw">
+ <function name="DrawArraysInstancedBaseInstance" exec="dynamic" marshal="draw"
+ marshal_fail="_mesa_glthread_is_non_vbo_draw_arrays(ctx)">
<param name="mode" type="GLenum"/>
<param name="first" type="GLint"/>
<param name="count" type="GLsizei"/>
diff --git a/src/mapi/glapi/gen/ARB_draw_instanced.xml b/src/mapi/glapi/gen/ARB_draw_instanced.xml
index 8d7fd6301b3..e450f04a8e1 100644
--- a/src/mapi/glapi/gen/ARB_draw_instanced.xml
+++ b/src/mapi/glapi/gen/ARB_draw_instanced.xml
@@ -8,7 +8,8 @@
<category name="GL_ARB_draw_instanced" number="44">
- <function name="DrawArraysInstancedARB" exec="dynamic" marshal="draw">
+ <function name="DrawArraysInstancedARB" exec="dynamic" marshal="draw"
+ marshal_fail="_mesa_glthread_is_non_vbo_draw_arrays(ctx)">
<param name="mode" type="GLenum"/>
<param name="first" type="GLint"/>
<param name="count" type="GLsizei"/>
diff --git a/src/mapi/glapi/gen/ARB_indirect_parameters.xml b/src/mapi/glapi/gen/ARB_indirect_parameters.xml
index 20de9057707..3938bd643bb 100644
--- a/src/mapi/glapi/gen/ARB_indirect_parameters.xml
+++ b/src/mapi/glapi/gen/ARB_indirect_parameters.xml
@@ -8,7 +8,8 @@
<enum name="PARAMETER_BUFFER_ARB" value="0x80EE"/>
<enum name="PARAMETER_BUFFER_BINDING_ARB" value="0x80EF"/>
- <function name="MultiDrawArraysIndirectCountARB" exec="dynamic">
+ <function name="MultiDrawArraysIndirectCountARB" exec="dynamic" marshal="draw"
+ marshal_fail="_mesa_glthread_is_non_vbo_draw_arrays(ctx)">
<param name="mode" type="GLenum"/>
<param name="indirect" type="GLintptr"/>
<param name="drawcount" type="GLintptr"/>
@@ -16,7 +17,9 @@
<param name="stride" type="GLsizei"/>
</function>
- <function name="MultiDrawElementsIndirectCountARB" exec="dynamic">
+ <!-- Use "...vbo_draw_arrays", because indices always come from a buffer object. -->
+ <function name="MultiDrawElementsIndirectCountARB" exec="dynamic" marshal="draw"
+ marshal_fail="_mesa_glthread_is_non_vbo_draw_arrays(ctx)">
<param name="mode" type="GLenum"/>
<param name="type" type="GLenum"/>
<param name="indirect" type="GLintptr"/>
diff --git a/src/mapi/glapi/gen/ARB_vertex_array_object.xml b/src/mapi/glapi/gen/ARB_vertex_array_object.xml
index befa4c91c63..e149997d05c 100644
--- a/src/mapi/glapi/gen/ARB_vertex_array_object.xml
+++ b/src/mapi/glapi/gen/ARB_vertex_array_object.xml
@@ -11,16 +11,18 @@
<enum name="VERTEX_ARRAY_BINDING" value="0x85B5"/>
<function name="BindVertexArray" es2="3.0" no_error="true"
- marshal_fail="_mesa_glthread_is_compat_bind_vertex_array(ctx)">
+ marshal_call_after="_mesa_glthread_BindVertexArray(ctx, array);">
<param name="array" type="GLuint"/>
</function>
- <function name="DeleteVertexArrays" es2="3.0" no_error="true">
+ <function name="DeleteVertexArrays" es2="3.0" no_error="true"
+ marshal_call_after="_mesa_glthread_DeleteVertexArrays(ctx, n, arrays);">
<param name="n" type="GLsizei"/>
<param name="arrays" type="const GLuint *" count="n"/>
</function>
- <function name="GenVertexArrays" es2="3.0" no_error="true">
+ <function name="GenVertexArrays" es2="3.0" no_error="true"
+ marshal_call_after="_mesa_glthread_GenVertexArrays(ctx, n, arrays);">
<param name="n" type="GLsizei"/>
<param name="arrays" type="GLuint *"/>
</function>
diff --git a/src/mapi/glapi/gen/ARB_vertex_attrib_64bit.xml b/src/mapi/glapi/gen/ARB_vertex_attrib_64bit.xml
index d96729be3ac..f75387bf8fe 100644
--- a/src/mapi/glapi/gen/ARB_vertex_attrib_64bit.xml
+++ b/src/mapi/glapi/gen/ARB_vertex_attrib_64bit.xml
@@ -52,7 +52,7 @@
</function>
<function name="VertexAttribLPointer" no_error="true" marshal="async"
- marshal_fail="_mesa_glthread_is_non_vbo_vertex_attrib_pointer(ctx)">
+ marshal_call_after="_mesa_glthread_AttribPointer(ctx);">
<param name="index" type="GLuint"/>
<param name="size" type="GLint"/>
<param name="type" type="GLenum"/>
diff --git a/src/mapi/glapi/gen/EXT_direct_state_access.xml b/src/mapi/glapi/gen/EXT_direct_state_access.xml
index 8e68ec38b99..0fe9ebcd647 100644
--- a/src/mapi/glapi/gen/EXT_direct_state_access.xml
+++ b/src/mapi/glapi/gen/EXT_direct_state_access.xml
@@ -658,7 +658,7 @@
</function>
<function name="MultiTexCoordPointerEXT" marshal="async"
- marshal_fail="_mesa_glthread_is_non_vbo_vertex_attrib_pointer(ctx)">
+ marshal_call_after="_mesa_glthread_AttribPointer(ctx);">
<param name="texunit" type="GLenum" />
<param name="size" type="GLint" />
<param name="type" type="GLenum" />
diff --git a/src/mapi/glapi/gen/GL3x.xml b/src/mapi/glapi/gen/GL3x.xml
index 4bf7c132560..16035adc01d 100644
--- a/src/mapi/glapi/gen/GL3x.xml
+++ b/src/mapi/glapi/gen/GL3x.xml
@@ -258,7 +258,7 @@
<function name="VertexAttribIPointer" es2="3.0" marshal="async"
no_error="true"
- marshal_fail="_mesa_glthread_is_non_vbo_vertex_attrib_pointer(ctx)">
+ marshal_call_after="_mesa_glthread_AttribPointer(ctx);">
<param name="index" type="GLuint"/>
<param name="size" type="GLint"/>
<param name="type" type="GLenum"/>
diff --git a/src/mapi/glapi/gen/es_EXT.xml b/src/mapi/glapi/gen/es_EXT.xml
index c30ad56c75d..9dc1444bafe 100644
--- a/src/mapi/glapi/gen/es_EXT.xml
+++ b/src/mapi/glapi/gen/es_EXT.xml
@@ -320,7 +320,7 @@
<function name="PointSizePointerOES" es1="1.0" desktop="false"
no_error="true" marshal="async"
- marshal_fail="_mesa_glthread_is_non_vbo_vertex_attrib_pointer(ctx)">
+ marshal_call_after="_mesa_glthread_AttribPointer(ctx);">
<param name="type" type="GLenum"/>
<param name="stride" type="GLsizei"/>
<param name="pointer" type="const GLvoid *"/>
diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml
index 256d0f3aa15..6de88c6d7fe 100644
--- a/src/mapi/glapi/gen/gl_API.xml
+++ b/src/mapi/glapi/gen/gl_API.xml
@@ -3166,7 +3166,7 @@
<function name="ColorPointer" es1="1.0" deprecated="3.1" marshal="async"
no_error="true"
- marshal_fail="_mesa_glthread_is_non_vbo_vertex_attrib_pointer(ctx)">
+ marshal_call_after="_mesa_glthread_AttribPointer(ctx);">
<param name="size" type="GLint"/>
<param name="type" type="GLenum"/>
<param name="stride" type="GLsizei"/>
@@ -3179,7 +3179,8 @@
<glx handcode="true"/>
</function>
- <function name="DrawArrays" es1="1.0" es2="2.0" exec="dynamic" marshal="draw">
+ <function name="DrawArrays" es1="1.0" es2="2.0" exec="dynamic" marshal="draw"
+ marshal_fail="_mesa_glthread_is_non_vbo_draw_arrays(ctx)">
<param name="mode" type="GLenum"/>
<param name="first" type="GLint"/>
<param name="count" type="GLsizei"/>
@@ -3197,7 +3198,7 @@
<function name="EdgeFlagPointer" deprecated="3.1" marshal="async"
no_error="true"
- marshal_fail="_mesa_glthread_is_non_vbo_vertex_attrib_pointer(ctx)">
+ marshal_call_after="_mesa_glthread_AttribPointer(ctx);">
<param name="stride" type="GLsizei"/>
<param name="pointer" type="const GLvoid *"/>
<glx handcode="true"/>
@@ -3216,7 +3217,7 @@
<function name="IndexPointer" deprecated="3.1" marshal="async"
no_error="true"
- marshal_fail="_mesa_glthread_is_non_vbo_vertex_attrib_pointer(ctx)">
+ marshal_call_after="_mesa_glthread_AttribPointer(ctx);">
<param name="type" type="GLenum"/>
<param name="stride" type="GLsizei"/>
<param name="pointer" type="const GLvoid *"/>
@@ -3232,7 +3233,7 @@
<function name="NormalPointer" es1="1.0" deprecated="3.1" marshal="async"
no_error="true"
- marshal_fail="_mesa_glthread_is_non_vbo_vertex_attrib_pointer(ctx)">
+ marshal_call_after="_mesa_glthread_AttribPointer(ctx);">
<param name="type" type="GLenum"/>
<param name="stride" type="GLsizei"/>
<param name="pointer" type="const GLvoid *"/>
@@ -3241,7 +3242,7 @@
<function name="TexCoordPointer" es1="1.0" deprecated="3.1" marshal="async"
no_error="true"
- marshal_fail="_mesa_glthread_is_non_vbo_vertex_attrib_pointer(ctx)">
+ marshal_call_after="_mesa_glthread_AttribPointer(ctx);">
<param name="size" type="GLint"/>
<param name="type" type="GLenum"/>
<param name="stride" type="GLsizei"/>
@@ -3251,7 +3252,7 @@
<function name="VertexPointer" es1="1.0" deprecated="3.1" marshal="async"
no_error="true"
- marshal_fail="_mesa_glthread_is_non_vbo_vertex_attrib_pointer(ctx)">
+ marshal_call_after="_mesa_glthread_AttribPointer(ctx);">
<param name="size" type="GLint"/>
<param name="type" type="GLenum"/>
<param name="stride" type="GLsizei"/>
@@ -4747,14 +4748,15 @@
<function name="FogCoordPointer" deprecated="3.1" marshal="async"
no_error="true"
- marshal_fail="_mesa_glthread_is_non_vbo_vertex_attrib_pointer(ctx)">
+ marshal_call_after="_mesa_glthread_AttribPointer(ctx);">
<param name="type" type="GLenum"/>
<param name="stride" type="GLsizei"/>
<param name="pointer" type="const GLvoid *"/>
<glx handcode="true"/>
</function>
- <function name="MultiDrawArrays" marshal="draw">
+ <function name="MultiDrawArrays" marshal="draw"
+ marshal_fail="_mesa_glthread_is_non_vbo_draw_arrays(ctx)">
<param name="mode" type="GLenum"/>
<param name="first" type="const GLint *" count="primcount"/>
<param name="count" type="const GLsizei *" count="primcount"/>
@@ -4887,7 +4889,7 @@
<function name="SecondaryColorPointer" deprecated="3.1" marshal="async"
no_error="true"
- marshal_fail="_mesa_glthread_is_non_vbo_vertex_attrib_pointer(ctx)">
+ marshal_call_after="_mesa_glthread_AttribPointer(ctx);">
<param name="size" type="GLint"/>
<param name="type" type="GLenum"/>
<param name="stride" type="GLsizei"/>
@@ -5844,7 +5846,7 @@
<function name="VertexAttribPointer" es2="2.0" marshal="async"
no_error="true"
- marshal_fail="_mesa_glthread_is_non_vbo_vertex_attrib_pointer(ctx)">
+ marshal_call_after="_mesa_glthread_AttribPointer(ctx);">
<param name="index" type="GLuint"/>
<param name="size" type="GLint"/>
<param name="type" type="GLenum"/>
@@ -9242,7 +9244,7 @@
</function>
<function name="ColorPointerEXT" deprecated="3.1" marshal="async"
- marshal_fail="_mesa_glthread_is_non_vbo_vertex_attrib_pointer(ctx)">
+ marshal_call_after="_mesa_glthread_AttribPointer(ctx);">
<param name="size" type="GLint"/>
<param name="type" type="GLenum"/>
<param name="stride" type="GLsizei"/>
@@ -9258,7 +9260,7 @@
</function>
<function name="EdgeFlagPointerEXT" deprecated="3.1" marshal="async"
- marshal_fail="_mesa_glthread_is_non_vbo_vertex_attrib_pointer(ctx)">
+ marshal_call_after="_mesa_glthread_AttribPointer(ctx);">
<param name="stride" type="GLsizei"/>
<param name="count" type="GLsizei"/>
<param name="pointer" type="const GLboolean *"/>
@@ -9271,7 +9273,7 @@
</function>
<function name="IndexPointerEXT" deprecated="3.1" marshal="async"
- marshal_fail="_mesa_glthread_is_non_vbo_vertex_attrib_pointer(ctx)">
+ marshal_call_after="_mesa_glthread_AttribPointer(ctx);">
<param name="type" type="GLenum"/>
<param name="stride" type="GLsizei"/>
<param name="count" type="GLsizei"/>
@@ -9280,7 +9282,7 @@
</function>
<function name="NormalPointerEXT" deprecated="3.1" marshal="async"
- marshal_fail="_mesa_glthread_is_non_vbo_vertex_attrib_pointer(ctx)">
+ marshal_call_after="_mesa_glthread_AttribPointer(ctx);">
<param name="type" type="GLenum"/>
<param name="stride" type="GLsizei"/>
<param name="count" type="GLsizei"/>
@@ -9289,7 +9291,7 @@
</function>
<function name="TexCoordPointerEXT" deprecated="3.1" marshal="async"
- marshal_fail="_mesa_glthread_is_non_vbo_vertex_attrib_pointer(ctx)">
+ marshal_call_after="_mesa_glthread_AttribPointer(ctx);">
<param name="size" type="GLint"/>
<param name="type" type="GLenum"/>
<param name="stride" type="GLsizei"/>
@@ -9299,7 +9301,7 @@
</function>
<function name="VertexPointerEXT" deprecated="3.1" marshal="async"
- marshal_fail="_mesa_glthread_is_non_vbo_vertex_attrib_pointer(ctx)">
+ marshal_call_after="_mesa_glthread_AttribPointer(ctx);">
<param name="size" type="GLint"/>
<param name="type" type="GLenum"/>
<param name="stride" type="GLsizei"/>
@@ -11390,7 +11392,7 @@
<category name="GL_IBM_multimode_draw_arrays" number="200">
<function name="MultiModeDrawArraysIBM" marshal="draw"
- marshal_fail="_mesa_glthread_is_non_vbo_draw_elements(ctx)">
+ marshal_fail="_mesa_glthread_is_non_vbo_draw_arrays(ctx)">
<param name="mode" type="const GLenum *" count="primcount"/>
<param name="first" type="const GLint *" count="primcount"/>
<param name="count" type="const GLsizei *" count="primcount"/>