summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2021-12-20 13:23:41 +1000
committerMarge Bot <emma+marge@anholt.net>2021-12-23 19:06:57 +0000
commitd2148af2cabcf2118e7008d8368384c020ec480c (patch)
tree5f231e00756f4facf433d499c88f907736fb8549
parent86a7a36164d8cc42a89d20a0dfd745dde43b4aae (diff)
mesa/st: remove conditionals for driver state bits that are always set.
Just removes some conditional checks that never work out now. 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>
-rw-r--r--src/mesa/main/blend.c3
-rw-r--r--src/mesa/main/enable.c9
-rw-r--r--src/mesa/main/multisample.c4
3 files changed, 5 insertions, 11 deletions
diff --git a/src/mesa/main/blend.c b/src/mesa/main/blend.c
index 93d632a17c7..0bc21a42ccc 100644
--- a/src/mesa/main/blend.c
+++ b/src/mesa/main/blend.c
@@ -850,8 +850,7 @@ _mesa_AlphaFunc( GLenum func, GLclampf ref )
case GL_NOTEQUAL:
case GL_GEQUAL:
case GL_ALWAYS:
- FLUSH_VERTICES(ctx, ctx->DriverFlags.NewAlphaTest ? 0 : _NEW_COLOR,
- GL_COLOR_BUFFER_BIT);
+ FLUSH_VERTICES(ctx, 0, GL_COLOR_BUFFER_BIT);
ctx->NewDriverState |= ctx->DriverFlags.NewAlphaTest;
ctx->Color.AlphaFunc = func;
ctx->Color.AlphaRefUnclamped = ref;
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index 059288c36f7..d033d626f52 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -353,8 +353,7 @@ _mesa_set_multisample(struct gl_context *ctx, GLboolean state)
/* GL compatibility needs Multisample.Enable to determine program state
* constants.
*/
- if (ctx->API == API_OPENGL_COMPAT || ctx->API == API_OPENGLES ||
- !ctx->DriverFlags.NewMultisampleEnable) {
+ if (ctx->API == API_OPENGL_COMPAT || ctx->API == API_OPENGLES) {
FLUSH_VERTICES(ctx, _NEW_MULTISAMPLE, GL_MULTISAMPLE_BIT | GL_ENABLE_BIT);
} else {
FLUSH_VERTICES(ctx, 0, GL_MULTISAMPLE_BIT | GL_ENABLE_BIT);
@@ -462,8 +461,7 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
/* The compatibility profile needs _NEW_TRANSFORM to transform
* clip planes according to the projection matrix.
*/
- if (ctx->API == API_OPENGL_COMPAT || ctx->API == API_OPENGLES ||
- !ctx->DriverFlags.NewClipPlaneEnable) {
+ if (ctx->API == API_OPENGL_COMPAT || ctx->API == API_OPENGLES) {
FLUSH_VERTICES(ctx, _NEW_TRANSFORM,
GL_TRANSFORM_BIT | GL_ENABLE_BIT);
} else {
@@ -1048,8 +1046,7 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
goto invalid_enum_error;
if (ctx->Multisample.SampleShading == state)
return;
- FLUSH_VERTICES(ctx, ctx->DriverFlags.NewSampleShading ? 0 :
- _NEW_MULTISAMPLE,
+ FLUSH_VERTICES(ctx, 0,
GL_MULTISAMPLE_BIT | GL_ENABLE_BIT);
ctx->NewDriverState |= ctx->DriverFlags.NewSampleShading;
ctx->Multisample.SampleShading = state;
diff --git a/src/mesa/main/multisample.c b/src/mesa/main/multisample.c
index a955a105a40..91592d7c691 100644
--- a/src/mesa/main/multisample.c
+++ b/src/mesa/main/multisample.c
@@ -192,9 +192,7 @@ min_sample_shading(struct gl_context *ctx, GLclampf value)
if (ctx->Multisample.MinSampleShadingValue == value)
return;
- FLUSH_VERTICES(ctx,
- ctx->DriverFlags.NewSampleShading ? 0 : _NEW_MULTISAMPLE,
- GL_MULTISAMPLE_BIT);
+ FLUSH_VERTICES(ctx, 0, GL_MULTISAMPLE_BIT);
ctx->NewDriverState |= ctx->DriverFlags.NewSampleShading;
ctx->Multisample.MinSampleShadingValue = value;
}