Пример #1
0
 /// <summary>
 ///
 /// </summary>
 public ExternalMemoryProperties(SharpVk.Khronos.ExternalMemoryFeatureFlags externalMemoryFeatures, SharpVk.Khronos.ExternalMemoryHandleTypeFlags exportFromImportedHandleTypes, SharpVk.Khronos.ExternalMemoryHandleTypeFlags compatibleHandleTypes)
 {
     this.ExternalMemoryFeatures        = externalMemoryFeatures;
     this.ExportFromImportedHandleTypes = exportFromImportedHandleTypes;
     this.CompatibleHandleTypes         = compatibleHandleTypes;
 }
Пример #2
0
 /// <summary>
 ///
 /// </summary>
 public static unsafe SharpVk.Khronos.MemoryFileDescriptorProperties GetMemoryFileDescriptorProperties(this SharpVk.Device extendedHandle, SharpVk.Khronos.ExternalMemoryHandleTypeFlags handleType, int fileDescriptor)
 {
     try
     {
         SharpVk.Khronos.MemoryFileDescriptorProperties result = default(SharpVk.Khronos.MemoryFileDescriptorProperties);
         CommandCache commandCache = default(CommandCache);
         SharpVk.Interop.Khronos.MemoryFileDescriptorProperties marshalledMemoryFileDescriptorProperties = default(SharpVk.Interop.Khronos.MemoryFileDescriptorProperties);
         commandCache = extendedHandle.commandCache;
         SharpVk.Interop.Khronos.VkDeviceGetMemoryFileDescriptorPropertiesDelegate commandDelegate = commandCache.GetCommandDelegate <SharpVk.Interop.Khronos.VkDeviceGetMemoryFileDescriptorPropertiesDelegate>("vkGetMemoryFdPropertiesKHR", "instance");
         Result methodResult = commandDelegate(extendedHandle.handle, handleType, fileDescriptor, &marshalledMemoryFileDescriptorProperties);
         if (SharpVkException.IsError(methodResult))
         {
             throw SharpVkException.Create(methodResult);
         }
         result = SharpVk.Khronos.MemoryFileDescriptorProperties.MarshalFrom(&marshalledMemoryFileDescriptorProperties);
         return(result);
     }
     finally
     {
         Interop.HeapUtil.FreeAll();
     }
 }
Пример #3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="extendedHandle">
 /// The Device handle to extend.
 /// </param>
 public static unsafe SharpVk.Multivendor.MemoryHostPointerProperties GetMemoryHostPointerProperties(this SharpVk.Device extendedHandle, SharpVk.Khronos.ExternalMemoryHandleTypeFlags handleType, IntPtr hostPointer)
 {
     try
     {
         SharpVk.Multivendor.MemoryHostPointerProperties result = default(SharpVk.Multivendor.MemoryHostPointerProperties);
         CommandCache commandCache = default(CommandCache);
         SharpVk.Interop.Multivendor.MemoryHostPointerProperties marshalledMemoryHostPointerProperties = default(SharpVk.Interop.Multivendor.MemoryHostPointerProperties);
         commandCache = extendedHandle.commandCache;
         SharpVk.Interop.Multivendor.VkDeviceGetMemoryHostPointerPropertiesDelegate commandDelegate = commandCache.GetCommandDelegate <SharpVk.Interop.Multivendor.VkDeviceGetMemoryHostPointerPropertiesDelegate>("vkGetMemoryHostPointerPropertiesEXT", "device");
         Result methodResult = commandDelegate(extendedHandle.handle, handleType, hostPointer.ToPointer(), &marshalledMemoryHostPointerProperties);
         if (SharpVkException.IsError(methodResult))
         {
             throw SharpVkException.Create(methodResult);
         }
         result = SharpVk.Multivendor.MemoryHostPointerProperties.MarshalFrom(&marshalledMemoryHostPointerProperties);
         return(result);
     }
     finally
     {
         Interop.HeapUtil.FreeAll();
     }
 }