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

Commit 3e0ebbe

Browse files
author
Jonah Williams
authored
[Impeller] disable Maleoon GPU from using Vulkan. (#56203)
Fixes flutter/flutter#156623 using info from https://vulkan.gpuinfo.org/displayreport.php?id=23730 . I dont believe these vulkan drivers are working correctly.
1 parent faf213b commit 3e0ebbe

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

impeller/renderer/backend/vulkan/driver_info_vk.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,11 @@ bool DriverInfoVK::IsKnownBadDriver() const {
350350
return false;
351351
}
352352
}
353+
// Disable Maleoon series GPUs, see:
354+
// https://github.com/flutter/flutter/issues/156623
355+
if (vendor_ == VendorVK::kHuawei) {
356+
return true;
357+
}
353358
return false;
354359
}
355360

impeller/renderer/backend/vulkan/driver_info_vk_unittests.cc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,19 @@ TEST_P(DriverInfoVKTest, CanDumpToLog) {
3636
EXPECT_TRUE(log.str().find("Driver Information") != std::string::npos);
3737
}
3838

39+
TEST(DriverInfoVKTest, CanIdentifyBadMaleoonDriver) {
40+
auto const context =
41+
MockVulkanContextBuilder()
42+
.SetPhysicalPropertiesCallback(
43+
[](VkPhysicalDevice device, VkPhysicalDeviceProperties* prop) {
44+
prop->vendorID = 0x19E5; // Huawei
45+
prop->deviceType = VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU;
46+
})
47+
.Build();
48+
49+
EXPECT_TRUE(context->GetDriverInfo()->IsKnownBadDriver());
50+
}
51+
3952
bool IsBadVersionTest(std::string_view driver_name, bool qc = true) {
4053
auto const context =
4154
MockVulkanContextBuilder()

0 commit comments

Comments
 (0)