diff options
Diffstat (limited to 'tests/language-feature/capability')
| -rw-r--r-- | tests/language-feature/capability/address-of.slang | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/language-feature/capability/address-of.slang b/tests/language-feature/capability/address-of.slang new file mode 100644 index 000000000..924312b0e --- /dev/null +++ b/tests/language-feature/capability/address-of.slang @@ -0,0 +1,17 @@ +//TEST:SIMPLE(filecheck=CHECK_FAIL): -target glsl -entry computeMain -stage compute +//TEST:SIMPLE(filecheck=CHECK_PASS): -target spirv -entry computeMain -stage compute + +// Test that __getAddress correctly reports capabilities. + +uniform int* outputBuffer; +uniform int* buffer; + +// CHECK_PASS: OpEntryPoint +// CHECK_PASS-NOT: error + +// CHECK_FAIL: ([[# @LINE+1]]): error 36107{{.*}}glsl +void computeMain() +{ + // CHECK: ([[# @LINE+1]]): note: see using of '__getAddress' + outputBuffer[0] = *(__getAddress(buffer[0])); +}
\ No newline at end of file |
