venus: clean up vn_android api names

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/10847>
This commit is contained in:
Yiwei Zhang
2021-05-14 22:58:34 +00:00
committed by Marge Bot
parent 98812f893b
commit 055ce78f31
3 changed files with 18 additions and 17 deletions

View File

@@ -211,11 +211,11 @@ vn_num_planes_from_format_and_modifier(VkPhysicalDevice physical_device,
}
VkResult
vn_image_from_anb(struct vn_device *dev,
const VkImageCreateInfo *image_info,
const VkNativeBufferANDROID *anb_info,
const VkAllocationCallbacks *alloc,
struct vn_image **out_img)
vn_android_image_from_anb(struct vn_device *dev,
const VkImageCreateInfo *image_info,
const VkNativeBufferANDROID *anb_info,
const VkAllocationCallbacks *alloc,
struct vn_image **out_img)
{
/* If anb_info->handle points to a classic resouce created from
* virtio_gpu_cmd_resource_create_3d, anb_info->stride is the stride of the

View File

@@ -45,11 +45,11 @@ vn_android_find_native_buffer(const VkImageCreateInfo *create_info)
}
VkResult
vn_image_from_anb(struct vn_device *dev,
const VkImageCreateInfo *image_info,
const VkNativeBufferANDROID *anb_info,
const VkAllocationCallbacks *alloc,
struct vn_image **out_img);
vn_android_image_from_anb(struct vn_device *dev,
const VkImageCreateInfo *image_info,
const VkNativeBufferANDROID *anb_info,
const VkAllocationCallbacks *alloc,
struct vn_image **out_img);
#else
@@ -68,17 +68,17 @@ vn_android_wsi_fini(UNUSED struct vn_device *dev,
}
static inline const VkNativeBufferANDROID *
vn_android_find_native_buffer(const VkImageCreateInfo *create_info)
vn_android_find_native_buffer(UNUSED const VkImageCreateInfo *create_info)
{
return NULL;
}
static inline VkResult
vn_image_from_anb(struct vn_device *dev,
const VkImageCreateInfo *image_info,
const VkNativeBufferANDROID *anb_info,
const VkAllocationCallbacks *alloc,
struct vn_image **out_img)
vn_android_image_from_anb(UNUSED struct vn_device *dev,
UNUSED const VkImageCreateInfo *image_info,
UNUSED const VkNativeBufferANDROID *anb_info,
UNUSED const VkAllocationCallbacks *alloc,
UNUSED struct vn_image **out_img)
{
return VK_ERROR_OUT_OF_HOST_MEMORY;
}

View File

@@ -299,7 +299,8 @@ vn_CreateImage(VkDevice device,
assert(wsi_info->scanout);
result = vn_wsi_create_scanout_image(dev, pCreateInfo, alloc, &img);
} else if (anb_info) {
result = vn_image_from_anb(dev, pCreateInfo, anb_info, alloc, &img);
result =
vn_android_image_from_anb(dev, pCreateInfo, anb_info, alloc, &img);
} else {
result = vn_image_create(dev, pCreateInfo, alloc, &img);
}