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>
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user