}
bs->swapchain = NULL;
+ util_dynarray_foreach(&bs->fences, struct zink_tc_fence*, mfence)
+ zink_fence_reference(screen, mfence, NULL);
+ util_dynarray_clear(&bs->fences);
+
bs->unordered_write_access = 0;
bs->unordered_write_stages = 0;
util_dynarray_init(&bs->signal_semaphores, NULL);
util_dynarray_init(&bs->wait_semaphores, NULL);
util_dynarray_init(&bs->fd_wait_semaphores, NULL);
+ util_dynarray_init(&bs->fences, NULL);
util_dynarray_init(&bs->dead_querypools, NULL);
util_dynarray_init(&bs->dgc.pipelines, NULL);
util_dynarray_init(&bs->dgc.layouts, NULL);
mfence->submit_count = submit_count;
util_dynarray_append(&fence->mfences, struct zink_tc_fence *, mfence);
}
+ if (export_sem) {
+ pipe_reference(NULL, &mfence->reference);
+ util_dynarray_append(&ctx->batch.state->fences, struct zink_tc_fence*, mfence);
+ }
if (deferred_fence) {
assert(fence);
VkPipelineStageFlags flag = VK_PIPELINE_STAGE_ALL_COMMANDS_BIT;
util_dynarray_append(&ctx->batch.state->wait_semaphores, VkSemaphore, mfence->sem);
util_dynarray_append(&ctx->batch.state->wait_semaphore_stages, VkPipelineStageFlags, flag);
+ pipe_reference(NULL, &mfence->reference);
+ util_dynarray_append(&ctx->batch.state->fences, struct zink_tc_fence*, mfence);
/* transfer the external wait sempahore ownership to the next submit */
mfence->sem = VK_NULL_HANDLE;
struct util_dynarray wait_semaphore_stages; //external wait semaphores
struct util_dynarray fd_wait_semaphores; //dmabuf wait semaphores
struct util_dynarray fd_wait_semaphore_stages; //dmabuf wait semaphores
+ struct util_dynarray fences; //zink_tc_fence refs
VkSemaphore present;
struct zink_resource *swapchain;