From: Marek Olšák Date: Wed, 4 Mar 2020 20:02:15 +0000 (-0500) Subject: glthread: don't execute any custom VAO and BindBuffer code in the Core profile X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=951c6acb074b18da0e595825fe05c77a0fbee96d;p=mesa.git glthread: don't execute any custom VAO and BindBuffer code in the Core profile It's not needed, because user pointers can never occur there. Reviewed-by: Timothy Arceri Part-of: --- diff --git a/src/mapi/glapi/gen/ARB_direct_state_access.xml b/src/mapi/glapi/gen/ARB_direct_state_access.xml index ead893e1c67..ec7b13609a1 100644 --- a/src/mapi/glapi/gen/ARB_direct_state_access.xml +++ b/src/mapi/glapi/gen/ARB_direct_state_access.xml @@ -580,7 +580,7 @@ + marshal_call_after="if (COMPAT) _mesa_glthread_GenVertexArrays(ctx, n, arrays);"> diff --git a/src/mapi/glapi/gen/ARB_vertex_array_object.xml b/src/mapi/glapi/gen/ARB_vertex_array_object.xml index e149997d05c..ba011987e8d 100644 --- a/src/mapi/glapi/gen/ARB_vertex_array_object.xml +++ b/src/mapi/glapi/gen/ARB_vertex_array_object.xml @@ -11,18 +11,18 @@ + marshal_call_after="if (COMPAT) _mesa_glthread_BindVertexArray(ctx, array);"> + marshal_call_after="if (COMPAT) _mesa_glthread_DeleteVertexArrays(ctx, n, arrays);"> + marshal_call_after="if (COMPAT) _mesa_glthread_GenVertexArrays(ctx, n, arrays);"> diff --git a/src/mapi/glapi/gen/ARB_vertex_attrib_64bit.xml b/src/mapi/glapi/gen/ARB_vertex_attrib_64bit.xml index 1342e7e777e..45c30f48378 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 @@ + marshal_call_after="if (COMPAT) _mesa_glthread_AttribPointer(ctx);"> diff --git a/src/mapi/glapi/gen/EXT_direct_state_access.xml b/src/mapi/glapi/gen/EXT_direct_state_access.xml index 3888dd34e6e..397c75a37d0 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 @@ + marshal_call_after="if (COMPAT) _mesa_glthread_AttribPointer(ctx);"> diff --git a/src/mapi/glapi/gen/GL3x.xml b/src/mapi/glapi/gen/GL3x.xml index 16035adc01d..943e5289a93 100644 --- a/src/mapi/glapi/gen/GL3x.xml +++ b/src/mapi/glapi/gen/GL3x.xml @@ -258,7 +258,7 @@ + marshal_call_after="if (COMPAT) _mesa_glthread_AttribPointer(ctx);"> diff --git a/src/mapi/glapi/gen/es_EXT.xml b/src/mapi/glapi/gen/es_EXT.xml index 9dc1444bafe..107ca9a2cb0 100644 --- a/src/mapi/glapi/gen/es_EXT.xml +++ b/src/mapi/glapi/gen/es_EXT.xml @@ -320,7 +320,7 @@ + marshal_call_after="if (COMPAT) _mesa_glthread_AttribPointer(ctx);"> diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml index 3a703f2a3d4..7d6e01eb031 100644 --- a/src/mapi/glapi/gen/gl_API.xml +++ b/src/mapi/glapi/gen/gl_API.xml @@ -3166,7 +3166,7 @@ + marshal_call_after="if (COMPAT) _mesa_glthread_AttribPointer(ctx);"> @@ -3198,7 +3198,7 @@ + marshal_call_after="if (COMPAT) _mesa_glthread_AttribPointer(ctx);"> @@ -3217,7 +3217,7 @@ + marshal_call_after="if (COMPAT) _mesa_glthread_AttribPointer(ctx);"> @@ -3233,7 +3233,7 @@ + marshal_call_after="if (COMPAT) _mesa_glthread_AttribPointer(ctx);"> @@ -3242,7 +3242,7 @@ + marshal_call_after="if (COMPAT) _mesa_glthread_AttribPointer(ctx);"> @@ -3252,7 +3252,7 @@ + marshal_call_after="if (COMPAT) _mesa_glthread_AttribPointer(ctx);"> @@ -4748,7 +4748,7 @@ + marshal_call_after="if (COMPAT) _mesa_glthread_AttribPointer(ctx);"> @@ -4889,7 +4889,7 @@ + marshal_call_after="if (COMPAT) _mesa_glthread_AttribPointer(ctx);"> @@ -5055,7 +5055,7 @@ + marshal_call_after="if (COMPAT) _mesa_glthread_BindBuffer(ctx, target, buffer);"> @@ -5847,7 +5847,7 @@ + marshal_call_after="if (COMPAT) _mesa_glthread_AttribPointer(ctx);"> @@ -9245,7 +9245,7 @@ + marshal_call_after="if (COMPAT) _mesa_glthread_AttribPointer(ctx);"> @@ -9261,7 +9261,7 @@ + marshal_call_after="if (COMPAT) _mesa_glthread_AttribPointer(ctx);"> @@ -9274,7 +9274,7 @@ + marshal_call_after="if (COMPAT) _mesa_glthread_AttribPointer(ctx);"> @@ -9283,7 +9283,7 @@ + marshal_call_after="if (COMPAT) _mesa_glthread_AttribPointer(ctx);"> @@ -9292,7 +9292,7 @@ + marshal_call_after="if (COMPAT) _mesa_glthread_AttribPointer(ctx);"> @@ -9302,7 +9302,7 @@ + marshal_call_after="if (COMPAT) _mesa_glthread_AttribPointer(ctx);"> diff --git a/src/mapi/glapi/gen/gl_marshal.py b/src/mapi/glapi/gen/gl_marshal.py index 05c4e28eec1..02c94dd74db 100644 --- a/src/mapi/glapi/gen/gl_marshal.py +++ b/src/mapi/glapi/gen/gl_marshal.py @@ -35,6 +35,8 @@ header = """ #include "dispatch.h" #include "glthread.h" #include "marshal.h" + +#define COMPAT (ctx->API != API_OPENGL_CORE) """ diff --git a/src/mesa/main/glthread_varray.c b/src/mesa/main/glthread_varray.c index 8786f0f2d09..7a261552202 100644 --- a/src/mesa/main/glthread_varray.c +++ b/src/mesa/main/glthread_varray.c @@ -139,6 +139,6 @@ _mesa_glthread_AttribPointer(struct gl_context *ctx) { struct glthread_state *glthread = ctx->GLThread; - if (ctx->API != API_OPENGL_CORE && !glthread->vertex_array_is_vbo) + if (!glthread->vertex_array_is_vbo) glthread->CurrentVAO->HasUserPointer = true; }