-
Notifications
You must be signed in to change notification settings - Fork 415
Open
Labels
DiagnosticsMissing DiagnosticWe should be emitting a diagnostics but we don't or crash or emit bad codeWe should be emitting a diagnostics but we don't or crash or emit bad code
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
DiagnosticsMissing DiagnosticWe should be emitting a diagnostics but we don't or crash or emit bad codeWe should be emitting a diagnostics but we don't or crash or emit bad code