Mesa (main): anv, iris: Add Wa_22011440098 for DG2

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Dec 16 00:14:37 UTC 2021


Module: Mesa
Branch: main
Commit: 40b66a44998407c0a91bf6a1d762d204a56b81a0
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=40b66a44998407c0a91bf6a1d762d204a56b81a0

Author: Anuj Phogat <anuj.phogat at gmail.com>
Date:   Wed May 12 10:42:41 2021 -0700

anv, iris: Add Wa_22011440098 for DG2

Rework:
 * Jordan: Set MOCS after
   7b78b2fcac6 ("intel/genxml: Assert that all MOCS fields are non-zero on Gfx7+")

Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14212>

---

 src/gallium/drivers/iris/iris_state.c | 14 ++++++++++++++
 src/intel/vulkan/genX_cmd_buffer.c    | 14 ++++++++++++++
 2 files changed, 28 insertions(+)

diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c
index ace28b38ef3..1c9266aa868 100644
--- a/src/gallium/drivers/iris/iris_state.c
+++ b/src/gallium/drivers/iris/iris_state.c
@@ -939,6 +939,20 @@ iris_alloc_push_constants(struct iris_batch *batch)
          alloc.ConstantBufferSize = i == MESA_SHADER_FRAGMENT ? frag_size : stage_size;
       }
    }
+
+#if GFX_VERx10 == 125
+   /* Wa_22011440098
+    *
+    * In 3D mode, after programming push constant alloc command immediately
+    * program push constant command(ZERO length) without any commit between
+    * them.
+    */
+   if (intel_device_info_is_dg2(devinfo)) {
+      iris_emit_cmd(batch, GENX(3DSTATE_CONSTANT_ALL), c) {
+         c.MOCS = iris_mocs(NULL, &batch->screen->isl_dev, 0);
+      }
+   }
+#endif
 }
 
 #if GFX_VER >= 12
diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c
index 186485ba78a..22f89403841 100644
--- a/src/intel/vulkan/genX_cmd_buffer.c
+++ b/src/intel/vulkan/genX_cmd_buffer.c
@@ -2518,6 +2518,20 @@ cmd_buffer_alloc_push_constants(struct anv_cmd_buffer *cmd_buffer)
       alloc.ConstantBufferSize = push_constant_kb - kb_used;
    }
 
+#if GFX_VERx10 == 125
+   /* Wa_22011440098
+    *
+    * In 3D mode, after programming push constant alloc command immediately
+    * program push constant command(ZERO length) without any commit between
+    * them.
+    */
+   if (intel_device_info_is_dg2(&cmd_buffer->device->info)) {
+      anv_batch_emit(&cmd_buffer->batch, GENX(3DSTATE_CONSTANT_ALL), c) {
+         c.MOCS = anv_mocs(cmd_buffer->device, NULL, 0);
+      }
+   }
+#endif
+
    cmd_buffer->state.gfx.push_constant_stages = stages;
 
    /* From the BDW PRM for 3DSTATE_PUSH_CONSTANT_ALLOC_VS:



More information about the mesa-commit mailing list