mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 05:24:02 +08:00
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:
committed by
sys_ocldev
parent
cbf838e5ab
commit
7d506e3608
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user