diff options
Diffstat (limited to 'tests/language-feature/pointer/globallycoherent-ptr.slang')
| -rw-r--r-- | tests/language-feature/pointer/globallycoherent-ptr.slang | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/language-feature/pointer/globallycoherent-ptr.slang b/tests/language-feature/pointer/globallycoherent-ptr.slang new file mode 100644 index 000000000..4909537d7 --- /dev/null +++ b/tests/language-feature/pointer/globallycoherent-ptr.slang @@ -0,0 +1,20 @@ +//TEST:SIMPLE(filecheck=CHECK):-stage compute -entry computeMain -target spirv + +// Tests for invalid use of `globallycoherent` with Ptr/T* + +cbuffer Globals +{ + // CHECK: ([[# @LINE+1]]): error 30078 + globallycoherent Ptr<int> ptr1; + // CHECK: ([[# @LINE+1]]): error 30078 + globallycoherent int* ptr2; + // CHECK: ([[# @LINE+1]]): error 30078 + coherent Ptr<int> ptr3; + // CHECK: ([[# @LINE+1]]): error 30078 + coherent int* ptr4; +} + +[numthreads(1, 1, 1)] +void computeMain(int id : SV_DispatchThreadID) +{ +} |
