Pass additional allocation parameters to aub_stream

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2021-02-16 18:06:08 +00:00
committed by Compute-Runtime-Automation
parent e3e8171638
commit 15f3353351
5 changed files with 54 additions and 19 deletions

View File

@ -8,6 +8,7 @@
#include "shared/source/os_interface/aub_memory_operations_handler.h"
#include "shared/source/aub_mem_dump/aub_mem_dump.h"
#include "shared/source/gmm_helper/gmm.h"
#include "shared/source/memory_manager/graphics_allocation.h"
#include "third_party/aub_stream/headers/allocation_params.h"
@ -27,12 +28,18 @@ MemoryOperationsStatus AubMemoryOperationsHandler::makeResident(Device *device,
auto lock = acquireLock(resourcesLock);
int hint = AubMemDump::DataTypeHintValues::TraceNotype;
for (const auto &allocation : gfxAllocations) {
aubManager->writeMemory2({allocation->getGpuAddress(),
allocation->getUnderlyingBuffer(),
allocation->getUnderlyingBufferSize(),
allocation->storageInfo.getMemoryBanks(),
hint,
allocation->getUsedPageSize()});
aub_stream::AllocationParams params(allocation->getGpuAddress(),
allocation->getUnderlyingBuffer(),
allocation->getUnderlyingBufferSize(),
allocation->storageInfo.getMemoryBanks(),
hint,
allocation->getUsedPageSize());
auto gmm = allocation->getDefaultGmm();
params.additionalParams.compressionEnabled = gmm ? gmm->isRenderCompressed : false;
aubManager->writeMemory2(params);
residentAllocations.push_back(allocation);
}
return MemoryOperationsStatus::SUCCESS;