summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias Fröhlich <mathias.froehlich@web.de>2020-02-26 07:49:27 +0100
committerEric Engestrom <eric@engestrom.ch>2020-03-06 22:59:21 +0100
commite32110df115d6b371bc0488def1950493684379e (patch)
tree6f48779f8c39898800d9c7bfe409bdf34ecda942
parente3e2ceb25a410b1e6b47ae191d4c2e4ccb3151c4 (diff)
mesa: Flush vertices before changing the OpenGL state.
Reviewed-by: Marek Olšák <marek.olsak@amd.com> CC: <mesa-stable@lists.freedesktop.org> Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3958> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3958> (cherry picked from commit 636656bcd7801c703ebcf9bd4c65197e4e6cbee8)
-rw-r--r--.pick_status.json2
-rw-r--r--src/mesa/main/conservativeraster.c14
2 files changed, 11 insertions, 5 deletions
diff --git a/.pick_status.json b/.pick_status.json
index 6435ad9c090..48f2f9e2cac 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -3289,7 +3289,7 @@
"description": "mesa: Flush vertices before changing the OpenGL state.",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"master_sha": null,
"because_sha": null
},
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)