Module: Mesa
Branch: staging/23.2
Commit: 040a65bac88ace32bf407e548901f1a0fe8e68d2
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=040a65bac88ace32bf407e548901f1a0fe8e68d2

Author: Mike Blumenkrantz <[email protected]>
Date:   Thu Aug  3 07:36:56 2023 -0400

zink: unset line stipple ds3 state flags when stipple not available

Fixes: 7b4c1b3a426 ("zink: track and apply ds3 states only on change")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24478>
(cherry picked from commit 122ffb0c88810ca7fb3a8519830fe157c127d94e)

---

 .pick_status.json                       | 2 +-
 src/gallium/drivers/zink/zink_context.c | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/.pick_status.json b/.pick_status.json
index bf2e3bab72d..d1152e9b6a2 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -10274,7 +10274,7 @@
         "description": "zink: unset line stipple ds3 state flags when stipple 
not available",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "7b4c1b3a426ec781c81f48bf57e5e7de07bea2af",
         "notes": null
diff --git a/src/gallium/drivers/zink/zink_context.c 
b/src/gallium/drivers/zink/zink_context.c
index 610a0e302fc..a4cb5088225 100644
--- a/src/gallium/drivers/zink/zink_context.c
+++ b/src/gallium/drivers/zink/zink_context.c
@@ -3250,6 +3250,10 @@ flush_batch(struct zink_context *ctx, bool sync)
             ctx->ds3_states = BITFIELD_MASK(ZINK_DS3_BLEND_A2C);
          if 
(!screen->info.dynamic_state3_feats.extendedDynamicState3AlphaToOneEnable)
             ctx->ds3_states &= ~BITFIELD_BIT(ZINK_DS3_BLEND_A21);
+         if 
(!screen->info.dynamic_state3_feats.extendedDynamicState3LineStippleEnable)
+            ctx->ds3_states &= ~BITFIELD_BIT(ZINK_DS3_RAST_STIPPLE_ON);
+         if (screen->driver_workarounds.no_linestipple)
+            ctx->ds3_states &= ~BITFIELD_BIT(ZINK_DS3_RAST_STIPPLE);
       }
       ctx->oom_flush = false;
       ctx->oom_stall = false;

Reply via email to