radv: Use actual memory type count for setting app-visible bitset.

Otherwise we might make a bitset that is too large.

Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4751>
This commit is contained in:
Bas Nieuwenhuizen
2020-04-25 23:39:21 +02:00
parent 8e03cf15f9
commit 4a8d172d3f
+1 -1
View File
@@ -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: