Module: Mesa Branch: main Commit: cbaf07297196a956587f47d388cef7072dc97562 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=cbaf07297196a956587f47d388cef7072dc97562
Author: Dave Airlie <[email protected]> Date: Mon Dec 20 13:07:08 2021 +1000 mesa/st: drop clip plane driver state bits Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14261> --- src/mesa/main/attrib.c | 2 +- src/mesa/main/clip.c | 3 ++- src/mesa/main/enable.c | 2 +- src/mesa/main/mtypes.h | 6 ------ src/mesa/main/viewport.c | 5 ++--- src/mesa/state_tracker/st_context.c | 3 --- 6 files changed, 6 insertions(+), 15 deletions(-) diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c index ce7bcecdd88..88a56c4c824 100644 --- a/src/mesa/main/attrib.c +++ b/src/mesa/main/attrib.c @@ -1040,7 +1040,7 @@ _mesa_PopAttrib(void) _math_matrix_analyse(ctx->ProjectionMatrixStack.Top); ctx->NewState |= _NEW_TRANSFORM; - ctx->NewDriverState |= ctx->DriverFlags.NewClipPlane; + ctx->NewDriverState |= ST_NEW_CLIP_STATE; /* restore clip planes */ for (i = 0; i < ctx->Const.MaxClipPlanes; i++) { diff --git a/src/mesa/main/clip.c b/src/mesa/main/clip.c index 5b76867ed5a..c7b152d4f74 100644 --- a/src/mesa/main/clip.c +++ b/src/mesa/main/clip.c @@ -32,6 +32,7 @@ #include "math/m_matrix.h" #include "api_exec_decl.h" +#include "state_tracker/st_context.h" /** * Update derived clip plane state. @@ -87,7 +88,7 @@ _mesa_ClipPlane( GLenum plane, const GLdouble *eq ) /* EyeUserPlane is used by program state constants. */ FLUSH_VERTICES(ctx, _NEW_TRANSFORM, GL_TRANSFORM_BIT); - ctx->NewDriverState |= ctx->DriverFlags.NewClipPlane; + ctx->NewDriverState |= ST_NEW_CLIP_STATE; COPY_4FV(ctx->Transform.EyeUserPlane[p], equation); if (ctx->Transform.ClipPlanesEnabled & (1 << p)) { diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index f658f183f30..5e7a28f4cfa 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -478,7 +478,7 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) /* TODO: glEnable might not be the best place to do it. */ if (ctx->API == API_OPENGL_COMPAT || ctx->API == API_OPENGLES) { _mesa_update_clip_plane(ctx, p); - ctx->NewDriverState |= ctx->DriverFlags.NewClipPlane; + ctx->NewDriverState |= ST_NEW_CLIP_STATE; } } else { diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 4dcff8ab374..68bbd2a64aa 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -4788,12 +4788,6 @@ struct gl_driver_flags /** gl_context::Multisample::(Min)SampleShading */ uint64_t NewSampleShading; - /** gl_context::Transform::ClipOrigin/ClipDepthMode */ - uint64_t NewClipControl; - - /** gl_context::Transform::EyeUserPlane */ - uint64_t NewClipPlane; - /** gl_context::Transform::ClipPlanesEnabled */ uint64_t NewClipPlaneEnable; diff --git a/src/mesa/main/viewport.c b/src/mesa/main/viewport.c index 07e6ab1cc42..698d18b6295 100644 --- a/src/mesa/main/viewport.c +++ b/src/mesa/main/viewport.c @@ -507,9 +507,8 @@ clip_control(struct gl_context *ctx, GLenum origin, GLenum depth, bool no_error) } /* Affects transform state and the viewport transform */ - FLUSH_VERTICES(ctx, ctx->DriverFlags.NewClipControl ? 0 : - _NEW_TRANSFORM | _NEW_VIEWPORT, GL_TRANSFORM_BIT); - ctx->NewDriverState |= ctx->DriverFlags.NewClipControl; + FLUSH_VERTICES(ctx, 0, GL_TRANSFORM_BIT); + ctx->NewDriverState |= ST_NEW_VIEWPORT | ST_NEW_RASTERIZER; if (ctx->Transform.ClipOrigin != origin) { ctx->Transform.ClipOrigin = origin; diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index f828b0c5447..49329aed0d7 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -481,9 +481,6 @@ st_init_driver_flags(struct st_context *st) f->NewSampleShading |= ST_NEW_RASTERIZER; } - f->NewClipControl = ST_NEW_VIEWPORT | ST_NEW_RASTERIZER; - f->NewClipPlane = ST_NEW_CLIP_STATE; - if (st->clamp_frag_color_in_shader) { f->NewFragClamp = ST_NEW_FS_STATE; } else {
