mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 00:00:11 +01:00
mesa/st: move Enable to direct call
Acked-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14100>
This commit is contained in:
parent
cc4964847b
commit
d0e48ef34f
4 changed files with 8 additions and 22 deletions
|
|
@ -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) */
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue