Module: Mesa
Branch: staging/23.1
Commit: 04a8cc5c517ae2a963185afbfdaf58a445b8d785
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=04a8cc5c517ae2a963185afbfdaf58a445b8d785

Author: Lionel Landwerlin <[email protected]>
Date:   Wed Sep 27 15:42:32 2023 +0300

iris: add missing workaround for 3DSTATE_LINE_STIPPLE

Signed-off-by: Lionel Landwerlin <[email protected]>
Cc: mesa-stable
Reviewed-by: Tapani Pälli <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25425>
(cherry picked from commit ee4062666c625faa5026e5d076681c7a2ad1da6d)

---

 .pick_status.json                     |  2 +-
 src/gallium/drivers/iris/iris_state.c | 11 +++++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/.pick_status.json b/.pick_status.json
index e0e277cef3f..823e17e02fa 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -886,7 +886,7 @@
         "description": "iris: add missing workaround for 3DSTATE_LINE_STIPPLE",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": null
     },
diff --git a/src/gallium/drivers/iris/iris_state.c 
b/src/gallium/drivers/iris/iris_state.c
index da4b648e1d9..d65c56383e6 100644
--- a/src/gallium/drivers/iris/iris_state.c
+++ b/src/gallium/drivers/iris/iris_state.c
@@ -7044,6 +7044,17 @@ iris_upload_dirty_render_state(struct iris_context *ice,
    if (dirty & IRIS_DIRTY_LINE_STIPPLE) {
       struct iris_rasterizer_state *cso = ice->state.cso_rast;
       iris_batch_emit(batch, cso->line_stipple, sizeof(cso->line_stipple));
+#if GFX_VER >= 11
+      /* ICL PRMs, Volume 2a - Command Reference: Instructions,
+       * 3DSTATE_LINE_STIPPLE:
+       *
+       *    "Workaround: This command must be followed by a PIPE_CONTROL with
+       *     CS Stall bit set."
+       */
+      iris_emit_pipe_control_flush(batch,
+                                   "workaround: post 3DSTATE_LINE_STIPPLE",
+                                   PIPE_CONTROL_CS_STALL);
+#endif
    }
 
    if (dirty & IRIS_DIRTY_VF_TOPOLOGY) {

Reply via email to