internal static unsafe SparseImageFormatProperties2 MarshalFrom(Interop.SparseImageFormatProperties2 *value) { SparseImageFormatProperties2 result = new SparseImageFormatProperties2(); result.Properties = value->Properties; return(result); }
/// <summary> /// Retrieve properties of an image format applied to sparse images. /// </summary> public SparseImageFormatProperties2[] GetSparseImageFormatProperties2(PhysicalDeviceSparseImageFormatInfo2 formatInfo) { unsafe { try { var commandDelegate = this.commandCache.GetCommandDelegate <Interop.vkGetPhysicalDeviceSparseImageFormatProperties2KHR>("vkGetPhysicalDeviceSparseImageFormatProperties2KHR", "instance"); SparseImageFormatProperties2[] result = default(SparseImageFormatProperties2[]); Interop.PhysicalDeviceSparseImageFormatInfo2 marshalledFormatInfo; formatInfo.MarshalTo(&marshalledFormatInfo); uint propertyCount; Interop.SparseImageFormatProperties2 *marshalledProperties = null; commandDelegate(this.handle, &marshalledFormatInfo, &propertyCount, null); marshalledProperties = (Interop.SparseImageFormatProperties2 *)Interop.HeapUtil.Allocate <Interop.SparseImageFormatProperties2>((uint)propertyCount); commandDelegate(this.handle, &marshalledFormatInfo, &propertyCount, marshalledProperties); result = new SparseImageFormatProperties2[(uint)propertyCount]; for (int index = 0; index < (uint)propertyCount; index++) { result[index] = SparseImageFormatProperties2.MarshalFrom(&marshalledProperties[index]); } return(result); } finally { Interop.HeapUtil.FreeLog(); } } }