fix: correct order of wddm initialization

init gmm after getting device and paging queue handles

Related-To: NEO-11080
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2025-09-11 10:09:55 +00:00
committed by Compute-Runtime-Automation
parent 0c2a8ef30b
commit ed15408592
4 changed files with 31 additions and 7 deletions

View File

@@ -536,6 +536,20 @@ TEST_F(WddmTestWithMockGdiDll, givenShareableAllocationWhenCreateThenSharedHandl
EXPECT_NE(0u, handle);
}
TEST_F(WddmTestWithMockGdiDll, whenCreateDeviceFailsThenGmmIsNotIntialized) {
VariableBackup backupFailDevice(&failCreateDevice, true);
wddm->rootDeviceEnvironment.gmmHelper.reset();
EXPECT_FALSE(wddm->init());
EXPECT_EQ(nullptr, wddm->rootDeviceEnvironment.gmmHelper.get());
}
TEST_F(WddmTestWithMockGdiDll, whenCreatePagingQueueFailsThenGmmIsNotIntialized) {
VariableBackup backupFailDevice(&failCreatePagingQueue, true);
wddm->rootDeviceEnvironment.gmmHelper.reset();
EXPECT_FALSE(wddm->init());
EXPECT_EQ(nullptr, wddm->rootDeviceEnvironment.gmmHelper.get());
}
TEST_F(Wddm20Tests, WhenMakingResidentAndEvictingThenReturnIsCorrect) {
OsAgnosticMemoryManager mm(*executionEnvironment);
auto gmmHelper = getGmmHelper();