Same as commit
18feb32df0a ("anv/android: Use VkFormat for
externalFormat"), but for hasvk.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22619>
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.
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
*