bs->has_barriers = false;
if (bs->fence.batch_id)
zink_screen_update_last_finished(screen, bs->fence.batch_id);
- bs->submit_count++;
+ bs->usage.submit_count++;
bs->fence.batch_id = 0;
bs->usage.usage = 0;
bs->next = NULL;
bs->is_device_lost = true;
}
simple_mtx_unlock(&screen->queue_lock);
- bs->submit_count++;
+ bs->usage.submit_count++;
end:
cnd_broadcast(&bs->usage.flush);
tc_driver_internal_flush_notify(ctx->tc);
} else {
fence = &batch->state->fence;
- submit_count = batch->state->submit_count;
+ submit_count = batch->state->usage.submit_count;
if (deferred && !(flags & PIPE_FLUSH_FENCE_FD) && pfence)
deferred_fence = true;
else
struct zink_fence *fence = mfence->fence;
- unsigned submit_diff = zink_batch_state(mfence->fence)->submit_count - mfence->submit_count;
+ unsigned submit_diff = zink_batch_state(mfence->fence)->usage.submit_count - mfence->submit_count;
/* this batch is known to have finished because it has been submitted more than 1 time
* since the tc fence last saw it
*/
*/
struct zink_batch_usage {
uint32_t usage;
+ /* this is a monotonic int used to disambiguate internal fences from their tc fence references */
+ uint32_t submit_count;
cnd_t flush;
mtx_t mtx;
bool unflushed;
VkDeviceSize resource_size;
- /* this is a monotonic int used to disambiguate internal fences from their tc fence references */
- unsigned submit_count;
-
bool is_device_lost;
bool has_barriers;
};