summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/glthread_varray.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2020-03-08 22:50:16 -0400
committerMarek Olšák <[email protected]>2020-03-20 23:01:13 -0400
commitc02a1347e5c68d7f1c68ca6b90d2736e35b1fde5 (patch)
tree624425458b2fc9cca70dcf6aad94c24c56570727 /src/mesa/main/glthread_varray.c
parent0b1dd1859134e71b25ad1124535df96d435e9766 (diff)
glthread: ignore vertex arrays with user pointers if they're disabled
Reviewed-by: Timothy Arceri <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4124>
Diffstat (limited to 'src/mesa/main/glthread_varray.c')
-rw-r--r--src/mesa/main/glthread_varray.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mesa/main/glthread_varray.c b/src/mesa/main/glthread_varray.c
index 9e45aa28755..fbd08f41e5a 100644
--- a/src/mesa/main/glthread_varray.c
+++ b/src/mesa/main/glthread_varray.c
@@ -158,10 +158,13 @@ _mesa_glthread_ClientState(struct gl_context *ctx, GLuint *vaobj,
}
void
-_mesa_glthread_AttribPointer(struct gl_context *ctx)
+_mesa_glthread_AttribPointer(struct gl_context *ctx, gl_vert_attrib attrib)
{
struct glthread_state *glthread = &ctx->GLThread;
+ struct glthread_vao *vao = glthread->CurrentVAO;
- if (glthread->CurrentArrayBufferName == 0)
- glthread->CurrentVAO->HasUserPointer = true;
+ if (glthread->CurrentArrayBufferName != 0)
+ vao->UserPointerMask &= ~(1u << attrib);
+ else
+ vao->UserPointerMask |= 1u << attrib;
}