public void BindDescriptorSets(VkPipelineBindPoint pipelineBindPoint, PipelineLayout layout, uint firstSet, DescriptorSet descriptorSet, uint dynamicOffset)
 {
     unsafe
     {
         VkDescriptorSet setNative = descriptorSet.Native;
         Device.Commands.cmdBindDescriptorSets(commandBuffer, pipelineBindPoint, layout.Native,
                                               firstSet, 1, (IntPtr)(&setNative),
                                               1, (IntPtr)(&dynamicOffset));
     }
 }
        public void BindDescriptorSets(VkPipelineBindPoint pipelineBindPoint, PipelineLayout layout, uint firstSet, DescriptorSet descriptorSet, List <uint> dynamicOffsets)
        {
            unsafe
            {
                int dynamicOffsetCount = 0;
                if (dynamicOffsets != null)
                {
                    dynamicOffsetCount = dynamicOffsets.Count;
                }

                var offsets = stackalloc uint[dynamicOffsetCount];

                VkDescriptorSet setNative = descriptorSet.Native;
                Interop.Copy(dynamicOffsets, (IntPtr)offsets);

                Device.Commands.cmdBindDescriptorSets(commandBuffer, VkPipelineBindPoint.Graphics, layout.Native,
                                                      firstSet, 1, (IntPtr)(&setNative),
                                                      (uint)dynamicOffsetCount, (IntPtr)offsets);
            }
        }