diff options
| author | Yong He <yonghe@outlook.com> | 2024-06-12 09:40:27 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-12 09:40:27 -0700 |
| commit | c194af81a5b1f7d2869d9617dc06cd50609362bf (patch) | |
| tree | 01018eed11a9cccb1176f70a085b948b825d07bc /tests/bugs | |
| parent | 7a4757d2e97f92aae3ddb5dc353a54f72e23351e (diff) | |
Fix crash on invalid entrypoint varying parameter. (#4349)
* Fix crash on invalid entrypoint varying parameter.
* Fix test.
Diffstat (limited to 'tests/bugs')
| -rw-r--r-- | tests/bugs/invalid-entrypoint-param.slang | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/bugs/invalid-entrypoint-param.slang b/tests/bugs/invalid-entrypoint-param.slang new file mode 100644 index 000000000..bafb0fb88 --- /dev/null +++ b/tests/bugs/invalid-entrypoint-param.slang @@ -0,0 +1,17 @@ +//TEST:SIMPLE(filecheck=CHECK): -target spirv + +// `TT` is not valid for defining a varying entrypoint parameter, +// and we should diagnose an error. + +// CHECK: error 39028 + +struct TT +{ + Texture2D tex; +} + +[numthreads(1, 1, 1)] +void f(TT t) +{ + return; +}
\ No newline at end of file |
