Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 22, 2025

Thanks for assigning this issue to me. I'm starting to work on it and will keep this PR's description up to date as I form a plan and make progress.

Original prompt

This section details on the original issue you should resolve

<issue_title>vk::binding attribute ignored on entry point parameter</issue_title>
<issue_description># Issue Description

The vk::binding attribute is ignored if it is specified on an entry point parameter.

Reproducer Code

[numthreads(32, 1, 1)]
[shader("compute")]
void main(
    [[vk::binding(/* binding */ 0, /* set */ 1)]]
    StructuredBuffer<float> a,
    [[vk::binding(/* binding */ 3, /* set */ 2)]]
    RWStructuredBuffer<float> b,
)
{
    b[0] = a[0];
}
slang -entry main -o main.spv main.slang
spirv-dis main.spv

Expected Behavior

The SPIR-V object defines two descriptors, one with binding 0 set 1, and one with binding 3 set 2.

Actual Behavior

The SPIR-V object defines two descriptors, one with binding 0 set 0, and one with binding 1 set 0.

Environment

  • Slang Version: v2025.23.2
  • OS: NixOS 25.05
    </issue_description>

Comments on the Issue (you are @copilot in this section)

@bmillsNV This isn't supported, but there should be a diagnostic. @jhelferty-nv There should be a diagnostic, @zopsicle can you confirm that you're seeing it? ``` test.slang(5): warning 38010: attribute '[[vk::binding(...)]]' on parameter 'a' is unsupported on entry point parameters and will be ignored StructuredBuffer a, ^ test.slang(7): warning 38010: attribute '[[vk::binding(...)]]' on parameter 'b' is unsupported on entry point parameters and will be ignored RWStructuredBuffer b, ^ ```

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vk::binding attribute ignored on entry point parameter

2 participants