mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
Add MultiGraphicsAllocation to USM
Related-To: NEO-4672 Change-Id: I53ea4bea73ae6d52840146f63bc561bb90f9fe62 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
5bc511b77d
commit
93c1e1b976
@@ -7,6 +7,7 @@
|
||||
|
||||
#pragma once
|
||||
#include "shared/source/helpers/common_types.h"
|
||||
#include "shared/source/memory_manager/multi_graphics_allocation.h"
|
||||
#include "shared/source/memory_manager/residency_container.h"
|
||||
#include "shared/source/unified_memory/unified_memory.h"
|
||||
#include "shared/source/utilities/spinlock.h"
|
||||
@@ -23,12 +24,28 @@ class GraphicsAllocation;
|
||||
class MemoryManager;
|
||||
|
||||
struct SvmAllocationData {
|
||||
SvmAllocationData(uint32_t maxRootDeviceIndex) : gpuAllocations(maxRootDeviceIndex), maxRootDeviceIndex(maxRootDeviceIndex){};
|
||||
SvmAllocationData(const SvmAllocationData &svmAllocData) : SvmAllocationData(svmAllocData.maxRootDeviceIndex) {
|
||||
this->allocationFlagsProperty = svmAllocData.allocationFlagsProperty;
|
||||
this->cpuAllocation = svmAllocData.cpuAllocation;
|
||||
this->device = svmAllocData.device;
|
||||
this->size = svmAllocData.size;
|
||||
this->memoryType = svmAllocData.memoryType;
|
||||
for (auto allocation : svmAllocData.gpuAllocations.getGraphicsAllocations()) {
|
||||
if (allocation) {
|
||||
this->gpuAllocations.addAllocation(allocation);
|
||||
}
|
||||
}
|
||||
}
|
||||
GraphicsAllocation *cpuAllocation = nullptr;
|
||||
GraphicsAllocation *gpuAllocation = nullptr;
|
||||
MultiGraphicsAllocation gpuAllocations;
|
||||
size_t size = 0;
|
||||
InternalMemoryType memoryType = InternalMemoryType::SVM;
|
||||
MemoryProperties allocationFlagsProperty;
|
||||
void *device = nullptr;
|
||||
|
||||
protected:
|
||||
const uint32_t maxRootDeviceIndex;
|
||||
};
|
||||
|
||||
struct SvmMapOperation {
|
||||
|
||||
Reference in New Issue
Block a user