radv: Use VRAM for upload buffers if entire VRAM is CPU-visible.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Mon, 7 Dec 2020 23:25:56 +0000 (00:25 +0100)
committerMarge Bot <eric+marge@anholt.net>
Mon, 4 Jan 2021 13:10:15 +0000 (13:10 +0000)
commitf06e91d85ab602a0a906f8afc405c0d027b547f0
tree7115d94684f4a47fc8b359d1a6fcd0da91c83643
parent24dcdc3fa9485463de2d3f9053bc02619656a3e8
radv: Use VRAM for upload buffers if entire VRAM is CPU-visible.

Not doing this for APUs because spilling is quite likely, due to
overall VRAM pressure.

Also adding a flag to disable for performance debugging.

Finally adds some memset for places where we depended on the memory
being initialized to zero, which we won't get with VRAM anymore.
(I think these places should stop depending on it since it hides
 issues with executing the cmdbuffer multiple times, but this
  preserves behavior)

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7979>
docs/envvars.rst
src/amd/vulkan/radv_cmd_buffer.c
src/amd/vulkan/radv_debug.h
src/amd/vulkan/radv_device.c
src/amd/vulkan/radv_radeon_winsys.h