mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
Add allocateGraphicsMemoryInDevicePool
- do not always expect failures in tests with failure injections there is retry mechanism for some cases Change-Id: If7589d2dacc41216d2f3b08f861209bbab179615
This commit is contained in:
committed by
sys_ocldev
parent
1afc09bc05
commit
f125c8ff45
@@ -104,6 +104,7 @@ class MemoryManager {
|
||||
Success = 0,
|
||||
Error,
|
||||
InvalidHostPointer,
|
||||
RetryInNonDevicePool
|
||||
};
|
||||
|
||||
MemoryManager(bool enable64kbpages);
|
||||
@@ -139,6 +140,19 @@ class MemoryManager {
|
||||
|
||||
virtual GraphicsAllocation *createGraphicsAllocationFromNTHandle(void *handle) = 0;
|
||||
|
||||
virtual GraphicsAllocation *allocateGraphicsMemoryInDevicePool(const AllocationData &allocationData, AllocationStatus &status) {
|
||||
status = AllocationStatus::Error;
|
||||
if (!allocationData.flags.useSystemMemory && !(allocationData.flags.allow32Bit && this->force32bitAllocations)) {
|
||||
auto allocation = allocateGraphicsMemory(allocationData);
|
||||
if (allocation) {
|
||||
status = AllocationStatus::Success;
|
||||
}
|
||||
return allocation;
|
||||
}
|
||||
status = AllocationStatus::RetryInNonDevicePool;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
virtual bool mapAuxGpuVA(GraphicsAllocation *graphicsAllocation) { return false; };
|
||||
|
||||
virtual void *lockResource(GraphicsAllocation *graphicsAllocation) = 0;
|
||||
|
||||
Reference in New Issue
Block a user