diff options
| author | Yong He <yonghe@outlook.com> | 2023-03-23 16:59:02 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-23 16:59:02 -0700 |
| commit | 50e7d9797d9bf4b98a056d5df128c24dde6e78bd (patch) | |
| tree | 3e6e4491b1b6512280adff1d69a93ccaf50f6bb3 /tests/slang-extension | |
| parent | 85f005888cadeb4b1d957b57a86cbad6cc9ea313 (diff) | |
Fix optimization pass not converging. (#2725)
* Fix optimization pass not converging.
* Fix.
* Fix tests.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'tests/slang-extension')
| -rw-r--r-- | tests/slang-extension/atomic-float-byte-address-buffer-cross.slang.glsl | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/tests/slang-extension/atomic-float-byte-address-buffer-cross.slang.glsl b/tests/slang-extension/atomic-float-byte-address-buffer-cross.slang.glsl index fca1fc1fa..4fb647199 100644 --- a/tests/slang-extension/atomic-float-byte-address-buffer-cross.slang.glsl +++ b/tests/slang-extension/atomic-float-byte-address-buffer-cross.slang.glsl @@ -10,16 +10,14 @@ layout(std430, binding = 0) buffer _S2 { } _S3; void RWByteAddressBuffer_InterlockedAddF32_0(uint _S4, float _S5, out float _S6) { - uint _S7 = _S4 / 4U; - float _S8 = (atomicAdd((((_S3)._data[(_S7)])), (_S5))); - _S6 = _S8; + float _S7 = (atomicAdd((((_S3)._data[(_S4 / 4U)])), (_S5))); + _S6 = _S7; return; } -void RWByteAddressBuffer_InterlockedAddF32_1(uint _S9, float _S10) +void RWByteAddressBuffer_InterlockedAddF32_1(uint _S8, float _S9) { - uint _S11 = _S9 / 4U; - float _S12 = (atomicAdd((((_S3)._data[(_S11)])), (_S10))); + float _S10 = (atomicAdd((((_S3)._data[(_S8 / 4U)])), (_S9))); return; } @@ -27,11 +25,11 @@ layout(local_size_x = 16, local_size_y = 1, local_size_z = 1) in; void main() { uint tid_0 = gl_GlobalInvocationID.x; - uint _S13 = tid_0 >> 2; - int idx_0 = int(tid_0 & 3U ^ _S13); + uint _S11 = tid_0 >> 2; + int idx_0 = int(tid_0 & 3U ^ _S11); float delta_0 = ((anotherBuffer_0)._data[(uint(idx_0 & 3))]); float previousValue_0 = 0.0; RWByteAddressBuffer_InterlockedAddF32_0(uint(idx_0 << 2), 1.0, previousValue_0); - RWByteAddressBuffer_InterlockedAddF32_1(uint(int(_S13) << 2), delta_0); + RWByteAddressBuffer_InterlockedAddF32_1(uint(int(_S11) << 2), delta_0); return; } |
