diff options
| author | Yong He <yonghe@outlook.com> | 2024-04-12 17:07:40 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-12 17:07:40 -0700 |
| commit | 31c704f2ba5588e0612158ea016552debf09ee98 (patch) | |
| tree | 0499d4c6ba2f60ee2456451969e555df55ad1bd0 /tests/preprocessor | |
| parent | b937207dccd05f700855e9aeb3f7c375b595b827 (diff) | |
Fix micro expansion issue for __LINE__. (#3942)
Diffstat (limited to 'tests/preprocessor')
| -rw-r--r-- | tests/preprocessor/line-macro.slang | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/preprocessor/line-macro.slang b/tests/preprocessor/line-macro.slang new file mode 100644 index 000000000..2b035357a --- /dev/null +++ b/tests/preprocessor/line-macro.slang @@ -0,0 +1,14 @@ +//TEST:COMPARE_COMPUTE(filecheck-buffer=CHECK): -output-using-type + +//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer +RWStructuredBuffer<int> outputBuffer : register(u0); + +#define T(x) x +#define LL T(__LINE__) + +[numthreads(1, 1, 1)] +void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) +{ + // CHECK: 13 + outputBuffer[0] = LL; +}
\ No newline at end of file |
