hasvk/android: Use VkFormat for externalFormat

Same as commit 18feb32df0 ("anv/android: Use VkFormat for
externalFormat"), but for hasvk.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22619>
This commit is contained in:
Chia-I Wu 2023-04-20 21:55:18 -07:00 committed by Marge Bot
parent 6039f2a22f
commit cb6d655f53
2 changed files with 2 additions and 2 deletions

View file

@ -192,9 +192,9 @@ get_ahw_buffer_format_properties2(
VkAndroidHardwareBufferFormatProperties2ANDROID *p = pProperties;
p->format = vk_format_from_android(desc.format, desc.usage);
p->externalFormat = p->format;
const struct anv_format *anv_format = anv_get_format(p->format);
p->externalFormat = (uint64_t) (uintptr_t) anv_format;
/* Default to OPTIMAL tiling but set to linear in case
* of AHARDWAREBUFFER_USAGE_GPU_DATA_BUFFER usage.

View file

@ -1687,7 +1687,7 @@ VkResult anv_CreateSamplerYcbcrConversion(
if (ext_info && ext_info->externalFormat) {
assert(pCreateInfo->format == VK_FORMAT_UNDEFINED);
conversion->format = (struct anv_format *) (uintptr_t) ext_info->externalFormat;
conversion->format = anv_get_format(ext_info->externalFormat);
} else {
/* The Vulkan 1.1.95 spec says
*