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

@@ -828,10 +828,10 @@ bool Wddm::verifySharedHandle(D3DKMT_HANDLE osHandle) {
return status == STATUS_SUCCESS;
}
bool Wddm::openSharedHandle(D3DKMT_HANDLE handle, WddmAllocation *alloc) {
bool Wddm::openSharedHandle(const MemoryManager::ExtendedOsHandleData &osHandleData, WddmAllocation *alloc) {
D3DKMT_QUERYRESOURCEINFO queryResourceInfo = {};
queryResourceInfo.hDevice = device;
queryResourceInfo.hGlobalShare = handle;
queryResourceInfo.hGlobalShare = osHandleData.handle;
[[maybe_unused]] auto status = getGdi()->queryResourceInfo(&queryResourceInfo);
DEBUG_BREAK_IF(status != STATUS_SUCCESS);
@@ -847,7 +847,7 @@ bool Wddm::openSharedHandle(D3DKMT_HANDLE handle, WddmAllocation *alloc) {
D3DKMT_OPENRESOURCE openResource = {};
openResource.hDevice = device;
openResource.hGlobalShare = handle;
openResource.hGlobalShare = osHandleData.handle;
openResource.NumAllocations = queryResourceInfo.NumAllocations;
openResource.pOpenAllocationInfo2 = allocationInfo.get();
openResource.pTotalPrivateDriverDataBuffer = allocPrivateData.get();