mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-11-15 02:11:22 +00:00
Do not set banDedicated for android AHB on panvk
The spec says Android hardware buffers have intrinsic width, height, format, and usage properties, so Vulkan images bound to memory imported from an Android hardware buffer must use dedicated allocations: VkMemoryDedicatedRequirements::requiresDedicatedAllocation must be VK_TRUE for images created with VkExternalMemoryImageCreateInfo::handleTypes that includes VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID. Stripping VkMemoryDedicatedAllocateInfo causes segfaults on Mesa panvk driver at least.
This commit is contained in:
1 parent
8552eec7a1
commit
1c2cf527da
1 file changed
+4
-4
@@ -3064,10 +3064,10 @@ VkResult WrappedVulkan::vkCreateImage(VkDevice device, const VkImageCreateInfo *
|
||||
resInfo.memreqs.alignment = mrq.alignment;
|
||||
resInfo.memreqs.memoryTypeBits = mrq.memoryTypeBits;
|
||||
|
||||
RDCWARN(
|
||||
"Android hardware buffer backed image, so pre-emptively banning dedicated "
|
||||
"memory");
|
||||
resInfo.banDedicated = true;
|
||||
resInfo.banDedicated =
|
||||
m_PhysicalDeviceData.driverProps.driverID != VK_DRIVER_ID_MESA_PANVK;
|
||||
RDCWARN("Android hardware buffer backed image, %s dedicated memory",
|
||||
resInfo.banDedicated ? "banning" : "allowing");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user