From 4a8d172d3f81ef981e386f0cc6c259c36818f697 Mon Sep 17 00:00:00 2001 From: Bas Nieuwenhuizen Date: Sat, 25 Apr 2020 23:39:21 +0200 Subject: [PATCH] radv: Use actual memory type count for setting app-visible bitset. Otherwise we might make a bitset that is too large. Cc: Reviewed-by: Samuel Pitoiset Part-of: --- src/amd/vulkan/radv_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index b590a92d4d5..c7aa2c14eba 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -7261,7 +7261,7 @@ VkResult radv_GetMemoryFdPropertiesKHR(VkDevice _device, switch (handleType) { case VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT: - pMemoryFdProperties->memoryTypeBits = (1 << RADV_MEM_TYPE_COUNT) - 1; + pMemoryFdProperties->memoryTypeBits = (1 << device->physical_device->memory_properties.memoryTypeCount) - 1; return VK_SUCCESS; default: -- 2.30.2