Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Impeller] Disable AHB swapchain. #52713

Merged
merged 2 commits into from
May 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 21 additions & 16 deletions impeller/renderer/backend/vulkan/swapchain/swapchain_vk.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,24 +55,29 @@ std::shared_ptr<SwapchainVK> SwapchainVK::Create(
return nullptr;
}

// TODO(147533): AHB swapchains on emulators are not functional.
const auto emulator = ContextVK::Cast(*context).GetDriverInfo()->IsEmulator();
// TODO(148139): https://github.com/flutter/flutter/issues/148139 sync issues
// on present.
if constexpr (false) {
// TODO(147533): AHB swapchains on emulators are not functional.
const auto emulator =
ContextVK::Cast(*context).GetDriverInfo()->IsEmulator();

// Try AHB swapchains first.
if (!emulator && AHBSwapchainVK::IsAvailableOnPlatform()) {
auto ahb_swapchain = std::shared_ptr<AHBSwapchainVK>(new AHBSwapchainVK(
context, //
window.GetHandle(), //
std::move(surface), //
window.GetSize(), //
enable_msaa //
));
// Try AHB swapchains first.
if (!emulator && AHBSwapchainVK::IsAvailableOnPlatform()) {
auto ahb_swapchain = std::shared_ptr<AHBSwapchainVK>(new AHBSwapchainVK(
context, //
window.GetHandle(), //
std::move(surface), //
window.GetSize(), //
enable_msaa //
));

if (ahb_swapchain->IsValid()) {
return ahb_swapchain;
} else {
VALIDATION_LOG
<< "Could not create AHB swapchain. Falling back to KHR variant.";
if (ahb_swapchain->IsValid()) {
return ahb_swapchain;
} else {
VALIDATION_LOG
<< "Could not create AHB swapchain. Falling back to KHR variant.";
}
}
}

Expand Down