mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Create OsInterface before calling Wddm::init
Related-To: NEO-3691 Change-Id: I33690e4297b6ddd3195c272de00f0c946c56380b Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:

committed by
sys_ocldev

parent
a77965adf7
commit
1a35298fdb
@ -1402,3 +1402,12 @@ TEST(DiscoverDevices, whenDriverInfoHasIncompatibleDriverStoreThenHwDeviceIdIsNo
|
||||
auto hwDeviceIds = OSInterface::discoverDevices(executionEnvironment);
|
||||
EXPECT_TRUE(hwDeviceIds.empty());
|
||||
}
|
||||
|
||||
TEST(InitOsInterfaceTest, givenRootDeviceEnvironmentWhenIntializingWddmDuringInitOsInterfaceMethodThenOsInterfaceIsAvailable) {
|
||||
MockExecutionEnvironment executionEnvironment{};
|
||||
auto hwDeviceIds = OSInterface::discoverDevices(executionEnvironment);
|
||||
EXPECT_EQ(1u, hwDeviceIds.size());
|
||||
executionEnvironment.rootDeviceEnvironments[0]->initOsInterface(std::move(hwDeviceIds[0]));
|
||||
auto wddm = static_cast<WddmMock *>(executionEnvironment.rootDeviceEnvironments[0]->osInterface->get()->getWddm());
|
||||
EXPECT_TRUE(wddm->osInterfaceAvailable);
|
||||
}
|
||||
|
Reference in New Issue
Block a user