Return a unique pointer for multiple calls to openIpcHandle

This to follow specification, which says:

zeMemOpenIpcHandle:

- Multiple calls to this function with the same IPC handle will return
unique pointers.

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
This commit is contained in:
Jaime Arteaga
2022-11-30 15:42:33 +00:00
committed by Compute-Runtime-Automation
parent af82557e55
commit 99655d34f9
42 changed files with 164 additions and 105 deletions

View File

@@ -100,7 +100,7 @@ class MemoryManager {
virtual bool verifyHandle(osHandle handle, uint32_t rootDeviceIndex, bool) { return true; }
virtual bool isNTHandle(osHandle handle, uint32_t rootDeviceIndex) { return false; }
virtual GraphicsAllocation *createGraphicsAllocationFromMultipleSharedHandles(const std::vector<osHandle> &handles, AllocationProperties &properties, bool requireSpecificBitness, bool isHostIpcAllocation) = 0;
virtual GraphicsAllocation *createGraphicsAllocationFromSharedHandle(osHandle handle, const AllocationProperties &properties, bool requireSpecificBitness, bool isHostIpcAllocation) = 0;
virtual GraphicsAllocation *createGraphicsAllocationFromSharedHandle(osHandle handle, const AllocationProperties &properties, bool requireSpecificBitness, bool isHostIpcAllocation, bool reuseSharedAllocation) = 0;
virtual void closeSharedHandle(GraphicsAllocation *graphicsAllocation){};
virtual GraphicsAllocation *createGraphicsAllocationFromNTHandle(void *handle, uint32_t rootDeviceIndex, AllocationType allocType) = 0;