What is a “Push-Constant” in vulkan?

Push constants is a way to quickly provide a small amount of uniform data to shaders. It should be much quicker than UBOs but a huge limitation is the size of data – spec requires 128 bytes to be available for a push constant range. Hardware vendors may support more, but compared to other means … Read more

What is the difference between framebuffer and image in Vulkan?

VkFramebuffer + VkRenderPass defines the render target. Render pass defines which attachment will be written with colors. VkFramebuffer defines which VkImageView is to be which attachment. VkImageView defines which part of VkImage to use. VkImage defines which VkDeviceMemory is used and a format of the texel. Or maybe in opposite sequence: VkDeviceMemory is just a … Read more

OpenCL, Vulkan, Sycl

How does OpenCL relates to vulkan ? I understand that OpenCL is higher level and abstracts the devices, but does ( or could ) it uses Vulkan internally ? They’re not related to each other at all. Well, they do technically use the same intermediate shader language, but Vulkan forbids the Kernel execution model, and … Read more

What is actually a Queue family in Vulkan?

To understand queue families, you first have to understand queues. A queue is something you submit command buffers to, and command buffers submitted to a queue are executed in order[*1] relative to each other. Command buffers submitted to different queues are unordered relative to each other unless you explicitly synchronize them with VkSemaphore. You can … Read more

Should I ever use a `vec3` inside of a uniform buffer or shader storage buffer object?

NO! Never do this! When declaring UBOs/SSBOs, pretend that all 3-element vector types don’t exist. This includes column-major matrices with 3 rows or row-major matrices with 3 columns. Pretend that the only types are scalars, 2, and 4 element vectors (and matrices). You will save yourself a very great deal of grief if you do … Read more