Skip to content

[WIP] Fix vk::binding attribute ignored on entry point parameter#9471

Draft
Copilot wants to merge 1 commit intomasterfrom
copilot/fix-vk-binding-attribute-issue-again
Draft

[WIP] Fix vk::binding attribute ignored on entry point parameter#9471
Copilot wants to merge 1 commit intomasterfrom
copilot/fix-vk-binding-attribute-issue-again

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, ^ ```

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@jkwak-work
Copy link
Collaborator

@copilot Can you rebase this PR with master branch?

*PS: testing @copilot magic keyword.

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

3 participants