Mesa (main): zink: respect line_rectangular state
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jul 14 07:40:16 UTC 2021
Module: Mesa
Branch: main
Commit: c7fefc0f2fdcec487f91a560529a6f0be4417aea
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c7fefc0f2fdcec487f91a560529a6f0be4417aea
Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date: Tue Jul 13 09:37:01 2021 +0200
zink: respect line_rectangular state
This is mostly a theoretical fix for the Nine frontent, which doesn't
want rectangular lines even when multisampling.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11841>
---
src/gallium/drivers/zink/zink_state.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/src/gallium/drivers/zink/zink_state.c b/src/gallium/drivers/zink/zink_state.c
index 93a52f15225..3953d4b5cc5 100644
--- a/src/gallium/drivers/zink/zink_state.c
+++ b/src/gallium/drivers/zink/zink_state.c
@@ -469,14 +469,14 @@ zink_create_rasterizer_state(struct pipe_context *pctx,
state->hw_state.line_stipple_pattern = rs_state->line_stipple_pattern;
if (screen->info.have_EXT_line_rasterization) {
- if (rs_state->multisample) {
- if (line_feats->stippledRectangularLines)
+ if (rs_state->line_rectangular) {
+ if (rs_state->line_smooth) {
+ if (line_feats->stippledSmoothLines)
+ state->hw_state.line_mode =
+ VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT;
+ } else if (line_feats->stippledRectangularLines)
state->hw_state.line_mode =
VK_LINE_RASTERIZATION_MODE_RECTANGULAR_EXT;
- } else if (rs_state->line_smooth) {
- if (line_feats->stippledSmoothLines)
- state->hw_state.line_mode =
- VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT;
} else if (line_feats->stippledBresenhamLines)
state->hw_state.line_mode =
VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT;
@@ -488,14 +488,14 @@ zink_create_rasterizer_state(struct pipe_context *pctx,
}
} else {
if (screen->info.have_EXT_line_rasterization) {
- if (rs_state->multisample) {
- if (line_feats->rectangularLines)
+ if (rs_state->line_rectangular) {
+ if (rs_state->line_smooth) {
+ if (line_feats->smoothLines)
+ state->hw_state.line_mode =
+ VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT;
+ } else if (line_feats->rectangularLines)
state->hw_state.line_mode =
VK_LINE_RASTERIZATION_MODE_RECTANGULAR_EXT;
- } else if (rs_state->line_smooth) {
- if (line_feats->smoothLines)
- state->hw_state.line_mode =
- VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT;
} else if (line_feats->bresenhamLines)
state->hw_state.line_mode =
VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT;
More information about the mesa-commit
mailing list