private DescriptorSet[] AllocateDescriptorSets() { fixed(DescriptorSetLayout *pLayouts = this.DescriptorSetLayouts) { DescriptorSetAllocateInfo allocInfo = new DescriptorSetAllocateInfo { SType = StructureType.DescriptorSetAllocateInfo, DescriptorPool = this.DescriptorPool, DescriptorSetCount = (uint)this.DescriptorSetLayouts.Length, PSetLayouts = pLayouts }; var arr = new DescriptorSet[this.DescriptorSetLayouts.Length]; fixed(DescriptorSet *pSets = arr) { var res = VkApi.AllocateDescriptorSets(this.Device, &allocInfo, pSets); if (res != Result.Success) { throw new VMASharp.VulkanResultException("Failed to allocate Descriptor Sets!", res); } return(arr); } } }