diff --git a/src/intel/vulkan/genX_init_state.c b/src/intel/vulkan/genX_init_state.c index ab093f202e2..2c1764ee9c0 100644 --- a/src/intel/vulkan/genX_init_state.c +++ b/src/intel/vulkan/genX_init_state.c @@ -802,20 +802,20 @@ init_compute_queue_state(struct anv_queue *queue) static VkResult init_copy_video_queue_state(struct anv_queue *queue) { -#if GFX_VER >= 12 struct anv_device *device = queue->device; - const struct intel_device_info *devinfo = device->info; + UNUSED const struct intel_device_info *devinfo = device->info; + struct anv_async_submit *submit; + VkResult result = anv_async_submit_create(queue, + &device->batch_bo_pool, + false, true, &submit); + if (result != VK_SUCCESS) + return result; + + struct anv_batch *batch = &submit->batch; + +#if GFX_VER >= 12 if (devinfo->has_aux_map) { - struct anv_async_submit *submit; - VkResult result = anv_async_submit_create(queue, - &device->batch_bo_pool, - false, true, &submit); - if (result != VK_SUCCESS) - return result; - - struct anv_batch *batch = &submit->batch; - uint64_t reg = GENX(VD0_AUX_TABLE_BASE_ADDR_num); if (queue->family->engine_class == INTEL_ENGINE_CLASS_COPY) { @@ -835,7 +835,12 @@ init_copy_video_queue_state(struct anv_queue *queue) lri.RegisterOffset = reg + 4; lri.DataDWord = aux_base_addr >> 32; } + } +#else + assert(!queue->device->info->has_aux_map); +#endif + if (batch->start != batch->next) { anv_batch_emit(batch, GENX(MI_BATCH_BUFFER_END), bbe); result = batch->status; @@ -851,10 +856,9 @@ init_copy_video_queue_state(struct anv_queue *queue) } queue->init_submit = submit; + } else { + anv_async_submit_destroy(submit); } -#else - assert(!queue->device->info->has_aux_map); -#endif return VK_SUCCESS; }