panvk: fix a missing cache invalidation

For the host-to-device domain operation, it is possible that
wait_sb_mask is empty but there is a cache invalidaton,

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32074>
This commit is contained in:
Chia-I Wu 2024-11-08 13:00:19 -08:00 committed by Marge Bot
parent a23c0eb61a
commit 619463837f

View file

@ -497,13 +497,12 @@ panvk_per_arch(CmdPipelineBarrier2)(VkCommandBuffer commandBuffer,
}
for (uint32_t i = 0; i < PANVK_SUBQUEUE_COUNT; i++) {
if (!deps.src[i].wait_sb_mask)
continue;
struct cs_builder *b = panvk_get_cs_builder(cmdbuf, i);
struct panvk_cs_state *cs_state = &cmdbuf->state.cs[i];
cs_wait_slots(b, deps.src[i].wait_sb_mask, false);
if (deps.src[i].wait_sb_mask)
cs_wait_slots(b, deps.src[i].wait_sb_mask, false);
struct panvk_cache_flush_info cache_flush = deps.src[i].cache_flush;
if (cache_flush.l2 != MALI_CS_FLUSH_MODE_NONE ||
@ -521,6 +520,8 @@ panvk_per_arch(CmdPipelineBarrier2)(VkCommandBuffer commandBuffer,
struct cs_index sync_addr = cs_scratch_reg64(b, 0);
struct cs_index add_val = cs_scratch_reg64(b, 2);
assert(deps.src[i].wait_sb_mask);
cs_load64_to(b, sync_addr, cs_subqueue_ctx_reg(b),
offsetof(struct panvk_cs_subqueue_context, syncobjs));
cs_wait_slot(b, SB_ID(LS), false);