diff options
| author | Yong He <yonghe@outlook.com> | 2024-12-09 04:47:53 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-09 20:47:53 +0800 |
| commit | 051ae8acec0a641bcaf86e7eeff35eff29e8922d (patch) | |
| tree | 4e385415742ad98c8842454fda14a9abb8112cb2 /tests/language-feature | |
| parent | 71e90a7ba78d0566e3b7da54df48f9af598e4cbb (diff) | |
Fix crash during emitCast of attributed type, allow MaxIters to take linktime const. (#5791)
* Fix crash during emitCast of attributed type.
* Allow [MaxIters] to take link time constants.
---------
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
Diffstat (limited to 'tests/language-feature')
| -rw-r--r-- | tests/language-feature/constants/max-iters-link-time-const.slang | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/language-feature/constants/max-iters-link-time-const.slang b/tests/language-feature/constants/max-iters-link-time-const.slang new file mode 100644 index 000000000..cf1ccbbd1 --- /dev/null +++ b/tests/language-feature/constants/max-iters-link-time-const.slang @@ -0,0 +1,15 @@ +//TEST:SIMPLE(filecheck=CHECK): -target spirv +// CHECK: OpEntryPoint + +extern static const int num = 10; +RWStructuredBuffer<float> outputBuffer; + +[numthreads(1,1,1)] +void computeMain() +{ + [MaxIters(num)] + for (int i = 0; i < num; i++) + { + outputBuffer[i] = i; + } +} |
