radv: pad GFX preambles IBs with only one NOP

This is optimal.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30743>
This commit is contained in:
Samuel Pitoiset
2024-08-20 16:01:08 +02:00
committed by Marge Bot
parent d690f293c6
commit 6fa1bf3b88
2 changed files with 2 additions and 13 deletions

View File

@@ -44,12 +44,7 @@ radv_create_shadow_regs_preamble(struct radv_device *device, struct radv_queue_s
ac_create_shadowing_ib_preamble(gpu_info, (pm4_cmd_add_fn)&radeon_emit, cs, queue_state->shadowed_regs->va,
device->pbb_allowed);
while (cs->cdw & 7) {
if (gpu_info->gfx_ib_pad_with_type2)
radeon_emit(cs, PKT2_NOP_PAD);
else
radeon_emit(cs, PKT3_NOP_PAD);
}
ws->cs_pad(cs, 0);
result = radv_bo_create(
device, NULL, cs->cdw * 4, 4096, ws->cs_domain(ws),

View File

@@ -875,7 +875,6 @@ radv_device_init_cache_key(struct radv_device *device)
static void
radv_create_gfx_preamble(struct radv_device *device)
{
const struct radv_physical_device *pdev = radv_device_physical(device);
struct radeon_cmdbuf *cs = device->ws->cs_create(device->ws, AMD_IP_GFX, false);
if (!cs)
return;
@@ -884,12 +883,7 @@ radv_create_gfx_preamble(struct radv_device *device)
radv_emit_graphics(device, cs);
while (cs->cdw & 7) {
if (pdev->info.gfx_ib_pad_with_type2)
radeon_emit(cs, PKT2_NOP_PAD);
else
radeon_emit(cs, PKT3_NOP_PAD);
}
device->ws->cs_pad(cs, 0);
VkResult result = radv_bo_create(
device, NULL, cs->cdw * 4, 4096, device->ws->cs_domain(device->ws),