From bdc7d32e939bae88bede58a879b1e5ab05b22d90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tapani=20P=C3=A4lli?= Date: Tue, 23 Jan 2024 13:52:49 +0200 Subject: [PATCH] blorp/crocus: refactor blorp_emit_urb_config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch changes blorp_emit_urb_config to use intel_urb_config so that we can use it later to communicate blorp urb configuration for drivers. Signed-off-by: Tapani Pälli Reviewed-by: Lionel Landwerlin Part-of: --- src/gallium/drivers/crocus/crocus_blorp.c | 16 ++++++++++------ src/intel/blorp/blorp_genX_exec.h | 11 +++++++---- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/src/gallium/drivers/crocus/crocus_blorp.c b/src/gallium/drivers/crocus/crocus_blorp.c index 3d20eb6eb2f..53525366b8f 100644 --- a/src/gallium/drivers/crocus/crocus_blorp.c +++ b/src/gallium/drivers/crocus/crocus_blorp.c @@ -261,20 +261,24 @@ blorp_get_l3_config(struct blorp_batch *blorp_batch) struct crocus_batch *batch = blorp_batch->driver_batch; return batch->screen->l3_config_3d; } -#else /* GFX_VER < 7 */ +#endif + static void blorp_emit_urb_config(struct blorp_batch *blorp_batch, - unsigned vs_entry_size, - UNUSED unsigned sf_entry_size) + struct intel_urb_config *urb_cfg) { +#if GFX_VER < 7 struct crocus_batch *batch = blorp_batch->driver_batch; #if GFX_VER <= 5 - batch->screen->vtbl.calculate_urb_fence(batch, 0, vs_entry_size, sf_entry_size); + batch->screen->vtbl.calculate_urb_fence(batch, 0, + urb_cfg->size[MESA_SHADER_VERTEX], + urb_cfg->size[MESA_SHADER_FRAGMENT]); #else - genX(crocus_upload_urb)(batch, vs_entry_size, false, vs_entry_size); + genX(crocus_upload_urb)(batch, urb_cfg->size[MESA_SHADER_VERTEX], false, + urb_cfg->size[MESA_SHADER_VERTEX]); +#endif #endif } -#endif static void crocus_blorp_exec(struct blorp_batch *blorp_batch, diff --git a/src/intel/blorp/blorp_genX_exec.h b/src/intel/blorp/blorp_genX_exec.h index 935450410c5..a3683af31a5 100644 --- a/src/intel/blorp/blorp_genX_exec.h +++ b/src/intel/blorp/blorp_genX_exec.h @@ -113,11 +113,11 @@ blorp_get_surface_base_address(struct blorp_batch *batch); #if GFX_VER >= 7 static const struct intel_l3_config * blorp_get_l3_config(struct blorp_batch *batch); -# else +#endif + static void blorp_emit_urb_config(struct blorp_batch *batch, - unsigned vs_entry_size, unsigned sf_entry_size); -#endif + struct intel_urb_config *urb_config); static void blorp_emit_pipeline(struct blorp_batch *batch, @@ -285,7 +285,10 @@ emit_urb_config(struct blorp_batch *batch, } #else /* GFX_VER < 7 */ - blorp_emit_urb_config(batch, vs_entry_size, sf_entry_size); + struct intel_urb_config urb_cfg = { + .size = { vs_entry_size, 0, 0, 0, sf_entry_size, }, + }; + blorp_emit_urb_config(batch, &urb_cfg); #endif }