diff options
author | Mathias Fröhlich <[email protected]> | 2020-02-26 07:49:27 +0100 |
---|---|---|
committer | Mathias Fröhlich <[email protected]> | 2020-02-27 06:58:56 +0100 |
commit | 636656bcd7801c703ebcf9bd4c65197e4e6cbee8 (patch) | |
tree | 583fb5784eced8a3b546a10d3c27c147cfc969d2 /src/mesa/main | |
parent | 4a54f8cd2cf31d0fc952748a998fa63763b3977e (diff) |
mesa: Flush vertices before changing the OpenGL state.
Reviewed-by: Marek Olšák <[email protected]>
CC: <[email protected]>
Signed-off-by: Mathias Fröhlich <[email protected]>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3958>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3958>
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/conservativeraster.c | 14 |
1 files 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) |