diff options
| author | Yong He <yonghe@outlook.com> | 2023-01-24 22:16:21 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-24 22:16:21 -0800 |
| commit | 951ad25e0a9c3b0089c6b996b8e821ac93cf5766 (patch) | |
| tree | 7bed99484204611a4669d7c2c11019795e37f7cb /tests/bugs | |
| parent | a3b0eff62e59f3a05461bf3edee5e100e804e4d5 (diff) | |
Reimplement address elimination. (#2605)
* Reimplement address elimination pass.
* Fix error.
* Update test references.
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'tests/bugs')
| -rw-r--r-- | tests/bugs/gh-841.slang.glsl | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/tests/bugs/gh-841.slang.glsl b/tests/bugs/gh-841.slang.glsl index dd949521b..820f7d2b3 100644 --- a/tests/bugs/gh-841.slang.glsl +++ b/tests/bugs/gh-841.slang.glsl @@ -1,5 +1,7 @@ //TEST_IGNORE_FILE: #version 450 +layout(row_major) uniform; +layout(row_major) buffer; layout(location = 0) out vec4 _S1; @@ -10,26 +12,18 @@ in vec4 _S2; flat layout(location = 1) in uint _S3; -struct RasterVertex_0 -{ - vec4 c_0; - uint u_0; -}; void main() { - RasterVertex_0 _S4 = RasterVertex_0(_S2, _S3); - vec4 result_0 = _S4.c_0; - - vec4 result_1; - if((_S4.u_0 & uint(1))!=0) + vec4 result_0; + if((_S3 & 1U) != 0U) { - result_1 = result_0 + 1.0; + result_0 = _S2 + 1.00000000000000000000; } else { - result_1 = result_0; + result_0 = _S2; } - _S1 = result_1; + _S1 = result_0; return; } |
