Mesa (main): mesa/st: merge NewDepthClamp state flag
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Dec 23 19:35:09 UTC 2021
Module: Mesa
Branch: main
Commit: df4f0672d3f419baf078b29507db31bdec351048
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=df4f0672d3f419baf078b29507db31bdec351048
Author: Dave Airlie <airlied at redhat.com>
Date: Mon Dec 20 12:13:40 2021 +1000
mesa/st: merge NewDepthClamp state flag
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14261>
---
src/mesa/main/enable.c | 15 ++++++---------
src/mesa/main/mtypes.h | 3 ---
src/mesa/state_tracker/st_context.c | 2 --
3 files changed, 6 insertions(+), 14 deletions(-)
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index 9e1a348ecdf..e94e098040e 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -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;
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index d87a3299f54..c3fc03c030c 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -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;
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c
index 36a46d628d8..979b338901f 100644
--- a/src/mesa/state_tracker/st_context.c
+++ b/src/mesa/state_tracker/st_context.c
@@ -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
More information about the mesa-commit
mailing list