From 5ae2b4882a030b2f19a32338705b03b0e348e5ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tapani=20P=C3=A4lli?= Date: Tue, 23 Jan 2024 14:31:32 +0200 Subject: [PATCH] blorp: implement Wa_16014912113 callback for drivers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tapani Pälli Reviewed-by: Lionel Landwerlin Part-of: --- src/gallium/drivers/crocus/crocus_blorp.c | 7 +++++++ src/gallium/drivers/iris/iris_blorp.c | 7 +++++++ src/intel/blorp/blorp_genX_exec.h | 7 +++++++ src/intel/vulkan/genX_blorp_exec.c | 12 ++++++++++++ src/intel/vulkan_hasvk/genX_blorp_exec.c | 7 +++++++ 5 files changed, 40 insertions(+) diff --git a/src/gallium/drivers/crocus/crocus_blorp.c b/src/gallium/drivers/crocus/crocus_blorp.c index 53525366b8f..c4a4ef03726 100644 --- a/src/gallium/drivers/crocus/crocus_blorp.c +++ b/src/gallium/drivers/crocus/crocus_blorp.c @@ -263,6 +263,13 @@ blorp_get_l3_config(struct blorp_batch *blorp_batch) } #endif +static void +blorp_pre_emit_urb_config(struct blorp_batch *blorp_batch, + struct intel_urb_config *urb_cfg) +{ + /* Dummy. */ +} + static void blorp_emit_urb_config(struct blorp_batch *blorp_batch, struct intel_urb_config *urb_cfg) diff --git a/src/gallium/drivers/iris/iris_blorp.c b/src/gallium/drivers/iris/iris_blorp.c index ac6c90c5f4b..2869d624ebd 100644 --- a/src/gallium/drivers/iris/iris_blorp.c +++ b/src/gallium/drivers/iris/iris_blorp.c @@ -274,6 +274,13 @@ blorp_flush_range(UNUSED struct blorp_batch *blorp_batch, */ } +static void +blorp_pre_emit_urb_config(struct blorp_batch *blorp_batch, + struct intel_urb_config *urb_cfg) +{ + genX(urb_workaround)(blorp_batch->driver_batch, urb_cfg); +} + static const struct intel_l3_config * blorp_get_l3_config(struct blorp_batch *blorp_batch) { diff --git a/src/intel/blorp/blorp_genX_exec.h b/src/intel/blorp/blorp_genX_exec.h index a3683af31a5..5a1b13ae29f 100644 --- a/src/intel/blorp/blorp_genX_exec.h +++ b/src/intel/blorp/blorp_genX_exec.h @@ -115,6 +115,10 @@ static const struct intel_l3_config * blorp_get_l3_config(struct blorp_batch *batch); #endif +static void +blorp_pre_emit_urb_config(struct blorp_batch *batch, + struct intel_urb_config *urb_config); + static void blorp_emit_urb_config(struct blorp_batch *batch, struct intel_urb_config *urb_config); @@ -252,6 +256,9 @@ emit_urb_config(struct blorp_batch *batch, false, false, &urb_cfg, deref_block_size, &constrained); + /* Tell drivers about the config. */ + blorp_pre_emit_urb_config(batch, &urb_cfg); + #if GFX_VERx10 == 70 /* From the IVB PRM Vol. 2, Part 1, Section 3.2.1: * diff --git a/src/intel/vulkan/genX_blorp_exec.c b/src/intel/vulkan/genX_blorp_exec.c index a4ec021224d..11a0e3c7d92 100644 --- a/src/intel/vulkan/genX_blorp_exec.c +++ b/src/intel/vulkan/genX_blorp_exec.c @@ -255,6 +255,18 @@ blorp_flush_range(struct blorp_batch *batch, void *start, size_t size) */ } +static void +blorp_pre_emit_urb_config(struct blorp_batch *blorp_batch, + struct intel_urb_config *urb_cfg) +{ + struct anv_cmd_buffer *cmd_buffer = blorp_batch->driver_batch; + genX(urb_workaround)(cmd_buffer, urb_cfg); + + /* Update urb config. */ + memcpy(&cmd_buffer->state.gfx.urb_cfg, urb_cfg, + sizeof(struct intel_urb_config)); +} + static const struct intel_l3_config * blorp_get_l3_config(struct blorp_batch *batch) { diff --git a/src/intel/vulkan_hasvk/genX_blorp_exec.c b/src/intel/vulkan_hasvk/genX_blorp_exec.c index 34734d05c67..0d10e521244 100644 --- a/src/intel/vulkan_hasvk/genX_blorp_exec.c +++ b/src/intel/vulkan_hasvk/genX_blorp_exec.c @@ -250,6 +250,13 @@ blorp_flush_range(struct blorp_batch *batch, void *start, size_t size) */ } +static void +blorp_pre_emit_urb_config(struct blorp_batch *blorp_batch, + struct intel_urb_config *urb_cfg) +{ + /* Dummy. */ +} + static const struct intel_l3_config * blorp_get_l3_config(struct blorp_batch *batch) {