mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 05:56:36 +08:00
Enable shareable buffer support (1/N)
Define method to allocate memory in SKL using DRM_IOCTL_I915_GEM_CREATE. Change-Id: I3106c690eaa6ce089a21100a1839c4886580f9c0 Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
d11d3ad27e
commit
e02162d301
@@ -435,7 +435,7 @@ bool Wddm::freeGpuVirtualAddress(D3DGPU_VIRTUAL_ADDRESS &gpuPtr, uint64_t size)
|
||||
return status == STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
NTSTATUS Wddm::createAllocation(const void *alignedCpuPtr, const Gmm *gmm, D3DKMT_HANDLE &outHandle) {
|
||||
NTSTATUS Wddm::createAllocation(const void *alignedCpuPtr, const Gmm *gmm, D3DKMT_HANDLE &outHandle, uint32_t shareable) {
|
||||
NTSTATUS status = STATUS_UNSUCCESSFUL;
|
||||
D3DDDI_ALLOCATIONINFO AllocationInfo = {0};
|
||||
D3DKMT_CREATEALLOCATION CreateAllocation = {0};
|
||||
@@ -456,7 +456,7 @@ NTSTATUS Wddm::createAllocation(const void *alignedCpuPtr, const Gmm *gmm, D3DKM
|
||||
CreateAllocation.pPrivateRuntimeData = NULL;
|
||||
CreateAllocation.pPrivateDriverData = NULL;
|
||||
CreateAllocation.Flags.NonSecure = FALSE;
|
||||
CreateAllocation.Flags.CreateShared = FALSE;
|
||||
CreateAllocation.Flags.CreateShared = shareable ? TRUE : FALSE;
|
||||
CreateAllocation.Flags.RestrictSharedAccess = FALSE;
|
||||
CreateAllocation.Flags.CreateResource = alignedCpuPtr ? TRUE : FALSE;
|
||||
CreateAllocation.pAllocationInfo = &AllocationInfo;
|
||||
|
||||
Reference in New Issue
Block a user