Skip to content

[Feature Request] [SPIR-V] no vk::ext_decorate on function parameters #8103

Closed

Description

@Erfan-Ahmadi

Is your feature request related to a problem? Please describe.

In the example below (full godbolt link), only the x variable gets correctly decorated with Aliased.
The OpFunctionParameters %a and %b remain undecorated.

// A simple function with an input and a return value
void SimpleAdd([[vk::ext_decorate(/*spv::DecorationAliased*/20)]] inout float a, [[vk::ext_decorate(/*spv::DecorationAliased*/20)]]  inout float b) {
    a = 1.0f;
    b = 2.0f;
}

[numthreads(64, 1, 1)]
void main(uint3 DTid : SV_DispatchThreadID, 
          uint3 Gid  : SV_GroupID,           
          uint  GTid : SV_GroupIndex)        
{
    [[vk::ext_decorate(/*spv::DecorationAliased*/20)]]  float x = 43;
    SimpleAdd(x, x);
    OutputBuffer[GTid] = x;
}

Describe the solution you'd like
I'd like to be able to decorate function parameters

Additional context
make sure to compile with -fcgl or -O0 to avoid inlining the function

Activity

  1. added
    enhancement
    needs-triage
    on Jan 27, 2026
  2. Erfan-Ahmadi commented on Jan 27, 2026

    @Erfan-Ahmadi
    Author

    maybe related to #8000

  3. changed the title [-][Feature Request] [SPIR-V] no vk::ext_decorateon function parameters[/-] [+][Feature Request] [SPIR-V] no vk::ext_decorate on function parameters[/+] on Jan 30, 2026
  4. moved this from For Google to Triaged in HLSL Triageon Apr 10, 2026
  5. luciechoi commented on Apr 10, 2026

    @luciechoi
    Collaborator

    Function parameters should now be supported, please try from head or wait for the release.

    (for reference, the documentation does mention supporting function parameters #8326)

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

Metadata

Metadata

Labels

enhancement

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions