diff options
Diffstat (limited to 'tests/spirv/fetch-array-from-parameter-block.slang')
| -rw-r--r-- | tests/spirv/fetch-array-from-parameter-block.slang | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/spirv/fetch-array-from-parameter-block.slang b/tests/spirv/fetch-array-from-parameter-block.slang new file mode 100644 index 000000000..4a86bfb8d --- /dev/null +++ b/tests/spirv/fetch-array-from-parameter-block.slang @@ -0,0 +1,22 @@ +//TEST:SIMPLE(filecheck=CHECK):-target spirv + +//CHECK-NOT: OpCompositeConstruct +//CHECK-COUNT-1: OpStore + +struct Data +{ + int bigArray[8]; + int fetch(int i) + { + return bigArray[i]; + } +} + +ParameterBlock<Data> pData; +uniform int* result; + +[numthreads(16,1,1)] +void main(int id : SV_DispatchThreadID) +{ + *result = pData.fetch(id); +}
\ No newline at end of file |
