From 16fc1641ccad15bc34dd2b77d1a91cc38ebbc444 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Mon, 26 Dec 2022 14:59:53 -0500 Subject: [PATCH] glthread: handle GL_*_ARRAY in glEnable/Disable Surprisingly, the GL compatibility profile allows these in both glEnableClientState and glEnable. Fixes: 0b1dd185913 - glthread: track which vertex array attribs are enabled Acked-by: Pierre-Eric Pelloux-Prayer Part-of: (cherry picked from commit 777166cc66c7330e66e493ee804d32d1f87d297a) --- .pick_status.json | 2 +- src/mesa/main/glthread_marshal.h | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index 82f47c287b0..04c14130c3a 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1921,7 +1921,7 @@ "description": "glthread: handle GL_*_ARRAY in glEnable/Disable", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "0b1dd1859134e71b25ad1124535df96d435e9766" }, diff --git a/src/mesa/main/glthread_marshal.h b/src/mesa/main/glthread_marshal.h index 49eba0850d9..69f4f2a62cd 100644 --- a/src/mesa/main/glthread_marshal.h +++ b/src/mesa/main/glthread_marshal.h @@ -488,6 +488,18 @@ _mesa_glthread_Enable(struct gl_context *ctx, GLenum cap) case GL_POLYGON_STIPPLE: ctx->GLThread.PolygonStipple = true; break; + case GL_VERTEX_ARRAY: + case GL_NORMAL_ARRAY: + case GL_COLOR_ARRAY: + case GL_TEXTURE_COORD_ARRAY: + case GL_INDEX_ARRAY: + case GL_EDGE_FLAG_ARRAY: + case GL_FOG_COORDINATE_ARRAY: + case GL_SECONDARY_COLOR_ARRAY: + case GL_POINT_SIZE_ARRAY_OES: + _mesa_glthread_ClientState(ctx, NULL, _mesa_array_to_attrib(ctx, cap), + true); + break; } } @@ -517,6 +529,18 @@ _mesa_glthread_Disable(struct gl_context *ctx, GLenum cap) case GL_POLYGON_STIPPLE: ctx->GLThread.PolygonStipple = false; break; + case GL_VERTEX_ARRAY: + case GL_NORMAL_ARRAY: + case GL_COLOR_ARRAY: + case GL_TEXTURE_COORD_ARRAY: + case GL_INDEX_ARRAY: + case GL_EDGE_FLAG_ARRAY: + case GL_FOG_COORDINATE_ARRAY: + case GL_SECONDARY_COLOR_ARRAY: + case GL_POINT_SIZE_ARRAY_OES: + _mesa_glthread_ClientState(ctx, NULL, _mesa_array_to_attrib(ctx, cap), + false); + break; } }