Beispiel #1
0
        public Result CreateHeap1 <T>(HeapDescription description, ID3D12ProtectedResourceSession protectedSession, out T?heap) where T : ID3D12Heap1
        {
            Result result = CreateHeap1(ref description, protectedSession, typeof(T).GUID, out IntPtr nativePtr);

            if (result.Failure)
            {
                heap = default;
                return(result);
            }

            heap = MarshallingHelpers.FromPointer <T>(nativePtr);
            return(result);
        }
Beispiel #2
0
 public ID3D12Heap CreateHeap(HeapDescription description)
 {
     return(CreateHeap(ref description, typeof(ID3D12Heap).GUID));
 }
Beispiel #3
0
 public T CreateHeap1 <T>(HeapDescription description, ID3D12ProtectedResourceSession protectedSession) where T : ID3D12Heap1
 {
     CreateHeap1(ref description, protectedSession, typeof(T).GUID, out IntPtr nativePtr).CheckError();
     return(MarshallingHelpers.FromPointer <T>(nativePtr));
 }