mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 17:30:20 +01:00
mesa/st: merge NewDepthClamp state flag
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14261>
This commit is contained in:
parent
535a9d4203
commit
df4f0672d3
3 changed files with 6 additions and 14 deletions
|
|
@ -1178,10 +1178,9 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
|
|||
if (ctx->Transform.DepthClampNear == state &&
|
||||
ctx->Transform.DepthClampFar == state)
|
||||
return;
|
||||
FLUSH_VERTICES(ctx, ctx->DriverFlags.NewDepthClamp ? 0 :
|
||||
_NEW_TRANSFORM,
|
||||
FLUSH_VERTICES(ctx, 0,
|
||||
GL_TRANSFORM_BIT | GL_ENABLE_BIT);
|
||||
ctx->NewDriverState |= ctx->DriverFlags.NewDepthClamp;
|
||||
ctx->NewDriverState |= ST_NEW_RASTERIZER;
|
||||
ctx->Transform.DepthClampNear = state;
|
||||
ctx->Transform.DepthClampFar = state;
|
||||
break;
|
||||
|
|
@ -1191,10 +1190,9 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
|
|||
goto invalid_enum_error;
|
||||
if (ctx->Transform.DepthClampNear == state)
|
||||
return;
|
||||
FLUSH_VERTICES(ctx, ctx->DriverFlags.NewDepthClamp ? 0 :
|
||||
_NEW_TRANSFORM,
|
||||
FLUSH_VERTICES(ctx, 0,
|
||||
GL_TRANSFORM_BIT | GL_ENABLE_BIT);
|
||||
ctx->NewDriverState |= ctx->DriverFlags.NewDepthClamp;
|
||||
ctx->NewDriverState |= ST_NEW_RASTERIZER;
|
||||
ctx->Transform.DepthClampNear = state;
|
||||
break;
|
||||
|
||||
|
|
@ -1203,10 +1201,9 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
|
|||
goto invalid_enum_error;
|
||||
if (ctx->Transform.DepthClampFar == state)
|
||||
return;
|
||||
FLUSH_VERTICES(ctx, ctx->DriverFlags.NewDepthClamp ? 0 :
|
||||
_NEW_TRANSFORM,
|
||||
FLUSH_VERTICES(ctx, 0,
|
||||
GL_TRANSFORM_BIT | GL_ENABLE_BIT);
|
||||
ctx->NewDriverState |= ctx->DriverFlags.NewDepthClamp;
|
||||
ctx->NewDriverState |= ST_NEW_RASTERIZER;
|
||||
ctx->Transform.DepthClampFar = state;
|
||||
break;
|
||||
|
||||
|
|
|
|||
|
|
@ -4888,9 +4888,6 @@ struct gl_driver_flags
|
|||
/** gl_context::Color::ClampFragmentColor */
|
||||
uint64_t NewFragClamp;
|
||||
|
||||
/** gl_context::Transform::DepthClamp */
|
||||
uint64_t NewDepthClamp;
|
||||
|
||||
/** gl_context::Line */
|
||||
uint64_t NewLineState;
|
||||
|
||||
|
|
|
|||
|
|
@ -509,8 +509,6 @@ st_init_driver_flags(struct st_context *st)
|
|||
f->NewFragClamp = ST_NEW_RASTERIZER;
|
||||
}
|
||||
|
||||
f->NewDepthClamp = ST_NEW_RASTERIZER;
|
||||
|
||||
if (st->lower_ucp)
|
||||
f->NewClipPlaneEnable = ST_NEW_VS_STATE | ST_NEW_GS_STATE;
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue