mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 05:08:08 +02:00
venus: properly check and fill ahb buffer properties
When it comes to AHB, pExternalBufferInfo->handleType is already
overridden to the renderer handle type. Thus the AHB buffer prop path is
not used. However, this is not caught by cts, vvl or apps because the
host renderer memory features so far satisfy the ahb requirement.
Fixes: ebf0e45506 ("venus: add ahb image and buffer properties query support")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13076>
This commit is contained in:
parent
489d325757
commit
5a9f907d94
1 changed files with 4 additions and 2 deletions
|
|
@ -2256,6 +2256,9 @@ vn_GetPhysicalDeviceExternalBufferProperties(
|
|||
physical_dev->external_memory.renderer_handle_type;
|
||||
const VkExternalMemoryHandleTypeFlags supported_handle_types =
|
||||
physical_dev->external_memory.supported_handle_types;
|
||||
const bool is_ahb =
|
||||
pExternalBufferInfo->handleType ==
|
||||
VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID;
|
||||
|
||||
VkExternalMemoryProperties *props =
|
||||
&pExternalBufferProperties->externalMemoryProperties;
|
||||
|
|
@ -2278,8 +2281,7 @@ vn_GetPhysicalDeviceExternalBufferProperties(
|
|||
physical_dev->instance, physicalDevice, pExternalBufferInfo,
|
||||
pExternalBufferProperties);
|
||||
|
||||
if (pExternalBufferInfo->handleType ==
|
||||
VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID) {
|
||||
if (is_ahb) {
|
||||
props->compatibleHandleTypes =
|
||||
VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID;
|
||||
/* AHB backed buffer requires renderer to support import bit while it
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue