Skip to content
This repository was archived by the owner on Nov 3, 2023. It is now read-only.
This repository was archived by the owner on Nov 3, 2023. It is now read-only.

WriteDescriptorSet initialization bug? #91

@ryco117

Description

@ryco117

When creating a new WriteDescriptorSet with the following F# initialization, the created object does not have the expected members.

new WriteDescriptorSet (
    DstBinding = 0u,
    DstSet = descriptorSet,
    DescriptorType = DescriptorType.StorageBuffer,
    BufferInfo = [|buffInfo|],
    ImageInfo = Array.empty,
    TexelBufferView = Array.empty)

The object constructed by this code has the following members. Note that most have been set to default values, but not all:

BufferInfo = null
DescriptorCount = 0
DescriptorType = StorageBuffer
DstArrayElement = 0
DstBinding = 0
DstSet = {Vulkan.DescriptorSet}
ImageInfo = null
TexelBufferView = null

Furthermore, if the ImageInfo and TexelBufferView members are removed from the initialization, then the DescriptorCount and BufferInfo members are not overwritten with empty values.

Note: I stumbled across this bug after adding ImageInfo and TexelBufferView members to the initialization as empty arrays to work around issue #81 on my end. I don't think the issues are directly related, although I would like to bring attention to the fact that there are multiple structures which attempt to dispose of null objects and a fix for that would be greatly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions