From df38b99e85590d846c2191f5990592b568202b55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Wed, 23 Dec 2020 12:29:24 -0500 Subject: [PATCH] glthread: rename inside_dlist to ListMode for future use Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/mapi/glapi/gen/gl_API.xml | 4 ++-- src/mesa/main/glthread.h | 4 ++-- src/mesa/main/glthread_draw.c | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml index 7c754b8671e..d04f4c4f1d6 100644 --- a/src/mapi/glapi/gen/gl_API.xml +++ b/src/mapi/glapi/gen/gl_API.xml @@ -1111,14 +1111,14 @@ + marshal_call_after="if (COMPAT) ctx->GLThread.ListMode = mode;"> + marshal_call_after="if (COMPAT) ctx->GLThread.ListMode = 0;"> diff --git a/src/mesa/main/glthread.h b/src/mesa/main/glthread.h index 62367abbfad..bc1b751c86b 100644 --- a/src/mesa/main/glthread.h +++ b/src/mesa/main/glthread.h @@ -153,8 +153,8 @@ struct glthread_state /** Whether GLThread is enabled. */ bool enabled; - /** Whether GLThread is inside a display list generation. */ - bool inside_dlist; + /** Display lists. */ + GLenum ListMode; /**< Zero if not inside display list, else list mode. */ /** For L3 cache pinning. */ unsigned pin_thread_counter; diff --git a/src/mesa/main/glthread_draw.c b/src/mesa/main/glthread_draw.c index 263be4fe487..a534c51ab84 100644 --- a/src/mesa/main/glthread_draw.c +++ b/src/mesa/main/glthread_draw.c @@ -379,7 +379,7 @@ draw_arrays(GLenum mode, GLint first, GLsizei count, GLsizei instance_count, struct glthread_vao *vao = ctx->GLThread.CurrentVAO; unsigned user_buffer_mask = vao->UserPointerMask & vao->BufferEnabled; - if (compiled_into_dlist && ctx->GLThread.inside_dlist) { + if (compiled_into_dlist && ctx->GLThread.ListMode) { _mesa_glthread_finish_before(ctx, "DrawArrays"); /* Use the function that's compiled into a display list. */ CALL_DrawArrays(ctx->CurrentServerDispatch, (mode, first, count)); @@ -492,7 +492,7 @@ _mesa_marshal_MultiDrawArrays(GLenum mode, const GLint *first, struct glthread_vao *vao = ctx->GLThread.CurrentVAO; unsigned user_buffer_mask = vao->UserPointerMask & vao->BufferEnabled; - if (ctx->GLThread.inside_dlist) + if (ctx->GLThread.ListMode) goto sync; if (draw_count >= 0 && @@ -764,7 +764,7 @@ draw_elements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, unsigned user_buffer_mask = vao->UserPointerMask & vao->BufferEnabled; bool has_user_indices = vao->CurrentElementBufferName == 0; - if (compiled_into_dlist && ctx->GLThread.inside_dlist) + if (compiled_into_dlist && ctx->GLThread.ListMode) goto sync; /* Fast path when nothing needs to be done. @@ -837,7 +837,7 @@ draw_elements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, sync: _mesa_glthread_finish_before(ctx, "DrawElements"); - if (compiled_into_dlist && ctx->GLThread.inside_dlist) { + if (compiled_into_dlist && ctx->GLThread.ListMode) { /* Only use the ones that are compiled into display lists. */ if (basevertex) { CALL_DrawElementsBaseVertex(ctx->CurrentServerDispatch, @@ -977,7 +977,7 @@ _mesa_marshal_MultiDrawElementsBaseVertex(GLenum mode, const GLsizei *count, unsigned user_buffer_mask = vao->UserPointerMask & vao->BufferEnabled; bool has_user_indices = vao->CurrentElementBufferName == 0; - if (ctx->GLThread.inside_dlist) + if (ctx->GLThread.ListMode) goto sync; /* Fast path when nothing needs to be done. */