mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 23:56:39 +08:00
Fix missing handle in external memory
Related-To: NEO-6757 Signed-off-by: Baj, Tomasz <tomasz.baj@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
0a4adc7c72
commit
9529f21182
@@ -152,6 +152,17 @@ GraphicsAllocation *MockMemoryManager::createGraphicsAllocationFromExistingStora
|
||||
return allocation;
|
||||
}
|
||||
|
||||
GraphicsAllocation *MockMemoryManager::createGraphicsAllocationFromSharedHandle(osHandle handle, const AllocationProperties &properties, bool requireSpecificBitness, bool isHostIpcAllocation) {
|
||||
if (handle != invalidSharedHandle) {
|
||||
auto allocation = OsAgnosticMemoryManager::createGraphicsAllocationFromSharedHandle(handle, properties, requireSpecificBitness, isHostIpcAllocation);
|
||||
this->capturedSharedHandle = handle;
|
||||
return allocation;
|
||||
} else {
|
||||
this->capturedSharedHandle = handle;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
bool MockMemoryManager::copyMemoryToAllocationBanks(GraphicsAllocation *graphicsAllocation, size_t destinationOffset, const void *memoryToCopy, size_t sizeToCopy, DeviceBitfield handleMask) {
|
||||
copyMemoryToAllocationBanksCalled++;
|
||||
copyMemoryToAllocationBanksParamsPassed.push_back({graphicsAllocation, destinationOffset, memoryToCopy, sizeToCopy, handleMask});
|
||||
|
||||
@@ -82,6 +82,7 @@ class MockMemoryManager : public MemoryManagerCreate<OsAgnosticMemoryManager> {
|
||||
GraphicsAllocation *allocateGraphicsMemoryWithProperties(const AllocationProperties &properties) override;
|
||||
GraphicsAllocation *allocateGraphicsMemoryWithProperties(const AllocationProperties &properties, const void *ptr) override;
|
||||
GraphicsAllocation *createGraphicsAllocationFromExistingStorage(AllocationProperties &properties, void *ptr, MultiGraphicsAllocation &multiGraphicsAllocation) override;
|
||||
GraphicsAllocation *createGraphicsAllocationFromSharedHandle(osHandle handle, const AllocationProperties &properties, bool requireSpecificBitness, bool isHostIpcAllocation) override;
|
||||
|
||||
void *allocateSystemMemory(size_t size, size_t alignment) override;
|
||||
|
||||
@@ -220,6 +221,8 @@ class MockMemoryManager : public MemoryManagerCreate<OsAgnosticMemoryManager> {
|
||||
uint32_t handleFenceCompletionCalled = 0u;
|
||||
uint32_t waitForEnginesCompletionCalled = 0u;
|
||||
uint32_t allocateGraphicsMemoryWithPropertiesCount = 0;
|
||||
osHandle capturedSharedHandle = 0u;
|
||||
osHandle invalidSharedHandle = -1;
|
||||
bool allocationCreated = false;
|
||||
bool allocation64kbPageCreated = false;
|
||||
bool allocationInDevicePoolCreated = false;
|
||||
|
||||
Reference in New Issue
Block a user