Skip to content

Incorrect TypeScript signature for vkCmdBindVertexBuffers #61

@Mudbill

Description

@Mudbill

The fifth argument claims it should be of type Float32Array but should actually be BigUint64Array.

It says:

vkCmdBindVertexBuffers(commandBuffer: VkCommandBuffer | null, firstBinding: number, bindingCount: number, pBuffers: VkBuffer[] | null, pOffsets: Float32Array | null): void

Attempting to use a Float32Array results in a crash with the message: TypeError: Invalid type for argument 5 'pOffsets' in 'vkCmdBindVertexBuffers'

Giving a type of BigUint64Array makes TypeScript complain, so I suppose the only work-around at the moment is to silence the TS compiler.

const offsets = new BigUint64Array();
vkCmdBindVertexBuffers(/*...*/, offsets as any);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions