radeosi: assert addresses are not NULL in a couple of places

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35175>
This commit is contained in:
Karol Herbst 2025-02-18 16:45:18 +01:00 committed by Marge Bot
parent d2d98abf1d
commit a1b8c6c404
3 changed files with 3 additions and 0 deletions

View file

@ -46,6 +46,7 @@ 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 (sctx->gfx_level >= GFX9)
command |= S_415_BYTE_COUNT_GFX9(size);

View file

@ -1317,6 +1317,7 @@ static void si_set_shader_buffer(struct si_context *sctx, struct si_buffer_resou
assert(sbuffer->buffer_offset + sbuffer->buffer_size <= align(buf->bo_size, 4));
uint64_t va = buf->gpu_address + sbuffer->buffer_offset;
assert(va);
desc[0] = va;
desc[1] = S_008F04_BASE_ADDRESS_HI(va >> 32) | S_008F04_STRIDE(0);
desc[2] = sbuffer->buffer_size;

View file

@ -542,6 +542,7 @@ static void si_cp_dma_prefetch_inline(struct si_context *sctx, uint64_t address,
assert(size % SI_CPDMA_ALIGNMENT == 0);
assert(address % SI_CPDMA_ALIGNMENT == 0);
assert(size < S_415_BYTE_COUNT_GFX6(~0u));
assert(address || size == 0);
uint32_t header = S_411_SRC_SEL(V_411_SRC_ADDR_TC_L2);
uint32_t command = S_415_BYTE_COUNT_GFX6(size);