feature: bind resources as read only

Related-to: NEO-10398
Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
This commit is contained in:
Maciej Plewka
2024-03-26 12:22:28 +00:00
committed by Compute-Runtime-Automation
parent 00445d9285
commit f3d36d3350
28 changed files with 230 additions and 32 deletions

View File

@@ -642,6 +642,14 @@ GraphicsAllocation *MemoryManager::allocateGraphicsMemoryInPreferredPool(const A
return nullptr;
}
auto &rootDeviceEnvironment = *executionEnvironment.rootDeviceEnvironments[properties.rootDeviceIndex];
auto &productHelper = rootDeviceEnvironment.getProductHelper();
if (productHelper.supportReadOnlyAllocations() &&
allocation->hasAllocationReadOnlyType() &&
!productHelper.isBlitCopyRequiredForLocalMemory(rootDeviceEnvironment, *allocation)) {
allocation->setAsReadOnly();
}
fileLoggerInstance().logAllocation(allocation);
registerAllocationInOs(allocation);
return allocation;