summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2023-03-23 16:59:02 -0700
committerGitHub <noreply@github.com>2023-03-23 16:59:02 -0700
commit50e7d9797d9bf4b98a056d5df128c24dde6e78bd (patch)
tree3e6e4491b1b6512280adff1d69a93ccaf50f6bb3 /tests
parent85f005888cadeb4b1d957b57a86cbad6cc9ea313 (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')
-rw-r--r--tests/bugs/vk-structured-buffer-load.hlsl.glsl15
-rw-r--r--tests/experimental/liveness/liveness-3.slang.expected71
-rw-r--r--tests/experimental/liveness/liveness-4.slang.expected12
-rw-r--r--tests/experimental/liveness/liveness-5.slang.expected16
-rw-r--r--tests/experimental/liveness/liveness-6.slang.expected20
-rw-r--r--tests/experimental/liveness/liveness.slang.expected14
-rw-r--r--tests/hlsl-intrinsic/shader-execution-reordering/hit-object-trace-motion-ray.slang.1.expected21
-rw-r--r--tests/nv-extensions/nv-ray-tracing-motion-blur.slang.glsl17
-rw-r--r--tests/slang-extension/atomic-float-byte-address-buffer-cross.slang.glsl16
-rw-r--r--tests/vkray/callable-caller.slang.glsl7
-rw-r--r--tests/vkray/raygen.slang.glsl20
11 files changed, 106 insertions, 123 deletions
diff --git a/tests/bugs/vk-structured-buffer-load.hlsl.glsl b/tests/bugs/vk-structured-buffer-load.hlsl.glsl
index 1d056944a..0184e6ed5 100644
--- a/tests/bugs/vk-structured-buffer-load.hlsl.glsl
+++ b/tests/bugs/vk-structured-buffer-load.hlsl.glsl
@@ -7,8 +7,7 @@ layout(std430, binding = 1) readonly buffer _S1 {
} gParamBlock_sbuf_0;
float rcp_0(float x_0)
{
- float _S2 = 1.0 / x_0;
- return _S2;
+ return 1.0 / x_0;
}
struct RayHitInfoPacked_0
@@ -16,35 +15,35 @@ struct RayHitInfoPacked_0
vec4 PackedHitInfoA_0;
};
-rayPayloadInNV RayHitInfoPacked_0 _S3;
+rayPayloadInNV RayHitInfoPacked_0 _S2;
struct BuiltInTriangleIntersectionAttributes_0
{
vec2 barycentrics_0;
};
-hitAttributeNV BuiltInTriangleIntersectionAttributes_0 _S4;
+hitAttributeNV BuiltInTriangleIntersectionAttributes_0 _S3;
void main()
{
float HitT_0 = ((gl_RayTmaxNV));
- _S3.PackedHitInfoA_0.x = HitT_0;
+ _S2.PackedHitInfoA_0.x = HitT_0;
float offsfloat_0 = ((gParamBlock_sbuf_0)._data[(0)]);
uint use_rcp_0 = 0U | uint(HitT_0 > 0.0);
if(use_rcp_0 != 0U)
{
- _S3.PackedHitInfoA_0.y = rcp_0(offsfloat_0);
+ _S2.PackedHitInfoA_0.y = rcp_0(offsfloat_0);
}
else
{
if(use_rcp_0 > 0U&&offsfloat_0 == 0.0)
{
- _S3.PackedHitInfoA_0.y = (inversesqrt((offsfloat_0 + 1.0)));
+ _S2.PackedHitInfoA_0.y = (inversesqrt((offsfloat_0 + 1.0)));
}
else
{
- _S3.PackedHitInfoA_0.y = (inversesqrt((offsfloat_0)));
+ _S2.PackedHitInfoA_0.y = (inversesqrt((offsfloat_0)));
}
}
return;
diff --git a/tests/experimental/liveness/liveness-3.slang.expected b/tests/experimental/liveness/liveness-3.slang.expected
index d4b417082..7719c6bb1 100644
--- a/tests/experimental/liveness/liveness-3.slang.expected
+++ b/tests/experimental/liveness/liveness-3.slang.expected
@@ -55,15 +55,14 @@ int calcThing_0(int offset_0)
idx_0[0] = 0;
idx_0[1] = 0;
idx_0[2] = 0;
- int _S2 = (k_0 + 7) % 5;
- bool _S3 = _S2 == 4;
+ bool _S2 = (k_0 + 7) % 5 == 4;
int k_1 = k_0 + 1;
int i_0;
livenessStart_1(i_0, 0);
i_0 = 0;
- int _S4;
- livenessStart_1(_S4, 0);
- _S4 = _S1;
+ int _S3;
+ livenessStart_1(_S3, 0);
+ _S3 = _S1;
for(;;)
{
if(i_0 < 17)
@@ -76,71 +75,69 @@ int calcThing_0(int offset_0)
}
int modRange_0 = i_0 % 3;
another_0[i_0 & 1] = another_0[i_0 & 1] + modRange_0;
- int _S5 = i_0 % 3;
- int _S6;
+ int _S4;
if(modRange_0 != 0)
{
- int _S7 = _S4;
- livenessEnd_0(_S4, 0);
- int _S8 = _S7 + 1;
- livenessStart_1(_S6, 0);
- _S6 = _S8;
+ int _S5 = _S3;
+ livenessEnd_0(_S3, 0);
+ int _S6 = _S5 + 1;
+ livenessStart_1(_S4, 0);
+ _S4 = _S6;
}
else
{
- int _S9 = _S4;
- livenessEnd_0(_S4, 0);
- livenessStart_1(_S6, 0);
- _S6 = _S9;
+ int _S7 = _S3;
+ livenessEnd_0(_S3, 0);
+ livenessStart_1(_S4, 0);
+ _S4 = _S7;
}
- idx_0[modRange_0] = idx_0[modRange_0] + (_S6 + i_0);
+ idx_0[modRange_0] = idx_0[modRange_0] + (_S4 + i_0);
i_0 = i_0 + 1;
- livenessStart_1(_S4, 0);
- int _S10 = _S6;
- livenessEnd_0(_S6, 0);
- _S4 = _S10;
+ livenessStart_1(_S3, 0);
+ int _S8 = _S4;
+ livenessEnd_0(_S4, 0);
+ _S3 = _S8;
}
livenessEnd_0(_S1, 0);
livenessEnd_0(k_0, 0);
- if(_S3)
+ if(_S2)
{
- livenessEnd_0(_S4, 0);
+ livenessEnd_0(_S3, 0);
livenessEnd_1(idx_0, 0);
livenessEnd_2(another_0, 0);
return total_0;
}
- int _S11 = idx_0[0] + idx_0[1];
- int _S12 = idx_0[2];
+ int _S9 = idx_0[0] + idx_0[1];
+ int _S10 = idx_0[2];
livenessEnd_1(idx_0, 0);
- int _S13 = _S11 + _S12;
- int _S14 = total_0;
+ int _S11 = _S9 + _S10;
+ int _S12 = total_0;
livenessEnd_0(total_0, 0);
- int total_1 = _S14 + _S13;
+ int total_1 = _S12 + _S11;
livenessStart_1(k_0, 0);
k_0 = k_1;
livenessStart_1(_S1, 0);
- int _S15 = _S4;
- livenessEnd_0(_S4, 0);
- _S1 = _S15;
+ int _S13 = _S3;
+ livenessEnd_0(_S3, 0);
+ _S1 = _S13;
livenessStart_1(total_0, 0);
total_0 = total_1;
}
livenessEnd_2(another_0, 0);
- int _S16 = total_0;
+ int _S14 = total_0;
livenessEnd_0(total_0, 0);
- return - _S16;
+ return - _S14;
}
-layout(std430, binding = 0) buffer _S17 {
+layout(std430, binding = 0) buffer _S15 {
int _data[];
} outputBuffer_0;
layout(local_size_x = 4, local_size_y = 1, local_size_z = 1) in;
void main()
{
int index_0 = int(gl_GlobalInvocationID.x);
- uint _S18 = uint(index_0);
- int _S19 = calcThing_0(index_0);
- ((outputBuffer_0)._data[(_S18)]) = _S19;
+ int _S16 = calcThing_0(index_0);
+ ((outputBuffer_0)._data[(uint(index_0))]) = _S16;
return;
}
diff --git a/tests/experimental/liveness/liveness-4.slang.expected b/tests/experimental/liveness/liveness-4.slang.expected
index 483247ecd..d6662c6a3 100644
--- a/tests/experimental/liveness/liveness-4.slang.expected
+++ b/tests/experimental/liveness/liveness-4.slang.expected
@@ -37,8 +37,7 @@ int calcThing_0(int offset_0)
livenessEnd_0(k_0, 0);
break;
}
- int _S1 = (k_0 + 7) % 5;
- bool _S2 = _S1 == 4;
+ bool _S1 = (k_0 + 7) % 5 == 4;
int k_1 = k_0 + 1;
int i_0;
livenessStart_1(i_0, 0);
@@ -57,7 +56,7 @@ int calcThing_0(int offset_0)
i_0 = i_0 + 1;
}
livenessEnd_0(k_0, 0);
- if(_S2)
+ if(_S1)
{
livenessEnd_1(another_0, 0);
return 1;
@@ -69,16 +68,15 @@ int calcThing_0(int offset_0)
return -2;
}
-layout(std430, binding = 0) buffer _S3 {
+layout(std430, binding = 0) buffer _S2 {
int _data[];
} outputBuffer_0;
layout(local_size_x = 4, local_size_y = 1, local_size_z = 1) in;
void main()
{
int index_0 = int(gl_GlobalInvocationID.x);
- uint _S4 = uint(index_0);
- int _S5 = calcThing_0(index_0);
- ((outputBuffer_0)._data[(_S4)]) = _S5;
+ int _S3 = calcThing_0(index_0);
+ ((outputBuffer_0)._data[(uint(index_0))]) = _S3;
return;
}
diff --git a/tests/experimental/liveness/liveness-5.slang.expected b/tests/experimental/liveness/liveness-5.slang.expected
index 5e144a095..c2ce1d741 100644
--- a/tests/experimental/liveness/liveness-5.slang.expected
+++ b/tests/experimental/liveness/liveness-5.slang.expected
@@ -40,8 +40,7 @@ int calcThing_0(int offset_0)
livenessEnd_0(k_0, 0);
break;
}
- int _S1 = (k_0 + 7) % 5;
- bool _S2 = _S1 == 4;
+ bool _S1 = (k_0 + 7) % 5 == 4;
int k_1 = k_0 + 1;
int i_0;
livenessStart_1(i_0, 0);
@@ -60,10 +59,10 @@ int calcThing_0(int offset_0)
i_0 = i_0 + 1;
}
livenessEnd_0(k_0, 0);
- int _S3 = total_0;
+ int _S2 = total_0;
livenessEnd_0(total_0, 0);
- int total_1 = _S3 + another_0[k_0 & 1];
- if(_S2)
+ int total_1 = _S2 + another_0[k_0 & 1];
+ if(_S1)
{
livenessEnd_1(another_0, 0);
return 1;
@@ -84,16 +83,15 @@ int calcThing_0(int offset_0)
return total_0;
}
-layout(std430, binding = 0) buffer _S4 {
+layout(std430, binding = 0) buffer _S3 {
int _data[];
} outputBuffer_0;
layout(local_size_x = 4, local_size_y = 1, local_size_z = 1) in;
void main()
{
int index_0 = int(gl_GlobalInvocationID.x);
- uint _S5 = uint(index_0);
- int _S6 = calcThing_0(index_0);
- ((outputBuffer_0)._data[(_S5)]) = _S6;
+ int _S4 = calcThing_0(index_0);
+ ((outputBuffer_0)._data[(uint(index_0))]) = _S4;
return;
}
diff --git a/tests/experimental/liveness/liveness-6.slang.expected b/tests/experimental/liveness/liveness-6.slang.expected
index 0d2e997b2..45e94a242 100644
--- a/tests/experimental/liveness/liveness-6.slang.expected
+++ b/tests/experimental/liveness/liveness-6.slang.expected
@@ -45,8 +45,7 @@ int calcThing_0(int offset_0)
arr_0[0] = 2;
arr_0[1] = 3;
int _S1 = k_0 & 1;
- int _S2 = (k_0 + 7) % 5;
- bool _S3 = _S2 == 4;
+ bool _S2 = (k_0 + 7) % 5 == 4;
int k_1 = k_0 + 1;
int i_0;
livenessStart_1(i_0, 0);
@@ -66,13 +65,13 @@ int calcThing_0(int offset_0)
i_0 = i_0 + 1;
}
livenessEnd_0(k_0, 0);
- int _S4 = total_0;
+ int _S3 = total_0;
livenessEnd_0(total_0, 0);
- int total_1 = _S4 + another_0[_S1];
- int _S5 = arr_0[_S1];
+ int total_1 = _S3 + another_0[_S1];
+ int _S4 = arr_0[_S1];
livenessEnd_1(arr_0, 0);
- int total_2 = total_1 + _S5;
- if(_S3)
+ int total_2 = total_1 + _S4;
+ if(_S2)
{
livenessEnd_1(another_0, 0);
return 1;
@@ -93,16 +92,15 @@ int calcThing_0(int offset_0)
return total_0;
}
-layout(std430, binding = 0) buffer _S6 {
+layout(std430, binding = 0) buffer _S5 {
int _data[];
} outputBuffer_0;
layout(local_size_x = 4, local_size_y = 1, local_size_z = 1) in;
void main()
{
int index_0 = int(gl_GlobalInvocationID.x);
- uint _S7 = uint(index_0);
- int _S8 = calcThing_0(index_0);
- ((outputBuffer_0)._data[(_S7)]) = _S8;
+ int _S6 = calcThing_0(index_0);
+ ((outputBuffer_0)._data[(uint(index_0))]) = _S6;
return;
}
diff --git a/tests/experimental/liveness/liveness.slang.expected b/tests/experimental/liveness/liveness.slang.expected
index b0017ea9d..46b8f0922 100644
--- a/tests/experimental/liveness/liveness.slang.expected
+++ b/tests/experimental/liveness/liveness.slang.expected
@@ -92,9 +92,9 @@ layout(local_size_x = 4, local_size_y = 1, local_size_z = 1) in;
void main()
{
int index_0 = int(gl_GlobalInvocationID.x);
- const int _S10[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 _S11 = index_0 & 7;
- SomeStruct_0 _S12 = makeSomeStruct_0();
+ 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;
int v_1 = someSlowFunc_0(index_0);
bool _S13 = (v_1 & 256) != 0;
int _S14 = v_1 & 3;
@@ -118,7 +118,7 @@ void main()
livenessStart_2(s_3, 0);
SomeStruct_0 t_0;
livenessStart_2(t_0, 0);
- t_0 = _S12;
+ t_0 = _S10;
SomeStruct_0 u_0;
if(_S13)
{
@@ -127,7 +127,7 @@ void main()
livenessStart_2(u_0, 0);
u_0.a_1 = 0;
u_0.x_0 = 0;
- u_0.c_0 = _S10;
+ u_0.c_0 = _S11;
}
else
{
@@ -135,14 +135,14 @@ void main()
livenessStart_2(x_1, 0);
x_1.a_1 = 0;
x_1.x_0 = 0;
- x_1.c_0 = _S10;
+ x_1.c_0 = _S11;
x_1.x_0 = ((anotherBuffer_0)._data[(uint(_S14))]) + 1;
SomeStruct_0 _S15 = x_1;
livenessEnd_2(x_1, 0);
livenessStart_2(u_0, 0);
u_0 = _S15;
}
- s_3.c_0[_S11] = s_3.c_0[_S11] + 1;
+ 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;
livenessEnd_2(u_0, 0);
diff --git a/tests/hlsl-intrinsic/shader-execution-reordering/hit-object-trace-motion-ray.slang.1.expected b/tests/hlsl-intrinsic/shader-execution-reordering/hit-object-trace-motion-ray.slang.1.expected
index 12025efe0..4aa4c95c2 100644
--- a/tests/hlsl-intrinsic/shader-execution-reordering/hit-object-trace-motion-ray.slang.1.expected
+++ b/tests/hlsl-intrinsic/shader-execution-reordering/hit-object-trace-motion-ray.slang.1.expected
@@ -68,23 +68,22 @@ void main()
ivec2 launchID_0 = ivec2(_S3.xy);
uvec3 _S4 = ((gl_LaunchSizeEXT));
int idx_0 = launchID_0.x;
- int _S5 = idx_0 / 4;
- float currentTime_0 = float(_S5);
- float _S6 = float(idx_0);
- float _S7 = _S6 * 2.0;
+ float currentTime_0 = float(idx_0 / 4);
+ float _S5 = float(idx_0);
+ float _S6 = _S5 * 2.0;
RayDesc_0 ray_0;
- ray_0.Origin_0 = vec3(_S6, 0.0, 0.0);
+ ray_0.Origin_0 = vec3(_S5, 0.0, 0.0);
ray_0.TMin_0 = 0.00999999977648258209;
ray_0.Direction_0 = vec3(0.0, 1.0, 0.0);
ray_0.TMax_0 = 10000.0;
- RayDesc_0 _S8 = ray_0;
+ RayDesc_0 _S7 = ray_0;
p_0.a_0 = idx_0;
- p_0.b_0 = _S7;
+ p_0.b_0 = _S6;
hitObjectNV hitObj_0;
- hitObjectTraceRayMotionNV(hitObj_0, scene_0, 20U, 255U, 0U, 4U, 0U, _S8.Origin_0, _S8.TMin_0, _S8.Direction_0, _S8.TMax_0, currentTime_0, (0));
- uint _S9 = uint(idx_0);
- uint _S10 = calcValue_0(hitObj_0);
- ((outputBuffer_0)._data[(_S9)]) = _S10;
+ hitObjectTraceRayMotionNV(hitObj_0, scene_0, 20U, 255U, 0U, 4U, 0U, _S7.Origin_0, _S7.TMin_0, _S7.Direction_0, _S7.TMax_0, currentTime_0, (0));
+ uint _S8 = uint(idx_0);
+ uint _S9 = calcValue_0(hitObj_0);
+ ((outputBuffer_0)._data[(_S8)]) = _S9;
return;
}
diff --git a/tests/nv-extensions/nv-ray-tracing-motion-blur.slang.glsl b/tests/nv-extensions/nv-ray-tracing-motion-blur.slang.glsl
index bae5f361d..d58b07ffa 100644
--- a/tests/nv-extensions/nv-ray-tracing-motion-blur.slang.glsl
+++ b/tests/nv-extensions/nv-ray-tracing-motion-blur.slang.glsl
@@ -90,19 +90,16 @@ void main()
ivec2 launchID_0 = ivec2(_S2.xy);
uvec3 _S3 = ((gl_LaunchSizeEXT));
ivec2 launchSize_0 = ivec2(_S3.xy);
-
- float _S4 = (float(launchID_0.x) + 0.5) / float(launchSize_0.x);
- float _S5 = (float(launchID_0.y) + 0.5) / float(launchSize_0.y);
- vec2 inUV_0 = vec2(_S4, _S5);
- vec4 _S6 = (texture(sampler2D(samplerPosition_0,sampler_0), (inUV_0)));
- vec3 P_0 = _S6.xyz;
- vec4 _S7 = (texture(sampler2D(samplerNormal_0,sampler_0), (inUV_0)));
- vec3 N_0 = _S7.xyz * 2.0 - 1.0;
+ vec2 inUV_0 = vec2((float(launchID_0.x) + 0.5) / float(launchSize_0.x), (float(launchID_0.y) + 0.5) / float(launchSize_0.y));
+ vec4 _S4 = (texture(sampler2D(samplerPosition_0,sampler_0), (inUV_0)));
+ vec3 P_0 = _S4.xyz;
+ vec4 _S5 = (texture(sampler2D(samplerNormal_0,sampler_0), (inUV_0)));
+ vec3 N_0 = _S5.xyz * 2.0 - 1.0;
vec3 lightDelta_0 = ubo_0._data.light_0.position_0.xyz - P_0;
float lightDist_0 = length(lightDelta_0);
vec3 L_0 = normalize(lightDelta_0);
- float _S8 = 1.0 / (lightDist_0 * lightDist_0);
+ float _S6 = 1.0 / (lightDist_0 * lightDist_0);
RayDesc_0 ray_0;
ray_0.Origin_0 = P_0;
ray_0.TMin_0 = 0.00000099999999747524;
@@ -120,7 +117,7 @@ void main()
}
else
{
- atten_0 = _S8;
+ atten_0 = _S6;
}
vec3 color_2 = ubo_0._data.light_0.color_1.xyz * saturate_0(dot(N_0, L_0)) * atten_0;
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;
}
diff --git a/tests/vkray/callable-caller.slang.glsl b/tests/vkray/callable-caller.slang.glsl
index 11049074f..885c78dfa 100644
--- a/tests/vkray/callable-caller.slang.glsl
+++ b/tests/vkray/callable-caller.slang.glsl
@@ -41,10 +41,9 @@ void main()
uvec3 _S2 = ((gl_LaunchIDNV));
vec2 _S3 = vec2(_S2.xy);
uvec3 _S4 = ((gl_LaunchSizeNV));
- vec2 _S5 = _S3 / vec2(_S4.xy);
- payload_1.uv_0 = _S5;
+ payload_1.uv_0 = _S3 / vec2(_S4.xy);
CallShader_0(C_0._data.shaderIndex_0, payload_1);
- uvec3 _S6 = ((gl_LaunchIDNV));
- imageStore((gImage_0), ivec2((_S6.xy)), payload_1.albedo_0);
+ uvec3 _S5 = ((gl_LaunchIDNV));
+ imageStore((gImage_0), ivec2((_S5.xy)), payload_1.albedo_0);
return;
}
diff --git a/tests/vkray/raygen.slang.glsl b/tests/vkray/raygen.slang.glsl
index f86f67e82..5c609f795 100644
--- a/tests/vkray/raygen.slang.glsl
+++ b/tests/vkray/raygen.slang.glsl
@@ -92,17 +92,17 @@ void main()
uvec3 _S6 = ((gl_LaunchIDEXT));
float _S7 = float(_S6.y) + 0.5;
uvec3 _S8 = ((gl_LaunchSizeEXT));
- float _S9 = _S7 / float(_S8.y);
- vec2 inUV_0 = vec2(_S5, _S9);
- vec4 _S10 = (texture(sampler2D(samplerPosition_0,sampler_0), (inUV_0)));
- vec3 P_0 = _S10.xyz;
- vec4 _S11 = (texture(sampler2D(samplerNormal_0,sampler_0), (inUV_0)));
- vec3 N_0 = _S11.xyz * 2.0 - 1.0;
+
+ vec2 inUV_0 = vec2(_S5, _S7 / float(_S8.y));
+ vec4 _S9 = (texture(sampler2D(samplerPosition_0,sampler_0), (inUV_0)));
+ vec3 P_0 = _S9.xyz;
+ vec4 _S10 = (texture(sampler2D(samplerNormal_0,sampler_0), (inUV_0)));
+ vec3 N_0 = _S10.xyz * 2.0 - 1.0;
vec3 lightDelta_0 = ubo_0._data.light_0.position_0.xyz - P_0;
float lightDist_0 = length(lightDelta_0);
vec3 L_0 = normalize(lightDelta_0);
- float _S12 = 1.0 / (lightDist_0 * lightDist_0);
+ float _S11 = 1.0 / (lightDist_0 * lightDist_0);
RayDesc_0 ray_0;
ray_0.Origin_0 = P_0;
ray_0.TMin_0 = 0.00000099999999747524;
@@ -119,14 +119,14 @@ void main()
}
else
{
- atten_0 = _S12;
+ atten_0 = _S11;
}
vec3 color_2 = ubo_0._data.light_0.color_1.xyz * saturate_0(dot(N_0, L_0)) * atten_0;
ReflectionRay_0 reflectionRay_0;
TraceRay_1(as_0, 1U, 255U, 0U, 0U, 2U, ray_0, reflectionRay_0);
vec3 color_3 = color_2 + reflectionRay_0.color_0;
- uvec3 _S13 = ((gl_LaunchIDEXT));
- imageStore((outputImage_0), ivec2((uvec2(ivec2(_S13.xy)))), vec4(color_3, 1.0));
+ uvec3 _S12 = ((gl_LaunchIDEXT));
+ imageStore((outputImage_0), ivec2((uvec2(ivec2(_S12.xy)))), vec4(color_3, 1.0));
return;
}