ajm: mark empty batches as finished immediately

This commit is contained in:
Vladislav Mikhalin 2025-02-09 15:46:30 +03:00
parent 9dc3e39fc2
commit eceb556d6c

View File

@ -141,7 +141,12 @@ int AjmContext::BatchStartBuffer(u8* p_batch, u32 batch_size, const int priority
*out_batch_id = batch_id.value();
batch_info->id = *out_batch_id;
batch_queue.EmplaceWait(batch_info);
if (!batch_info->jobs.empty()) {
batch_queue.EmplaceWait(batch_info);
} else {
// Empty batches are not submitted to the processor and are marked as finished
batch_info->finished.release();
}
return ORBIS_OK;
}