mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-05 02:08:18 +02:00
mesa/st: remove lower_two_sided_color from st_context
lower_two_sided_color is the negation of screen->caps.two_sided_color. Replace all call sites with !screen->caps.two_sided_color directly. Reviewed-by: Marek Olšák <maraeo@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41184>
This commit is contained in:
parent
7c84af940a
commit
3d2164f890
5 changed files with 5 additions and 8 deletions
|
|
@ -1194,7 +1194,7 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
|
|||
if (ctx->VertexProgram.TwoSideEnabled == state)
|
||||
return;
|
||||
FLUSH_VERTICES(ctx, 0, GL_ENABLE_BIT);
|
||||
if (ctx->st->lower_two_sided_color) {
|
||||
if (!ctx->st->screen->caps.two_sided_color) {
|
||||
/* TODO: this could be smaller, but most drivers don't get here */
|
||||
ST_SET_STATE3(ctx->NewDriverState, ST_NEW_VS_STATE,
|
||||
ST_NEW_TES_STATE, ST_NEW_GS_STATE);
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ st_update_rasterizer(struct st_context *st)
|
|||
GL_FIRST_VERTEX_CONVENTION_EXT;
|
||||
|
||||
/* _NEW_LIGHT_STATE | _NEW_PROGRAM */
|
||||
if (!st->lower_two_sided_color)
|
||||
if (st->screen->caps.two_sided_color)
|
||||
raster->light_twoside = _mesa_vertex_program_two_side_enabled(ctx);
|
||||
|
||||
/*_NEW_LIGHT_STATE | _NEW_BUFFERS */
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ st_update_fp( struct st_context *st )
|
|||
key.lower_alpha_func = st->ctx->Color.AlphaFunc;
|
||||
|
||||
/* _NEW_LIGHT_STATE | _NEW_PROGRAM */
|
||||
key.lower_two_sided_color = st->lower_two_sided_color &&
|
||||
key.lower_two_sided_color = !st->screen->caps.two_sided_color &&
|
||||
_mesa_vertex_program_two_side_enabled(st->ctx);
|
||||
|
||||
/* gl_driver_flags::NewFragClamp */
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ st_invalidate_state(struct gl_context *ctx)
|
|||
ST_SET_STATE(ctx->NewDriverState, ST_NEW_RASTERIZER);
|
||||
|
||||
if ((new_state & _NEW_LIGHT_STATE) &&
|
||||
(!st->screen->caps.flatshade || st->lower_two_sided_color))
|
||||
(!st->screen->caps.flatshade || !st->screen->caps.two_sided_color))
|
||||
ST_SET_STATE(ctx->NewDriverState, ST_NEW_FS_STATE);
|
||||
|
||||
if (new_state & _NEW_PROJECTION &&
|
||||
|
|
@ -593,8 +593,6 @@ st_create_context_priv(struct gl_context *ctx, struct pipe_context *pipe,
|
|||
break;
|
||||
default: break;
|
||||
}
|
||||
st->lower_two_sided_color =
|
||||
!screen->caps.two_sided_color;
|
||||
st->lower_ucp =
|
||||
!screen->caps.clip_planes;
|
||||
st->prefer_real_buffer_in_constbuf0 =
|
||||
|
|
@ -683,7 +681,7 @@ st_create_context_priv(struct gl_context *ctx, struct pipe_context *pipe,
|
|||
(is_gles2 || st->screen->caps.alpha_test) &&
|
||||
!st->clamp_frag_color_in_shader &&
|
||||
!st->force_persample_in_shader &&
|
||||
(is_gles2 || !st->lower_two_sided_color);
|
||||
(is_gles2 || st->screen->caps.two_sided_color);
|
||||
|
||||
st->shader_has_one_variant[MESA_SHADER_TESS_CTRL] = st->screen->caps.shareable_shaders;
|
||||
st->shader_has_one_variant[MESA_SHADER_TESS_EVAL] =
|
||||
|
|
|
|||
|
|
@ -162,7 +162,6 @@ struct st_context
|
|||
bool can_bind_const_buffer_as_vertex;
|
||||
bool lower_point_size;
|
||||
bool add_point_size;
|
||||
bool lower_two_sided_color;
|
||||
bool lower_ucp;
|
||||
bool prefer_real_buffer_in_constbuf0;
|
||||
bool has_conditional_render;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue