mesa: set fewer flags for VertexProgram.TwoSideEnabled changes

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19859>
This commit is contained in:
Marek Olšák 2022-11-18 07:31:03 -05:00 committed by Marge Bot
parent 5acc0fa1d2
commit dbc9cb6995

View file

@ -1103,7 +1103,14 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
goto invalid_enum_error;
if (ctx->VertexProgram.TwoSideEnabled == state)
return;
FLUSH_VERTICES(ctx, _NEW_PROGRAM, GL_ENABLE_BIT);
FLUSH_VERTICES(ctx, 0, GL_ENABLE_BIT);
if (ctx->st->lower_two_sided_color) {
/* TODO: this could be smaller, but most drivers don't get here */
ctx->NewDriverState |= ST_NEW_VS_STATE |
ST_NEW_TES_STATE |
ST_NEW_GS_STATE;
}
ctx->NewDriverState |= ST_NEW_RASTERIZER;
ctx->VertexProgram.TwoSideEnabled = state;
break;