Add virtual adapter name
Change-Id: I892a9c2cdf6798a7c213be74f1e7b314cdb749c5 Signed-off-by: Koska <andrzej.koska@intel.com> Related-To: NEO-2614
This commit is contained in:
parent
1c6abfb210
commit
0c74922797
|
@ -254,7 +254,8 @@ std::unique_ptr<HwDeviceId> Wddm::discoverDevices() {
|
|||
// Check for adapters that include either "Intel" or "Citrix" (which may
|
||||
// be virtualizing one of our adapters) in the description
|
||||
if ((wcsstr(OpenAdapterDesc.Description, L"Intel") != 0) ||
|
||||
(wcsstr(OpenAdapterDesc.Description, L"Citrix") != 0)) {
|
||||
(wcsstr(OpenAdapterDesc.Description, L"Citrix") != 0) ||
|
||||
(wcsstr(OpenAdapterDesc.Description, L"Virtual Render") != 0)) {
|
||||
char deviceId[16];
|
||||
sprintf_s(deviceId, "%X", OpenAdapterDesc.DeviceId);
|
||||
bool choosenDevice = (DebugManager.flags.ForceDeviceId.get() == "unk") || (DebugManager.flags.ForceDeviceId.get() == deviceId);
|
||||
|
|
|
@ -139,6 +139,14 @@ TEST(Wddm20EnumAdaptersTest, WhenAdapterDescriptionContainsDCHIAndgdrclPathConta
|
|||
EXPECT_NE(nullptr, hwDeviceId.get());
|
||||
}
|
||||
|
||||
TEST(WddmDiscoverDevices, WhenAdapterDescriptionContainsVirtualRenderThenAdapterIsDiscovered) {
|
||||
VariableBackup<const wchar_t *> descriptionBackup(&UltIDXGIAdapter1::description);
|
||||
descriptionBackup = L"Virtual Render";
|
||||
|
||||
auto hwDeviceId = Wddm::discoverDevices();
|
||||
EXPECT_NE(nullptr, hwDeviceId.get());
|
||||
}
|
||||
|
||||
TEST(Wddm20EnumAdaptersTest, expectTrue) {
|
||||
|
||||
const HardwareInfo *hwInfo = platformDevices[0];
|
||||
|
|
Loading…
Reference in New Issue