Skip to content

[VK] Handle kernel arguments set via uniform buffers - #2186

Draft
EwanC wants to merge 1 commit into
AdaptiveCpp:developfrom
EwanC:vk/ub_args
Draft

[VK] Handle kernel arguments set via uniform buffers#2186
EwanC wants to merge 1 commit into
AdaptiveCpp:developfrom
EwanC:vk/ub_args

Conversation

@EwanC

@EwanC EwanC commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Draft for now as the clspv PR google/clspv#1623 is required for the full stack to work and I want to bump the recommended commit in this PR

This patch updates the Vulkan backend to correctly handle when a SPIR-V kernel expects arguments to be passed via uniform buffers instead of push constants. This requires creating uniform buffers and descriptor sets that can be used on a kernel invocation without conflicting with other invocations of the same kernel.

This path is less efficient than pushing constants to set arguments but is used as workaround for the Qualcomm Adreno GPU Vulkan driver on Android which struggles to correctly execute well formed SPIR-V code where ulong device buffer addresses are passed in the push constant struct.

This patch updates the Vulkan backend to correctly handle
when a SPIR-V kernel expects arguments to be passed via uniform
buffers instead of push constants. This requires creating
uniform buffers and descriptor sets that can be used on a
kernel invocation without conflicting with other invocations of
the same kernel.

This path is less efficient than pushing constants to set arguments
but is used as workaround for the Qualcomm Adreno GPU Vulkan driver
which struggles to correctly execute well formed SPIR-V code where
ulong device buffer addresses are passed in the push constant struct.

The clspv PR google/clspv#1623 is required
for the full stack to work.
@EwanC EwanC added the vulkan Issue relating to the Vulkan backend label Aug 12, 2026
EwanC added a commit to EwanC/adaptivecpp.github.io that referenced this pull request Aug 12, 2026
Create a blog post on the recent AdaptiveCpp developments
of a Vulkan backend that can run on Android.

Using placeholders for blog date as we need these two AdaptiveCpp
PRs to merge first:
* AdaptiveCpp/AdaptiveCpp#2186
* AdaptiveCpp/AdaptiveCpp#2158
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

vulkan Issue relating to the Vulkan backend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant