Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

[Impeller] Make extensions required for AHB swapchains optional on Android. #54785

Closed
wants to merge 4 commits into from

Conversation

jonahwilliams
Copy link
Member

@jonahwilliams jonahwilliams commented Aug 26, 2024

From flutter/flutter#153762

AHB required extensions are not present on some devices. These devices can still use KHR, right now we're kciking them off vulkan entirely.

Minor fixes:
Some devices don't support non-infinite timeouts
Some devices don't seem to work with the AHB swapchain/SurfaceControl.

Make some adjustments so we can prepare to fallback to KHR if needed.

@flutter-dashboard

This comment was marked as off-topic.

@jonahwilliams jonahwilliams changed the title [Impeller] prepare to use KHR swapchains on certain Android devices. [Impeller] Make extensions required for AHB swapchains optional on Android. Aug 26, 2024
Copy link
Member

@chinmaygarde chinmaygarde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't make sense to me. I followed the spec. links for all the extensions and they all became core in 1.1. For instance, https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_KHR_external_semaphore.html says "Promoted to Vulkan 1.1" and "All functionality in this extension is included in core Vulkan 1.1, with the KHR suffix omitted. The original type, enum and command names are still available as aliases of the core functionality."

Am I misunderstanding what the spec. is trying to say? Or are we not checking correctly for the presence of 1.1?

/// Platform agnostic code can still check if these Android
/// extensions are present.
///
enum class OptionalAndroidDeviceExtensionVK : uint32_t {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is nothing Android specific about these extensions, you can move them to OptionalDeviceExtensionVK.

@chinmaygarde
Copy link
Member

Did some sleuthing on vulkan.gpuinfo.org. It allows you to filter devices by Vulkan version. I selected 1.1 and above and selected one extension. If my understanding of how the spec. is worded was right, then the support for the extension that became core in 1.1 should have been 100%. But its not (though its super close). That makes me think that the extensions check must still be performed. Presumably, the extension struct just don't need to be referred to via the KHR suffix. I looked at devices that are reported as 1.1 but do NOT support the extension, its some emulators and a few Xiaomi devices. Can we ask the users reporting these issues for the vulkan.gpuinfo.org dumps?

Screenshot 2024-08-26 at 3 47 14 PM Screenshot 2024-08-26 at 3 48 28 PM

@jonahwilliams
Copy link
Member Author

I can repro this on my android emulator. I'll get a gpu info dump from it

@jonahwilliams
Copy link
Member Author

I cannot run vulkan caps viewer on my emulator, it crashes immediately

@jonahwilliams
Copy link
Member Author

Closing as its just my f'd up emulator

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants