···10631063 return ret;
10641064}
1065106510661066+// - vk_csci_get_image_external_handle_type (usually but not always a constant)
10671067+// - vk_csci_get_image_external_support
10681068+// - vkGetPhysicalDeviceImageFormatProperties2
10691069+// - vkCreateImage
10701070+// - vkGetImageMemoryRequirements
10711071+// - maybe vkGetAndroidHardwareBufferPropertiesANDROID
10721072+// - vk_alloc_and_bind_image_memory
10661073XRT_CHECK_RESULT VkResult
10671074vk_create_image_from_native(struct vk_bundle *vk,
10681075 const struct xrt_swapchain_create_info *info,
···10781085#ifdef XRT_GRAPHICS_BUFFER_HANDLE_IS_AHARDWAREBUFFER
10791086 /*
10801087 * Some Vulkan drivers will natively support importing and exporting
10811081- * SRGB formats (Qualcomm Adreno) even tho technically that's not intended
10821082- * by the AHardwareBuffer since they don't support sRGB formats.
10831083- * While others (arm Mali) does not support importing and exporting sRGB
10841084- * formats. So we need to create the image without sRGB and then create
10851085- * the image views with sRGB which is allowed by the Vulkan spec. It
10861086- * seems to be safe to do with on all drivers, so to reduce the logic
10871087- * do that instead.
10881088+ * SRGB formats (Qualcomm Adreno) even though technically the
10891089+ * AHardwareBuffer support for sRGB is... awkward (not inherent).
10901090+ * While others (arm Mali) does not support importing and exporting
10911091+ * sRGB formats. So we need to create the image without sRGB and
10921092+ * then create the image views with sRGB which is allowed by the
10931093+ * Vulkan spec. It seems to be safe to do with on all drivers,
10941094+ * so to reduce the logic do that instead.
10881095 */
10891096 if (image_format == VK_FORMAT_R8G8B8A8_SRGB) {
10901097 image_format = VK_FORMAT_R8G8B8A8_UNORM;