blorp/crocus: refactor blorp_emit_urb_config

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 <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26920>
This commit is contained in:
Tapani Pälli
2024-01-23 13:52:49 +02:00
committed by Marge Bot
parent 829e4fe877
commit bdc7d32e93
2 changed files with 17 additions and 10 deletions
+10 -6
View File
@@ -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,
+7 -4
View File
@@ -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
}