mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 07:20:10 +01:00
anv/android: align AHardwareBuffer naming to ahb
/s/ahw/ahb/ to match common vulkan Signed-off-by: Juston Li <justonli@google.com> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38039>
This commit is contained in:
parent
1f1022d161
commit
c36f0e73ba
6 changed files with 8 additions and 8 deletions
|
|
@ -27,7 +27,7 @@
|
||||||
* Called from anv_AllocateMemory when import AHardwareBuffer.
|
* Called from anv_AllocateMemory when import AHardwareBuffer.
|
||||||
*/
|
*/
|
||||||
VkResult
|
VkResult
|
||||||
anv_import_ahw_memory(VkDevice device_h,
|
anv_import_ahb_memory(VkDevice device_h,
|
||||||
struct anv_device_memory *mem)
|
struct anv_device_memory *mem)
|
||||||
{
|
{
|
||||||
#if ANDROID_API_LEVEL >= 26
|
#if ANDROID_API_LEVEL >= 26
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ VkResult anv_image_init_from_gralloc(struct anv_device *device,
|
||||||
const VkImageCreateInfo *base_info,
|
const VkImageCreateInfo *base_info,
|
||||||
const VkNativeBufferANDROID *gralloc_info);
|
const VkNativeBufferANDROID *gralloc_info);
|
||||||
|
|
||||||
VkResult anv_import_ahw_memory(VkDevice device_h,
|
VkResult anv_import_ahb_memory(VkDevice device_h,
|
||||||
struct anv_device_memory *mem);
|
struct anv_device_memory *mem);
|
||||||
|
|
||||||
#endif /* ANV_ANDROID_H */
|
#endif /* ANV_ANDROID_H */
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ anv_image_init_from_gralloc(struct anv_device *device,
|
||||||
}
|
}
|
||||||
|
|
||||||
VkResult
|
VkResult
|
||||||
anv_import_ahw_memory(VkDevice device_h,
|
anv_import_ahb_memory(VkDevice device_h,
|
||||||
struct anv_device_memory *mem)
|
struct anv_device_memory *mem)
|
||||||
{
|
{
|
||||||
return VK_ERROR_EXTENSION_NOT_PRESENT;
|
return VK_ERROR_EXTENSION_NOT_PRESENT;
|
||||||
|
|
|
||||||
|
|
@ -1576,7 +1576,7 @@ VkResult anv_AllocateMemory(
|
||||||
alloc_flags |= ANV_BO_ALLOC_DYNAMIC_VISIBLE_POOL;
|
alloc_flags |= ANV_BO_ALLOC_DYNAMIC_VISIBLE_POOL;
|
||||||
|
|
||||||
if (mem->vk.ahardware_buffer) {
|
if (mem->vk.ahardware_buffer) {
|
||||||
result = anv_import_ahw_memory(_device, mem);
|
result = anv_import_ahb_memory(_device, mem);
|
||||||
if (result != VK_SUCCESS)
|
if (result != VK_SUCCESS)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2257,7 +2257,7 @@ void anv_GetPhysicalDeviceExternalBufferProperties(
|
||||||
pExternalBufferProperties->externalMemoryProperties = android_buffer_props;
|
pExternalBufferProperties->externalMemoryProperties = android_buffer_props;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
FALLTHROUGH; /* If ahw not supported */
|
FALLTHROUGH; /* If ahb not supported */
|
||||||
default:
|
default:
|
||||||
goto unsupported;
|
goto unsupported;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2265,7 +2265,7 @@ VkResult anv_CreateImage(
|
||||||
__LINE__, pCreateInfo->flags);
|
__LINE__, pCreateInfo->flags);
|
||||||
|
|
||||||
#ifndef VK_USE_PLATFORM_ANDROID_KHR
|
#ifndef VK_USE_PLATFORM_ANDROID_KHR
|
||||||
/* Skip the WSI common swapchain creation here on Android. Similar to ahw,
|
/* Skip the WSI common swapchain creation here on Android. Similar to ahb,
|
||||||
* this case is handled by a partial image init and then resolved when the
|
* this case is handled by a partial image init and then resolved when the
|
||||||
* image is bound and gralloc info is passed.
|
* image is bound and gralloc info is passed.
|
||||||
*/
|
*/
|
||||||
|
|
@ -2357,7 +2357,7 @@ anv_GetImageOpaqueCaptureDescriptorDataEXT(VkDevice device,
|
||||||
* format and prepare anv_image properly.
|
* format and prepare anv_image properly.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
resolve_ahw_image(struct anv_device *device,
|
resolve_ahb_image(struct anv_device *device,
|
||||||
struct anv_image *image,
|
struct anv_image *image,
|
||||||
struct anv_device_memory *mem)
|
struct anv_device_memory *mem)
|
||||||
{
|
{
|
||||||
|
|
@ -2984,7 +2984,7 @@ anv_bind_image_memory(struct anv_device *device,
|
||||||
|
|
||||||
/* Resolve will alter the image's aspects, do this first. */
|
/* Resolve will alter the image's aspects, do this first. */
|
||||||
if (mem && mem->vk.ahardware_buffer)
|
if (mem && mem->vk.ahardware_buffer)
|
||||||
resolve_ahw_image(device, image, mem);
|
resolve_ahb_image(device, image, mem);
|
||||||
|
|
||||||
vk_foreach_struct_const(s, bind_info->pNext) {
|
vk_foreach_struct_const(s, bind_info->pNext) {
|
||||||
switch (s->sType) {
|
switch (s->sType) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue