diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c index 9c60c01d86a..1a85bf305e9 100644 --- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c +++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c @@ -445,9 +445,17 @@ radv_amdgpu_winsys_bo_create(struct radeon_winsys *_ws, * GTT(RAM) usage, which is shared with the OS, allow VRAM * placements too. The idea is not to use VRAM usefully, but * to use it so that it's not unused and wasted. + * + * Furthermore, even on discrete GPUs this is beneficial. If + * both GTT and VRAM are set then AMDGPU still prefers VRAM + * for the initial placement, but it makes the buffers + * spillable. Otherwise AMDGPU tries to place the buffers in + * VRAM really hard to the extent that we are getting a lot + * of unnecessary movement. This helps significantly when + * e.g. Horizon Zero Dawn allocates more memory than we have + * VRAM. */ - if (!ws->info.has_dedicated_vram) - request.preferred_heap |= AMDGPU_GEM_DOMAIN_GTT; + request.preferred_heap |= AMDGPU_GEM_DOMAIN_GTT; } if (initial_domain & RADEON_DOMAIN_GTT)