diff options
| author | Yong He <yonghe@outlook.com> | 2025-07-01 19:09:29 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-02 02:09:29 +0000 |
| commit | c701ec00ccce6dfa8094d6550ce2db929fc8cefe (patch) | |
| tree | 4f729e8fa5700b2d6d7d99f34514682e3ad351f8 /tests/spirv/fetch-array-from-parameter-block.slang | |
| parent | 83c72fd8772d312233f4e3ccd4154b81030d4795 (diff) | |
Defer immutable buffer loads when emitting spirv. (#7579)
* Defer immutable buffer loads when emitting spirv.
* Fix.
* Fix.
* Fix.
* Fix tests.
* Fix test.
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 |
