These commits are fixes I hit while using the self-hosted SPIR-V backend to build Vulkan compute kernels for molten-zig, a small project that lowers Zig kernels to SPIR-V and dispatches them on Apple Silicon GPUs through MoltenVK.
Nothing exotic on the kernel side: storage buffers in set 0, a main entry point, the kind of thing every compute pipeline needs.
Each commit is small and scoped to one issue. Without these, the kernels either failed validation, failed to assemble, or crashed the compiler before emitting SPIR-V.
A few caveats worth stating up front:
- I am not a compiler engineer or a SPIR-V expert. These are pragmatic fixes that unblocked my use case and pass validation against the kernels I'm exercising. They may not be the right shape for upstream, and I'd defer to anyone who actually owns this backend on naming, structure, or whether a given fix belongs somewhere else entirely.
- Happy to rewrite, split, squash, or cherry-pick any subset. If only some of these are landable as-is, just say which and I'll reshape the rest.
- I'll likely keep pushing further fixes to this branch as I run into them. The
molten-zig project doesn't have an explicit direction yet, so the patch set is still growing organically. If you'd prefer I freeze the branch for review, let me know.
Mainly opening this to start the conversation and see whether any of it is useful upstream.
These commits are fixes I hit while using the self-hosted SPIR-V backend to build Vulkan compute kernels for [molten-zig](https://codeberg.org/quint/molten-zig), a small project that lowers Zig kernels to SPIR-V and dispatches them on Apple Silicon GPUs through MoltenVK.
Nothing exotic on the kernel side: storage buffers in set 0, a main entry point, the kind of thing every compute pipeline needs.
**Each commit is small and scoped to one issue**. Without these, the kernels either failed validation, failed to assemble, or crashed the compiler before emitting SPIR-V.
A few caveats worth stating up front:
- **I am not a compiler engineer or a SPIR-V expert**. These are pragmatic fixes that unblocked my use case and pass validation against the kernels I'm exercising. They may not be the right shape for upstream, and I'd defer to anyone who actually owns this backend on naming, structure, or whether a given fix belongs somewhere else entirely.
- **Happy to rewrite, split, squash, or cherry-pick any subset**. If only some of these are landable as-is, just say which and I'll reshape the rest.
- **I'll likely keep pushing further fixes to this branch as I run into them**. The `molten-zig` project doesn't have an explicit direction yet, so the patch set is still growing organically. If you'd prefer I freeze the branch for review, let me know.
Mainly opening this to start the conversation and see whether any of it is useful upstream.