Add shareable allocation for Windows

Signed-off-by: Kamil Diedrich <kamil.diedrich@intel.com>
This commit is contained in:
Kamil Diedrich
2021-08-11 10:36:04 +00:00
committed by Compute-Runtime-Automation
parent c7ff2bacd3
commit 4390590831
22 changed files with 111 additions and 36 deletions

View File

@@ -506,6 +506,7 @@ NTSTATUS Wddm::createAllocation(const void *alignedCpuPtr, const Gmm *gmm, D3DKM
AllocationInfo.PrivateDriverDataSize = static_cast<uint32_t>(gmm->gmmResourceInfo->peekHandleSize());
CreateAllocation.NumAllocations = 1;
CreateAllocation.Flags.CreateShared = outSharedHandle ? TRUE : FALSE;
CreateAllocation.Flags.NtSecuritySharing = outSharedHandle ? TRUE : FALSE;
CreateAllocation.Flags.CreateResource = outSharedHandle || alignedCpuPtr ? TRUE : FALSE;
CreateAllocation.pAllocationInfo2 = &AllocationInfo;
CreateAllocation.hDevice = device;