anv: Always create anv_async_submit in init_copy_video_queue_state()
A next patch will emit more instructions in video and copy queues
for Gfx 200 and newer but the current code only creates anv_async_submit
if device has aux_map.
Instead we can always create anv_async_submit and only submit it to
hardware if any instruction was emited.
Fixes: 86813c60a4
("mi-builder: add read/write memory fencing support on Gfx20+")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32680>
This commit is contained in:

committed by
Marge Bot

parent
edb33b47ab
commit
b8f93bfd38
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user