mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Pass additional allocation parameters to aub_stream
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
e3e8171638
commit
15f3353351
@ -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;
|
||||
|
Reference in New Issue
Block a user