zink: zink_batch_state::has_barriers -> has_reordered_work
and add a note Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29108>
This commit is contained in:
committed by
Marge Bot
parent
ac07fefdda
commit
e4c516bece
@@ -188,7 +188,7 @@ zink_reset_batch_state(struct zink_context *ctx, struct zink_batch_state *bs)
|
||||
* before the state is reused
|
||||
*/
|
||||
bs->fence.submitted = false;
|
||||
bs->has_barriers = false;
|
||||
bs->has_reordered_work = false;
|
||||
bs->has_unsync = false;
|
||||
if (bs->fence.batch_id)
|
||||
zink_screen_update_last_finished(screen, bs->fence.batch_id);
|
||||
@@ -675,7 +675,7 @@ submit_queue(void *data, void *gdata, int thread_index)
|
||||
unsigned c = 0;
|
||||
if (bs->has_unsync)
|
||||
cmdbufs[c++] = bs->unsynchronized_cmdbuf;
|
||||
if (bs->has_barriers)
|
||||
if (bs->has_reordered_work)
|
||||
cmdbufs[c++] = bs->reordered_cmdbuf;
|
||||
cmdbufs[c++] = bs->cmdbuf;
|
||||
si[ZINK_SUBMIT_CMDBUF].pCommandBuffers = cmdbufs;
|
||||
@@ -712,7 +712,7 @@ submit_queue(void *data, void *gdata, int thread_index)
|
||||
goto end;
|
||||
}
|
||||
);
|
||||
if (bs->has_barriers) {
|
||||
if (bs->has_reordered_work) {
|
||||
if (bs->unordered_write_access) {
|
||||
VkMemoryBarrier mb;
|
||||
mb.sType = VK_STRUCTURE_TYPE_MEMORY_BARRIER;
|
||||
|
||||
@@ -436,7 +436,7 @@ zink_blit(struct pipe_context *pctx,
|
||||
ctx->in_rp = false;
|
||||
ctx->rp_changed = true;
|
||||
ctx->queries_disabled = true;
|
||||
ctx->bs->has_barriers = true;
|
||||
ctx->bs->has_reordered_work = true;
|
||||
ctx->pipeline_changed[0] = true;
|
||||
zink_reset_ds3_states(ctx);
|
||||
zink_select_draw_vbo(ctx);
|
||||
|
||||
@@ -717,7 +717,7 @@ fb_clears_apply_internal(struct zink_context *ctx, struct pipe_resource *pres, i
|
||||
ctx->bs->cmdbuf = ctx->bs->reordered_cmdbuf;
|
||||
ctx->rp_changed = true;
|
||||
ctx->queries_disabled = true;
|
||||
ctx->bs->has_barriers = true;
|
||||
ctx->bs->has_reordered_work = true;
|
||||
}
|
||||
/* this will automatically trigger all the clears */
|
||||
zink_batch_rp(ctx);
|
||||
|
||||
@@ -4517,7 +4517,7 @@ zink_copy_buffer(struct zink_context *ctx, struct zink_resource *dst, struct zin
|
||||
bool unordered_dst = zink_resource_buffer_transfer_dst_barrier(ctx, dst, dst_offset, size);
|
||||
bool can_unorder = unordered_dst && unordered_src && !ctx->no_reorder;
|
||||
VkCommandBuffer cmdbuf = can_unorder ? ctx->bs->reordered_cmdbuf : zink_get_cmdbuf(ctx, src, dst);
|
||||
ctx->bs->has_barriers |= can_unorder;
|
||||
ctx->bs->has_reordered_work |= can_unorder;
|
||||
zink_batch_reference_resource_rw(ctx, src, false);
|
||||
zink_batch_reference_resource_rw(ctx, dst, true);
|
||||
if (unlikely(zink_debug & ZINK_DEBUG_SYNC)) {
|
||||
|
||||
@@ -152,7 +152,7 @@ reset_vk_query_pool(struct zink_context *ctx, struct zink_vk_query *vkq)
|
||||
{
|
||||
if (vkq->needs_reset) {
|
||||
VKCTX(CmdResetQueryPool)(ctx->bs->reordered_cmdbuf, vkq->pool->query_pool, vkq->query_id, 1);
|
||||
ctx->bs->has_barriers = true;
|
||||
ctx->bs->has_reordered_work = true;
|
||||
}
|
||||
vkq->needs_reset = false;
|
||||
}
|
||||
|
||||
@@ -289,7 +289,7 @@ zink_get_cmdbuf(struct zink_context *ctx, struct zink_resource *src, struct zink
|
||||
zink_batch_no_rp(ctx);
|
||||
|
||||
if (unordered_exec) {
|
||||
ctx->bs->has_barriers = true;
|
||||
ctx->bs->has_reordered_work = true;
|
||||
ctx->bs->has_work = true;
|
||||
return ctx->bs->reordered_cmdbuf;
|
||||
}
|
||||
|
||||
@@ -664,9 +664,10 @@ struct zink_batch_state {
|
||||
VkDeviceSize resource_size;
|
||||
|
||||
bool is_device_lost;
|
||||
bool has_barriers;
|
||||
bool has_unsync;
|
||||
/* these flags correspond to the matching cmdbufs */
|
||||
bool has_work;
|
||||
bool has_reordered_work;
|
||||
bool has_unsync;
|
||||
};
|
||||
|
||||
static inline struct zink_batch_state *
|
||||
|
||||
Reference in New Issue
Block a user