Kaydet (Commit) 44e89fa6 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Accept also hex vendor id in hex in opengl_blacklist_windows.xml

(And not just names from the hardcoded list.) Surely we want it to be
possible to add a blacklist entry for a hitherto unhandled vendor to
the file at a user site without having to modify the parsing code and
rebuilding LO.

Change-Id: I01ca45cb91df06e1634a565b3e469fb85fe4e116
üst adf7df9c
......@@ -131,8 +131,12 @@ OUString getVendor(const OString& rString)
{
return "0x1414";
}
throw InvalidFileException();
else
{
// Allow having simply the hex number as such there, too. After all, it's hex numbers that
// are output to opengl_device.log.
return OStringToOUString(rString, RTL_TEXTENCODING_UTF8);
}
}
uint64_t getVersion(const OString& rString)
......
......@@ -40,7 +40,7 @@ void BlocklistParserTest::testParse()
aBlocklistParser.parse();
size_t const n = aDriveInfos.size();
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(20), n);
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(22), n);
size_t i = 0;
......@@ -79,6 +79,11 @@ void BlocklistParserTest::testParse()
CPPUNIT_ASSERT_EQUAL(WinOpenGLDeviceInfo::GetDeviceVendor(wgl::VendorMicrosoft), aDriveInfo.maAdapterVendor);
CPPUNIT_ASSERT_EQUAL(wgl::VersionComparisonOp::DRIVER_NOT_EQUAL, aDriveInfo.meComparisonOp);
aDriveInfo = aDriveInfos[i++];
CPPUNIT_ASSERT_EQUAL(bIsWhitelisted, aDriveInfo.mbWhitelisted);
CPPUNIT_ASSERT_EQUAL(OUString("0xcafe"), aDriveInfo.maAdapterVendor);
CPPUNIT_ASSERT_EQUAL(wgl::VersionComparisonOp::DRIVER_NOT_EQUAL, aDriveInfo.meComparisonOp);
aDriveInfo = aDriveInfos[i++];
CPPUNIT_ASSERT_EQUAL(bIsWhitelisted, aDriveInfo.mbWhitelisted);
CPPUNIT_ASSERT_EQUAL(WinOpenGLDeviceInfo::GetDeviceVendor(wgl::VendorAll), aDriveInfo.maAdapterVendor);
......
......@@ -27,6 +27,9 @@
<entry os="8" vendor="microsoft" compare="not_equal" version="10.20.30.40">
<device id="all"/>
</entry>
<entry os="8" vendor="0xcafe" compare="not_equal" version="10.20.30.40">
<device id="all"/>
</entry>
<entry os="8_1" compare="between_exclusive" version="10.20.30.40">
<device id="all"/>
</entry>
......@@ -59,6 +62,9 @@
<entry os="8" vendor="microsoft" compare="not_equal" version="10.20.30.40">
<device id="all"/>
</entry>
<entry os="8" vendor="0xcafe" compare="not_equal" version="10.20.30.40">
<device id="all"/>
</entry>
<entry os="8_1" compare="between_exclusive" version="10.20.30.40">
<device id="all"/>
</entry>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment