[Impeller] Disable AHB swapchain. (flutter/engine#52713)

The AHB swapchain has correctness issues, which can be observed when
running the draw points microbenchmark application. Disable for now
until we figure out the sync fence behavior.
This commit is contained in:
Jonah Williams
2024-05-10 11:44:53 -07:00
committed by GitHub
parent 060dc54296
commit 6d4428162a

View File

@@ -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.";
}
}
}