From cb6d655f535fea8b16122804f1536a53481f7dd1 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Thu, 20 Apr 2023 21:55:18 -0700 Subject: [PATCH] hasvk/android: Use VkFormat for externalFormat Same as commit 18feb32df0a ("anv/android: Use VkFormat for externalFormat"), but for hasvk. Part-of: --- src/intel/vulkan_hasvk/anv_android.c | 2 +- src/intel/vulkan_hasvk/anv_formats.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/intel/vulkan_hasvk/anv_android.c b/src/intel/vulkan_hasvk/anv_android.c index f8aa155..1648ffb 100644 --- a/src/intel/vulkan_hasvk/anv_android.c +++ b/src/intel/vulkan_hasvk/anv_android.c @@ -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. diff --git a/src/intel/vulkan_hasvk/anv_formats.c b/src/intel/vulkan_hasvk/anv_formats.c index aadede4..8ad85fb 100644 --- a/src/intel/vulkan_hasvk/anv_formats.c +++ b/src/intel/vulkan_hasvk/anv_formats.c @@ -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 * -- 2.7.4