diff options
author | Eric Anholt <[email protected]> | 2013-03-04 10:30:15 -0800 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-03-16 14:14:19 +1100 |
commit | 012bfebc0779bd0eed10ccbdec2edb874992d0dd (patch) | |
tree | f209d1c78aea375a56a5d0f91cca2e92deb140d2 /src/mapi/glapi | |
parent | 238d027ed6d11f7ced80e4c7a43ca62293914781 (diff) |
mesa: Track the current vertex/element array buffers for glthread.
We want to support glthread on GLES contexts with reasonable apps, and on
desktop for apps that use VBOs but haven't completely moved to core GL.
To do so, we have to deal with the "the user may or may not pass user
pointers to draw calls" problem.
Acked-by: Timothy Arceri <[email protected]>
Acked-by: Marek Olšák <[email protected]>
Tested-by: Dieter Nützel <[email protected]>
Tested-by: Mike Lothian <[email protected]>
Diffstat (limited to 'src/mapi/glapi')
-rw-r--r-- | src/mapi/glapi/gen/ARB_base_instance.xml | 9 | ||||
-rw-r--r-- | src/mapi/glapi/gen/ARB_draw_elements_base_vertex.xml | 12 | ||||
-rw-r--r-- | src/mapi/glapi/gen/ARB_draw_instanced.xml | 3 | ||||
-rw-r--r-- | src/mapi/glapi/gen/ARB_vertex_array_object.xml | 3 | ||||
-rw-r--r-- | src/mapi/glapi/gen/GL3x.xml | 3 | ||||
-rw-r--r-- | src/mapi/glapi/gen/gl_API.xml | 59 | ||||
-rw-r--r-- | src/mapi/glapi/gen/gl_marshal.py | 4 |
7 files changed, 59 insertions, 34 deletions
diff --git a/src/mapi/glapi/gen/ARB_base_instance.xml b/src/mapi/glapi/gen/ARB_base_instance.xml index 5bd6cabf9c1..e3bbcd198e8 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_elements(ctx)"> <param name="mode" type="GLenum"/> <param name="first" type="GLint"/> <param name="count" type="GLsizei"/> @@ -16,7 +17,8 @@ <param name="baseinstance" type="GLuint"/> </function> - <function name="DrawElementsInstancedBaseInstance" exec="dynamic" marshal="draw"> + <function name="DrawElementsInstancedBaseInstance" exec="dynamic" marshal="draw" + marshal_fail="_mesa_glthread_is_non_vbo_draw_elements(ctx)"> <param name="mode" type="GLenum"/> <param name="count" type="GLsizei"/> <param name="type" type="GLenum"/> @@ -25,7 +27,8 @@ <param name="baseinstance" type="GLuint"/> </function> - <function name="DrawElementsInstancedBaseVertexBaseInstance" exec="dynamic" marshal="draw"> + <function name="DrawElementsInstancedBaseVertexBaseInstance" exec="dynamic" marshal="draw" + marshal_fail="_mesa_glthread_is_non_vbo_draw_elements(ctx)"> <param name="mode" type="GLenum"/> <param name="count" type="GLsizei"/> <param name="type" type="GLenum"/> diff --git a/src/mapi/glapi/gen/ARB_draw_elements_base_vertex.xml b/src/mapi/glapi/gen/ARB_draw_elements_base_vertex.xml index 7c7a6a49588..2f1a93dc8a7 100644 --- a/src/mapi/glapi/gen/ARB_draw_elements_base_vertex.xml +++ b/src/mapi/glapi/gen/ARB_draw_elements_base_vertex.xml @@ -8,7 +8,8 @@ <category name="GL_ARB_draw_elements_base_vertex" number="62"> - <function name="DrawElementsBaseVertex" es2="3.2" exec="dynamic" marshal="draw"> + <function name="DrawElementsBaseVertex" es2="3.2" exec="dynamic" marshal="draw" + marshal_fail="_mesa_glthread_is_non_vbo_draw_elements(ctx)"> <param name="mode" type="GLenum"/> <param name="count" type="GLsizei"/> <param name="type" type="GLenum"/> @@ -16,7 +17,8 @@ <param name="basevertex" type="GLint"/> </function> - <function name="DrawRangeElementsBaseVertex" es2="3.2" exec="dynamic" marshal="draw"> + <function name="DrawRangeElementsBaseVertex" es2="3.2" exec="dynamic" marshal="draw" + marshal_fail="_mesa_glthread_is_non_vbo_draw_elements(ctx)"> <param name="mode" type="GLenum"/> <param name="start" type="GLuint"/> <param name="end" type="GLuint"/> @@ -26,7 +28,8 @@ <param name="basevertex" type="GLint"/> </function> - <function name="MultiDrawElementsBaseVertex" exec="dynamic" marshal="draw"> + <function name="MultiDrawElementsBaseVertex" exec="dynamic" marshal="draw" + marshal_fail="_mesa_glthread_is_non_vbo_draw_elements(ctx)"> <param name="mode" type="GLenum"/> <param name="count" type="const GLsizei *"/> <param name="type" type="GLenum"/> @@ -35,7 +38,8 @@ <param name="basevertex" type="const GLint *"/> </function> - <function name="DrawElementsInstancedBaseVertex" es2="3.2" exec="dynamic" marshal="draw"> + <function name="DrawElementsInstancedBaseVertex" es2="3.2" exec="dynamic" marshal="draw" + marshal_fail="_mesa_glthread_is_non_vbo_draw_elements(ctx)"> <param name="mode" type="GLenum"/> <param name="count" type="GLsizei"/> <param name="type" type="GLenum"/> diff --git a/src/mapi/glapi/gen/ARB_draw_instanced.xml b/src/mapi/glapi/gen/ARB_draw_instanced.xml index 52dba3cf3c3..8d7fd6301b3 100644 --- a/src/mapi/glapi/gen/ARB_draw_instanced.xml +++ b/src/mapi/glapi/gen/ARB_draw_instanced.xml @@ -15,7 +15,8 @@ <param name="primcount" type="GLsizei"/> </function> - <function name="DrawElementsInstancedARB" exec="dynamic" marshal="draw"> + <function name="DrawElementsInstancedARB" exec="dynamic" marshal="draw" + marshal_fail="_mesa_glthread_is_non_vbo_draw_elements(ctx)"> <param name="mode" type="GLenum"/> <param name="count" type="GLsizei"/> <param name="type" type="GLenum"/> diff --git a/src/mapi/glapi/gen/ARB_vertex_array_object.xml b/src/mapi/glapi/gen/ARB_vertex_array_object.xml index 4a392dbb427..4f21137ab03 100644 --- a/src/mapi/glapi/gen/ARB_vertex_array_object.xml +++ b/src/mapi/glapi/gen/ARB_vertex_array_object.xml @@ -10,7 +10,8 @@ <enum name="VERTEX_ARRAY_BINDING" value="0x85B5"/> - <function name="BindVertexArray" es2="3.0"> + <function name="BindVertexArray" es2="3.0" + marshal_fail="_mesa_glthread_is_compat_bind_vertex_array(ctx)"> <param name="array" type="GLuint"/> </function> diff --git a/src/mapi/glapi/gen/GL3x.xml b/src/mapi/glapi/gen/GL3x.xml index 65f12a42587..b603e1f82f6 100644 --- a/src/mapi/glapi/gen/GL3x.xml +++ b/src/mapi/glapi/gen/GL3x.xml @@ -256,7 +256,8 @@ <!-- These functions alias ones from GL_EXT_gpu_shader4 --> - <function name="VertexAttribIPointer" es2="3.0" marshal="async"> + <function name="VertexAttribIPointer" es2="3.0" marshal="async" + marshal_fail="_mesa_glthread_is_non_vbo_vertex_attrib_pointer(ctx)"> <param name="index" type="GLuint"/> <param name="size" type="GLint"/> <param name="type" type="GLenum"/> diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml index 814c725c500..15d7e4f24d2 100644 --- a/src/mapi/glapi/gen/gl_API.xml +++ b/src/mapi/glapi/gen/gl_API.xml @@ -3153,7 +3153,8 @@ <glx handcode="true"/> </function> - <function name="ColorPointer" es1="1.0" deprecated="3.1" marshal="async"> + <function name="ColorPointer" es1="1.0" deprecated="3.1" marshal="async" + marshal_fail="_mesa_glthread_is_non_vbo_vertex_attrib_pointer(ctx)"> <param name="size" type="GLint"/> <param name="type" type="GLenum"/> <param name="stride" type="GLsizei"/> @@ -3173,7 +3174,8 @@ <glx rop="193" handcode="true"/> </function> - <function name="DrawElements" es1="1.0" es2="2.0" exec="dynamic" marshal="draw"> + <function name="DrawElements" es1="1.0" es2="2.0" exec="dynamic" marshal="draw" + marshal_fail="_mesa_glthread_is_non_vbo_draw_elements(ctx)"> <param name="mode" type="GLenum"/> <param name="count" type="GLsizei"/> <param name="type" type="GLenum"/> @@ -3181,7 +3183,8 @@ <glx handcode="true"/> </function> - <function name="EdgeFlagPointer" deprecated="3.1" marshal="async"> + <function name="EdgeFlagPointer" deprecated="3.1" marshal="async" + marshal_fail="_mesa_glthread_is_non_vbo_vertex_attrib_pointer(ctx)"> <param name="stride" type="GLsizei"/> <param name="pointer" type="const GLvoid *"/> <glx handcode="true"/> @@ -3198,7 +3201,8 @@ <glx handcode="true"/> </function> - <function name="IndexPointer" deprecated="3.1" marshal="async"> + <function name="IndexPointer" deprecated="3.1" marshal="async" + marshal_fail="_mesa_glthread_is_non_vbo_vertex_attrib_pointer(ctx)"> <param name="type" type="GLenum"/> <param name="stride" type="GLsizei"/> <param name="pointer" type="const GLvoid *"/> @@ -3212,14 +3216,16 @@ <glx handcode="true"/> </function> - <function name="NormalPointer" es1="1.0" deprecated="3.1" marshal="async"> + <function name="NormalPointer" es1="1.0" deprecated="3.1" marshal="async" + marshal_fail="_mesa_glthread_is_non_vbo_vertex_attrib_pointer(ctx)"> <param name="type" type="GLenum"/> <param name="stride" type="GLsizei"/> <param name="pointer" type="const GLvoid *"/> <glx handcode="true"/> </function> - <function name="TexCoordPointer" es1="1.0" deprecated="3.1" marshal="async"> + <function name="TexCoordPointer" es1="1.0" deprecated="3.1" marshal="async" + marshal_fail="_mesa_glthread_is_non_vbo_vertex_attrib_pointer(ctx)"> <param name="size" type="GLint"/> <param name="type" type="GLenum"/> <param name="stride" type="GLsizei"/> @@ -3227,7 +3233,8 @@ <glx handcode="true"/> </function> - <function name="VertexPointer" es1="1.0" deprecated="3.1" marshal="async"> + <function name="VertexPointer" es1="1.0" deprecated="3.1" marshal="async" + marshal_fail="_mesa_glthread_is_non_vbo_vertex_attrib_pointer(ctx)"> <param name="size" type="GLint"/> <param name="type" type="GLenum"/> <param name="stride" type="GLsizei"/> @@ -3730,7 +3737,8 @@ <glx rop="4097"/> </function> - <function name="DrawRangeElements" es2="3.0" exec="dynamic" marshal="draw"> + <function name="DrawRangeElements" es2="3.0" exec="dynamic" marshal="draw" + marshal_fail="_mesa_glthread_is_non_vbo_draw_elements(ctx)"> <param name="mode" type="GLenum"/> <param name="start" type="GLuint"/> <param name="end" type="GLuint"/> @@ -4716,7 +4724,8 @@ <glx rop="4125"/> </function> - <function name="FogCoordPointer" deprecated="3.1" marshal="async"> + <function name="FogCoordPointer" deprecated="3.1" marshal="async" + marshal_fail="_mesa_glthread_is_non_vbo_vertex_attrib_pointer(ctx)"> <param name="type" type="GLenum"/> <param name="stride" type="GLsizei"/> <param name="pointer" type="const GLvoid *"/> @@ -4852,7 +4861,8 @@ <glx rop="4132"/> </function> - <function name="SecondaryColorPointer" deprecated="3.1" marshal="async"> + <function name="SecondaryColorPointer" deprecated="3.1" marshal="async" + marshal_fail="_mesa_glthread_is_non_vbo_vertex_attrib_pointer(ctx)"> <param name="size" type="GLint"/> <param name="type" type="GLenum"/> <param name="stride" type="GLsizei"/> @@ -5017,7 +5027,7 @@ <type name="intptr" size="4" glx_name="CARD32"/> <type name="sizeiptr" size="4" unsigned="true" glx_name="CARD32"/> - <function name="BindBuffer" es1="1.1" es2="2.0"> + <function name="BindBuffer" es1="1.1" es2="2.0" marshal="custom"> <param name="target" type="GLenum"/> <param name="buffer" type="GLuint"/> <glx ignore="true"/> @@ -5806,7 +5816,8 @@ <glx rop="4233"/> </function> - <function name="VertexAttribPointer" es2="2.0" marshal="async"> + <function name="VertexAttribPointer" es2="2.0" marshal="async" + marshal_fail="_mesa_glthread_is_non_vbo_vertex_attrib_pointer(ctx)"> <param name="index" type="GLuint"/> <param name="size" type="GLint"/> <param name="type" type="GLenum"/> @@ -9179,7 +9190,8 @@ <param name="i" type="GLint"/> </function> - <function name="ColorPointerEXT" deprecated="3.1" marshal="async"> + <function name="ColorPointerEXT" deprecated="3.1" marshal="async" + marshal_fail="_mesa_glthread_is_non_vbo_vertex_attrib_pointer(ctx)"> <param name="size" type="GLint"/> <param name="type" type="GLenum"/> <param name="stride" type="GLsizei"/> @@ -9194,7 +9206,8 @@ <param name="count" type="GLsizei"/> </function> - <function name="EdgeFlagPointerEXT" deprecated="3.1" marshal="async"> + <function name="EdgeFlagPointerEXT" deprecated="3.1" marshal="async" + marshal_fail="_mesa_glthread_is_non_vbo_vertex_attrib_pointer(ctx)"> <param name="stride" type="GLsizei"/> <param name="count" type="GLsizei"/> <param name="pointer" type="const GLboolean *"/> @@ -9206,7 +9219,8 @@ <param name="params" type="GLvoid **" output="true"/> </function> - <function name="IndexPointerEXT" deprecated="3.1" marshal="async"> + <function name="IndexPointerEXT" deprecated="3.1" marshal="async" + marshal_fail="_mesa_glthread_is_non_vbo_vertex_attrib_pointer(ctx)"> <param name="type" type="GLenum"/> <param name="stride" type="GLsizei"/> <param name="count" type="GLsizei"/> @@ -9214,7 +9228,8 @@ <glx handcode="true"/> </function> - <function name="NormalPointerEXT" deprecated="3.1" marshal="async"> + <function name="NormalPointerEXT" deprecated="3.1" marshal="async" + marshal_fail="_mesa_glthread_is_non_vbo_vertex_attrib_pointer(ctx)"> <param name="type" type="GLenum"/> <param name="stride" type="GLsizei"/> <param name="count" type="GLsizei"/> @@ -9222,7 +9237,8 @@ <glx handcode="true"/> </function> - <function name="TexCoordPointerEXT" deprecated="3.1" marshal="async"> + <function name="TexCoordPointerEXT" deprecated="3.1" marshal="async" + marshal_fail="_mesa_glthread_is_non_vbo_vertex_attrib_pointer(ctx)"> <param name="size" type="GLint"/> <param name="type" type="GLenum"/> <param name="stride" type="GLsizei"/> @@ -9231,7 +9247,8 @@ <glx handcode="true"/> </function> - <function name="VertexPointerEXT" deprecated="3.1" marshal="async"> + <function name="VertexPointerEXT" deprecated="3.1" marshal="async" + marshal_fail="_mesa_glthread_is_non_vbo_vertex_attrib_pointer(ctx)"> <param name="size" type="GLint"/> <param name="type" type="GLenum"/> <param name="stride" type="GLsizei"/> @@ -10206,7 +10223,8 @@ <param name="primcount" type="GLsizei"/> </function> - <function name="MultiDrawElementsEXT" es1="1.0" es2="2.0" exec="dynamic" marshal="draw"> + <function name="MultiDrawElementsEXT" es1="1.0" es2="2.0" exec="dynamic" marshal="draw" + marshal_fail="_mesa_glthread_is_non_vbo_draw_elements(ctx)"> <param name="mode" type="GLenum"/> <param name="count" type="const GLsizei *"/> <param name="type" type="GLenum"/> @@ -11225,7 +11243,8 @@ <glx handcode="true" ignore="true"/> </function> - <function name="MultiModeDrawElementsIBM" marshal="draw"> + <function name="MultiModeDrawElementsIBM" marshal="draw" + marshal_fail="_mesa_glthread_is_non_vbo_draw_elements(ctx)"> <param name="mode" type="const GLenum *"/> <param name="count" type="const GLsizei *"/> <param name="type" type="GLenum"/> diff --git a/src/mapi/glapi/gen/gl_marshal.py b/src/mapi/glapi/gen/gl_marshal.py index a50d773e27e..165275904ff 100644 --- a/src/mapi/glapi/gen/gl_marshal.py +++ b/src/mapi/glapi/gen/gl_marshal.py @@ -252,10 +252,6 @@ class PrintCode(gl_XML.gl_print_base): self.print_sync_dispatch(func) out('}') - if func.marshal == 'draw': - out('/* We relied on all vertex and index data being in VBOs */') - out('assert(ctx->API == API_OPENGL_CORE);') - out('}') def print_async_body(self, func): |