From 636656bcd7801c703ebcf9bd4c65197e4e6cbee8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mathias=20Fr=C3=B6hlich?= Date: Wed, 26 Feb 2020 07:49:27 +0100 Subject: [PATCH] mesa: Flush vertices before changing the OpenGL state. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Marek Olšák CC: Signed-off-by: Mathias Fröhlich Tested-by: Marge Bot Part-of: --- src/mesa/main/conservativeraster.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/mesa/main/conservativeraster.c b/src/mesa/main/conservativeraster.c index 9068a00b4c9..d27c21c1f36 100644 --- a/src/mesa/main/conservativeraster.c +++ b/src/mesa/main/conservativeraster.c @@ -59,6 +59,11 @@ conservative_raster_parameter(GLenum pname, GLfloat param, _mesa_error(ctx, GL_INVALID_VALUE, "%s(param=%g)", func, param); return; } + + FLUSH_VERTICES(ctx, 0); + ctx->NewDriverState |= + ctx->DriverFlags.NewNvConservativeRasterizationParams; + ctx->ConservativeRasterDilate = CLAMP(param, ctx->Const.ConservativeRasterDilateRange[0], @@ -74,6 +79,11 @@ conservative_raster_parameter(GLenum pname, GLfloat param, "%s(pname=%s)", func, _mesa_enum_to_string(param)); return; } + + FLUSH_VERTICES(ctx, 0); + ctx->NewDriverState |= + ctx->DriverFlags.NewNvConservativeRasterizationParams; + ctx->ConservativeRasterMode = param; break; default: @@ -81,10 +91,6 @@ conservative_raster_parameter(GLenum pname, GLfloat param, break; } - FLUSH_VERTICES(ctx, 0); - ctx->NewDriverState |= - ctx->DriverFlags.NewNvConservativeRasterizationParams; - return; invalid_pname_enum: if (!no_error) -- 2.30.2