mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-20 08:53:55 +08:00
feature: bind resources as read only
Related-to: NEO-10398 Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
00445d9285
commit
f3d36d3350
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user