Skip to content

Descriptor Heap Support #524

Description

@codecnotsupported

Whilst descriptor heap can be used with regular descriptor sets/bindings.
It also allows for untyped access which is much more flexible.

// VkPhysicalDeviceDescriptorHeapPropertiesEXT::bufferDescriptorSize == 16 (0x10)
layout(descriptor_heap) buffer SSBO {
    vec4 payload;
} s_buffers[];

void main() {
    s_buffers[6].payload = vec4(1.0);
}

https://github.khronos.org/SPIRV-Registry/extensions/EXT/SPV_EXT_descriptor_heap.html
https://github.khronos.org/SPIRV-Registry/extensions/KHR/SPV_KHR_untyped_pointers.html
https://github.com/KhronosGroup/SPIRV-Guide/blob/main/chapters/untyped_pointers.md

https://docs.vulkan.org/guide/latest/descriptor_heap.html#_untyped_shader_model
https://docs.vulkan.org/refpages/latest/refpages/source/VK_EXT_descriptor_heap.html
https://docs.vulkan.org/features/latest/features/proposals/VK_EXT_descriptor_heap.html

Activity

  1. changed the title [-]Support: SPV_EXT_descriptor_heap & SPV_KHR_untyped_pointers Support (Descriptor Heap Support)[/-] [+]Descriptor Heap Support[/+] on Feb 10, 2026
  2. Firestar99 commented on Feb 10, 2026

    @Firestar99
    Member

    You're the third to ask me about descriptor heaps, ping @FacelessTiger :D

    On branch asm_fn_ptr I made prototypes to declare the entry point in asm! blocks, which would allow end users with advanced entry point requirements to directly emit whatever SPIR-V they want to output. Example:

    #[inline]
    pub fn main(input: Vec4, out: &mut Vec4) {
    *out = input + 1.;
    }
    pub fn entry() {
    unsafe {
    let mut input = Vec4::default();
    asm! {
    "%input = OpVariable typeof{input} Input",
    "OpName %input \"input\"",
    "OpDecorate %input Location 0",
    "%tmp = OpLoad typeof*{input} %input",
    "OpStore {input} %tmp",
    input = in(reg) &mut input,
    };
    let mut output = Vec4::default();
    main(input, &mut output);
    asm! {
    "%output = OpVariable typeof{output} Output",
    "OpName %output \"output\"",
    "OpDecorate %output Location 0",
    "%tmp = OpLoad _ {output}",
    "OpStore %output %tmp",
    output = in(reg) &output,
    };
    }
    }
    /// we don't support `global_asm!` yet
    pub fn non_global_asm() {
    unsafe {
    asm! {
    "OpEntryPoint Vertex {entry} \"main\"",
    entry = in(reg) entry,
    }
    }
    }

    Primarily, I want to move our entry point system from being a compiler internal thing to a "simple" proc macro you can expand, inspect and modify more easily. We could also have a proc macro for descriptor heaps, or you could use said assembly directly.

    I've had some trouble getting buffers to work, but got a hint that this works so may revisit this soon.

  3. Firestar99 commented on Feb 19, 2026

    @Firestar99
    Member

    The compiletest prototypes in #534 may be interesting reference on how this could be implemented

  4. OppositeNor commented on Sep 11, 2026

    @OppositeNor

    +1 requesting for this feature. Are there any updates?

  5. Firestar99 commented on Sep 24, 2026

    @Firestar99
    Member

    Unlikely that I'll get around to this relatively niche feature. But if you're willing to toy around with inline asm! blocks, you could probably get it working without having to modify the compiler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions