diff --git a/CMakeLists.txt b/CMakeLists.txt index 618f67fe82..9a33b572c3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -938,15 +938,9 @@ include_directories(${NEO_SHARED_DIRECTORY}/kernel/definitions${BRANCH_DIR_SUFFI include_directories(${NEO_SHARED_DIRECTORY}/gen_common${BRANCH_DIR_SUFFIX}) include_directories(${NEO_SHARED_DIRECTORY}/gmm_helper/${DRIVER_MODEL}) if(WIN32) - include_directories(${NEO_SHARED_DIRECTORY}/gmm_helper/windows/gmm_memory${BRANCH_DIR_SUFFIX}) include_directories(${NEO_SHARED_DIRECTORY}/os_interface/windows/wddm/definitions) else() - include_directories(${NEO_LINUX_KMD_HEADERS_DIR} - ${NEO_SHARED_DIRECTORY}/gmm_helper/windows/gmm_memory - ) - if("${BRANCH_TYPE}" STREQUAL "") - include_directories(${NEO_SOURCE_DIR}/third_party/uapi/prelim) - endif() + include_directories(${NEO_LINUX_KMD_HEADERS_DIR}) if(NOT DISABLE_WDDM_LINUX) include_directories(${NEO_SHARED_DIRECTORY}/os_interface/linux/wddm_linux/definitions) endif() diff --git a/level_zero/CMakeLists.txt b/level_zero/CMakeLists.txt index 860f899ae7..f085158d4a 100644 --- a/level_zero/CMakeLists.txt +++ b/level_zero/CMakeLists.txt @@ -251,8 +251,7 @@ if(BUILD_WITH_L0) ${NEO_SHARED_DIRECTORY}/dll/wddm/wddm_create.cpp ${NEO_SHARED_DIRECTORY}/dll/windows/debugger_l0_windows.cpp ${NEO_SHARED_DIRECTORY}/dll/windows${BRANCH_DIR_SUFFIX}/options_windows.cpp - ${NEO_SHARED_DIRECTORY}/gmm_helper/windows/gmm_memory_base.cpp - ${NEO_SHARED_DIRECTORY}/gmm_helper/windows/gmm_memory.cpp + ${NEO_SHARED_DIRECTORY}/gmm_helper/windows/create_gmm_memory.cpp ${NEO_SHARED_DIRECTORY}/os_interface/windows/gmm_interface_win.cpp ${NEO_SHARED_DIRECTORY}/os_interface/windows/sys_calls.cpp ${NEO_SHARED_DIRECTORY}/os_interface/windows/sys_calls_winmm.cpp @@ -282,7 +281,7 @@ if(BUILD_WITH_L0) if(NOT DISABLE_WDDM_LINUX) target_sources(${TARGET_NAME_L0} PRIVATE - ${NEO_SHARED_DIRECTORY}/gmm_helper/windows/gmm_memory.cpp + ${NEO_SHARED_DIRECTORY}/gmm_helper/windows/create_gmm_memory.cpp ${NEO_SHARED_DIRECTORY}/dll/wddm/wddm_create.cpp ${NEO_SHARED_DIRECTORY}/dll/wddm/create_gdi.cpp ) diff --git a/opencl/source/dll/CMakeLists.txt b/opencl/source/dll/CMakeLists.txt index 0a8dbf1cef..09253ab8e9 100644 --- a/opencl/source/dll/CMakeLists.txt +++ b/opencl/source/dll/CMakeLists.txt @@ -65,7 +65,7 @@ set(RUNTIME_SRCS_DLL_WINDOWS ${NEO_SHARED_DIRECTORY}/dll/windows/debugger_l0_windows.cpp ${NEO_SHARED_DIRECTORY}/dll/windows${BRANCH_DIR_SUFFIX}/options_windows.cpp ${NEO_SHARED_DIRECTORY}/dll/windows/options_windows.inl - ${NEO_SHARED_DIRECTORY}/gmm_helper/windows/gmm_memory.cpp + ${NEO_SHARED_DIRECTORY}/gmm_helper/windows/create_gmm_memory.cpp ${NEO_SHARED_DIRECTORY}/os_interface/windows/os_memory_virtual_alloc.cpp ${NEO_SHARED_DIRECTORY}/os_interface/windows/sys_calls.cpp ${NEO_SHARED_DIRECTORY}/os_interface/windows/sys_calls_winmm.cpp @@ -77,7 +77,7 @@ set(RUNTIME_SRCS_DLL_WINDOWS if(NOT DISABLE_WDDM_LINUX) list(APPEND RUNTIME_SRCS_DLL_LINUX - ${NEO_SHARED_DIRECTORY}/gmm_helper/windows/gmm_memory.cpp + ${NEO_SHARED_DIRECTORY}/gmm_helper/windows/create_gmm_memory.cpp ${NEO_SHARED_DIRECTORY}/dll/wddm/wddm_create.cpp ${NEO_SHARED_DIRECTORY}/dll/wddm/create_gdi.cpp ) diff --git a/opencl/test/unit_test/CMakeLists.txt b/opencl/test/unit_test/CMakeLists.txt index af510a9ef6..3aed9584d8 100644 --- a/opencl/test/unit_test/CMakeLists.txt +++ b/opencl/test/unit_test/CMakeLists.txt @@ -97,12 +97,6 @@ target_include_directories(igdrcl_tests PRIVATE ${KHRONOS_GL_HEADERS_DIR} ${NEO_SHARED_TEST_DIRECTORY}/common/test_configuration/unit_tests ) -if(WIN32) - target_include_directories(igdrcl_tests PRIVATE - ${NEO_SHARED_TEST_DIRECTORY}/common/mocks/windows/gmm_memory${BRANCH_DIR_SUFFIX} - ) -endif() - target_link_libraries(igdrcl_tests gmock-gtest ${NEO_EXTRA_LIBS}) set(BUILT_IN_KERNEL_DIR "${NEO_SOURCE_DIR}/shared/source/built_ins") diff --git a/shared/source/gmm_helper/CMakeLists.txt b/shared/source/gmm_helper/CMakeLists.txt index b8a060d723..1ba96e3bc3 100644 --- a/shared/source/gmm_helper/CMakeLists.txt +++ b/shared/source/gmm_helper/CMakeLists.txt @@ -30,16 +30,9 @@ set(NEO_CORE_GMM_HELPER ${CMAKE_CURRENT_SOURCE_DIR}/resource_info_impl.cpp ) -set(NEO_CORE_GMM_HELPER_WINDOWS - ${CMAKE_CURRENT_SOURCE_DIR}/windows/gmm_memory${BRANCH_DIR_SUFFIX}gmm_memory.h - ${CMAKE_CURRENT_SOURCE_DIR}/windows/gmm_memory_base.h - ${CMAKE_CURRENT_SOURCE_DIR}/windows/gmm_memory_base.cpp -) - if(NOT ${DRIVER_MODEL} STREQUAL "drm") list(APPEND NEO_CORE_GMM_HELPER ${CMAKE_CURRENT_SOURCE_DIR}/windows/gmm_configure_device_address_space_${DRIVER_MODEL}.cpp) endif() set_property(GLOBAL PROPERTY NEO_CORE_GMM_HELPER ${NEO_CORE_GMM_HELPER}) -set_property(GLOBAL PROPERTY NEO_CORE_GMM_HELPER_WINDOWS ${NEO_CORE_GMM_HELPER_WINDOWS}) add_subdirectories() diff --git a/shared/source/gmm_helper/windows/CMakeLists.txt b/shared/source/gmm_helper/windows/CMakeLists.txt index cef68e2de8..24507e53a9 100644 --- a/shared/source/gmm_helper/windows/CMakeLists.txt +++ b/shared/source/gmm_helper/windows/CMakeLists.txt @@ -1,7 +1,13 @@ # -# Copyright (C) 2021 Intel Corporation +# Copyright (C) 2021-2025 Intel Corporation # # SPDX-License-Identifier: MIT # +set(NEO_CORE_GMM_HELPER_WINDOWS + ${CMAKE_CURRENT_SOURCE_DIR}/gmm_memory.h + ${CMAKE_CURRENT_SOURCE_DIR}/gmm_memory.cpp +) + add_subdirectories() +set_property(GLOBAL APPEND PROPERTY NEO_CORE_GMM_HELPER_WINDOWS ${NEO_CORE_GMM_HELPER_WINDOWS}) diff --git a/shared/source/gmm_helper/windows/create_gmm_memory.cpp b/shared/source/gmm_helper/windows/create_gmm_memory.cpp new file mode 100644 index 0000000000..4ea1e01eea --- /dev/null +++ b/shared/source/gmm_helper/windows/create_gmm_memory.cpp @@ -0,0 +1,14 @@ +/* + * Copyright (C) 2018-2025 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +#include "shared/source/gmm_helper/windows/gmm_memory.h" + +namespace NEO { +GmmMemory *GmmMemory::create(GmmClientContext *gmmClientContext) { + return new GmmMemory(gmmClientContext); +} +} // namespace NEO diff --git a/shared/source/gmm_helper/windows/gmm_configure_device_address_space_drm_or_wddm.cpp b/shared/source/gmm_helper/windows/gmm_configure_device_address_space_drm_or_wddm.cpp index 9e208f8d3c..07a87c3b52 100644 --- a/shared/source/gmm_helper/windows/gmm_configure_device_address_space_drm_or_wddm.cpp +++ b/shared/source/gmm_helper/windows/gmm_configure_device_address_space_drm_or_wddm.cpp @@ -1,22 +1,19 @@ /* - * Copyright (C) 2021 Intel Corporation + * Copyright (C) 2021-2025 Intel Corporation * * SPDX-License-Identifier: MIT * */ -#include "shared/source/gmm_helper/client_context/gmm_client_context.h" -#include "shared/source/gmm_helper/windows/gmm_memory_base.h" -#include "shared/source/helpers/debug_helpers.h" -#include "shared/source/os_interface/windows/windows_defs.h" +#include "shared/source/gmm_helper/windows/gmm_memory.h" namespace NEO { -bool GmmMemoryBase::configureDeviceAddressSpace(GMM_ESCAPE_HANDLE hAdapter, - GMM_ESCAPE_HANDLE hDevice, - GMM_ESCAPE_FUNC_TYPE pfnEscape, - GMM_GFX_SIZE_T svmSize, - BOOLEAN bdwL3Coherency) { +bool GmmMemory::configureDeviceAddressSpace(GMM_ESCAPE_HANDLE hAdapter, + GMM_ESCAPE_HANDLE hDevice, + GMM_ESCAPE_FUNC_TYPE pfnEscape, + GMM_GFX_SIZE_T svmSize, + BOOLEAN bdwL3Coherency) { return true; } diff --git a/shared/source/gmm_helper/windows/gmm_configure_device_address_space_wddm.cpp b/shared/source/gmm_helper/windows/gmm_configure_device_address_space_wddm.cpp index 2d86fc88e5..03e7f7ce16 100644 --- a/shared/source/gmm_helper/windows/gmm_configure_device_address_space_wddm.cpp +++ b/shared/source/gmm_helper/windows/gmm_configure_device_address_space_wddm.cpp @@ -1,21 +1,21 @@ /* - * Copyright (C) 2021-2022 Intel Corporation + * Copyright (C) 2021-2025 Intel Corporation * * SPDX-License-Identifier: MIT * */ #include "shared/source/gmm_helper/client_context/gmm_client_context.h" -#include "shared/source/gmm_helper/windows/gmm_memory_base.h" +#include "shared/source/gmm_helper/windows/gmm_memory.h" #include "shared/source/os_interface/windows/windows_defs.h" namespace NEO { -bool GmmMemoryBase::configureDeviceAddressSpace(GMM_ESCAPE_HANDLE hAdapter, - GMM_ESCAPE_HANDLE hDevice, - GMM_ESCAPE_FUNC_TYPE pfnEscape, - GMM_GFX_SIZE_T svmSize, - BOOLEAN bdwL3Coherency) { +bool GmmMemory::configureDeviceAddressSpace(GMM_ESCAPE_HANDLE hAdapter, + GMM_ESCAPE_HANDLE hDevice, + GMM_ESCAPE_FUNC_TYPE pfnEscape, + GMM_GFX_SIZE_T svmSize, + BOOLEAN bdwL3Coherency) { return clientContext.ConfigureDeviceAddressSpace( {hAdapter}, {hDevice}, diff --git a/shared/source/gmm_helper/windows/gmm_memory.cpp b/shared/source/gmm_helper/windows/gmm_memory.cpp index cf778a62ee..d0c582ded3 100644 --- a/shared/source/gmm_helper/windows/gmm_memory.cpp +++ b/shared/source/gmm_helper/windows/gmm_memory.cpp @@ -1,14 +1,41 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2025 Intel Corporation * * SPDX-License-Identifier: MIT * */ -#include "gmm_memory.h" +#include "shared/source/gmm_helper/windows/gmm_memory.h" + +#include "shared/source/gmm_helper/client_context/gmm_client_context.h" +#include "shared/source/helpers/debug_helpers.h" +#include "shared/source/os_interface/windows/windows_defs.h" namespace NEO { -GmmMemory *GmmMemory::create(GmmClientContext *gmmClientContext) { - return new GmmMemory(gmmClientContext); +GmmMemory::GmmMemory(GmmClientContext *gmmClientContext) : clientContext(*gmmClientContext->getHandle()) { } -} // namespace NEO + +bool GmmMemory::configureDevice(GMM_ESCAPE_HANDLE hAdapter, + GMM_ESCAPE_HANDLE hDevice, + GMM_ESCAPE_FUNC_TYPE pfnEscape, + GMM_GFX_SIZE_T svmSize, + BOOLEAN bdwL3Coherency, + uintptr_t &minAddress, + bool obtainMinAddress) { + minAddress = windowsMinAddress; + auto retVal = configureDeviceAddressSpace(hAdapter, hDevice, pfnEscape, svmSize, bdwL3Coherency); + if (obtainMinAddress) { + minAddress = getInternalGpuVaRangeLimit(); + } + return retVal; +} +uintptr_t GmmMemory::getInternalGpuVaRangeLimit() { + return static_cast(clientContext.GetInternalGpuVaRangeLimit()); +} + +bool GmmMemory::setDeviceInfo(GMM_DEVICE_INFO *deviceInfo) { + auto status = clientContext.GmmSetDeviceInfo(deviceInfo); + DEBUG_BREAK_IF(status != GMM_SUCCESS); + return GMM_SUCCESS == status; +} +}; // namespace NEO diff --git a/shared/source/gmm_helper/windows/gmm_memory_base.h b/shared/source/gmm_helper/windows/gmm_memory.h similarity index 83% rename from shared/source/gmm_helper/windows/gmm_memory_base.h rename to shared/source/gmm_helper/windows/gmm_memory.h index 50c6711990..8813d88a00 100644 --- a/shared/source/gmm_helper/windows/gmm_memory_base.h +++ b/shared/source/gmm_helper/windows/gmm_memory.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2023 Intel Corporation + * Copyright (C) 2018-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -10,9 +10,10 @@ namespace NEO { class GmmClientContext; -class GmmMemoryBase { +class GmmMemory { public: - virtual ~GmmMemoryBase() = default; + static GmmMemory *create(GmmClientContext *gmmClientContext); + virtual ~GmmMemory() = default; MOCKABLE_VIRTUAL bool configureDeviceAddressSpace(GMM_ESCAPE_HANDLE hAdapter, GMM_ESCAPE_HANDLE hDevice, @@ -33,7 +34,7 @@ class GmmMemoryBase { MOCKABLE_VIRTUAL bool setDeviceInfo(GMM_DEVICE_INFO *deviceInfo); protected: - GmmMemoryBase(GmmClientContext *gmmClientContext); + GmmMemory(GmmClientContext *gmmClientContext); GMM_CLIENT_CONTEXT &clientContext; }; } // namespace NEO diff --git a/shared/source/gmm_helper/windows/gmm_memory/gmm_memory.h b/shared/source/gmm_helper/windows/gmm_memory/gmm_memory.h deleted file mode 100644 index b324accb50..0000000000 --- a/shared/source/gmm_helper/windows/gmm_memory/gmm_memory.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) 2020-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once -#include "shared/source/gmm_helper/windows/gmm_memory_base.h" - -namespace NEO { -class GmmMemory : public GmmMemoryBase { - public: - static GmmMemory *create(GmmClientContext *gmmClientContext); - ~GmmMemory() override = default; - - protected: - using GmmMemoryBase::GmmMemoryBase; -}; -} // namespace NEO diff --git a/shared/source/gmm_helper/windows/gmm_memory_base.cpp b/shared/source/gmm_helper/windows/gmm_memory_base.cpp deleted file mode 100644 index e5f8ac19e8..0000000000 --- a/shared/source/gmm_helper/windows/gmm_memory_base.cpp +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (C) 2018-2021 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gmm_helper/windows/gmm_memory_base.h" - -#include "shared/source/gmm_helper/client_context/gmm_client_context.h" -#include "shared/source/helpers/debug_helpers.h" -#include "shared/source/os_interface/windows/windows_defs.h" - -namespace NEO { -GmmMemoryBase::GmmMemoryBase(GmmClientContext *gmmClientContext) : clientContext(*gmmClientContext->getHandle()) { -} - -bool GmmMemoryBase::configureDevice(GMM_ESCAPE_HANDLE hAdapter, - GMM_ESCAPE_HANDLE hDevice, - GMM_ESCAPE_FUNC_TYPE pfnEscape, - GMM_GFX_SIZE_T svmSize, - BOOLEAN bdwL3Coherency, - uintptr_t &minAddress, - bool obtainMinAddress) { - minAddress = windowsMinAddress; - auto retVal = configureDeviceAddressSpace(hAdapter, hDevice, pfnEscape, svmSize, bdwL3Coherency); - if (obtainMinAddress) { - minAddress = getInternalGpuVaRangeLimit(); - } - return retVal; -} -uintptr_t GmmMemoryBase::getInternalGpuVaRangeLimit() { - return static_cast(clientContext.GetInternalGpuVaRangeLimit()); -} - -bool GmmMemoryBase::setDeviceInfo(GMM_DEVICE_INFO *deviceInfo) { - auto status = clientContext.GmmSetDeviceInfo(deviceInfo); - DEBUG_BREAK_IF(status != GMM_SUCCESS); - return GMM_SUCCESS == status; -} -}; // namespace NEO diff --git a/shared/source/os_interface/windows/wddm/configure_device_address_space_drm_or_wddm.cpp b/shared/source/os_interface/windows/wddm/configure_device_address_space_drm_or_wddm.cpp index 6eda726d3d..d73413bce3 100644 --- a/shared/source/os_interface/windows/wddm/configure_device_address_space_drm_or_wddm.cpp +++ b/shared/source/os_interface/windows/wddm/configure_device_address_space_drm_or_wddm.cpp @@ -13,6 +13,7 @@ #include "shared/source/gmm_helper/gmm_helper.h" #include "shared/source/gmm_helper/page_table_mngr.h" #include "shared/source/gmm_helper/resource_info.h" +#include "shared/source/gmm_helper/windows/gmm_memory.h" #include "shared/source/helpers/aligned_memory.h" #include "shared/source/helpers/hw_info.h" #include "shared/source/memory_manager/gfx_partition.h" @@ -24,8 +25,6 @@ #include "shared/source/os_interface/windows/wddm/um_km_data_translator.h" #include "shared/source/os_interface/windows/wddm/wddm.h" -#include "gmm_memory.h" - namespace NEO { struct GfxSynchPartitionInfoEscapeHeader { diff --git a/shared/source/os_interface/windows/wddm/configure_device_address_space_wddm.cpp b/shared/source/os_interface/windows/wddm/configure_device_address_space_wddm.cpp index c68eb5503d..ef349728d6 100644 --- a/shared/source/os_interface/windows/wddm/configure_device_address_space_wddm.cpp +++ b/shared/source/os_interface/windows/wddm/configure_device_address_space_wddm.cpp @@ -7,13 +7,12 @@ #include "shared/source/execution_environment/root_device_environment.h" #include "shared/source/gmm_helper/gmm_callbacks.h" +#include "shared/source/gmm_helper/windows/gmm_memory.h" #include "shared/source/helpers/constants.h" #include "shared/source/helpers/hw_info.h" #include "shared/source/os_interface/windows/gdi_interface.h" #include "shared/source/os_interface/windows/wddm/wddm.h" -#include "gmm_memory.h" - namespace NEO { bool Wddm::configureDeviceAddressSpace() { diff --git a/shared/source/os_interface/windows/wddm/wddm.cpp b/shared/source/os_interface/windows/wddm/wddm.cpp index ab57c1f955..433f14f868 100644 --- a/shared/source/os_interface/windows/wddm/wddm.cpp +++ b/shared/source/os_interface/windows/wddm/wddm.cpp @@ -17,6 +17,7 @@ #include "shared/source/gmm_helper/gmm_helper.h" #include "shared/source/gmm_helper/page_table_mngr.h" #include "shared/source/gmm_helper/resource_info.h" +#include "shared/source/gmm_helper/windows/gmm_memory.h" #include "shared/source/helpers/api_specific_config.h" #include "shared/source/helpers/compiler_product_helper.h" #include "shared/source/helpers/gfx_core_helper.h" @@ -43,8 +44,6 @@ #include "shared/source/os_interface/windows/wddm_residency_allocations_container.h" #include "shared/source/sku_info/operations/windows/sku_info_receiver.h" -#include "gmm_memory.h" - namespace NEO { extern Wddm::CreateDXGIFactoryFcn getCreateDxgiFactory(); extern Wddm::DXCoreCreateAdapterFactoryFcn getDXCoreCreateAdapterFactory(); diff --git a/shared/test/common/mocks/CMakeLists.txt b/shared/test/common/mocks/CMakeLists.txt index 756c89db91..d995d00983 100644 --- a/shared/test/common/mocks/CMakeLists.txt +++ b/shared/test/common/mocks/CMakeLists.txt @@ -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 diff --git a/shared/test/common/mocks/windows/mock_gmm_memory_base.cpp b/shared/test/common/mocks/windows/create_mock_gmm_memory.cpp similarity index 65% rename from shared/test/common/mocks/windows/mock_gmm_memory_base.cpp rename to shared/test/common/mocks/windows/create_mock_gmm_memory.cpp index 0373b16f55..3697005b56 100644 --- a/shared/test/common/mocks/windows/mock_gmm_memory_base.cpp +++ b/shared/test/common/mocks/windows/create_mock_gmm_memory.cpp @@ -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) { diff --git a/shared/test/common/mocks/windows/gmm_memory/mock_gmm_memory.h b/shared/test/common/mocks/windows/gmm_memory/mock_gmm_memory.h deleted file mode 100644 index 76d67ec9b8..0000000000 --- a/shared/test/common/mocks/windows/gmm_memory/mock_gmm_memory.h +++ /dev/null @@ -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 diff --git a/shared/test/common/mocks/windows/mock_gmm_memory.cpp b/shared/test/common/mocks/windows/mock_gmm_memory.cpp new file mode 100644 index 0000000000..2e03c39abb --- /dev/null +++ b/shared/test/common/mocks/windows/mock_gmm_memory.cpp @@ -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 diff --git a/shared/test/common/mocks/windows/mock_gmm_memory_base.h b/shared/test/common/mocks/windows/mock_gmm_memory.h similarity index 57% rename from shared/test/common/mocks/windows/mock_gmm_memory_base.h rename to shared/test/common/mocks/windows/mock_gmm_memory.h index 7616cfbac9..633737e97a 100644 --- a/shared/test/common/mocks/windows/mock_gmm_memory_base.h +++ b/shared/test/common/mocks/windows/mock_gmm_memory.h @@ -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 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; diff --git a/shared/test/common/os_interface/windows/wddm_fixture.h b/shared/test/common/os_interface/windows/wddm_fixture.h index b9b436a5f3..3f49d40965 100644 --- a/shared/test/common/os_interface/windows/wddm_fixture.h +++ b/shared/test/common/os_interface/windows/wddm_fixture.h @@ -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(Wddm::createWddm(nullptr, *rootDeviceEnvironment)); - gmmMem = new MockGmmMemoryBase(rootDeviceEnvironment->getGmmClientContext()); + gmmMem = new MockGmmMemory(rootDeviceEnvironment->getGmmClientContext()); wddm->gmmMemory.reset(gmmMem); rootDeviceEnvironment->osInterface = std::make_unique(); rootDeviceEnvironment->osInterface->setDriverModel(std::unique_ptr(wddm)); @@ -202,7 +202,7 @@ struct WddmInstrumentationGmmFixture : DeviceFixture { } WddmMock *wddm; - MockGmmMemoryBase *gmmMem = nullptr; + MockGmmMemory *gmmMem = nullptr; ExecutionEnvironment *executionEnvironment; }; diff --git a/shared/test/common/test_configuration/aub_tests/CMakeLists.txt b/shared/test/common/test_configuration/aub_tests/CMakeLists.txt index 7262feda83..27601b464e 100644 --- a/shared/test/common/test_configuration/aub_tests/CMakeLists.txt +++ b/shared/test/common/test_configuration/aub_tests/CMakeLists.txt @@ -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() diff --git a/shared/test/common/test_configuration/mt_tests/CMakeLists.txt b/shared/test/common/test_configuration/mt_tests/CMakeLists.txt index 4cddb6a792..4a5a756b06 100644 --- a/shared/test/common/test_configuration/mt_tests/CMakeLists.txt +++ b/shared/test/common/test_configuration/mt_tests/CMakeLists.txt @@ -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 $ $ ) -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 $) create_project_source_tree(neo_mt_tests_config) diff --git a/shared/test/common/test_configuration/unit_tests/CMakeLists.txt b/shared/test/common/test_configuration/unit_tests/CMakeLists.txt index e6bb17c338..b027681391 100644 --- a/shared/test/common/test_configuration/unit_tests/CMakeLists.txt +++ b/shared/test/common/test_configuration/unit_tests/CMakeLists.txt @@ -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 $ $ ) -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 $) create_project_source_tree(neo_unit_tests_config) diff --git a/shared/test/unit_test/gen12lp/windows/wddm_tests_gen12lp.cpp b/shared/test/unit_test/gen12lp/windows/wddm_tests_gen12lp.cpp index 72b218abe2..eb5dc862c3 100644 --- a/shared/test/unit_test/gen12lp/windows/wddm_tests_gen12lp.cpp +++ b/shared/test/unit_test/gen12lp/windows/wddm_tests_gen12lp.cpp @@ -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" diff --git a/shared/test/unit_test/os_interface/wddm_linux/ccs_mode_drm_or_wddm_test.cpp b/shared/test/unit_test/os_interface/wddm_linux/ccs_mode_drm_or_wddm_test.cpp index 00d90f8591..ffdc90ac9f 100644 --- a/shared/test/unit_test/os_interface/wddm_linux/ccs_mode_drm_or_wddm_test.cpp +++ b/shared/test/unit_test/os_interface/wddm_linux/ccs_mode_drm_or_wddm_test.cpp @@ -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 { diff --git a/shared/test/unit_test/os_interface/wddm_linux/configure_device_address_space_drm_or_wddm_test.cpp b/shared/test/unit_test/os_interface/wddm_linux/configure_device_address_space_drm_or_wddm_test.cpp index 44fa3d5bbb..908c711e24 100644 --- a/shared/test/unit_test/os_interface/wddm_linux/configure_device_address_space_drm_or_wddm_test.cpp +++ b/shared/test/unit_test/os_interface/wddm_linux/configure_device_address_space_drm_or_wddm_test.cpp @@ -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 hwDeviceId, NEO::RootDeviceEnvironment &rootDeviceEnvironment) : NEO::Wddm(std::move(hwDeviceId), rootDeviceEnvironment) { diff --git a/shared/test/unit_test/os_interface/windows/wddm20_tests.cpp b/shared/test/unit_test/os_interface/windows/wddm20_tests.cpp index f2671dbc75..4205ade670 100644 --- a/shared/test/unit_test/os_interface/windows/wddm20_tests.cpp +++ b/shared/test/unit_test/os_interface/windows/wddm20_tests.cpp @@ -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(); diff --git a/shared/test/unit_test/os_interface/windows/wddm_address_space_windows_tests.cpp b/shared/test/unit_test/os_interface/windows/wddm_address_space_windows_tests.cpp index 8d00c06134..f575cc4b95 100644 --- a/shared/test/unit_test/os_interface/windows/wddm_address_space_windows_tests.cpp +++ b/shared/test/unit_test/os_interface/windows/wddm_address_space_windows_tests.cpp @@ -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); diff --git a/shared/test/unit_test/os_interface/windows/wddm_windows_tests.cpp b/shared/test/unit_test/os_interface/windows/wddm_windows_tests.cpp index 9dee9fccd0..d37ea223be 100644 --- a/shared/test/unit_test/os_interface/windows/wddm_windows_tests.cpp +++ b/shared/test/unit_test/os_interface/windows/wddm_windows_tests.cpp @@ -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(wddm->getGmmMemory()); + auto gmmMemory = static_cast(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(wddm->getGmmMemory()); + auto gmmMemory = static_cast(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; diff --git a/shared/test/unit_test/xe_hpg_core/dg2/windows/wddm_memory_manager_tests_dg2.cpp b/shared/test/unit_test/xe_hpg_core/dg2/windows/wddm_memory_manager_tests_dg2.cpp index ad75aea53d..fdc7120ae7 100644 --- a/shared/test/unit_test/xe_hpg_core/dg2/windows/wddm_memory_manager_tests_dg2.cpp +++ b/shared/test/unit_test/xe_hpg_core/dg2/windows/wddm_memory_manager_tests_dg2.cpp @@ -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(Wddm::createWddm(nullptr, *rootDeviceEnvironment)); - MockGmmMemoryBase *gmmMemory = new MockGmmMemoryBase(rootDeviceEnvironment->getGmmClientContext()); + MockGmmMemory *gmmMemory = new MockGmmMemory(rootDeviceEnvironment->getGmmClientContext()); rootDeviceEnvironment->osInterface = std::make_unique(); rootDeviceEnvironment->osInterface->setDriverModel(std::unique_ptr(wddm)); wddm->init(); @@ -63,7 +63,7 @@ DG2TEST_F(Dg2WddmTest, givenG10B0WhenGettingLocalMemoryAccessModeThenCorrectValu RootDeviceEnvironment *rootDeviceEnvironment = executionEnvironment.rootDeviceEnvironments[0].get(); rootDeviceEnvironment->initGmm(); WddmMock *wddm = static_cast(Wddm::createWddm(nullptr, *rootDeviceEnvironment)); - MockGmmMemoryBase *gmmMemory = new MockGmmMemoryBase(rootDeviceEnvironment->getGmmClientContext()); + MockGmmMemory *gmmMemory = new MockGmmMemory(rootDeviceEnvironment->getGmmClientContext()); rootDeviceEnvironment->osInterface = std::make_unique(); rootDeviceEnvironment->osInterface->setDriverModel(std::unique_ptr(wddm)); wddm->init(); @@ -102,7 +102,7 @@ DG2TEST_F(Dg2WddmTest, givenG11WhenGettingLocalMemoryAccessModeThenCorrectValueI RootDeviceEnvironment *rootDeviceEnvironment = executionEnvironment.rootDeviceEnvironments[0].get(); rootDeviceEnvironment->initGmm(); WddmMock *wddm = static_cast(Wddm::createWddm(nullptr, *rootDeviceEnvironment)); - MockGmmMemoryBase *gmmMemory = new MockGmmMemoryBase(rootDeviceEnvironment->getGmmClientContext()); + MockGmmMemory *gmmMemory = new MockGmmMemory(rootDeviceEnvironment->getGmmClientContext()); rootDeviceEnvironment->osInterface = std::make_unique(); rootDeviceEnvironment->osInterface->setDriverModel(std::unique_ptr(wddm)); wddm->init(); @@ -141,7 +141,7 @@ DG2TEST_F(Dg2WddmTest, givenG12WhenGettingLocalMemoryAccessModeThenCorrectValueI RootDeviceEnvironment *rootDeviceEnvironment = executionEnvironment.rootDeviceEnvironments[0].get(); rootDeviceEnvironment->initGmm(); WddmMock *wddm = static_cast(Wddm::createWddm(nullptr, *rootDeviceEnvironment)); - MockGmmMemoryBase *gmmMemory = new MockGmmMemoryBase(rootDeviceEnvironment->getGmmClientContext()); + MockGmmMemory *gmmMemory = new MockGmmMemory(rootDeviceEnvironment->getGmmClientContext()); rootDeviceEnvironment->osInterface = std::make_unique(); rootDeviceEnvironment->osInterface->setDriverModel(std::unique_ptr(wddm)); wddm->init();