/// <summary> /// /// </summary> internal unsafe void MarshalTo(SharpVk.Interop.NVidia.AccelerationStructureMemoryRequirementsInfo *pointer) { pointer->SType = StructureType.AccelerationStructureMemoryRequirementsInfo; pointer->Next = null; pointer->Type = this.Type; pointer->AccelerationStructure = this.AccelerationStructure?.handle ?? default(SharpVk.Interop.NVidia.AccelerationStructure); }
/// <summary> /// /// </summary> /// <param name="extendedHandle"> /// The Device handle to extend. /// </param> /// <param name="info"> /// </param> public static unsafe SharpVk.MemoryRequirements2 GetAccelerationStructureMemoryRequirements(this SharpVk.Device extendedHandle, SharpVk.NVidia.AccelerationStructureMemoryRequirementsInfo info) { try { SharpVk.MemoryRequirements2 result = default(SharpVk.MemoryRequirements2); CommandCache commandCache = default(CommandCache); SharpVk.Interop.NVidia.AccelerationStructureMemoryRequirementsInfo *marshalledInfo = default(SharpVk.Interop.NVidia.AccelerationStructureMemoryRequirementsInfo *); SharpVk.Interop.MemoryRequirements2 marshalledMemoryRequirements = default(SharpVk.Interop.MemoryRequirements2); commandCache = extendedHandle.commandCache; marshalledInfo = (SharpVk.Interop.NVidia.AccelerationStructureMemoryRequirementsInfo *)(Interop.HeapUtil.Allocate <SharpVk.Interop.NVidia.AccelerationStructureMemoryRequirementsInfo>()); info.MarshalTo(marshalledInfo); SharpVk.Interop.NVidia.VkDeviceGetAccelerationStructureMemoryRequirementsDelegate commandDelegate = commandCache.Cache.vkGetAccelerationStructureMemoryRequirementsNV; commandDelegate(extendedHandle.handle, marshalledInfo, &marshalledMemoryRequirements); result = SharpVk.MemoryRequirements2.MarshalFrom(&marshalledMemoryRequirements); return(result); } finally { Interop.HeapUtil.FreeAll(); } }