refactor: pass arrayIndex to Wddm::openSharedHandle function

Related-To: NEO-11498
Signed-off-by: Jaroslaw Warchulski <jaroslaw.warchulski@intel.com>
This commit is contained in:
Jaroslaw Warchulski
2024-06-06 16:56:16 +00:00
committed by Compute-Runtime-Automation
parent 89a8623933
commit 0ac1be7669
50 changed files with 279 additions and 232 deletions

View File

@@ -114,7 +114,8 @@ ze_result_t ImageCoreFamily<gfxCoreFamily>::initialize(Device *device, const ze_
}
if (lookupTable.sharedHandleType.isDMABUFHandle) {
NEO::AllocationProperties properties(device->getRootDeviceIndex(), true, &imgInfo, NEO::AllocationType::sharedImage, device->getNEODevice()->getDeviceBitfield());
allocation = device->getNEODevice()->getMemoryManager()->createGraphicsAllocationFromSharedHandle(lookupTable.sharedHandleType.fd, properties, false, false, true, nullptr);
NEO::MemoryManager::OsHandleData osHandleData{static_cast<NEO::osHandle>(lookupTable.sharedHandleType.fd)};
allocation = device->getNEODevice()->getMemoryManager()->createGraphicsAllocationFromSharedHandle(osHandleData, properties, false, false, true, nullptr);
device->getNEODevice()->getMemoryManager()->closeSharedHandle(allocation);
} else if (lookupTable.sharedHandleType.isNTHandle) {
auto verifyResult = device->getNEODevice()->getMemoryManager()->verifyHandle(NEO::toOsHandle(lookupTable.sharedHandleType.ntHnadle), device->getNEODevice()->getRootDeviceIndex(), true);