radeonsi: Don't assert src_va != 0 with CP_DMA_CLEAR
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

CP_DMA_CLEAR just clears the destination, which doesn't require a valid
source address.

Fixes spurious assertion failures running xserver build tests (with
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34958 also
applied).

Fixes: a1b8c6c404 ("radeosi: assert addresses are not NULL in a couple of places")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35718>
This commit is contained in:
Michel Dänzer 2025-06-23 19:07:53 +02:00 committed by Marge Bot
parent ef91ad64d5
commit ac8dc19512

View file

@ -46,7 +46,13 @@ static void si_emit_cp_dma(struct si_context *sctx, struct radeon_cmdbuf *cs, ui
assert(sctx->screen->info.has_cp_dma);
assert(size <= cp_dma_max_byte_count(sctx));
assert(size == 0 || (src_va && dst_va));
if (size) {
assert(dst_va);
if (!(flags & CP_DMA_CLEAR))
assert(src_va);
}
if (sctx->gfx_level >= GFX9)
command |= S_415_BYTE_COUNT_GFX9(size);