nvk
nvk copied to clipboard
Incorrect TypeScript signature for vkCmdBindVertexBuffers
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);