Bug 1875136 - Add RENDERER sanitization bucket for Intel Arc A750. r=gfx-reviewers,lsalzman

Differential Revision: https://phabricator.services.mozilla.com/D199269
This commit is contained in:
Kelsey Gilbert 2024-01-23 18:01:56 +00:00
parent c449b4d460
commit 467d43c2ce
2 changed files with 26 additions and 0 deletions

View File

@ -200,6 +200,13 @@ static std::optional<std::string> ChooseDeviceReplacement(
static const std::string HD_GRAPHICS = "Intel(R) HD Graphics";
static const std::string HD_GRAPHICS_400 = "Intel(R) HD Graphics 400";
static const std::string INTEL_945GM = "Intel 945GM";
// Pick A750 to split the performance difference, but err optimistically on
// the high end.
static const std::string DGPU_ARC = "Intel(R) Arc(TM) A750 Graphics";
if (Contains(str, "Intel(R) Arc(TM)")) {
return DGPU_ARC;
}
static const std::regex kIntelHD("Intel.*Graphics( P?([0-9][0-9][0-9]+))?");
if (std::regex_search(str, m, kIntelHD)) {

View File

@ -212,6 +212,25 @@ TEST(SanitizeRenderer, TestAdreno512)
EXPECT_EQ(sanitized, expectation);
}
TEST(SanitizeRenderer, TestIntelArcWindowsAngle)
{
const std::string renderer(
"ANGLE (Intel, Intel(R) Arc(TM) A770 Graphics Direct3D11 vs_5_0 ps_5_0, "
"D3D11-31.0.101.5084)");
const std::string expectation(
"ANGLE (Intel, Intel(R) Arc(TM) A750 Graphics Direct3D11 vs_5_0 ps_5_0), "
"or similar");
const auto sanitized = mozilla::webgl::SanitizeRenderer(renderer);
EXPECT_EQ(sanitized, expectation);
}
TEST(SanitizeRenderer, TestIntelArcWindowsGl)
{
const std::string renderer("Intel(R) Arc(TM) A770 Graphics");
const std::string expectation("Intel(R) Arc(TM) A750 Graphics, or similar");
const auto sanitized = mozilla::webgl::SanitizeRenderer(renderer);
EXPECT_EQ(sanitized, expectation);
}
// -
// Keep gtests for our known CI RENDERER strings (see
// test_renderer_strings.html) otherwise the first time we know we messed up is