Add debug flag to enable compression in L0 USM allocations

Related-To: NEO-5069

Change-Id: Icbfeb8d72cd764bb3c90d5c699998455f81dd3ee
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
Zbigniew Zdanowicz
2020-09-11 15:44:09 +02:00
committed by sys_ocldev
parent cbf838e5ab
commit 7d506e3608
18 changed files with 165 additions and 46 deletions

View File

@@ -133,14 +133,18 @@ GraphicsAllocation *DrmMemoryManager::allocateGraphicsMemoryInDevicePool(const A
gmm = std::make_unique<Gmm>(executionEnvironment.rootDeviceEnvironments[allocationData.rootDeviceIndex]->getGmmClientContext(), *allocationData.imgInfo, allocationData.storageInfo);
sizeAligned = alignUp(allocationData.imgInfo->size, MemoryConstants::pageSize64k);
} else {
bool preferRenderCompressed = (allocationData.type == GraphicsAllocation::AllocationType::BUFFER_COMPRESSED);
if (allocationData.type == GraphicsAllocation::AllocationType::WRITE_COMBINED) {
sizeAligned = alignUp(allocationData.size + MemoryConstants::pageSize64k, 2 * MemoryConstants::megaByte) + 2 * MemoryConstants::megaByte;
} else {
sizeAligned = alignUp(allocationData.size, MemoryConstants::pageSize64k);
}
gmm = std::make_unique<Gmm>(executionEnvironment.rootDeviceEnvironments[allocationData.rootDeviceIndex]->getGmmClientContext(), nullptr, sizeAligned, allocationData.flags.uncacheable,
preferRenderCompressed, false, allocationData.storageInfo);
gmm = std::make_unique<Gmm>(executionEnvironment.rootDeviceEnvironments[allocationData.rootDeviceIndex]->getGmmClientContext(),
nullptr,
sizeAligned,
allocationData.flags.uncacheable,
allocationData.flags.preferRenderCompressed,
false,
allocationData.storageInfo);
}
auto sizeAllocated = sizeAligned;