diff options
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 |
