Mesa (master): radv: Ignore WC flags for VRAM.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Feb 12 14:16:29 UTC 2021


Module: Mesa
Branch: master
Commit: 045a85085afeed0afae1969a6fc52610f060bab5
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=045a85085afeed0afae1969a6fc52610f060bab5

Author: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Date:   Thu Feb 11 20:32:00 2021 +0100

radv: Ignore WC flags for VRAM.

Otherwise there might be buffers for which we don't have a type.

Fixes: 7262c743dc8 ("radv: Determine memory type for import based on fd.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4280
Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8996>

---

 src/amd/vulkan/radv_device.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index 6a11f8a2141..61718448aa9 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -7765,6 +7765,11 @@ static uint32_t radv_compute_valid_memory_types(struct radv_physical_device *dev
 	enum radeon_bo_flag ignore_flags = ~(RADEON_FLAG_NO_CPU_ACCESS | RADEON_FLAG_GTT_WC);
 	uint32_t bits = radv_compute_valid_memory_types_attempt(dev, domains, flags, ignore_flags);
 
+	if (!bits) {
+		ignore_flags |= RADEON_FLAG_GTT_WC;
+		bits = radv_compute_valid_memory_types_attempt(dev, domains, flags, ignore_flags);
+	}
+
 	if (!bits) {
 		ignore_flags |= RADEON_FLAG_NO_CPU_ACCESS;
 		bits = radv_compute_valid_memory_types_attempt(dev, domains, flags, ignore_flags);



More information about the mesa-commit mailing list