Add failInAllocateWithSizeAndAlignment flag to MockMemoryManager
Change-Id: Iee6a5ec468a905e065645dbf2ae8b9521c0b04d9
This commit is contained in:
parent
eebb919c18
commit
03bad96877
|
@ -94,6 +94,9 @@ GraphicsAllocation *MockMemoryManager::allocateGraphicsMemoryInDevicePool(const
|
|||
}
|
||||
|
||||
GraphicsAllocation *MockMemoryManager::allocateGraphicsMemory(size_t size, size_t alignment, bool forcePin, bool uncacheable) {
|
||||
if (failInAllocateWithSizeAndAlignment) {
|
||||
return nullptr;
|
||||
}
|
||||
allocationCreated = true;
|
||||
return OsAgnosticMemoryManager::allocateGraphicsMemory(size, alignment, forcePin, uncacheable);
|
||||
}
|
||||
|
|
|
@ -52,6 +52,7 @@ class MockMemoryManager : public OsAgnosticMemoryManager {
|
|||
bool allocationInDevicePoolCreated = false;
|
||||
bool failInDevicePool = false;
|
||||
bool failInDevicePoolWithError = false;
|
||||
bool failInAllocateWithSizeAndAlignment = false;
|
||||
bool preferRenderCompressedFlagPassed = false;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue