mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-22 05:20:37 +02:00
glthread: remove unnecessary debug code
_mesa_glthread_destroy won't be called for GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB, so the "reason" parameter will be useless. Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20624>
This commit is contained in:
parent
cabc08a184
commit
068670a79a
4 changed files with 5 additions and 22 deletions
|
|
@ -232,16 +232,13 @@ free_vao(void *data, UNUSED void *userData)
|
|||
}
|
||||
|
||||
void
|
||||
_mesa_glthread_destroy(struct gl_context *ctx, const char *reason)
|
||||
_mesa_glthread_destroy(struct gl_context *ctx)
|
||||
{
|
||||
struct glthread_state *glthread = &ctx->GLThread;
|
||||
|
||||
if (!glthread->enabled)
|
||||
return;
|
||||
|
||||
if (reason)
|
||||
_mesa_debug(ctx, "glthread destroy reason: %s\n", reason);
|
||||
|
||||
_mesa_glthread_finish(ctx);
|
||||
util_queue_destroy(&glthread->queue);
|
||||
|
||||
|
|
@ -269,7 +266,7 @@ _mesa_glthread_flush_batch(struct gl_context *ctx)
|
|||
return;
|
||||
|
||||
if (ctx->CurrentServerDispatch == ctx->ContextLost) {
|
||||
_mesa_glthread_destroy(ctx, "context lost");
|
||||
_mesa_glthread_destroy(ctx);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -300,20 +297,6 @@ _mesa_glthread_flush_batch(struct gl_context *ctx)
|
|||
|
||||
struct glthread_batch *next = glthread->next_batch;
|
||||
|
||||
/* Debug: execute the batch immediately from this thread.
|
||||
*
|
||||
* Note that glthread_unmarshal_batch() changes the dispatch table so we'll
|
||||
* need to restore it when it returns.
|
||||
*/
|
||||
if (false) {
|
||||
glthread_unmarshal_batch(next, NULL, 0);
|
||||
_glapi_set_dispatch(ctx->CurrentClientDispatch);
|
||||
|
||||
glthread->LastCallList = NULL;
|
||||
glthread->LastBindBuffer = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
p_atomic_add(&glthread->stats.num_offloaded_items, glthread->used);
|
||||
next->used = glthread->used;
|
||||
|
||||
|
|
|
|||
|
|
@ -277,7 +277,7 @@ struct glthread_state
|
|||
};
|
||||
|
||||
void _mesa_glthread_init(struct gl_context *ctx);
|
||||
void _mesa_glthread_destroy(struct gl_context *ctx, const char *reason);
|
||||
void _mesa_glthread_destroy(struct gl_context *ctx);
|
||||
|
||||
void _mesa_glthread_init_dispatch0(struct gl_context *ctx,
|
||||
struct _glapi_table *table);
|
||||
|
|
|
|||
|
|
@ -434,7 +434,7 @@ _mesa_glthread_Enable(struct gl_context *ctx, GLenum cap)
|
|||
_mesa_glthread_set_prim_restart(ctx, cap, true);
|
||||
break;
|
||||
case GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB:
|
||||
_mesa_glthread_destroy(ctx, "Enable(DEBUG_OUTPUT_SYNCHRONOUS)");
|
||||
_mesa_glthread_destroy(ctx);
|
||||
break;
|
||||
case GL_BLEND:
|
||||
ctx->GLThread.Blend = true;
|
||||
|
|
|
|||
|
|
@ -955,7 +955,7 @@ st_destroy_context(struct st_context *st)
|
|||
_mesa_make_current(ctx, NULL, NULL);
|
||||
|
||||
/* This must be called first so that glthread has a chance to finish */
|
||||
_mesa_glthread_destroy(ctx, NULL);
|
||||
_mesa_glthread_destroy(ctx);
|
||||
|
||||
_mesa_HashWalk(ctx->Shared->TexObjects, destroy_tex_sampler_cb, st);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue