Module: Mesa
Branch: staging/23.0
Commit: 725e985db5d5fe0d684d610669961784361bd7aa
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=725e985db5d5fe0d684d610669961784361bd7aa

Author: SoroushIMG <[email protected]>
Date:   Thu Feb 16 09:43:40 2023 +0000

zink: fix incorrect line mode check for bresenham

the line requirement check logic was assuming mode index 0
is bresenhamLines, but it is actually rectangularLines.

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22575>
(cherry picked from commit f6b5e128c13fe77199fb39f1b6e0a11504201352)

---

 .pick_status.json                        | 2 +-
 src/gallium/drivers/zink/zink_pipeline.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 201c1599d75..64719b4d55e 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -1684,7 +1684,7 @@
         "description": "zink: fix incorrect line mode check for bresenham",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": null,
         "notes": null
diff --git a/src/gallium/drivers/zink/zink_pipeline.c 
b/src/gallium/drivers/zink/zink_pipeline.c
index 906ce150d60..2b8e0e1cacf 100644
--- a/src/gallium/drivers/zink/zink_pipeline.c
+++ b/src/gallium/drivers/zink/zink_pipeline.c
@@ -306,9 +306,9 @@ zink_create_gfx_pipeline(struct zink_screen *screen,
             /* non-strictLine default lines are either parallelogram or 
bresenham which while not in GL spec,
              * in practice end up being within the two-pixel exception in the 
GL spec.
              */
-            else if (mode_idx || screen->info.props.limits.strictLines)
+            else if ((mode_idx != 1) || screen->info.props.limits.strictLines)
                warn_missing_feature(warned[mode_idx], 
features[hw_rast_state->line_mode][0]);
-         } else if (mode_idx || screen->info.props.limits.strictLines)
+         } else if ((mode_idx != 1) || screen->info.props.limits.strictLines)
             warn_missing_feature(warned[mode_idx], 
features[hw_rast_state->line_mode][hw_rast_state->line_stipple_enable]);
       }
 

Reply via email to