radeonsi: don't use cp_dma prefetch on GFX6

It's not supported.

Fixes: 47587758f2 ("radeonsi: prefetch VB descriptors right after uploading")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4211
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8914>
This commit is contained in:
Pierre-Eric Pelloux-Prayer 2021-02-08 12:10:50 +01:00 committed by Marge Bot
parent 568a668259
commit ac2bcb9e3c

View file

@ -1341,8 +1341,10 @@ static bool si_upload_and_prefetch_VB_descriptors(struct si_context *sctx)
sctx->vb_descriptors_gpu_list = ptr;
radeon_add_to_buffer_list(sctx, &sctx->gfx_cs, sctx->vb_descriptors_buffer,
RADEON_USAGE_READ, RADEON_PRIO_DESCRIPTORS);
si_cp_dma_prefetch(sctx, &sctx->vb_descriptors_buffer->b.b, sctx->vb_descriptors_offset,
alloc_size);
/* GFX6 doesn't support the L2 prefetch. */
if (GFX_VERSION >= GFX7)
si_cp_dma_prefetch(sctx, &sctx->vb_descriptors_buffer->b.b, sctx->vb_descriptors_offset,
alloc_size);
} else {
si_resource_reference(&sctx->vb_descriptors_buffer, NULL);
}