diff options
| author | Yong He <yonghe@outlook.com> | 2024-03-13 18:35:42 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-13 18:35:42 -0700 |
| commit | e4b01c4ba53c40ff0704e72615422e5a96f636e3 (patch) | |
| tree | e339f84d7dba74d26e22cde9a296d8cd78d24bb7 /tests/glsl | |
| parent | 25df6b868c2af58435bbd09d89e64d77bea87bc7 (diff) | |
Fix side effect checking around storage buffer type. (#3762)
Diffstat (limited to 'tests/glsl')
| -rw-r--r-- | tests/glsl/storage-buffer-side-effect.slang | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/glsl/storage-buffer-side-effect.slang b/tests/glsl/storage-buffer-side-effect.slang new file mode 100644 index 000000000..3209f763e --- /dev/null +++ b/tests/glsl/storage-buffer-side-effect.slang @@ -0,0 +1,24 @@ +//TEST(compute, vulkan):COMPARE_COMPUTE(filecheck-buffer=BUF):-vk -compute -entry computeMain -allow-glsl +#version 430 +precision highp float; +precision highp int; + +//TEST_INPUT:ubuffer(data=[0], stride=4):out,name=outputBuffer + +buffer MyBlockName2 +{ + uint data[1]; +} outputBuffer; + +layout(local_size_x = 4) in; + +void sideEffectInit(int val) +{ + outputBuffer.data[0] = val; +} +void computeMain() +{ + outputBuffer.data[0] = 1000; + sideEffectInit(4); + // BUF: 4 +} |
