Yiwei Zhang
e8a61a8a6b
vulkan/android: drop vk_buffer dependency from common AHB impl
...
Unlike AHB image, the spec has ensured no special treatment for
allocationSize for AHB buffer export operation.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Chia-I Wu <olvaffe@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25263 >
2023-09-18 19:25:59 +00:00
Yiwei Zhang
cd0b86fce1
vulkan/android: add missing AHARDWAREBUFFER_USAGE_GPU_DATA_BUFFER usage
...
An AHB backing a Vkbuffer requires AHARDWAREBUFFER_USAGE_GPU_DATA_BUFFER
usage bit, which is missed from the original ANV and RADV Android
frontends as well as the common VK Android refactor.
Cc: mesa-stable
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Chia-I Wu <olvaffe@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25263 >
2023-09-18 19:25:59 +00:00
Ryan Neph
7a5948b3ee
vulkan/android: add missed STACK_ARRAY_FINISH()
...
Fixes: 3c4c263dc7 ("vulkan/android: improve vkQueueSignalReleaseImageANDROID")
Signed-off-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25277 >
2023-09-18 11:30:02 -07:00
Yiwei Zhang
3c4c263dc7
vulkan/android: improve vkQueueSignalReleaseImageANDROID
...
There're two issues with the current implementation:
1. Wait semaphores are implicitly required to be SYNC_FD exportable
2. As a queue command that can further record cmds against the wsi
image, it currently doesn't account for pending cmds in the queue
beyond the wait semaphores.
This change fixes both by doing a queue submission in the call with a
SYNC_FD external signal semaphore. However, due to Android wsi not
exposing swapchain to icd, we have to cache the signal semaphore in the
queue, otherwise would have to create/destroy in each present.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Chia-I Wu <olvaffe@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25185 >
2023-09-15 19:03:22 +00:00
Yiwei Zhang
6ed2515df1
vulkan: remove a dup entry from vk_image_usage_to_ahb_usage
...
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Chia-I Wu <olvaffe@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25185 >
2023-09-15 19:03:22 +00:00
Chia-I Wu
47b37651f8
vulkan: add vk_image_format_to_ahb_format
...
There should be no functional change.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22619 >
2023-05-11 22:18:03 +00:00
Chia-I Wu
380180516c
anv,hasvk,radv: do not fall back to AHARDWAREBUFFER_FORMAT_BLOB
...
When allocating a VkDeviceMemory exportable as AHB, it seems incorrect
to fall back to AHARDWAREBUFFER_FORMAT_BLOB when the image has no known
AHB format. We should fail the allocation instead.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22619 >
2023-05-11 22:18:03 +00:00
Chia-I Wu
50e703f347
vulkan: add vk_ahb_format_to_image_format
...
There should be no functional change.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22619 >
2023-05-11 22:18:02 +00:00
Chia-I Wu
f81dce9bcc
vulkan: rename vk_image::ahardware_buffer_format
...
Rename it to ahb_format.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22619 >
2023-05-11 22:18:02 +00:00
Faith Ekstrand
b16cfe23ef
vulkan,anv,hasvk,radv: Unify Android hardware buffer creation
...
Reviewed-by: Lina Versace <lina@kiwitree.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22038 >
2023-03-31 14:57:03 +00:00
Faith Ekstrand
dc0749adab
vulkan/android: Fix hardware buffer usage flags
...
We now add the correct usage flags for input attachments, storage
images, and depth/stencil attachments.
Reviewed-by: Lina Versace <lina@kiwitree.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22038 >
2023-03-31 14:57:03 +00:00
Faith Ekstrand
41f88be282
vulkan,anv,hasvk,radv: Add a common vk_image_usage_to_ahb_usage helper
...
Reviewed-by: Lina Versace <lina@kiwitree.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22038 >
2023-03-31 14:57:03 +00:00
Faith Ekstrand
9d1c1379e7
vulkan: vk_android.c should be copyright Intel
...
That's where I copied+pasted it from.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22120 >
2023-03-26 00:16:26 +00:00
Jason Ekstrand
b2073f5e5d
radv: Move QueueSignalReleaseImageANDROID to common code
...
This is mostly a copy+paste job but with a few syntax changes to make it
follow more closely with other common Vulkan code.
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14372 >
2022-01-05 16:36:10 +00:00
Jason Ekstrand
dfb1e1777c
anv,radv,v3dv: Move AcquireImageANDROID to common code
...
All three implementations are identical.
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Tested-by: Tapani Pälli <tapani.palli@intel.com >
Tested-by: Roman Stratiienko <r.stratiienko@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14372 >
2022-01-05 16:36:10 +00:00