fix: Defer MOCS to PAT

Related-To: NEO-10556

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2024-05-27 09:27:22 +00:00
committed by Compute-Runtime-Automation
parent a787686ac5
commit a9269939f6
14 changed files with 93 additions and 4 deletions

View File

@@ -69,6 +69,7 @@ set(NEO_CORE_OS_INTERFACE_WDDM
${CMAKE_CURRENT_SOURCE_DIR}/gdi_interface_logging.cpp
${CMAKE_CURRENT_SOURCE_DIR}/gdi_interface_logging.h
${CMAKE_CURRENT_SOURCE_DIR}/gdi_profiling.h
${CMAKE_CURRENT_SOURCE_DIR}/gmm_helper_win.cpp
${CMAKE_CURRENT_SOURCE_DIR}/hw_device_id_win.cpp
${CMAKE_CURRENT_SOURCE_DIR}/hw_device_id.h
${CMAKE_CURRENT_SOURCE_DIR}/product_helper_wddm.cpp

View File

@@ -0,0 +1,16 @@
/*
* Copyright (C) 2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/execution_environment/root_device_environment.h"
#include "shared/source/gmm_helper/gmm_helper.h"
#include "shared/source/os_interface/product_helper.h"
namespace NEO {
bool GmmHelper::deferMOCSToPatIndex() const {
return this->rootDeviceEnvironment.getProductHelper().isNewCoherencyModelSupported();
}
} // namespace NEO

View File

@@ -447,6 +447,10 @@ GraphicsAllocation *WddmMemoryManager::allocateGraphicsMemoryForNonSvmHostPtr(co
GmmRequirements gmmRequirements{};
gmmRequirements.allowLargePages = true;
gmmRequirements.preferCompressed = false;
if (productHelper.overrideAllocationCacheable(allocationData)) {
gmmRequirements.overriderCacheable.enableOverride = true;
gmmRequirements.overriderCacheable.value = true;
}
auto gmm = new Gmm(executionEnvironment.rootDeviceEnvironments[allocationData.rootDeviceIndex]->getGmmHelper(), alignedPtr, alignedSize, 0u,
CacheSettingsHelper::getGmmUsageType(wddmAllocation->getAllocationType(), !!allocationData.flags.uncacheable, productHelper), {}, gmmRequirements);