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>
(cherry picked from commit 4a8d172d3f)
This commit is contained in:
Bas Nieuwenhuizen 2020-04-25 23:39:21 +02:00 committed by Dylan Baker
parent 8191b91695
commit b7ef444719
2 changed files with 2 additions and 2 deletions

View file

@ -274,7 +274,7 @@
"description": "radv: Use actual memory type count for setting app-visible bitset.",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"master_sha": null,
"because_sha": null
},

View file

@ -7051,7 +7051,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: