Skip to content

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

@Erfan-Ahmadi

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions