Module: Mesa
Branch: main
Commit: 777166cc66c7330e66e493ee804d32d1f87d297a
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=777166cc66c7330e66e493ee804d32d1f87d297a

Author: Marek Olšák <[email protected]>
Date:   Mon Dec 26 14:59:53 2022 -0500

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 <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20824>

---

 src/mesa/main/glthread_marshal.h | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

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;
    }
 }
 

Reply via email to