Mesa (staging/20.0): radv: Use actual memory type count for setting app-visible bitset.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Apr 28 19:51:58 UTC 2020
Module: Mesa
Branch: staging/20.0
Commit: b7ef4447192c2d2b27715d7d2cc3bd2dfc59525c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b7ef4447192c2d2b27715d7d2cc3bd2dfc59525c
Author: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Date: Sat Apr 25 23:39:21 2020 +0200
radv: Use actual memory type count for setting app-visible bitset.
Otherwise we might make a bitset that is too large.
Cc: <mesa-stable at lists.freedesktop.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4751>
(cherry picked from commit 4a8d172d3f81ef981e386f0cc6c259c36818f697)
---
.pick_status.json | 2 +-
src/amd/vulkan/radv_device.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index eb657f4a04d..1b72b86d04d 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -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
},
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index c4ed1505c60..4863257ea59 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -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:
More information about the mesa-commit
mailing list