From ec0d62ceb5f7f610f0d8e7da38dc8cca14772f73 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 20 Dec 2021 14:10:37 +1000 Subject: [PATCH] mesa/st: drop last user of st_Enable. Move the debug output piece into mesa Reviewed-by: Kristian H. Kristensen Part-of: --- src/mesa/main/enable.c | 11 +---------- src/mesa/state_tracker/st_context.c | 14 -------------- src/mesa/state_tracker/st_context.h | 1 - 3 files changed, 1 insertion(+), 25 deletions(-) diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index 0d81d8e..b6b34f9 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -147,9 +147,6 @@ client_state(struct gl_context *ctx, struct gl_vertex_array_object* vao, default: goto invalid_enum_error; } - - st_Enable( ctx, cap ); - return; invalid_enum_error: @@ -361,8 +358,6 @@ _mesa_set_multisample(struct gl_context *ctx, GLboolean state) ctx->NewDriverState |= ctx->DriverFlags.NewMultisampleEnable; ctx->Multisample.Enabled = state; - - st_Enable(ctx, GL_MULTISAMPLE); } /** @@ -380,8 +375,6 @@ _mesa_set_framebuffer_srgb(struct gl_context *ctx, GLboolean state) GL_COLOR_BUFFER_BIT | GL_ENABLE_BIT); ctx->NewDriverState |= ST_NEW_FB_STATE; ctx->Color.sRGBEnabled = state; - - st_Enable(ctx, GL_FRAMEBUFFER_SRGB); } /** @@ -518,6 +511,7 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) case GL_DEBUG_OUTPUT: case GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB: _mesa_set_debug_state_int(ctx, cap, state); + _mesa_update_debug_callback(ctx); break; case GL_DITHER: if (ctx->Color.DitherFlag == state) @@ -1320,9 +1314,6 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) default: goto invalid_enum_error; } - - st_Enable( ctx, cap ); - return; invalid_enum_error: diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index 876099d..71c9bf4 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -72,20 +72,6 @@ DEBUG_GET_ONCE_BOOL_OPTION(mesa_mvp_dp4, "MESA_MVP_DP4", FALSE) - -void -st_Enable(struct gl_context *ctx, GLenum cap) -{ - switch (cap) { - case GL_DEBUG_OUTPUT: - case GL_DEBUG_OUTPUT_SYNCHRONOUS: - _mesa_update_debug_callback(ctx); - break; - default: - break; - } -} - void st_query_memory_info(struct gl_context *ctx, struct gl_memory_info *out) { diff --git a/src/mesa/state_tracker/st_context.h b/src/mesa/state_tracker/st_context.h index df1fde3..dadb780 100644 --- a/src/mesa/state_tracker/st_context.h +++ b/src/mesa/state_tracker/st_context.h @@ -450,7 +450,6 @@ struct st_framebuffer struct list_head head; }; -void st_Enable(struct gl_context *ctx, GLenum cap); void st_query_memory_info(struct gl_context *ctx, struct gl_memory_info *out); void st_invalidate_state(struct gl_context *ctx); -- 2.7.4