Exemplo n.º 1
0
 /// <summary>
 /// Query an address of a buffer
 /// </summary>
 /// <param name="extendedHandle">
 /// The Device handle to extend.
 /// </param>
 /// <param name="info">
 /// An instance of the VkBufferDeviceAddressInfoEXT structure
 /// specifying the buffer to retrieve an address for.
 /// </param>
 public static unsafe void GetBufferDeviceAddress(this SharpVk.Device extendedHandle, SharpVk.Multivendor.BufferDeviceAddressInfo info)
 {
     try
     {
         CommandCache commandCache = default(CommandCache);
         SharpVk.Interop.Multivendor.BufferDeviceAddressInfo *marshalledInfo = default(SharpVk.Interop.Multivendor.BufferDeviceAddressInfo *);
         commandCache   = extendedHandle.commandCache;
         marshalledInfo = (SharpVk.Interop.Multivendor.BufferDeviceAddressInfo *)(Interop.HeapUtil.Allocate <SharpVk.Interop.Multivendor.BufferDeviceAddressInfo>());
         info.MarshalTo(marshalledInfo);
         SharpVk.Interop.Multivendor.VkDeviceGetBufferDeviceAddressDelegate commandDelegate = commandCache.Cache.vkGetBufferDeviceAddressEXT;
         commandDelegate(extendedHandle.handle, marshalledInfo);
     }
     finally
     {
         Interop.HeapUtil.FreeAll();
     }
 }
 /// <summary>
 ///
 /// </summary>
 internal unsafe void MarshalTo(SharpVk.Interop.Multivendor.BufferDeviceAddressInfo *pointer)
 {
     pointer->SType  = StructureType.BufferDeviceAddressInfo;
     pointer->Next   = null;
     pointer->Buffer = this.Buffer?.handle ?? default(SharpVk.Interop.Buffer);
 }