summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2022-07-24 16:06:22 -0400
committerMarge Bot <emma+marge@anholt.net>2022-08-03 00:14:33 +0000
commita4ee818b18414e3e3c38ee6bd91cdcec49c02665 (patch)
tree1936bb6341aec0d58f3d135557bcba7daf64aacc
parent51a8e9feb52d411bd128f9ad185017d794abc4ec (diff)
downloadmesa-a4ee818b18414e3e3c38ee6bd91cdcec49c02665.tar.gz
glthread: don't ignore glPushAttrib/glPopAttrib when tracking GL_CULL_FACE
Fixes: f4348ef60d51b07 - glthread: don't sync for glIsEnabled with a few enums Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17781>
-rw-r--r--src/mesa/main/glthread.h1
-rw-r--r--src/mesa/main/glthread_marshal.h6
2 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/main/glthread.h b/src/mesa/main/glthread.h
index e66708403cd..ae75def0216 100644
--- a/src/mesa/main/glthread.h
+++ b/src/mesa/main/glthread.h
@@ -129,6 +129,7 @@ struct glthread_attrib_node {
GLbitfield Mask;
int ActiveTexture;
GLenum MatrixMode;
+ bool CullFace;
};
typedef enum {
diff --git a/src/mesa/main/glthread_marshal.h b/src/mesa/main/glthread_marshal.h
index aac940dc08c..95d4b20e4d1 100644
--- a/src/mesa/main/glthread_marshal.h
+++ b/src/mesa/main/glthread_marshal.h
@@ -506,6 +506,9 @@ _mesa_glthread_PushAttrib(struct gl_context *ctx, GLbitfield mask)
attr->Mask = mask;
+ if (mask & (GL_POLYGON_BIT | GL_ENABLE_BIT))
+ attr->CullFace = ctx->GLThread.CullFace;
+
if (mask & GL_TEXTURE_BIT)
attr->ActiveTexture = ctx->GLThread.ActiveTexture;
@@ -523,6 +526,9 @@ _mesa_glthread_PopAttrib(struct gl_context *ctx)
&ctx->GLThread.AttribStack[--ctx->GLThread.AttribStackDepth];
unsigned mask = attr->Mask;
+ if (mask & (GL_POLYGON_BIT | GL_ENABLE_BIT))
+ ctx->GLThread.CullFace = attr->CullFace;
+
if (mask & GL_TEXTURE_BIT)
ctx->GLThread.ActiveTexture = attr->ActiveTexture;