From f526071ed1e5ccc0a6cd969199133ae61be4f741 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 22 Dec 2025 17:11:24 +0000 Subject: [PATCH 1/2] Initial plan From 42fa08cf3e0d4ddc01e0eeb12c45359f0adf0d53 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 22 Dec 2025 17:19:35 +0000 Subject: [PATCH 2/2] Add spirv target test for vk::binding diagnostic on entry point parameters Co-authored-by: jkiviluoto-nv <235827468+jkiviluoto-nv@users.noreply.github.com> --- tests/diagnostics/entry-point-mod-errors.slang | 1 + .../vk-binding-entry-point-param-spirv.slang | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 tests/diagnostics/vk-binding-entry-point-param-spirv.slang diff --git a/tests/diagnostics/entry-point-mod-errors.slang b/tests/diagnostics/entry-point-mod-errors.slang index 090ce5e337..bf59d4f3f0 100644 --- a/tests/diagnostics/entry-point-mod-errors.slang +++ b/tests/diagnostics/entry-point-mod-errors.slang @@ -4,6 +4,7 @@ //DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): -entry computeMain -target cuda //DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): -entry computeMain -target metal //DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): -entry computeMain -target cpp +//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): -entry computeMain -target spirv [shader("compute")] [numthreads(1,1,1)] void computeMain( diff --git a/tests/diagnostics/vk-binding-entry-point-param-spirv.slang b/tests/diagnostics/vk-binding-entry-point-param-spirv.slang new file mode 100644 index 0000000000..e17a0eff8d --- /dev/null +++ b/tests/diagnostics/vk-binding-entry-point-param-spirv.slang @@ -0,0 +1,18 @@ +// Test that vk::binding attributes on entry point parameters trigger a warning on spirv target +// This addresses the issue where vk::binding is ignored on entry point parameters + +//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): -entry main -target spirv + +[numthreads(32, 1, 1)] +[shader("compute")] +void main( +// CHECK: ([[#@LINE+1]]): warning 38010: {{.*}}vk::binding{{.*}}a + [[vk::binding(/* binding */ 0, /* set */ 1)]] + StructuredBuffer a, +// CHECK: ([[#@LINE+1]]): warning 38010: {{.*}}vk::binding{{.*}}b + [[vk::binding(/* binding */ 3, /* set */ 2)]] + RWStructuredBuffer b, +) +{ + b[0] = a[0]; +}