diff --git a/src/amd/vulkan/radv_cp_reg_shadowing.c b/src/amd/vulkan/radv_cp_reg_shadowing.c index 9a9c3f543b7..678a56d29a5 100644 --- a/src/amd/vulkan/radv_cp_reg_shadowing.c +++ b/src/amd/vulkan/radv_cp_reg_shadowing.c @@ -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), diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 179f39571aa..48056783dc6 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -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),