vulkan/android: Add rp_attachment_has_external_format helper
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37177>
This commit is contained in:
@@ -1061,4 +1061,14 @@ vk_android_get_ahb_buffer_properties(
|
||||
};
|
||||
}
|
||||
|
||||
bool vk_android_rp_attachment_has_external_format(
|
||||
const VkAttachmentDescription2 *desc)
|
||||
{
|
||||
const VkExternalFormatANDROID *format_info =
|
||||
vk_find_struct_const(desc->pNext,
|
||||
EXTERNAL_FORMAT_ANDROID);
|
||||
return (desc->format == VK_FORMAT_UNDEFINED) &&
|
||||
(format_info != NULL);
|
||||
}
|
||||
|
||||
#endif /* ANDROID_API_LEVEL >= 26 */
|
||||
|
||||
@@ -110,6 +110,9 @@ void vk_android_get_ahb_buffer_properties(
|
||||
const VkPhysicalDeviceExternalBufferInfo *info,
|
||||
VkExternalBufferProperties *props);
|
||||
|
||||
bool vk_android_rp_attachment_has_external_format(
|
||||
const VkAttachmentDescription2 *desc);
|
||||
|
||||
#else /* defined(VK_USE_PLATFORM_ANDROID_KHR) && ANDROID_API_LEVEL >= 26 */
|
||||
|
||||
static inline uint64_t
|
||||
@@ -169,6 +172,13 @@ vk_android_get_ahb_buffer_properties(
|
||||
{
|
||||
}
|
||||
|
||||
static bool
|
||||
vk_android_rp_attachment_has_external_format(
|
||||
const VkAttachmentDescription2 *desc)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif /* ANDROID_API_LEVEL >= 26 */
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
Reference in New Issue
Block a user