diff options
Diffstat (limited to 'tests')
5 files changed, 55 insertions, 56 deletions
diff --git a/tests/compute/half-texture.slang.glsl b/tests/compute/half-texture.slang.glsl index 0eccccaaf..27f63620d 100644 --- a/tests/compute/half-texture.slang.glsl +++ b/tests/compute/half-texture.slang.glsl @@ -25,20 +25,26 @@ layout(local_size_x = 4, local_size_y = 4, local_size_z = 1) in; void main() { ivec2 pos_0 = ivec2(gl_GlobalInvocationID.xy); - const float _S2 = 1.00000000000000000000 / 3.00000000000000000000; - int _S3 = pos_0.y; - int _S4 = pos_0.x; - ivec2 pos2_0 = ivec2(3 - _S3, 3 - _S4); - - float16_t h_0 = (float16_t(imageLoad((halfTexture_0), ivec2((uvec2(pos2_0)))).x)); - f16vec2 h2_0 = (f16vec2(imageLoad((halfTexture2_0), ivec2((uvec2(pos2_0)))).xy)); - f16vec4 h4_0 = (f16vec4(imageLoad((halfTexture4_0), ivec2((uvec2(pos2_0)))))); - imageStore((halfTexture_0), ivec2((uvec2(pos_0))), f16vec4(h2_0.x + h2_0.y, float16_t(0), float16_t(0), float16_t(0))); - imageStore((halfTexture2_0), ivec2((uvec2(pos_0))), f16vec4(h4_0.xy, float16_t(0), float16_t(0))); - imageStore((halfTexture4_0), ivec2((uvec2(pos_0))), f16vec4(h2_0, h_0, h_0)); - - int index_0 = _S4 + _S3 * 4; - ((outputBuffer_0)._data[(uint(index_0))]) = index_0; + int _S2 = pos_0.y; + + int _S3 = pos_0.x; + + uvec2 _S4 = uvec2(ivec2(3 - _S2, 3 - _S3)); + + float16_t h_0 = (float16_t(imageLoad((halfTexture_0), ivec2((_S4))).x)); + f16vec2 h2_0 = (f16vec2(imageLoad((halfTexture2_0), ivec2((_S4))).xy)); + f16vec4 h4_0 = (f16vec4(imageLoad((halfTexture4_0), ivec2((_S4))))); + + + + uvec2 _S5 = uvec2(pos_0); + + imageStore((halfTexture_0), ivec2((_S5)), f16vec4(h2_0.x + h2_0.y, float16_t(0), float16_t(0), float16_t(0))); + imageStore((halfTexture2_0), ivec2((_S5)), f16vec4(h4_0.xy, float16_t(0), float16_t(0))); + imageStore((halfTexture4_0), ivec2((_S5)), f16vec4(h2_0, h_0, h_0)); + + int index_0 = _S3 + _S2 * 4; + ((outputBuffer_0)._data[(uint(index_0))]) = index_0; return; -}
\ No newline at end of file +} diff --git a/tests/experimental/liveness/liveness.slang.expected b/tests/experimental/liveness/liveness.slang.expected index fe49e85d1..0f5e5deab 100644 --- a/tests/experimental/liveness/liveness.slang.expected +++ b/tests/experimental/liveness/liveness.slang.expected @@ -95,9 +95,10 @@ void main() SomeStruct_0 _S10 = makeSomeStruct_0(); const int _S11[100] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; int _S12 = index_0 & 7; + uint _S13 = uint(index_0); int v_1 = someSlowFunc_0(index_0); - bool _S13 = (v_1 & 256) != 0; - int _S14 = v_1 & 3; + bool _S14 = (v_1 & 256) != 0; + uint _S15 = uint(v_1 & 3); int i_2; livenessStart_1(i_2, 0); i_2 = 0; @@ -120,10 +121,10 @@ void main() livenessStart_2(t_0, 0); t_0 = _S10; SomeStruct_0 u_0; - if(_S13) + if(_S14) { - s_3.x_0 = ((anotherBuffer_0)._data[(uint(_S14))]); - t_0.x_0 = ((anotherBuffer_0)._data[(uint(_S14))]); + s_3.x_0 = ((anotherBuffer_0)._data[(_S15)]); + t_0.x_0 = ((anotherBuffer_0)._data[(_S15)]); livenessStart_2(u_0, 0); u_0.a_1 = 0; u_0.x_0 = 0; @@ -136,33 +137,33 @@ void main() x_1.a_1 = 0; x_1.x_0 = 0; x_1.c_0 = _S11; - x_1.x_0 = ((anotherBuffer_0)._data[(uint(_S14))]) + 1; - SomeStruct_0 _S15 = x_1; + x_1.x_0 = ((anotherBuffer_0)._data[(_S15)]) + 1; + SomeStruct_0 _S16 = x_1; livenessEnd_2(x_1, 0); livenessStart_2(u_0, 0); - u_0 = _S15; + u_0 = _S16; } s_3.c_0[_S12] = s_3.c_0[_S12] + 1; - int _S16 = s_3.x_0 + t_0.x_0; - SomeStruct_0 _S17 = u_0; + int _S17 = s_3.x_0 + t_0.x_0; + SomeStruct_0 _S18 = u_0; livenessEnd_2(u_0, 0); - int _S18 = _S16 + _S17.x_0 + doThing_0(t_0); - int _S19 = somethingElse_0(t_0); + int _S19 = _S17 + _S18.x_0 + doThing_0(t_0); + int _S20 = somethingElse_0(t_0); livenessEnd_2(t_0, 0); - int _S20 = _S18 + _S19; - int _S21 = s_3.c_0[2]; + int _S21 = _S19 + _S20; + int _S22 = s_3.c_0[2]; livenessEnd_2(s_3, 0); - int _S22 = _S20 + _S21; - int _S23 = res_0; + int _S23 = _S21 + _S22; + int _S24 = res_0; livenessEnd_0(res_0, 0); - int res_1 = _S23 + _S22; + int res_1 = _S24 + _S23; i_2 = i_2 + 1; livenessStart_1(res_0, 0); res_0 = res_1; } - int _S24 = res_0; + int _S25 = res_0; livenessEnd_0(res_0, 0); - ((outputBuffer_0)._data[(uint(index_0))]) = _S24; + ((outputBuffer_0)._data[(_S13)]) = _S25; return; } diff --git a/tests/hlsl-intrinsic/shader-execution-reordering/hit-object-assign.slang.1.expected b/tests/hlsl-intrinsic/shader-execution-reordering/hit-object-assign.slang.1.expected index c7be594d1..97b04be47 100644 --- a/tests/hlsl-intrinsic/shader-execution-reordering/hit-object-assign.slang.1.expected +++ b/tests/hlsl-intrinsic/shader-execution-reordering/hit-object-assign.slang.1.expected @@ -37,7 +37,7 @@ void main() hitObjectRecordMissNV(hitObj_1, _S5, ray_0.Origin_0, ray_0.TMin_0, ray_0.Direction_0, ray_0.TMax_0); bool _S6 = (hitObjectIsMissNV((hitObj_1))); uint _S7 = uint(int(_S6)); - ((outputBuffer_0)._data[(uint(idx_0))]) = _S7; + ((outputBuffer_0)._data[(_S4)]) = _S7; return; } diff --git a/tests/hlsl-intrinsic/shader-execution-reordering/hit-object-make-hit.slang.1.expected b/tests/hlsl-intrinsic/shader-execution-reordering/hit-object-make-hit.slang.1.expected index 938a19480..c9589b805 100644 --- a/tests/hlsl-intrinsic/shader-execution-reordering/hit-object-make-hit.slang.1.expected +++ b/tests/hlsl-intrinsic/shader-execution-reordering/hit-object-make-hit.slang.1.expected @@ -91,29 +91,21 @@ void main() ray_2.Direction_0 = vec3(0.0, 1.0, 0.0); ray_2.TMax_0 = 10000.0; uint _S10 = uint(idx_0); - int _S11 = idx_0 * 2; - uint _S12 = uint(_S11); - int _S13 = idx_0 * 3; - uint _S14 = uint(_S13); - RayDesc_0 _S15 = ray_2; + uint _S11 = uint(idx_0 * 2); + uint _S12 = uint(idx_0 * 3); + RayDesc_0 _S13 = ray_2; hitObjectNV hitObj_0; - int _S16 = int(_S10); - int _S17 = int(_S12); - int _S18 = int(_S14); - hitObjectRecordHitWithIndexNV(hitObj_0, scene_0, _S16, _S17, _S18, 0U, 0U, _S15.Origin_0, _S15.TMin_0, _S15.Direction_0, _S15.TMax_0, (0)); + int _S14 = int(_S10); + int _S15 = int(_S11); + int _S16 = int(_S12); + hitObjectRecordHitWithIndexNV(hitObj_0, scene_0, _S14, _S15, _S16, 0U, 0U, _S13.Origin_0, _S13.TMin_0, _S13.Direction_0, _S13.TMax_0, (0)); uint r_3 = calcValue_0(hitObj_0); - uint _S19 = uint(idx_0); - uint _S20 = uint(_S11); - uint _S21 = uint(_S13); - RayDesc_0 _S22 = ray_2; + RayDesc_0 _S17 = ray_2; hitObjectNV hitObj_1; - int _S23 = int(_S19); - int _S24 = int(_S21); - int _S25 = int(_S20); - hitObjectRecordHitNV(hitObj_1, scene_0, _S23, _S24, _S25, 0U, 0U, 4U, _S22.Origin_0, _S22.TMin_0, _S22.Direction_0, _S22.TMax_0, (0)); - uint _S26 = calcValue_0(hitObj_1); - uint r_4 = r_3 + _S26; - ((outputBuffer_0)._data[(uint(idx_0))]) = r_4; + hitObjectRecordHitNV(hitObj_1, scene_0, _S14, _S16, _S15, 0U, 0U, 4U, _S17.Origin_0, _S17.TMin_0, _S17.Direction_0, _S17.TMax_0, (0)); + uint _S18 = calcValue_0(hitObj_1); + uint r_4 = r_3 + _S18; + ((outputBuffer_0)._data[(_S10)]) = r_4; return; } diff --git a/tests/hlsl-intrinsic/shader-execution-reordering/hit-object-make-miss.slang.1.expected b/tests/hlsl-intrinsic/shader-execution-reordering/hit-object-make-miss.slang.1.expected index 3afe48bc9..c79c238e6 100644 --- a/tests/hlsl-intrinsic/shader-execution-reordering/hit-object-make-miss.slang.1.expected +++ b/tests/hlsl-intrinsic/shader-execution-reordering/hit-object-make-miss.slang.1.expected @@ -32,7 +32,7 @@ void main() hitObjectRecordMissNV(hitObj_0, _S2, ray_0.Origin_0, ray_0.TMin_0, ray_0.Direction_0, ray_0.TMax_0); bool _S3 = (hitObjectIsMissNV((hitObj_0))); uint _S4 = uint(int(_S3)); - ((outputBuffer_0)._data[(uint(idx_0))]) = _S4; + ((outputBuffer_0)._data[(_S2)]) = _S4; return; } |
