fix: set isLockable flag in storage info even if no memory banks are used

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2023-05-10 19:15:40 +00:00
committed by Compute-Runtime-Automation
parent b8c925b3b5
commit 1948781b67
2 changed files with 24 additions and 7 deletions

View File

@@ -19,8 +19,10 @@
namespace NEO {
StorageInfo MemoryManager::createStorageInfoFromProperties(const AllocationProperties &properties) {
StorageInfo storageInfo{};
storageInfo.isLockable = GraphicsAllocation::isLockable(properties.allocationType) || (properties.makeDeviceBufferLockable && properties.allocationType == AllocationType::BUFFER);
if (properties.subDevicesBitfield.count() == 0) {
return {};
return storageInfo;
}
const auto deviceCount = GfxCoreHelper::getSubDevicesCount(executionEnvironment.rootDeviceEnvironments[properties.rootDeviceIndex]->getHardwareInfo());
@@ -38,9 +40,10 @@ StorageInfo MemoryManager::createStorageInfoFromProperties(const AllocationPrope
preferredTile.set(leastOccupiedBank);
}
StorageInfo storageInfo{preferredTile, allTilesValue};
storageInfo.memoryBanks = preferredTile;
storageInfo.pageTablesVisibility = allTilesValue;
storageInfo.subDeviceBitfield = properties.subDevicesBitfield;
storageInfo.isLockable = GraphicsAllocation::isLockable(properties.allocationType) || (properties.makeDeviceBufferLockable && properties.allocationType == AllocationType::BUFFER);
storageInfo.cpuVisibleSegment = GraphicsAllocation::isCpuAccessRequired(properties.allocationType);
AppResourceHelper::copyResourceTagStr(storageInfo.resourceTag, properties.allocationType,