radeonsi: don't use staging uploads for buffers & shaders with all VRAM visible

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26917>
This commit is contained in:
Marek Olšák
2023-12-10 17:13:59 -05:00
committed by Marge Bot
parent b7af7efee4
commit da20c6c73f
2 changed files with 2 additions and 2 deletions

View File

@@ -135,7 +135,7 @@ void si_init_resource_fields(struct si_screen *sscreen, struct si_resource *res,
* because they might never be moved back again. If a buffer is large enough,
* upload data by copying from a temporary GTT buffer.
*/
if (sscreen->info.has_dedicated_vram &&
if (sscreen->info.has_dedicated_vram && !sscreen->info.all_vram_visible &&
!res->b.cpu_storage && /* TODO: The CPU storage breaks this. */
size >= sscreen->options.max_vram_map_size)
res->b.b.flags |= PIPE_RESOURCE_FLAG_DONT_MAP_DIRECTLY;

View File

@@ -1105,7 +1105,7 @@ bool si_shader_binary_upload(struct si_screen *sscreen, struct si_shader *shader
uint64_t scratch_va)
{
bool dma_upload = !(sscreen->debug_flags & DBG(NO_DMA_SHADERS)) &&
sscreen->info.has_dedicated_vram;
sscreen->info.has_dedicated_vram && !sscreen->info.all_vram_visible;
if (shader->binary.type == SI_SHADER_BINARY_ELF) {
return upload_binary_elf(sscreen, shader, scratch_va, dma_upload);