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

Author: Rohan Garg <[email protected]>
Date:   Fri Jul 14 12:45:37 2023 +0200

iris: migrate WA 14016118574 to use the WA framework

Fixes: 58829d9f1 ("iris: implement Wa_14016118574")
Signed-off-by: Rohan Garg <[email protected]>
Reviewed-by: José Roberto de Souza <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24156>
(cherry picked from commit 8b93fa149bfbe1ca1a59d89ec53d576aa4ede2ec)

---

 .pick_status.json                     | 2 +-
 src/gallium/drivers/iris/iris_state.c | 8 +++++---
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 946285d850d..4292b8f0469 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -24,7 +24,7 @@
         "description": "iris: migrate WA 14016118574 to use the WA framework",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "58829d9f112809cabaec471a2961ac42bb529ae6",
         "notes": null
diff --git a/src/gallium/drivers/iris/iris_state.c 
b/src/gallium/drivers/iris/iris_state.c
index 2abd5ec87b0..a2afd8cc74b 100644
--- a/src/gallium/drivers/iris/iris_state.c
+++ b/src/gallium/drivers/iris/iris_state.c
@@ -7511,6 +7511,7 @@ iris_upload_render_state(struct iris_context *ice,
                          const struct pipe_draw_indirect_info *indirect,
                          const struct pipe_draw_start_count_bias *sc)
 {
+   UNUSED const struct intel_device_info *devinfo = batch->screen->devinfo;
    bool use_predicate = ice->state.predicate == IRIS_PREDICATE_STATE_USE_BIT;
 
    trace_intel_begin_draw(&batch->trace);
@@ -7735,9 +7736,10 @@ iris_upload_render_state(struct iris_context *ice,
    }
 
 #if GFX_VERx10 == 125
-   if (point_or_line_list(ice->state.prim_mode) ||
-       indirect || (sc->count == 1 || sc->count == 2)) {
-         iris_emit_pipe_control_write(batch, "Wa_14016118574",
+   if (intel_needs_workaround(devinfo, 22014412737) &&
+       (point_or_line_list(ice->state.prim_mode) || indirect ||
+        (sc->count == 1 || sc->count == 2))) {
+         iris_emit_pipe_control_write(batch, "Wa_22014412737",
                                       PIPE_CONTROL_WRITE_IMMEDIATE,
                                       batch->screen->workaround_bo,
                                       batch->screen->workaround_address.offset,

Reply via email to