/// <summary> /// Retrieve properties of an image format applied to sparse images. /// </summary> public SparseImageFormatProperties[] GetSparseImageFormatProperties(Format format, ImageType type, SampleCountFlags samples, ImageUsageFlags usage, ImageTiling tiling) { unsafe { try { SparseImageFormatProperties[] result = default(SparseImageFormatProperties[]); uint propertyCount; SparseImageFormatProperties *marshalledProperties = null; Interop.Commands.vkGetPhysicalDeviceSparseImageFormatProperties(this.handle, format, type, samples, usage, tiling, &propertyCount, null); marshalledProperties = (SparseImageFormatProperties *)Interop.HeapUtil.Allocate <SparseImageFormatProperties>((uint)propertyCount); Interop.Commands.vkGetPhysicalDeviceSparseImageFormatProperties(this.handle, format, type, samples, usage, tiling, &propertyCount, marshalledProperties); result = new SparseImageFormatProperties[(uint)propertyCount]; for (int index = 0; index < (uint)propertyCount; index++) { result[index] = marshalledProperties[index]; } return(result); } finally { Interop.HeapUtil.FreeLog(); } } }
public static extern unsafe void vkGetPhysicalDeviceSparseImageFormatProperties(IntPtr physicalDevice, Format format, ImageType type, SampleCountFlags samples, ImageUsageFlags usage, ImageTiling tiling, uint *pPropertyCount, SparseImageFormatProperties *pProperties);
internal static unsafe extern void vkGetPhysicalDeviceSparseImageFormatProperties(PhysicalDevice physicalDevice, Format format, ImageType type, SampleCountFlags samples, ImageUsageFlags usage, ImageTiling tiling, out UInt32 *PropertyCount, SparseImageFormatProperties *Properties);