diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h index 59cdc1058ff..dcd07315df1 100644 --- a/src/mesa/main/dd.h +++ b/src/mesa/main/dd.h @@ -652,8 +652,6 @@ struct dd_function_table { /*@{*/ /** Used to allocated any buffers with on-demand creation */ void (*DrawBufferAllocate)(struct gl_context *ctx); - /** Enable or disable server-side gl capabilities */ - void (*Enable)(struct gl_context *ctx, GLenum cap, GLboolean state); /* Specifies the current buffer for reading */ void (*ReadBuffer)( struct gl_context *ctx, GLenum buffer ); /** Set texture parameter (callee gets param value from the texObj) */ diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index 1f835fddd78..ba9c88211cd 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -44,6 +44,7 @@ #include "texstate.h" #include "varray.h" +#include "state_tracker/st_context.h" void _mesa_update_derived_primitive_restart_state(struct gl_context *ctx) @@ -146,9 +147,7 @@ client_state(struct gl_context *ctx, struct gl_vertex_array_object* vao, goto invalid_enum_error; } - if (ctx->Driver.Enable) { - ctx->Driver.Enable( ctx, cap, state ); - } + st_Enable( ctx, cap ); return; @@ -363,9 +362,7 @@ _mesa_set_multisample(struct gl_context *ctx, GLboolean state) ctx->NewDriverState |= ctx->DriverFlags.NewMultisampleEnable; ctx->Multisample.Enabled = state; - if (ctx->Driver.Enable) { - ctx->Driver.Enable(ctx, GL_MULTISAMPLE, state); - } + st_Enable(ctx, GL_MULTISAMPLE); } /** @@ -384,9 +381,7 @@ _mesa_set_framebuffer_srgb(struct gl_context *ctx, GLboolean state) ctx->NewDriverState |= ctx->DriverFlags.NewFramebufferSRGB; ctx->Color.sRGBEnabled = state; - if (ctx->Driver.Enable) { - ctx->Driver.Enable(ctx, GL_FRAMEBUFFER_SRGB, state); - } + st_Enable(ctx, GL_FRAMEBUFFER_SRGB); } /** @@ -1348,9 +1343,7 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) goto invalid_enum_error; } - if (ctx->Driver.Enable) { - ctx->Driver.Enable( ctx, cap, state ); - } + st_Enable( ctx, cap ); return; diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index 0eb6766aa35..3fb3c496584 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -88,11 +88,8 @@ DEBUG_GET_ONCE_BOOL_OPTION(mesa_mvp_dp4, "MESA_MVP_DP4", FALSE) -/** - * Called via ctx->Driver.Enable() - */ -static void -st_Enable(struct gl_context *ctx, GLenum cap, UNUSED GLboolean state) +void +st_Enable(struct gl_context *ctx, GLenum cap) { struct st_context *st = st_context(ctx); @@ -965,7 +962,6 @@ st_init_driver_functions(struct pipe_screen *screen, if (screen->get_param(screen, PIPE_CAP_STRING_MARKER)) functions->EmitStringMarker = st_emit_string_marker; - functions->Enable = st_Enable; functions->UpdateState = st_invalidate_state; functions->QueryMemoryInfo = st_query_memory_info; functions->SetBackgroundContext = st_set_background_context; diff --git a/src/mesa/state_tracker/st_context.h b/src/mesa/state_tracker/st_context.h index a3b1488634e..c2aae6d729a 100644 --- a/src/mesa/state_tracker/st_context.h +++ b/src/mesa/state_tracker/st_context.h @@ -46,7 +46,6 @@ extern "C" { #endif -struct dd_function_table; struct draw_context; struct draw_stage; struct gen_mipmap_state; @@ -454,7 +453,7 @@ struct st_framebuffer struct list_head head; }; - +void st_Enable(struct gl_context *ctx, GLenum cap); #ifdef __cplusplus } #endif