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

[Impeller] disable Maleoon GPU from using Vulkan. #56203

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions impeller/renderer/backend/vulkan/driver_info_vk.cc
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,11 @@ bool DriverInfoVK::IsKnownBadDriver() const {
return false;
}
}
// Disable Maleoon series GPUs, see:
// https://github.com/flutter/flutter/issues/156623
if (vendor_ == VendorVK::kHuawei) {
return true;
}
return false;
}

Expand Down
13 changes: 13 additions & 0 deletions impeller/renderer/backend/vulkan/driver_info_vk_unittests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,19 @@ TEST_P(DriverInfoVKTest, CanDumpToLog) {
EXPECT_TRUE(log.str().find("Driver Information") != std::string::npos);
}

TEST(DriverInfoVKTest, CanIdentifyBadMaleoonDriver) {
auto const context =
MockVulkanContextBuilder()
.SetPhysicalPropertiesCallback(
[](VkPhysicalDevice device, VkPhysicalDeviceProperties* prop) {
prop->vendorID = 0x19E5; // Huawei
prop->deviceType = VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU;
})
.Build();

EXPECT_TRUE(context->GetDriverInfo()->IsKnownBadDriver());
}

bool IsBadVersionTest(std::string_view driver_name, bool qc = true) {
auto const context =
MockVulkanContextBuilder()
Expand Down