Mesa (main): lavapipe: fix disable_multisample condition
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Jul 12 22:31:23 UTC 2021
Module: Mesa
Branch: main
Commit: e0472217b03ffe2f8d159ebe7045a3eb522b03ba
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e0472217b03ffe2f8d159ebe7045a3eb522b03ba
Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date: Wed Jul 7 11:34:39 2021 +0200
lavapipe: fix disable_multisample condition
There's two of the line-modes that warrants disabling multisampling,
and that's bresenham and smooth lines.
The reason we need this for the smooth lines case, is that multisampling
overrides the smooth-flag.
Fixes: 9fbf6b2abff ("lavapipe: implement VK_EXT_line_rasterization")
Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11782>
---
src/gallium/frontends/lavapipe/lvp_pipeline.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/gallium/frontends/lavapipe/lvp_pipeline.c b/src/gallium/frontends/lavapipe/lvp_pipeline.c
index b52999b1150..6ab4bbac9ac 100644
--- a/src/gallium/frontends/lavapipe/lvp_pipeline.c
+++ b/src/gallium/frontends/lavapipe/lvp_pipeline.c
@@ -813,8 +813,8 @@ lvp_graphics_pipeline_init(struct lvp_pipeline *pipeline,
/* always draw bresenham if !smooth */
pipeline->line_stipple_enable = line_state->stippledLineEnable;
pipeline->line_smooth = line_state->lineRasterizationMode == VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT;
- pipeline->disable_multisample = (line_state->lineRasterizationMode != VK_LINE_RASTERIZATION_MODE_RECTANGULAR_EXT) &&
- line_state->lineRasterizationMode != VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT;
+ pipeline->disable_multisample = line_state->lineRasterizationMode == VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT ||
+ line_state->lineRasterizationMode == VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT;
if (!dynamic_state_contains(pipeline->graphics_create_info.pDynamicState, VK_DYNAMIC_STATE_LINE_STIPPLE_EXT)) {
pipeline->line_stipple_factor = line_state->lineStippleFactor - 1;
pipeline->line_stipple_pattern = line_state->lineStipplePattern;
More information about the mesa-commit
mailing list