mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 15:48:36 +02:00
radv: Fix barriers with cp dma
We need to wait for cp dma if VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT or VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT are set. Closes: #5911 Fixes:4b9bc4791b("radv: only sync CP DMA for transfer operations or bottom pipe") Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> (cherry picked from commitbbdf22ce13) Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16126>
This commit is contained in:
parent
86d6875fe1
commit
34b21fd25a
1 changed files with 4 additions and 10 deletions
|
|
@ -8359,16 +8359,10 @@ radv_barrier(struct radv_cmd_buffer *cmd_buffer, const VkDependencyInfoKHR *dep_
|
|||
/* Make sure CP DMA is idle because the driver might have performed a
|
||||
* DMA operation for copying or filling buffers/images.
|
||||
*/
|
||||
if (src_stage_mask & (VK_PIPELINE_STAGE_2_COPY_BIT_KHR |
|
||||
VK_PIPELINE_STAGE_2_RESOLVE_BIT_KHR |
|
||||
VK_PIPELINE_STAGE_2_BLIT_BIT_KHR |
|
||||
VK_PIPELINE_STAGE_2_CLEAR_BIT_KHR)) {
|
||||
/* Be conservative for now. */
|
||||
src_stage_mask |= VK_PIPELINE_STAGE_2_TRANSFER_BIT_KHR;
|
||||
}
|
||||
|
||||
if (src_stage_mask & (VK_PIPELINE_STAGE_2_TRANSFER_BIT_KHR |
|
||||
VK_PIPELINE_STAGE_2_BOTTOM_OF_PIPE_BIT_KHR))
|
||||
if (src_stage_mask &
|
||||
(VK_PIPELINE_STAGE_2_COPY_BIT | VK_PIPELINE_STAGE_2_CLEAR_BIT |
|
||||
VK_PIPELINE_STAGE_2_TRANSFER_BIT | VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT |
|
||||
VK_PIPELINE_STAGE_2_BOTTOM_OF_PIPE_BIT | VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT))
|
||||
si_cp_dma_wait_for_idle(cmd_buffer);
|
||||
|
||||
cmd_buffer->state.flush_bits |= dst_flush_bits;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue