From 3c13fb81f7cdf34d683acb6e6fe7821d9dba834b Mon Sep 17 00:00:00 2001 From: Mateusz Jablonski Date: Tue, 30 Sep 2025 12:15:29 +0000 Subject: [PATCH] refactor: remove not needed logic Related-To: NEO-11080 Signed-off-by: Mateusz Jablonski --- .../os_interface/windows/CMakeLists.txt | 1 - ..._tile_instanced_allocation_drm_or_wddm.cpp | 20 ------------------- .../map_tile_instanced_allocation_wddm.cpp | 20 ------------------- .../windows/wddm_memory_manager.cpp | 14 ++----------- 4 files changed, 2 insertions(+), 53 deletions(-) delete mode 100644 shared/source/os_interface/windows/map_tile_instanced_allocation_drm_or_wddm.cpp delete mode 100644 shared/source/os_interface/windows/map_tile_instanced_allocation_wddm.cpp diff --git a/shared/source/os_interface/windows/CMakeLists.txt b/shared/source/os_interface/windows/CMakeLists.txt index a7f658b2c3..0f464088eb 100644 --- a/shared/source/os_interface/windows/CMakeLists.txt +++ b/shared/source/os_interface/windows/CMakeLists.txt @@ -91,7 +91,6 @@ set(NEO_CORE_OS_INTERFACE_WDDM ${CMAKE_CURRENT_SOURCE_DIR}/wddm/max_mem_alloc_size_${DRIVER_MODEL}.cpp ${CMAKE_CURRENT_SOURCE_DIR}/wddm/helper_${DRIVER_MODEL}.cpp ${CMAKE_CURRENT_SOURCE_DIR}/wddm/skip_resource_cleanup_${DRIVER_MODEL}.cpp - ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}map_tile_instanced_allocation_${DRIVER_MODEL}.cpp ${CMAKE_CURRENT_SOURCE_DIR}/wddm/wddm.cpp ${CMAKE_CURRENT_SOURCE_DIR}/wddm/wddm.h ${CMAKE_CURRENT_SOURCE_DIR}/wddm/wddm_defs.h diff --git a/shared/source/os_interface/windows/map_tile_instanced_allocation_drm_or_wddm.cpp b/shared/source/os_interface/windows/map_tile_instanced_allocation_drm_or_wddm.cpp deleted file mode 100644 index dd66915fd7..0000000000 --- a/shared/source/os_interface/windows/map_tile_instanced_allocation_drm_or_wddm.cpp +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) 2021 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/memory_manager/gfx_partition.h" - -namespace NEO { - -class GfxPartition; -class WddmAllocation; -class Wddm; - -bool mapTileInstancedAllocation(WddmAllocation *allocation, const void *requiredPtr, Wddm *wddm, HeapIndex heapIndex, GfxPartition &gfxPartition) { - return false; -} - -} // namespace NEO diff --git a/shared/source/os_interface/windows/map_tile_instanced_allocation_wddm.cpp b/shared/source/os_interface/windows/map_tile_instanced_allocation_wddm.cpp deleted file mode 100644 index dd66915fd7..0000000000 --- a/shared/source/os_interface/windows/map_tile_instanced_allocation_wddm.cpp +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) 2021 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/memory_manager/gfx_partition.h" - -namespace NEO { - -class GfxPartition; -class WddmAllocation; -class Wddm; - -bool mapTileInstancedAllocation(WddmAllocation *allocation, const void *requiredPtr, Wddm *wddm, HeapIndex heapIndex, GfxPartition &gfxPartition) { - return false; -} - -} // namespace NEO diff --git a/shared/source/os_interface/windows/wddm_memory_manager.cpp b/shared/source/os_interface/windows/wddm_memory_manager.cpp index 81f39b218a..5e4d6aba5d 100644 --- a/shared/source/os_interface/windows/wddm_memory_manager.cpp +++ b/shared/source/os_interface/windows/wddm_memory_manager.cpp @@ -1520,19 +1520,9 @@ GraphicsAllocation *WddmMemoryManager::allocateGraphicsMemoryInDevicePool(const return wddmAllocation.release(); } -bool mapTileInstancedAllocation(WddmAllocation *allocation, const void *requiredPtr, Wddm *wddm, HeapIndex heapIndex, GfxPartition &gfxPartition); - bool WddmMemoryManager::mapGpuVirtualAddress(WddmAllocation *allocation, const void *requiredPtr) { - if (allocation->getNumGmms() > 1) { - if (allocation->storageInfo.tileInstanced) { - return mapTileInstancedAllocation(allocation, - requiredPtr, - &getWddm(allocation->getRootDeviceIndex()), - selectHeap(allocation, requiredPtr != nullptr, executionEnvironment.rootDeviceEnvironments[allocation->getRootDeviceIndex()]->isFullRangeSvm(), allocation->isAllocInFrontWindowPool()), - *getGfxPartition(allocation->getRootDeviceIndex())); - } else if (allocation->storageInfo.multiStorage) { - return mapMultiHandleAllocationWithRetry(allocation, requiredPtr); - } + if (allocation->getNumGmms() > 1 && allocation->storageInfo.multiStorage) { + return mapMultiHandleAllocationWithRetry(allocation, requiredPtr); } else if (allocation->getAllocationType() == AllocationType::writeCombined) { requiredPtr = lockResource(allocation); allocation->setCpuAddress(const_cast(requiredPtr));