mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-04 00:08:16 +02:00
mesa/st: remove lower_ucp from st_context
lower_ucp is the negation of screen->caps.clip_planes. Replace all call sites with !screen->caps.clip_planes 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
3d2164f890
commit
45dc94b1bb
4 changed files with 7 additions and 10 deletions
|
|
@ -63,7 +63,7 @@ void st_update_clip( struct st_context *st )
|
|||
|
||||
if (memcmp(&st->state.clip, &clip, sizeof(clip)) != 0) {
|
||||
st->state.clip = clip;
|
||||
if (!st->lower_ucp)
|
||||
if (st->screen->caps.clip_planes)
|
||||
st->pipe->set_clip_state(st->pipe, &clip);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -243,7 +243,7 @@ st_update_vp( struct st_context *st )
|
|||
if (st->lower_point_size)
|
||||
key.export_point_size = !st->ctx->VertexProgram.PointSizeEnabled && !st->ctx->PointSizeIsSet;
|
||||
/* _NEW_TRANSFORM */
|
||||
if (st->lower_ucp && st_user_clip_planes_enabled(st->ctx))
|
||||
if (!st->screen->caps.clip_planes && st_user_clip_planes_enabled(st->ctx))
|
||||
key.lower_ucp = st->ctx->Transform.ClipPlanesEnabled;
|
||||
}
|
||||
|
||||
|
|
@ -292,7 +292,7 @@ st_update_common_program(struct st_context *st, struct gl_program *prog,
|
|||
VARYING_SLOT_BFC0 |
|
||||
VARYING_SLOT_BFC1));
|
||||
|
||||
if (st->lower_ucp && st_user_clip_planes_enabled(st->ctx) &&
|
||||
if (!st->screen->caps.clip_planes && st_user_clip_planes_enabled(st->ctx) &&
|
||||
(pipe_shader == MESA_SHADER_GEOMETRY ||
|
||||
!st->ctx->GeometryProgram._Current))
|
||||
key.lower_ucp = st->ctx->Transform.ClipPlanesEnabled;
|
||||
|
|
|
|||
|
|
@ -413,7 +413,7 @@ st_init_driver_flags(struct st_context *st)
|
|||
}
|
||||
|
||||
ST_SET_STATE(f->NewClipPlaneEnable, ST_NEW_RASTERIZER);
|
||||
if (st->lower_ucp) {
|
||||
if (!st->screen->caps.clip_planes) {
|
||||
ST_SET_STATE3(f->NewClipPlaneEnable, ST_NEW_VS_STATE, ST_NEW_GS_STATE,
|
||||
ST_NEW_TES_STATE);
|
||||
}
|
||||
|
|
@ -593,8 +593,6 @@ st_create_context_priv(struct gl_context *ctx, struct pipe_context *pipe,
|
|||
break;
|
||||
default: break;
|
||||
}
|
||||
st->lower_ucp =
|
||||
!screen->caps.clip_planes;
|
||||
st->prefer_real_buffer_in_constbuf0 =
|
||||
screen->caps.prefer_real_buffer_in_constbuf0;
|
||||
st->has_conditional_render =
|
||||
|
|
@ -673,7 +671,7 @@ st_create_context_priv(struct gl_context *ctx, struct pipe_context *pipe,
|
|||
st->screen->caps.shareable_shaders &&
|
||||
!st->clamp_vert_color_in_shader &&
|
||||
!st->lower_point_size &&
|
||||
(is_gles2 || !st->lower_ucp);
|
||||
(is_gles2 || st->screen->caps.clip_planes);
|
||||
|
||||
st->shader_has_one_variant[MESA_SHADER_FRAGMENT] =
|
||||
st->screen->caps.shareable_shaders &&
|
||||
|
|
@ -688,13 +686,13 @@ st_create_context_priv(struct gl_context *ctx, struct pipe_context *pipe,
|
|||
st->screen->caps.shareable_shaders &&
|
||||
!st->clamp_vert_color_in_shader &&
|
||||
!st->lower_point_size &&
|
||||
(is_gles2 || !st->lower_ucp);
|
||||
(is_gles2 || st->screen->caps.clip_planes);
|
||||
|
||||
st->shader_has_one_variant[MESA_SHADER_GEOMETRY] =
|
||||
st->screen->caps.shareable_shaders &&
|
||||
!st->clamp_vert_color_in_shader &&
|
||||
!st->lower_point_size &&
|
||||
(is_gles2 || !st->lower_ucp);
|
||||
(is_gles2 || st->screen->caps.clip_planes);
|
||||
st->shader_has_one_variant[MESA_SHADER_COMPUTE] = st->screen->caps.shareable_shaders;
|
||||
|
||||
if (!st->pipe->set_context_param || !util_thread_scheduler_enabled())
|
||||
|
|
|
|||
|
|
@ -162,7 +162,6 @@ struct st_context
|
|||
bool can_bind_const_buffer_as_vertex;
|
||||
bool lower_point_size;
|
||||
bool add_point_size;
|
||||
bool lower_ucp;
|
||||
bool prefer_real_buffer_in_constbuf0;
|
||||
bool has_conditional_render;
|
||||
bool lower_rect_tex;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue