Skip to content

[SPIR-V] Decorations on vk::BufferPointer aren't applied with no error or warning #7533

Open

Description

Description

Context: Trying to apply Coherent decoration on PhysicalStorageBuffer address space pointer, because due to lack of Vulkan memory model #7180 we can't use MakeAvailable/MakeVisible on individual load/store and atomics.

Steps to Reproduce

Put a decoration on a vk::BufferPointer variable
https://godbolt.org/z/4qW5zKPzc

Actual Behavior

There's no error or warning, OpDecorate not present in emitted SPIR-V

Environment

  • DXC version
  • Host Operating System <!--- Host operating system and version --->

Activity

  1. added
    bug
    spirv
    needs-triage
    on Jun 12, 2025
  2. devshgraphicsprogramming commented on Jun 12, 2025

    @devshgraphicsprogramming
    Author

    Actually even decorations on Inline Spir-V typed members don't stick either

    struct PSInput
    {
        float4 position : SV_Position;
        float4 color    : COLOR0;
    };
    
    #include "nbl/builtin/hlsl/bda/__ref.hlsl"
    
    using namespace nbl::hlsl;
    
    struct Wrapper
    {
        [[vk::ext_decorate(5356)]] spirv::bda_pointer_t<uint32_t> p;
    };
    
    float4 PSMain(PSInput input) : SV_Target0
    {
        Wrapper w;
        w.p = spirv::bitcast<spirv::bda_pointer_t<uint32_t> >(0x0ull);
        spirv::store<uint32_t,4>(w.p,45);
        return input.color * input.color;
    }

    without any warning or error either

  3. danbrown-amd commented on Apr 11, 2026

    @danbrown-amd
    Contributor

    The Coherent decoration shows up on Godbolt now.

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

    bugspirv

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions