mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-03 19:48:17 +02:00
mesa/st: remove lower_flatshade from st_context
lower_flatshade is the negation of screen->caps.flatshade. Replace all call sites with !screen->caps.flatshade 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
51b059dd11
commit
797ebce3e1
4 changed files with 4 additions and 7 deletions
|
|
@ -94,7 +94,7 @@ st_update_rasterizer(struct st_context *st)
|
|||
}
|
||||
|
||||
/* _NEW_LIGHT_STATE */
|
||||
raster->flatshade = !st->lower_flatshade &&
|
||||
raster->flatshade = st->screen->caps.flatshade &&
|
||||
ctx->Light.ShadeModel == GL_FLAT;
|
||||
|
||||
raster->flatshade_first = ctx->Light.ProvokingVertex ==
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ st_update_fp( struct st_context *st )
|
|||
|
||||
key.st = st->screen->caps.shareable_shaders ? NULL : st;
|
||||
|
||||
key.lower_flatshade = st->lower_flatshade &&
|
||||
key.lower_flatshade = !st->screen->caps.flatshade &&
|
||||
st->ctx->Light.ShadeModel == GL_FLAT;
|
||||
|
||||
/* _NEW_COLOR */
|
||||
|
|
|
|||
|
|
@ -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->lower_flatshade || st->lower_two_sided_color))
|
||||
(!st->screen->caps.flatshade || st->lower_two_sided_color))
|
||||
ST_SET_STATE(ctx->NewDriverState, ST_NEW_FS_STATE);
|
||||
|
||||
if (new_state & _NEW_PROJECTION &&
|
||||
|
|
@ -583,8 +583,6 @@ st_create_context_priv(struct gl_context *ctx, struct pipe_context *pipe,
|
|||
PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_ALPHA_NOT_W);
|
||||
ctx->Const.GLSLHasHalfFloatPacking =
|
||||
screen->caps.shader_pack_half_float;
|
||||
st->lower_flatshade =
|
||||
!screen->caps.flatshade;
|
||||
st->lower_alpha_test =
|
||||
!screen->caps.alpha_test;
|
||||
switch (screen->caps.point_size_fixed) {
|
||||
|
|
@ -683,7 +681,7 @@ st_create_context_priv(struct gl_context *ctx, struct pipe_context *pipe,
|
|||
|
||||
st->shader_has_one_variant[MESA_SHADER_FRAGMENT] =
|
||||
st->screen->caps.shareable_shaders &&
|
||||
!st->lower_flatshade &&
|
||||
st->screen->caps.flatshade &&
|
||||
(is_gles2 || !st->lower_alpha_test) &&
|
||||
!st->clamp_frag_color_in_shader &&
|
||||
!st->force_persample_in_shader &&
|
||||
|
|
|
|||
|
|
@ -160,7 +160,6 @@ struct st_context
|
|||
bool force_specialized_compute_transfer;
|
||||
bool force_persample_in_shader;
|
||||
bool can_bind_const_buffer_as_vertex;
|
||||
bool lower_flatshade;
|
||||
bool lower_alpha_test;
|
||||
bool lower_point_size;
|
||||
bool add_point_size;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue