mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
Try to use provided pointer when dual storage shared memory is not supported
If user provided not-null hostptr field, then the driver should try to use it. This change adds omitted functionality, which handles the described case also in createUnifiedMemoryAllocation(). Related-To: NEO-7600 Signed-off-by: Wrobel, Patryk <patryk.wrobel@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
b4544f6f78
commit
d8a65c6958
@@ -93,10 +93,17 @@ GraphicsAllocation *MockMemoryManager::allocateGraphicsMemoryWithProperties(cons
|
||||
if (isMockHostMemoryManager) {
|
||||
allocateGraphicsMemoryWithPropertiesCount++;
|
||||
if (forceFailureInAllocationWithHostPointer) {
|
||||
if (singleFailureInAllocationWithHostPointer) {
|
||||
forceFailureInAllocationWithHostPointer = false;
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return NEO::MemoryManager::allocateGraphicsMemoryWithProperties(properties, ptr);
|
||||
}
|
||||
|
||||
recentlyPassedDeviceBitfield = properties.subDevicesBitfield;
|
||||
return OsAgnosticMemoryManager::allocateGraphicsMemoryWithProperties(properties, ptr);
|
||||
}
|
||||
|
||||
|
||||
@@ -250,6 +250,7 @@ class MockMemoryManager : public MemoryManagerCreate<OsAgnosticMemoryManager> {
|
||||
bool forceFailureInPrimaryAllocation = false;
|
||||
bool singleFailureInPrimaryAllocation = false;
|
||||
bool forceFailureInAllocationWithHostPointer = false;
|
||||
bool singleFailureInAllocationWithHostPointer = false;
|
||||
bool isMockHostMemoryManager = false;
|
||||
bool deferAllocInUse = false;
|
||||
bool isMockEventPoolCreateMemoryManager = false;
|
||||
|
||||
Reference in New Issue
Block a user