KhronosGroup / KhronosGroup/Vulkan-Docs

Base Pointer Alignment Decoration Should Work in Shader SPIR-V

Open
#2,685 28 comments 0 reactions 2 assignees Claimed by @pdaniell-nv View on GitHub
Dominant language
JavaScript
Stars
3.3k
Forks
549
Avg merge
5d 5h
Merged PRs (30d)
2

Description

The recent Vulkan 2026 roadmap mentioned trying to reduce the differences between Kernel and Shader SPIR-V. One important feature lacking in Shader SPIR-V is [`Alignment`](https://registry.khronos.org/SPIR-V/specs/unified1/SPIRV.html#Memory_Operands:~:text=44-,Alignment). I'm not sure if this is actually on Khronos Group's radar and I've not seen it mentioned elsewhere here, but it seems in line with current Vulkan priorities.

First, we get performance pessimizations due to the compiler not being able to optimize for `Alignment`, see: https://github.com/jaesung-cs/vulkan_radix_sort/issues/18

Additionally, DXIL is going to basically have this now https://github.com/microsoft/hlsl-specs/blob/main/proposals/0051-byte-address-buffer-alignment.md#spir-v-compatibility. They plan to support this on SPIR-V but appear to think this is simply solved by alignment being tied to descriptors, I have no clue why the lack of `Alignment` isn't flagged as a problem there, but I suspect this will help them a lot (additionally IIUC DX is moving to SPIR-V anyway right? so this probably needs to be there regardless for that reason?).

Finally it appears that the lack of `Alignment` has been an issue even recently for internal discussion on other features: https://github.com/KhronosGroup/Vulkan-Docs/issues/2666, in that it was assumed to be applicable to Shader SPIR-V when it isn't currently. The performance issues are mentioned of not being able to specify base pointer alignment in that conversation as well.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.