From: Bas Nieuwenhuizen Date: Sat, 25 Apr 2020 21:39:21 +0000 (+0200) Subject: radv: Use actual memory type count for setting app-visible bitset. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4a8d172d3f81ef981e386f0cc6c259c36818f697;p=mesa.git 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: --- 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: