mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 12:50:10 +01:00
panvk/csf: Make all sync operations on the CSG scope
The SYSTEM scope triggers CPU interrupts we don't really need, so let's use the CSG scope to avoid those. Note that the scope doesn't encode the visibility aspect, meaning changes to the sync object with a CSG scope will still be instantly visible to the CPU, it's just that the CPU needs to poll the value to detect a change, which is basically what we're doing for syncobjs attached to events/queries, so we're good. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com> Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32973>
This commit is contained in:
parent
6a7bcff1be
commit
cc517822e5
3 changed files with 5 additions and 5 deletions
|
|
@ -148,7 +148,7 @@ finish_cs(struct panvk_cmd_buffer *cmdbuf, uint32_t subqueue)
|
|||
offsetof(struct panvk_cs_sync32, error));
|
||||
cs_wait_slots(b, SB_ALL_MASK, false);
|
||||
if (cmdbuf->vk.level == VK_COMMAND_BUFFER_LEVEL_PRIMARY)
|
||||
cs_sync32_add(b, true, MALI_CS_SYNC_SCOPE_SYSTEM, one,
|
||||
cs_sync32_add(b, true, MALI_CS_SYNC_SCOPE_CSG, one,
|
||||
debug_sync_addr, cs_now());
|
||||
cs_match(b, error, cmp_scratch) {
|
||||
cs_case(b, 0) {
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ panvk_per_arch(CmdResetEvent2)(VkCommandBuffer commandBuffer, VkEvent _event,
|
|||
|
||||
cs_default(b) {
|
||||
cs_move32_to(b, seqno, 0);
|
||||
cs_sync32_set(b, false, MALI_CS_SYNC_SCOPE_SYSTEM, seqno, sync_addr,
|
||||
cs_sync32_set(b, false, MALI_CS_SYNC_SCOPE_CSG, seqno, sync_addr,
|
||||
cs_defer(sb_mask | SB_MASK(DEFERRED_FLUSH),
|
||||
SB_ID(DEFERRED_SYNC)));
|
||||
}
|
||||
|
|
@ -100,7 +100,7 @@ panvk_per_arch(CmdSetEvent2)(VkCommandBuffer commandBuffer, VkEvent _event,
|
|||
}
|
||||
|
||||
cs_move32_to(b, seqno, 1);
|
||||
cs_sync32_set(b, false, MALI_CS_SYNC_SCOPE_SYSTEM, seqno, sync_addr,
|
||||
cs_sync32_set(b, false, MALI_CS_SYNC_SCOPE_CSG, seqno, sync_addr,
|
||||
cs_defer(sb_mask | SB_MASK(DEFERRED_FLUSH),
|
||||
SB_ID(DEFERRED_SYNC)));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ panvk_cmd_reset_occlusion_queries(struct panvk_cmd_buffer *cmd,
|
|||
for (uint32_t query = first_query; query < first_query + query_count;
|
||||
query++) {
|
||||
cs_move64_to(b, addr, panvk_query_available_dev_addr(pool, query));
|
||||
cs_sync32_set(b, true, MALI_CS_SYNC_SCOPE_SYSTEM, zero32, addr,
|
||||
cs_sync32_set(b, true, MALI_CS_SYNC_SCOPE_CSG, zero32, addr,
|
||||
cs_defer(SB_IMM_MASK, SB_ID(DEFERRED_SYNC)));
|
||||
}
|
||||
}
|
||||
|
|
@ -126,7 +126,7 @@ panvk_cmd_end_occlusion_query(struct panvk_cmd_buffer *cmd,
|
|||
|
||||
/* We wait on any previous flush, and defer on sync */
|
||||
cs_move64_to(b, sync_addr, panvk_query_available_dev_addr(pool, query));
|
||||
cs_sync32_set(b, true, MALI_CS_SYNC_SCOPE_SYSTEM, seqno, sync_addr,
|
||||
cs_sync32_set(b, true, MALI_CS_SYNC_SCOPE_CSG, seqno, sync_addr,
|
||||
cs_defer(SB_MASK(DEFERRED_FLUSH), SB_ID(DEFERRED_SYNC)));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue