summaryrefslogtreecommitdiffstats
path: root/tests/compute
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2023-07-12 16:00:05 -0700
committerGitHub <noreply@github.com>2023-07-12 16:00:05 -0700
commit261b2f1f2bc13ccf7db5ec68c825ffc7b0781f7f (patch)
tree4953e376e705a8110cb8164dda5b239c04f2768b /tests/compute
parentbbd9c2e6d7b57f5acc3238083ab2f7c7b140df5e (diff)
Use scratchData on `IRInst` to replace HashSets. (#2978)
* Use scratchData on `IRInst` to replace HashSets. * Update test results. * Initialize scratchData. * Update autodiff documentation. * Use enum instead of bool. --------- Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'tests/compute')
-rw-r--r--tests/compute/half-texture.slang.glsl36
1 files changed, 21 insertions, 15 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
+}