[impeller] prevent PowerVR from using Vulkan backend. (#161841)

Almost all remaining blackscreen or rendering bugs/crashes are PowerVR
hardware. Based on common knowledge that several large engines prevent
PowerVR completely, we'll also block PowerVR until we have time to
accumulate the necessary workarounds.

---------

Co-authored-by: Navaron Bracke <brackenavaron@gmail.com>
This commit is contained in:
Jonah Williams 2025-01-21 12:37:35 -08:00 committed by GitHub
parent 52cfc8b073
commit f5a13cacb0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 21 additions and 0 deletions

View File

@ -334,6 +334,14 @@ bool DriverInfoVK::IsKnownBadDriver() const {
if (vendor_ == VendorVK::kHuawei) {
return true;
}
// https://github.com/flutter/flutter/issues/161122
// https://github.com/flutter/flutter/issues/160960
// https://github.com/flutter/flutter/issues/160866
// https://github.com/flutter/flutter/issues/160804
// https://github.com/flutter/flutter/issues/160406
if (vendor_ == VendorVK::kImgTec) {
return true;
}
return false;
}

View File

@ -222,4 +222,17 @@ TEST(DriverInfoVKTest, CanUseFramebufferFetch) {
EXPECT_TRUE(CanUseFramebufferFetch("Mali-G51", false));
}
TEST(DriverInfoVKTest, AllPowerVRDisabled) {
auto const context =
MockVulkanContextBuilder()
.SetPhysicalPropertiesCallback(
[](VkPhysicalDevice device, VkPhysicalDeviceProperties* prop) {
prop->vendorID = 0x1010;
prop->deviceType = VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU;
})
.Build();
EXPECT_TRUE(context->GetDriverInfo()->IsKnownBadDriver());
}
} // namespace impeller::testing