-
-
Notifications
You must be signed in to change notification settings - Fork 441
Closed
Description
Summary
The vkCmdSetBlendConstants
should take as argument a pointer to a fixed size array with 4 float values, however the function on Silk.NET bindings currently only takes a single float argument, which is incorrect and makes the funciton unusable.
Reference:
https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdSetBlendConstants.html
What Silk.NET currently has:
public partial void CmdSetBlendConstants([Count(Count = 0)] CommandBuffer commandBuffer, [Count(Count = 0)] float blendConstants);
Right now, calling the function will either cause garbage to be used as the blend constants (if the register happens to have a valid pointer) or crash. Sample API dump output that I got with a call passing 0 as constant:
vkCmdSetBlendConstants(commandBuffer, blendConstants) returns void:
commandBuffer: VkCommandBuffer = 00000250A8FFEB08
blendConstants: const float[4] = 00007FFECF8A1F04
blendConstants[0]: const float = 2.57654e-38
blendConstants[1]: const float = -3.48425e+29
blendConstants[2]: const float = nan
blendConstants[3]: const float = 0.000999451
Steps to reproduce
- Platform: Desktop
- Framework Version: .NET 5
- API: Vulkan
- API Version: Vulkan 1.2