/// <summary>
 ///
 /// </summary>
 public static unsafe SharpVk.Khronos.ImageFormatProperties2 GetImageFormatProperties2(this SharpVk.PhysicalDevice extendedHandle, SharpVk.Khronos.PhysicalDeviceImageFormatInfo2 imageFormatInfo)
 {
     try
     {
         SharpVk.Khronos.ImageFormatProperties2 result = default(SharpVk.Khronos.ImageFormatProperties2);
         CommandCache commandCache = default(CommandCache);
         SharpVk.Interop.Khronos.PhysicalDeviceImageFormatInfo2 *marshalledImageFormatInfo       = default(SharpVk.Interop.Khronos.PhysicalDeviceImageFormatInfo2 *);
         SharpVk.Interop.Khronos.ImageFormatProperties2          marshalledImageFormatProperties = default(SharpVk.Interop.Khronos.ImageFormatProperties2);
         commandCache = extendedHandle.commandCache;
         marshalledImageFormatInfo = (SharpVk.Interop.Khronos.PhysicalDeviceImageFormatInfo2 *)(Interop.HeapUtil.Allocate <SharpVk.Interop.Khronos.PhysicalDeviceImageFormatInfo2>());
         imageFormatInfo.MarshalTo(marshalledImageFormatInfo);
         SharpVk.Interop.Khronos.VkPhysicalDeviceGetImageFormatProperties2Delegate commandDelegate = commandCache.GetCommandDelegate <SharpVk.Interop.Khronos.VkPhysicalDeviceGetImageFormatProperties2Delegate>("vkGetPhysicalDeviceImageFormatProperties2KHR", "instance");
         Result methodResult = commandDelegate(extendedHandle.handle, marshalledImageFormatInfo, &marshalledImageFormatProperties);
         if (SharpVkException.IsError(methodResult))
         {
             throw SharpVkException.Create(methodResult);
         }
         result = SharpVk.Khronos.ImageFormatProperties2.MarshalFrom(&marshalledImageFormatProperties);
         return(result);
     }
     finally
     {
         Interop.HeapUtil.FreeAll();
     }
 }
Пример #2
0
        internal static unsafe PhysicalDeviceImageFormatInfo2 MarshalFrom(SharpVk.Interop.Khronos.PhysicalDeviceImageFormatInfo2 *pointer)
        {
            PhysicalDeviceImageFormatInfo2 result = default(PhysicalDeviceImageFormatInfo2);

            result.Format = pointer->Format;
            result.Type   = pointer->Type;
            result.Tiling = pointer->Tiling;
            result.Usage  = pointer->Usage;
            result.Flags  = pointer->Flags;
            return(result);
        }
Пример #3
0
 internal unsafe void MarshalTo(SharpVk.Interop.Khronos.PhysicalDeviceImageFormatInfo2 *pointer)
 {
     pointer->SType  = StructureType.PhysicalDeviceImageFormatInfo2Khr;
     pointer->Next   = null;
     pointer->Format = this.Format;
     pointer->Type   = this.Type;
     pointer->Tiling = this.Tiling;
     pointer->Usage  = this.Usage;
     if (this.Flags != null)
     {
         pointer->Flags = this.Flags.Value;
     }
     else
     {
         pointer->Flags = default(SharpVk.ImageCreateFlags);
     }
 }