From e2b99d704584bbbf3e1d9aa68cbc1cf62c6bfcc2 Mon Sep 17 00:00:00 2001 From: Rune Date: Thu, 9 Jul 2026 14:12:42 +0200 Subject: [PATCH] remove miss-leading span type in VkDescriptorSetLayoutBinding --- Setup/src/Program.bf | 1 + src/Vulkan.bf | 10 +++------- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Setup/src/Program.bf b/Setup/src/Program.bf index 671b057..29e5186 100644 --- a/Setup/src/Program.bf +++ b/Setup/src/Program.bf @@ -1121,6 +1121,7 @@ class RegistryParser : XmlParser } } + if (type_name != "VkDescriptorSetLayoutBinding") { Dictionary dict = scope .((.)fields.Count); for (let field in fields) diff --git a/src/Vulkan.bf b/src/Vulkan.bf index e53cc73..6d7a292 100644 --- a/src/Vulkan.bf +++ b/src/Vulkan.bf @@ -6972,18 +6972,14 @@ struct VkDescriptorSetLayout : uint64 public uint32 descriptorCount = 0; // Number of descriptors in this binding public VkShaderStageFlags stageFlags = default; // Shader stages this binding is visible to public VkSampler* pImmutableSamplers = null; // Immutable samplers (used if descriptor type is SAMPLER or COMBINED_IMAGE_SAMPLER, is either NULL or contains count number of elements) - public Span immutableSamplers - { - get { return .(pImmutableSamplers, (.)descriptorCount); } - set mut { pImmutableSamplers = value.Ptr; descriptorCount = (.)value.Length; } - } - public this(uint32 binding, VkDescriptorType descriptorType, VkShaderStageFlags stageFlags, Span immutableSamplers = default) : this() + public this(uint32 binding, VkDescriptorType descriptorType, uint32 descriptorCount, VkShaderStageFlags stageFlags, VkSampler* pImmutableSamplers = null) : this() { this.binding = binding; this.descriptorType = descriptorType; + this.descriptorCount = descriptorCount; this.stageFlags = stageFlags; - this.immutableSamplers = immutableSamplers; + this.pImmutableSamplers = pImmutableSamplers; } }