mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-09 22:43:00 +08:00
Add proper type for host ptr allocations.
Change-Id: I324b54b415626043cc801ceb7f73547b96018fe0
This commit is contained in:
committed by
sys_ocldev
parent
4e187e240c
commit
73456d66b3
@@ -83,6 +83,7 @@ class GraphicsAllocation : public IDNode<GraphicsAllocation> {
|
||||
SVM,
|
||||
KERNEL_ISA,
|
||||
INTERNAL_HEAP,
|
||||
EXTERNAL_HOST_PTR,
|
||||
UNDECIDED,
|
||||
};
|
||||
|
||||
|
||||
@@ -242,6 +242,7 @@ bool MemoryManager::getAllocationData(AllocationData &allocationData, const Allo
|
||||
case GraphicsAllocation::AllocationType::CONSTANT_SURFACE:
|
||||
case GraphicsAllocation::AllocationType::GLOBAL_SURFACE:
|
||||
case GraphicsAllocation::AllocationType::SVM:
|
||||
case GraphicsAllocation::AllocationType::EXTERNAL_HOST_PTR:
|
||||
mustBeZeroCopy = true;
|
||||
break;
|
||||
default:
|
||||
@@ -252,6 +253,7 @@ bool MemoryManager::getAllocationData(AllocationData &allocationData, const Allo
|
||||
case GraphicsAllocation::AllocationType::UNDECIDED:
|
||||
case GraphicsAllocation::AllocationType::FILL_PATTERN:
|
||||
case GraphicsAllocation::AllocationType::PROFILING_TAG_BUFFER:
|
||||
case GraphicsAllocation::AllocationType::EXTERNAL_HOST_PTR:
|
||||
allocationData.flags.useSystemMemory = true;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -107,7 +107,7 @@ class MemoryManager {
|
||||
|
||||
GraphicsAllocation *allocateGraphicsMemoryForHostPtr(size_t size, void *ptr, bool fullRangeSvm, bool requiresL3Flush) {
|
||||
if (fullRangeSvm && DebugManager.flags.EnableHostPtrTracking.get()) {
|
||||
return allocateGraphicsMemory({false, size, GraphicsAllocation::AllocationType::UNDECIDED}, ptr);
|
||||
return allocateGraphicsMemory({false, size, GraphicsAllocation::AllocationType::EXTERNAL_HOST_PTR}, ptr);
|
||||
} else {
|
||||
auto allocation = allocateGraphicsMemoryForNonSvmHostPtr(size, ptr);
|
||||
if (allocation) {
|
||||
|
||||
Reference in New Issue
Block a user