示例#1
0
 /// <summary>
 /// Retrieve properties of an image format applied to sparse images.
 /// </summary>
 public unsafe SharpVk.SparseImageFormatProperties[] GetSparseImageFormatProperties(SharpVk.Format format, SharpVk.ImageType type, SharpVk.SampleCountFlags samples, SharpVk.ImageUsageFlags usage, SharpVk.ImageTiling tiling)
 {
     try
     {
         SharpVk.SparseImageFormatProperties[] result = default(SharpVk.SparseImageFormatProperties[]);
         uint propertyCount = default(uint);
         SharpVk.SparseImageFormatProperties *marshalledProperties = default(SharpVk.SparseImageFormatProperties *);
         SharpVk.Interop.VkPhysicalDeviceGetSparseImageFormatPropertiesDelegate commandDelegate = commandCache.GetCommandDelegate <SharpVk.Interop.VkPhysicalDeviceGetSparseImageFormatPropertiesDelegate>("vkGetPhysicalDeviceSparseImageFormatProperties", "");
         commandDelegate(this.handle, format, type, samples, usage, tiling, &propertyCount, marshalledProperties);
         marshalledProperties = (SharpVk.SparseImageFormatProperties *)(Interop.HeapUtil.Allocate <SharpVk.SparseImageFormatProperties>((uint)(propertyCount)));
         commandDelegate(this.handle, format, type, samples, usage, tiling, &propertyCount, marshalledProperties);
         if (marshalledProperties != null)
         {
             var fieldPointer = new SharpVk.SparseImageFormatProperties[(uint)(propertyCount)];
             for (int index = 0; index < (uint)(propertyCount); index++)
             {
                 fieldPointer[index] = marshalledProperties[index];
             }
             result = fieldPointer;
         }
         else
         {
             result = null;
         }
         return(result);
     }
     finally
     {
         Interop.HeapUtil.FreeAll();
     }
 }
示例#2
0
 public static extern void vkGetPhysicalDeviceSparseImageFormatProperties(SharpVk.Interop.PhysicalDevice physicalDevice, SharpVk.Format format, SharpVk.ImageType type, SharpVk.SampleCountFlags samples, SharpVk.ImageUsageFlags usage, SharpVk.ImageTiling tiling, uint *propertyCount, SharpVk.SparseImageFormatProperties *properties);