zink: move zink_batch_state::submit_count to zink_batch_usage
no functional changes Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23035>
This commit is contained in:
committed by
Marge Bot
parent
84bcdc521d
commit
143da5f2e4
@@ -167,7 +167,7 @@ zink_reset_batch_state(struct zink_context *ctx, struct zink_batch_state *bs)
|
||||
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;
|
||||
@@ -608,7 +608,7 @@ submit_queue(void *data, void *gdata, int thread_index)
|
||||
bs->is_device_lost = true;
|
||||
}
|
||||
simple_mtx_unlock(&screen->queue_lock);
|
||||
bs->submit_count++;
|
||||
bs->usage.submit_count++;
|
||||
end:
|
||||
cnd_broadcast(&bs->usage.flush);
|
||||
|
||||
|
||||
@@ -3626,7 +3626,7 @@ zink_flush(struct pipe_context *pctx,
|
||||
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
|
||||
|
||||
@@ -178,7 +178,7 @@ zink_fence_finish(struct zink_screen *screen, struct pipe_context *pctx, struct
|
||||
|
||||
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
|
||||
*/
|
||||
|
||||
@@ -542,6 +542,8 @@ struct zink_batch_descriptor_data {
|
||||
*/
|
||||
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;
|
||||
@@ -605,9 +607,6 @@ struct zink_batch_state {
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user