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

Commit dcb260d

Browse files
author
Jonah Williams
authored
[CP][Impeller] disable Maleoon GPU from using Vulkan. (#56203) (#56207)
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 e929345 commit dcb260d

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
@@ -348,6 +348,11 @@ bool DriverInfoVK::IsKnownBadDriver() const {
348348
return false;
349349
}
350350
}
351+
// Disable Maleoon series GPUs, see:
352+
// https://github.com/flutter/flutter/issues/156623
353+
if (vendor_ == VendorVK::kHuawei) {
354+
return true;
355+
}
351356
return false;
352357
}
353358

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)