refactor: unify GmmMemory definition

Related-To: NEO-11080
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2025-09-30 15:25:55 +00:00
committed by Compute-Runtime-Automation
parent 0caa8d5297
commit 5b8e8b8b1a
32 changed files with 160 additions and 221 deletions

View File

@@ -139,6 +139,8 @@ if(WIN32 OR NOT DISABLE_WDDM_LINUX)
${NEO_SHARED_TEST_DIRECTORY}/common/mock_gdi/mock_os_library.cpp
${CMAKE_CURRENT_SOURCE_DIR}/windows/mock_gdi_interface.cpp
${CMAKE_CURRENT_SOURCE_DIR}/windows/mock_gdi_interface.h
${CMAKE_CURRENT_SOURCE_DIR}/windows/mock_gmm_memory.cpp
${CMAKE_CURRENT_SOURCE_DIR}/windows/mock_gmm_memory.h
${CMAKE_CURRENT_SOURCE_DIR}/windows/mock_os_time_win.h
${CMAKE_CURRENT_SOURCE_DIR}/windows/mock_wddm_eudebug.h
${CMAKE_CURRENT_SOURCE_DIR}/windows/mock_wddm_allocation.h

View File

@@ -1,11 +1,11 @@
/*
* Copyright (C) 2018-2021 Intel Corporation
* Copyright (C) 2018-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "mock_gmm_memory.h"
#include "shared/test/common/mocks/windows/mock_gmm_memory.h"
namespace NEO {
GmmMemory *GmmMemory::create(GmmClientContext *gmmClientContext) {

View File

@@ -1,16 +0,0 @@
/*
* Copyright (C) 2018-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/test/common/mocks/windows/mock_gmm_memory_base.h"
namespace NEO {
class MockGmmMemory : public MockGmmMemoryBase {
using MockGmmMemoryBase::MockGmmMemoryBase;
};
} // namespace NEO

View File

@@ -0,0 +1,35 @@
/*
* Copyright (C) 2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/test/common/mocks/windows/mock_gmm_memory.h"
namespace NEO {
bool MockGmmMemory::configureDeviceAddressSpace(GMM_ESCAPE_HANDLE hAdapter,
GMM_ESCAPE_HANDLE hDevice,
GMM_ESCAPE_FUNC_TYPE pfnEscape,
GMM_GFX_SIZE_T svmSize,
BOOLEAN bdwL3Coherency) {
configureDeviceAddressSpaceCalled++;
configureDeviceAddressSpaceParamsPassed.push_back({hAdapter,
hDevice,
pfnEscape,
svmSize,
bdwL3Coherency});
return configureDeviceAddressSpaceResult;
}
void MockGmmMemory::overrideInternalGpuVaRangeLimit(uintptr_t value) {
this->getInternalGpuVaRangeLimitResult = value;
}
bool MockGmmMemory::setDeviceInfo(GMM_DEVICE_INFO *deviceInfo) {
setDeviceInfoCalled++;
deviceCallbacks = *deviceInfo->pDeviceCb;
return setDeviceInfoResult;
}
} // namespace NEO

View File

@@ -1,39 +1,30 @@
/*
* Copyright (C) 2018-2023 Intel Corporation
* Copyright (C) 2018-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/source/gmm_helper/windows/gmm_memory.h"
#include "shared/source/os_interface/windows/sharedata_wrapper.h"
#include "shared/source/os_interface/windows/windows_defs.h"
#include "shared/source/utilities/stackvec.h"
#include "shared/test/common/test_macros/mock_method_macros.h"
#include "gmm_memory.h"
namespace NEO {
class MockGmmMemoryBase : public GmmMemory {
class MockGmmMemory : public GmmMemory {
public:
~MockGmmMemoryBase() override = default;
~MockGmmMemory() override = default;
MockGmmMemoryBase(GmmClientContext *gmmClientContext) : GmmMemory(gmmClientContext){};
MockGmmMemory(GmmClientContext *gmmClientContext) : GmmMemory(gmmClientContext){};
bool configureDeviceAddressSpace(GMM_ESCAPE_HANDLE hAdapter,
GMM_ESCAPE_HANDLE hDevice,
GMM_ESCAPE_FUNC_TYPE pfnEscape,
GMM_GFX_SIZE_T svmSize,
BOOLEAN bdwL3Coherency) override {
configureDeviceAddressSpaceCalled++;
configureDeviceAddressSpaceParamsPassed.push_back({hAdapter,
hDevice,
pfnEscape,
svmSize,
bdwL3Coherency});
return configureDeviceAddressSpaceResult;
}
BOOLEAN bdwL3Coherency) override;
struct ConfigureDeviceAddressSpaceParams {
GMM_ESCAPE_HANDLE hAdapter{};
@@ -47,17 +38,11 @@ class MockGmmMemoryBase : public GmmMemory {
bool configureDeviceAddressSpaceResult = true;
StackVec<ConfigureDeviceAddressSpaceParams, 1> configureDeviceAddressSpaceParamsPassed{};
void overrideInternalGpuVaRangeLimit(uintptr_t value) {
this->getInternalGpuVaRangeLimitResult = value;
}
void overrideInternalGpuVaRangeLimit(uintptr_t value);
ADDMETHOD_NOBASE(getInternalGpuVaRangeLimit, uintptr_t, NEO::windowsMinAddress, ());
bool setDeviceInfo(GMM_DEVICE_INFO *deviceInfo) override {
setDeviceInfoCalled++;
deviceCallbacks = *deviceInfo->pDeviceCb;
return setDeviceInfoResult;
}
bool setDeviceInfo(GMM_DEVICE_INFO *deviceInfo) override;
uint32_t setDeviceInfoCalled = 0u;
bool setDeviceInfoResult = true;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2024 Intel Corporation
* Copyright (C) 2018-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -26,7 +26,7 @@
#include "shared/test/common/mocks/mock_wddm_interface20.h"
#include "shared/test/common/mocks/mock_wddm_residency_allocations_container.h"
#include "shared/test/common/mocks/windows/mock_gdi_interface.h"
#include "shared/test/common/mocks/windows/mock_gmm_memory_base.h"
#include "shared/test/common/mocks/windows/mock_gmm_memory.h"
#include "shared/test/common/os_interface/windows/gdi_dll_fixture.h"
#include "shared/test/common/os_interface/windows/mock_wddm_memory_manager.h"
#include "shared/test/common/test_macros/test.h"
@@ -192,7 +192,7 @@ struct WddmInstrumentationGmmFixture : DeviceFixture {
executionEnvironment = pDevice->getExecutionEnvironment();
auto rootDeviceEnvironment = executionEnvironment->rootDeviceEnvironments[0].get();
wddm = static_cast<WddmMock *>(Wddm::createWddm(nullptr, *rootDeviceEnvironment));
gmmMem = new MockGmmMemoryBase(rootDeviceEnvironment->getGmmClientContext());
gmmMem = new MockGmmMemory(rootDeviceEnvironment->getGmmClientContext());
wddm->gmmMemory.reset(gmmMem);
rootDeviceEnvironment->osInterface = std::make_unique<OSInterface>();
rootDeviceEnvironment->osInterface->setDriverModel(std::unique_ptr<DriverModel>(wddm));
@@ -202,7 +202,7 @@ struct WddmInstrumentationGmmFixture : DeviceFixture {
}
WddmMock *wddm;
MockGmmMemoryBase *gmmMem = nullptr;
MockGmmMemory *gmmMem = nullptr;
ExecutionEnvironment *executionEnvironment;
};

View File

@@ -1,5 +1,5 @@
#
# Copyright (C) 2021 Intel Corporation
# Copyright (C) 2021-2025 Intel Corporation
#
# SPDX-License-Identifier: MIT
#
@@ -27,7 +27,7 @@ endif()
if(WIN32 OR(UNIX AND NOT DISABLE_WDDM_LINUX))
list(APPEND NEO_SHARED_aub_tests_configurations
${NEO_SHARED_DIRECTORY}/gmm_helper/windows/gmm_memory.cpp
${NEO_SHARED_DIRECTORY}/gmm_helper/windows/create_gmm_memory.cpp
)
endif()

View File

@@ -1,5 +1,5 @@
#
# Copyright (C) 2021-2023 Intel Corporation
# Copyright (C) 2021-2025 Intel Corporation
#
# SPDX-License-Identifier: MIT
#
@@ -12,16 +12,12 @@ set(NEO_SHARED_mt_tests_configurations
)
if(WIN32)
list(APPEND NEO_SHARED_mt_tests_configurations
${NEO_SHARED_TEST_DIRECTORY}/common/mocks/windows/gmm_memory${BRANCH_DIR_SUFFIX}mock_gmm_memory.h
${NEO_SHARED_TEST_DIRECTORY}/common/mocks/windows/mock_gmm_memory_base.cpp
${NEO_SHARED_TEST_DIRECTORY}/common/mocks/windows/mock_gmm_memory_base.h
${NEO_SHARED_TEST_DIRECTORY}/common/mocks/windows/create_mock_gmm_memory.cpp
${NEO_SHARED_TEST_DIRECTORY}/common/os_interface/windows/os_memory_virtual_alloc_ult.cpp
)
elseif(UNIX AND NOT DISABLE_WDDM_LINUX)
list(APPEND NEO_SHARED_mt_tests_configurations
${NEO_SHARED_TEST_DIRECTORY}/common/mocks/windows/gmm_memory/mock_gmm_memory.h
${NEO_SHARED_TEST_DIRECTORY}/common/mocks/windows/mock_gmm_memory_base.cpp
${NEO_SHARED_TEST_DIRECTORY}/common/mocks/windows/mock_gmm_memory_base.h
${NEO_SHARED_TEST_DIRECTORY}/common/mocks/windows/create_mock_gmm_memory.cpp
)
endif()
list(APPEND NEO_SHARED_mt_tests_configurations
@@ -36,14 +32,5 @@ target_include_directories(neo_mt_tests_config PRIVATE
$<TARGET_PROPERTY:${NEO_SHARED_MOCKABLE_LIB_NAME},INTERFACE_INCLUDE_DIRECTORIES>
$<TARGET_PROPERTY:gmock-gtest,INTERFACE_INCLUDE_DIRECTORIES>
)
if(WIN32)
target_include_directories(neo_mt_tests_config PRIVATE
${NEO_SHARED_TEST_DIRECTORY}/common/mocks/windows/gmm_memory${BRANCH_DIR_SUFFIX}
)
elseif(NOT DISABLE_WDDM_LINUX)
target_include_directories(neo_mt_tests_config PRIVATE
${NEO_SHARED_TEST_DIRECTORY}/common/mocks/windows/gmm_memory
)
endif()
target_compile_definitions(neo_mt_tests_config PRIVATE $<TARGET_PROPERTY:${NEO_SHARED_MOCKABLE_LIB_NAME},INTERFACE_COMPILE_DEFINITIONS>)
create_project_source_tree(neo_mt_tests_config)

View File

@@ -1,5 +1,5 @@
#
# Copyright (C) 2021-2022 Intel Corporation
# Copyright (C) 2021-2025 Intel Corporation
#
# SPDX-License-Identifier: MIT
#
@@ -12,16 +12,12 @@ set(NEO_SHARED_unit_tests_configurations
)
if(WIN32)
list(APPEND NEO_SHARED_unit_tests_configurations
${NEO_SHARED_TEST_DIRECTORY}/common/mocks/windows/gmm_memory${BRANCH_DIR_SUFFIX}mock_gmm_memory.h
${NEO_SHARED_TEST_DIRECTORY}/common/mocks/windows/mock_gmm_memory_base.cpp
${NEO_SHARED_TEST_DIRECTORY}/common/mocks/windows/mock_gmm_memory_base.h
${NEO_SHARED_TEST_DIRECTORY}/common/mocks/windows/create_mock_gmm_memory.cpp
${NEO_SHARED_TEST_DIRECTORY}/common/os_interface/windows/os_memory_virtual_alloc_ult.cpp
)
elseif(UNIX AND NOT DISABLE_WDDM_LINUX)
list(APPEND NEO_SHARED_unit_tests_configurations
${NEO_SHARED_TEST_DIRECTORY}/common/mocks/windows/gmm_memory/mock_gmm_memory.h
${NEO_SHARED_TEST_DIRECTORY}/common/mocks/windows/mock_gmm_memory_base.cpp
${NEO_SHARED_TEST_DIRECTORY}/common/mocks/windows/mock_gmm_memory_base.h
${NEO_SHARED_TEST_DIRECTORY}/common/mocks/windows/create_mock_gmm_memory.cpp
)
endif()
list(APPEND NEO_SHARED_unit_tests_configurations
@@ -36,14 +32,5 @@ target_include_directories(neo_unit_tests_config PRIVATE
$<TARGET_PROPERTY:${NEO_SHARED_MOCKABLE_LIB_NAME},INTERFACE_INCLUDE_DIRECTORIES>
$<TARGET_PROPERTY:gmock-gtest,INTERFACE_INCLUDE_DIRECTORIES>
)
if(WIN32)
target_include_directories(neo_unit_tests_config PRIVATE
${NEO_SHARED_TEST_DIRECTORY}/common/mocks/windows/gmm_memory${BRANCH_DIR_SUFFIX}
)
elseif(NOT DISABLE_WDDM_LINUX)
target_include_directories(neo_unit_tests_config PRIVATE
${NEO_SHARED_TEST_DIRECTORY}/common/mocks/windows/gmm_memory
)
endif()
target_compile_definitions(neo_unit_tests_config PRIVATE $<TARGET_PROPERTY:${NEO_SHARED_MOCKABLE_LIB_NAME},INTERFACE_COMPILE_DEFINITIONS>)
create_project_source_tree(neo_unit_tests_config)

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2022 Intel Corporation
* Copyright (C) 2020-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -11,7 +11,7 @@
#include "shared/source/os_interface/windows/gdi_interface.h"
#include "shared/test/common/mocks/mock_execution_environment.h"
#include "shared/test/common/mocks/mock_wddm.h"
#include "shared/test/common/mocks/windows/mock_gmm_memory_base.h"
#include "shared/test/common/mocks/windows/mock_gmm_memory.h"
#include "shared/test/common/os_interface/windows/gdi_dll_fixture.h"
#include "shared/test/common/test_macros/hw_test.h"

View File

@@ -6,6 +6,7 @@
*/
#include "shared/source/gmm_helper/gmm_helper.h"
#include "shared/source/gmm_helper/windows/gmm_memory.h"
#include "shared/source/helpers/hw_info.h"
#include "shared/source/memory_manager/gfx_partition.h"
#include "shared/source/os_interface/windows/gdi_interface.h"
@@ -20,8 +21,6 @@
#include "shared/test/common/mocks/mock_gmm.h"
#include "shared/test/common/mocks/mock_gmm_client_context.h"
#include "gmm_memory.h"
static uint32_t ccsMode = 1u;
struct MockWddmLinux : NEO::Wddm {

View File

@@ -6,6 +6,7 @@
*/
#include "shared/source/gmm_helper/gmm_helper.h"
#include "shared/source/gmm_helper/windows/gmm_memory.h"
#include "shared/source/helpers/surface_format_info.h"
#include "shared/source/memory_manager/gfx_partition.h"
#include "shared/source/os_interface/linux/os_time_linux.h"
@@ -24,8 +25,6 @@
#include "shared/test/common/mocks/mock_gmm_client_context.h"
#include "shared/test/common/test_macros/hw_test.h"
#include "gmm_memory.h"
struct MockWddmLinux : NEO::Wddm {
MockWddmLinux(std::unique_ptr<NEO::HwDeviceIdWddm> hwDeviceId, NEO::RootDeviceEnvironment &rootDeviceEnvironment)
: NEO::Wddm(std::move(hwDeviceId), rootDeviceEnvironment) {

View File

@@ -19,7 +19,7 @@
#include "shared/test/common/mocks/mock_memory_manager.h"
#include "shared/test/common/mocks/mock_wddm_residency_logger.h"
#include "shared/test/common/mocks/windows/mock_gdi_interface.h"
#include "shared/test/common/mocks/windows/mock_gmm_memory_base.h"
#include "shared/test/common/mocks/windows/mock_gmm_memory.h"
#include "shared/test/common/mocks/windows/mock_wddm_allocation.h"
#include "shared/test/common/os_interface/windows/ult_dxcore_factory.h"
#include "shared/test/common/os_interface/windows/wddm_fixture.h"
@@ -1492,7 +1492,7 @@ TEST_F(Wddm20WithMockGdiDllTests, WhenDestroyingSeparateMonitorFenceThenExpectGd
TEST_F(Wddm20WithMockGdiDllTests, whenSetDeviceInfoFailsThenDeviceIsNotConfigured) {
auto mockGmmMemory = new MockGmmMemoryBase(getGmmClientContext());
auto mockGmmMemory = new MockGmmMemory(getGmmClientContext());
mockGmmMemory->setDeviceInfoResult = false;
wddm->gmmMemory.reset(mockGmmMemory);
@@ -1505,7 +1505,7 @@ HWTEST_F(Wddm20WithMockGdiDllTests, givenNonGen12LPPlatformWhenConfigureDeviceAd
if (defaultHwInfo->platform.eRenderCoreFamily == IGFX_GEN12LP_CORE) {
GTEST_SKIP();
}
auto gmmMemory = new MockGmmMemoryBase(getGmmClientContext());
auto gmmMemory = new MockGmmMemory(getGmmClientContext());
wddm->gmmMemory.reset(gmmMemory);
wddm->init();

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2022 Intel Corporation
* Copyright (C) 2022-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -18,7 +18,7 @@ using WddmTests = WddmTestWithMockGdiDll;
TEST_F(WddmTests, whenInitializingWddmThenSetMinAddressToCorrectValue) {
constexpr static uintptr_t mockedInternalGpuVaRange = 0x9876u;
auto gmmMemory = new MockGmmMemoryBase(wddm->rootDeviceEnvironment.getGmmClientContext());
auto gmmMemory = new MockGmmMemory(wddm->rootDeviceEnvironment.getGmmClientContext());
gmmMemory->overrideInternalGpuVaRangeLimit(mockedInternalGpuVaRange);
wddm->gmmMemory.reset(gmmMemory);

View File

@@ -21,7 +21,7 @@
#include "shared/test/common/mocks/mock_memory_manager.h"
#include "shared/test/common/mocks/mock_wddm_residency_logger.h"
#include "shared/test/common/mocks/windows/mock_gdi_interface.h"
#include "shared/test/common/mocks/windows/mock_gmm_memory_base.h"
#include "shared/test/common/mocks/windows/mock_gmm_memory.h"
#include "shared/test/common/mocks/windows/mock_wddm_allocation.h"
#include "shared/test/common/os_interface/windows/ult_dxcore_factory.h"
#include "shared/test/common/os_interface/windows/wddm_fixture.h"
@@ -189,7 +189,7 @@ TEST_F(Wddm20WithMockGdiDllTests, givenDefaultScenarioWhenSetDeviceInfoSucceedsT
GMM_DEVICE_CALLBACKS_INT expectedDeviceCb{};
wddm->init();
auto gdi = wddm->getGdi();
auto gmmMemory = static_cast<MockGmmMemoryBase *>(wddm->getGmmMemory());
auto gmmMemory = static_cast<MockGmmMemory *>(wddm->getGmmMemory());
expectedDeviceCb.Adapter.KmtHandle = wddm->getAdapter();
expectedDeviceCb.hDevice.KmtHandle = wddm->getDeviceHandle();
@@ -240,7 +240,7 @@ TEST_F(Wddm20WithMockGdiDllTests, givenHwWithAubCaptureWhenSetDeviceInfoSucceeds
GMM_DEVICE_CALLBACKS_INT expectedDeviceCb{};
wddm->init();
auto gdi = wddm->getGdi();
auto gmmMemory = static_cast<MockGmmMemoryBase *>(wddm->getGmmMemory());
auto gmmMemory = static_cast<MockGmmMemory *>(wddm->getGmmMemory());
expectedDeviceCb.Adapter.KmtHandle = wddm->getAdapter();
expectedDeviceCb.hDevice.KmtHandle = wddm->getDeviceHandle();
@@ -285,16 +285,16 @@ TEST_F(Wddm20WithMockGdiDllTests, givenHwWithAubCaptureWhenSetDeviceInfoSucceeds
EXPECT_NE(nullptr, gmmMemory->deviceCallbacks.DevCbPtrs.KmtCbPtrs.pfnNotifyAubCapture);
}
class MockGmmMemoryWindows : public MockGmmMemoryBase {
class MockGmmMemoryWindows : public MockGmmMemory {
public:
using MockGmmMemoryBase::MockGmmMemoryBase;
using MockGmmMemory::MockGmmMemory;
bool setDeviceInfo(GMM_DEVICE_INFO *deviceInfo) override {
for (int i = 0; i < 3; i++) {
segmentId[i] = deviceInfo->MsSegId[i];
}
adapterLocalMemory = deviceInfo->AdapterLocalMemory;
adapterCpuVisibleMemory = deviceInfo->AdapterCpuVisibleLocalMemory;
return MockGmmMemoryBase::setDeviceInfo(deviceInfo);
return MockGmmMemory::setDeviceInfo(deviceInfo);
}
uint64_t adapterLocalMemory = 0;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2023 Intel Corporation
* Copyright (C) 2020-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -11,7 +11,7 @@
#include "shared/source/xe_hpg_core/hw_cmds_dg2.h"
#include "shared/test/common/helpers/debug_manager_state_restore.h"
#include "shared/test/common/mocks/mock_wddm.h"
#include "shared/test/common/mocks/windows/mock_gmm_memory_base.h"
#include "shared/test/common/mocks/windows/mock_gmm_memory.h"
#include "shared/test/common/os_interface/windows/gdi_dll_fixture.h"
#include "shared/test/common/os_interface/windows/mock_wddm_memory_manager.h"
#include "shared/test/common/test_macros/hw_test.h"
@@ -27,7 +27,7 @@ DG2TEST_F(Dg2WddmTest, givenG10A0WhenGettingLocalMemoryAccessModeThenCorrectValu
RootDeviceEnvironment *rootDeviceEnvironment = executionEnvironment.rootDeviceEnvironments[0].get();
rootDeviceEnvironment->initGmm();
WddmMock *wddm = static_cast<WddmMock *>(Wddm::createWddm(nullptr, *rootDeviceEnvironment));
MockGmmMemoryBase *gmmMemory = new MockGmmMemoryBase(rootDeviceEnvironment->getGmmClientContext());
MockGmmMemory *gmmMemory = new MockGmmMemory(rootDeviceEnvironment->getGmmClientContext());
rootDeviceEnvironment->osInterface = std::make_unique<OSInterface>();
rootDeviceEnvironment->osInterface->setDriverModel(std::unique_ptr<DriverModel>(wddm));
wddm->init();
@@ -63,7 +63,7 @@ DG2TEST_F(Dg2WddmTest, givenG10B0WhenGettingLocalMemoryAccessModeThenCorrectValu
RootDeviceEnvironment *rootDeviceEnvironment = executionEnvironment.rootDeviceEnvironments[0].get();
rootDeviceEnvironment->initGmm();
WddmMock *wddm = static_cast<WddmMock *>(Wddm::createWddm(nullptr, *rootDeviceEnvironment));
MockGmmMemoryBase *gmmMemory = new MockGmmMemoryBase(rootDeviceEnvironment->getGmmClientContext());
MockGmmMemory *gmmMemory = new MockGmmMemory(rootDeviceEnvironment->getGmmClientContext());
rootDeviceEnvironment->osInterface = std::make_unique<OSInterface>();
rootDeviceEnvironment->osInterface->setDriverModel(std::unique_ptr<DriverModel>(wddm));
wddm->init();
@@ -102,7 +102,7 @@ DG2TEST_F(Dg2WddmTest, givenG11WhenGettingLocalMemoryAccessModeThenCorrectValueI
RootDeviceEnvironment *rootDeviceEnvironment = executionEnvironment.rootDeviceEnvironments[0].get();
rootDeviceEnvironment->initGmm();
WddmMock *wddm = static_cast<WddmMock *>(Wddm::createWddm(nullptr, *rootDeviceEnvironment));
MockGmmMemoryBase *gmmMemory = new MockGmmMemoryBase(rootDeviceEnvironment->getGmmClientContext());
MockGmmMemory *gmmMemory = new MockGmmMemory(rootDeviceEnvironment->getGmmClientContext());
rootDeviceEnvironment->osInterface = std::make_unique<OSInterface>();
rootDeviceEnvironment->osInterface->setDriverModel(std::unique_ptr<DriverModel>(wddm));
wddm->init();
@@ -141,7 +141,7 @@ DG2TEST_F(Dg2WddmTest, givenG12WhenGettingLocalMemoryAccessModeThenCorrectValueI
RootDeviceEnvironment *rootDeviceEnvironment = executionEnvironment.rootDeviceEnvironments[0].get();
rootDeviceEnvironment->initGmm();
WddmMock *wddm = static_cast<WddmMock *>(Wddm::createWddm(nullptr, *rootDeviceEnvironment));
MockGmmMemoryBase *gmmMemory = new MockGmmMemoryBase(rootDeviceEnvironment->getGmmClientContext());
MockGmmMemory *gmmMemory = new MockGmmMemory(rootDeviceEnvironment->getGmmClientContext());
rootDeviceEnvironment->osInterface = std::make_unique<OSInterface>();
rootDeviceEnvironment->osInterface->setDriverModel(std::unique_ptr<DriverModel>(wddm));
wddm->init();