odin-lang / Odin

Odin Programming Language
https://odin-lang.org
BSD 3-Clause "New" or "Revised" License
6.1k stars 550 forks source link

Invalid Function Signature of proc `CmdSetBlendConstants` in `vendor:vulkan` #3799

Closed tadeohepperle closed 4 days ago

tadeohepperle commented 1 week ago

Context

Odin Version and OS:

    Odin:    dev-2024-06:f1779c85d
    OS:      Manjaro Linux, Linux 6.1.80-1-MANJARO
    CPU:     12th Gen Intel(R) Core(TM) i7-1260P
    RAM:     31806 MiB
    Backend: LLVM 14.0.6

Current & Expected Behavior

vulkan_core.h specifies:

typedef void (VKAPI_PTR *PFN_vkCmdSetBlendConstants)(VkCommandBuffer commandBuffer, const float blendConstants[4]);

but in vendor/vulkan/procedures.odin the function signature is:

ProcCmdSetBlendConstants :: #type proc "system" (commandBuffer: CommandBuffer)

This is wrong and currently makes it not possible to dynamically set blend constants in a vulkan application. I think the signature in odin should be

ProcCmdSetBlendConstants :: #type proc "system" (commandBuffer: CommandBuffer, blendConstants: [4]f32)
tadeohepperle commented 1 week ago

Created a PR to fix it, not sure if other Vulkan functions also have similar problems.