summaryrefslogtreecommitdiffstats
path: root/src/amd
diff options
context:
space:
mode:
authorBas Nieuwenhuizen <[email protected]>2020-04-25 23:39:21 +0200
committerBas Nieuwenhuizen <[email protected]>2020-04-28 15:44:27 +0200
commit4a8d172d3f81ef981e386f0cc6c259c36818f697 (patch)
tree1d18181a5f086191bed2264b2ce784f6e5768c41 /src/amd
parent8e03cf15f9516642ba7f7cd7b7a2d7aad835796a (diff)
radv: Use actual memory type count for setting app-visible bitset.
Otherwise we might make a bitset that is too large. Cc: <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4751>
Diffstat (limited to 'src/amd')
-rw-r--r--src/amd/vulkan/radv_device.c2
1 files changed, 1 insertions, 1 deletions
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: