From dbc9cb699549359577364f872aabd41f89539f9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Fri, 18 Nov 2022 07:31:03 -0500 Subject: [PATCH] mesa: set fewer flags for VertexProgram.TwoSideEnabled changes Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/mesa/main/enable.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index ed8016bcf8c..5696aa16a6e 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -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;