From d9b68eb691b696dbb6c9a9245e458f32c4a4b43c Mon Sep 17 00:00:00 2001 From: dan sinclair Date: Thu, 10 Nov 2022 00:32:12 +0000 Subject: [PATCH] Fix generation of f16 values. The generator script was not using the test values for `f16`, they always got a zero initialization. This CL fixes the script to generate `f16` values. Change-Id: I95e8f2c7007251a646de05b4f7fe0aad14e740f8 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/109342 Reviewed-by: Ben Clayton Kokoro: Kokoro Commit-Queue: Dan Sinclair --- test/tint/builtins/gen/gen.wgsl.tmpl | 1 + .../tint/builtins/gen/literal/abs/421ca3.wgsl | 2 +- .../literal/abs/421ca3.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/abs/421ca3.wgsl.expected.glsl | 6 +- .../gen/literal/abs/421ca3.wgsl.expected.msl | 2 +- .../literal/abs/421ca3.wgsl.expected.spvasm | 32 +++++----- .../gen/literal/abs/421ca3.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/literal/abs/538d29.wgsl | 2 +- .../literal/abs/538d29.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/abs/538d29.wgsl.expected.glsl | 6 +- .../gen/literal/abs/538d29.wgsl.expected.msl | 2 +- .../literal/abs/538d29.wgsl.expected.spvasm | 32 +++++----- .../gen/literal/abs/538d29.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/literal/abs/5ae4fe.wgsl | 2 +- .../literal/abs/5ae4fe.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/abs/5ae4fe.wgsl.expected.glsl | 6 +- .../gen/literal/abs/5ae4fe.wgsl.expected.msl | 2 +- .../literal/abs/5ae4fe.wgsl.expected.spvasm | 32 +++++----- .../gen/literal/abs/5ae4fe.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/literal/abs/fd247f.wgsl | 2 +- .../literal/abs/fd247f.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/abs/fd247f.wgsl.expected.glsl | 6 +- .../gen/literal/abs/fd247f.wgsl.expected.msl | 2 +- .../literal/abs/fd247f.wgsl.expected.spvasm | 31 +++++----- .../gen/literal/abs/fd247f.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/acos/004aff.wgsl | 2 +- .../acos/004aff.wgsl.expected.dxc.hlsl | 2 +- .../literal/acos/004aff.wgsl.expected.glsl | 6 +- .../gen/literal/acos/004aff.wgsl.expected.msl | 2 +- .../literal/acos/004aff.wgsl.expected.spvasm | 4 +- .../literal/acos/004aff.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/acos/203628.wgsl | 2 +- .../acos/203628.wgsl.expected.dxc.hlsl | 2 +- .../literal/acos/203628.wgsl.expected.glsl | 6 +- .../gen/literal/acos/203628.wgsl.expected.msl | 2 +- .../literal/acos/203628.wgsl.expected.spvasm | 4 +- .../literal/acos/203628.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/acos/303e3d.wgsl | 2 +- .../acos/303e3d.wgsl.expected.dxc.hlsl | 2 +- .../literal/acos/303e3d.wgsl.expected.glsl | 6 +- .../gen/literal/acos/303e3d.wgsl.expected.msl | 2 +- .../literal/acos/303e3d.wgsl.expected.spvasm | 4 +- .../literal/acos/303e3d.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/acos/f47057.wgsl | 2 +- .../acos/f47057.wgsl.expected.dxc.hlsl | 2 +- .../literal/acos/f47057.wgsl.expected.glsl | 6 +- .../gen/literal/acos/f47057.wgsl.expected.msl | 2 +- .../literal/acos/f47057.wgsl.expected.spvasm | 4 +- .../literal/acos/f47057.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/acosh/5f49d8.wgsl | 2 +- .../acosh/5f49d8.wgsl.expected.dxc.hlsl | 2 +- .../literal/acosh/5f49d8.wgsl.expected.glsl | 6 +- .../literal/acosh/5f49d8.wgsl.expected.msl | 2 +- .../literal/acosh/5f49d8.wgsl.expected.spvasm | 2 +- .../literal/acosh/5f49d8.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/acosh/a37dfe.wgsl | 2 +- .../acosh/a37dfe.wgsl.expected.dxc.hlsl | 2 +- .../literal/acosh/a37dfe.wgsl.expected.glsl | 6 +- .../literal/acosh/a37dfe.wgsl.expected.msl | 2 +- .../literal/acosh/a37dfe.wgsl.expected.spvasm | 2 +- .../literal/acosh/a37dfe.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/acosh/de60d8.wgsl | 2 +- .../acosh/de60d8.wgsl.expected.dxc.hlsl | 2 +- .../literal/acosh/de60d8.wgsl.expected.glsl | 6 +- .../literal/acosh/de60d8.wgsl.expected.msl | 2 +- .../literal/acosh/de60d8.wgsl.expected.spvasm | 2 +- .../literal/acosh/de60d8.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/acosh/f56574.wgsl | 2 +- .../acosh/f56574.wgsl.expected.dxc.hlsl | 2 +- .../literal/acosh/f56574.wgsl.expected.glsl | 6 +- .../literal/acosh/f56574.wgsl.expected.msl | 2 +- .../literal/acosh/f56574.wgsl.expected.spvasm | 2 +- .../literal/acosh/f56574.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/asin/11dfda.wgsl | 2 +- .../asin/11dfda.wgsl.expected.dxc.hlsl | 2 +- .../literal/asin/11dfda.wgsl.expected.glsl | 6 +- .../gen/literal/asin/11dfda.wgsl.expected.msl | 2 +- .../literal/asin/11dfda.wgsl.expected.spvasm | 31 +++++----- .../literal/asin/11dfda.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/asin/2d8e29.wgsl | 2 +- .../asin/2d8e29.wgsl.expected.dxc.hlsl | 2 +- .../literal/asin/2d8e29.wgsl.expected.glsl | 6 +- .../gen/literal/asin/2d8e29.wgsl.expected.msl | 2 +- .../literal/asin/2d8e29.wgsl.expected.spvasm | 32 +++++----- .../literal/asin/2d8e29.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/asin/3cfbd4.wgsl | 2 +- .../asin/3cfbd4.wgsl.expected.dxc.hlsl | 2 +- .../literal/asin/3cfbd4.wgsl.expected.glsl | 6 +- .../gen/literal/asin/3cfbd4.wgsl.expected.msl | 2 +- .../literal/asin/3cfbd4.wgsl.expected.spvasm | 32 +++++----- .../literal/asin/3cfbd4.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/asin/b4aced.wgsl | 2 +- .../asin/b4aced.wgsl.expected.dxc.hlsl | 2 +- .../literal/asin/b4aced.wgsl.expected.glsl | 6 +- .../gen/literal/asin/b4aced.wgsl.expected.msl | 2 +- .../literal/asin/b4aced.wgsl.expected.spvasm | 32 +++++----- .../literal/asin/b4aced.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/asinh/468a48.wgsl | 2 +- .../asinh/468a48.wgsl.expected.dxc.hlsl | 2 +- .../literal/asinh/468a48.wgsl.expected.glsl | 6 +- .../literal/asinh/468a48.wgsl.expected.msl | 2 +- .../literal/asinh/468a48.wgsl.expected.spvasm | 31 +++++----- .../literal/asinh/468a48.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/asinh/95ab2b.wgsl | 2 +- .../asinh/95ab2b.wgsl.expected.dxc.hlsl | 2 +- .../literal/asinh/95ab2b.wgsl.expected.glsl | 6 +- .../literal/asinh/95ab2b.wgsl.expected.msl | 2 +- .../literal/asinh/95ab2b.wgsl.expected.spvasm | 32 +++++----- .../literal/asinh/95ab2b.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/asinh/ad8f8b.wgsl | 2 +- .../asinh/ad8f8b.wgsl.expected.dxc.hlsl | 2 +- .../literal/asinh/ad8f8b.wgsl.expected.glsl | 6 +- .../literal/asinh/ad8f8b.wgsl.expected.msl | 2 +- .../literal/asinh/ad8f8b.wgsl.expected.spvasm | 32 +++++----- .../literal/asinh/ad8f8b.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/asinh/fb5e8c.wgsl | 2 +- .../asinh/fb5e8c.wgsl.expected.dxc.hlsl | 2 +- .../literal/asinh/fb5e8c.wgsl.expected.glsl | 6 +- .../literal/asinh/fb5e8c.wgsl.expected.msl | 2 +- .../literal/asinh/fb5e8c.wgsl.expected.spvasm | 32 +++++----- .../literal/asinh/fb5e8c.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/atan/19faea.wgsl | 2 +- .../atan/19faea.wgsl.expected.dxc.hlsl | 2 +- .../literal/atan/19faea.wgsl.expected.glsl | 6 +- .../gen/literal/atan/19faea.wgsl.expected.msl | 2 +- .../literal/atan/19faea.wgsl.expected.spvasm | 32 +++++----- .../literal/atan/19faea.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/atan/1e1764.wgsl | 2 +- .../atan/1e1764.wgsl.expected.dxc.hlsl | 2 +- .../literal/atan/1e1764.wgsl.expected.glsl | 6 +- .../gen/literal/atan/1e1764.wgsl.expected.msl | 2 +- .../literal/atan/1e1764.wgsl.expected.spvasm | 32 +++++----- .../literal/atan/1e1764.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/atan/a5f421.wgsl | 2 +- .../atan/a5f421.wgsl.expected.dxc.hlsl | 2 +- .../literal/atan/a5f421.wgsl.expected.glsl | 6 +- .../gen/literal/atan/a5f421.wgsl.expected.msl | 2 +- .../literal/atan/a5f421.wgsl.expected.spvasm | 32 +++++----- .../literal/atan/a5f421.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/atan/a7ba61.wgsl | 2 +- .../atan/a7ba61.wgsl.expected.dxc.hlsl | 2 +- .../literal/atan/a7ba61.wgsl.expected.glsl | 6 +- .../gen/literal/atan/a7ba61.wgsl.expected.msl | 2 +- .../literal/atan/a7ba61.wgsl.expected.spvasm | 31 +++++----- .../literal/atan/a7ba61.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/atan2/21dfea.wgsl | 2 +- .../atan2/21dfea.wgsl.expected.dxc.hlsl | 2 +- .../literal/atan2/21dfea.wgsl.expected.glsl | 6 +- .../literal/atan2/21dfea.wgsl.expected.msl | 2 +- .../literal/atan2/21dfea.wgsl.expected.spvasm | 32 +++++----- .../literal/atan2/21dfea.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/atan2/93febc.wgsl | 2 +- .../atan2/93febc.wgsl.expected.dxc.hlsl | 2 +- .../literal/atan2/93febc.wgsl.expected.glsl | 6 +- .../literal/atan2/93febc.wgsl.expected.msl | 2 +- .../literal/atan2/93febc.wgsl.expected.spvasm | 32 +++++----- .../literal/atan2/93febc.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/atan2/ca698e.wgsl | 2 +- .../atan2/ca698e.wgsl.expected.dxc.hlsl | 2 +- .../literal/atan2/ca698e.wgsl.expected.glsl | 6 +- .../literal/atan2/ca698e.wgsl.expected.msl | 2 +- .../literal/atan2/ca698e.wgsl.expected.spvasm | 31 +++++----- .../literal/atan2/ca698e.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/atan2/d983ab.wgsl | 2 +- .../atan2/d983ab.wgsl.expected.dxc.hlsl | 2 +- .../literal/atan2/d983ab.wgsl.expected.glsl | 6 +- .../literal/atan2/d983ab.wgsl.expected.msl | 2 +- .../literal/atan2/d983ab.wgsl.expected.spvasm | 32 +++++----- .../literal/atan2/d983ab.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/atanh/5bf88d.wgsl | 2 +- .../atanh/5bf88d.wgsl.expected.dxc.hlsl | 2 +- .../literal/atanh/5bf88d.wgsl.expected.glsl | 6 +- .../literal/atanh/5bf88d.wgsl.expected.msl | 2 +- .../literal/atanh/5bf88d.wgsl.expected.spvasm | 32 +++++----- .../literal/atanh/5bf88d.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/atanh/d2d8cd.wgsl | 2 +- .../atanh/d2d8cd.wgsl.expected.dxc.hlsl | 2 +- .../literal/atanh/d2d8cd.wgsl.expected.glsl | 6 +- .../literal/atanh/d2d8cd.wgsl.expected.msl | 2 +- .../literal/atanh/d2d8cd.wgsl.expected.spvasm | 31 +++++----- .../literal/atanh/d2d8cd.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/atanh/e3b450.wgsl | 2 +- .../atanh/e3b450.wgsl.expected.dxc.hlsl | 2 +- .../literal/atanh/e3b450.wgsl.expected.glsl | 6 +- .../literal/atanh/e3b450.wgsl.expected.msl | 2 +- .../literal/atanh/e3b450.wgsl.expected.spvasm | 32 +++++----- .../literal/atanh/e3b450.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/atanh/ec4b06.wgsl | 2 +- .../atanh/ec4b06.wgsl.expected.dxc.hlsl | 2 +- .../literal/atanh/ec4b06.wgsl.expected.glsl | 6 +- .../literal/atanh/ec4b06.wgsl.expected.msl | 2 +- .../literal/atanh/ec4b06.wgsl.expected.spvasm | 32 +++++----- .../literal/atanh/ec4b06.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/ceil/09bf52.wgsl | 2 +- .../ceil/09bf52.wgsl.expected.dxc.hlsl | 2 +- .../literal/ceil/09bf52.wgsl.expected.glsl | 6 +- .../gen/literal/ceil/09bf52.wgsl.expected.msl | 2 +- .../literal/ceil/09bf52.wgsl.expected.spvasm | 32 +++++----- .../literal/ceil/09bf52.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/ceil/18c240.wgsl | 2 +- .../ceil/18c240.wgsl.expected.dxc.hlsl | 2 +- .../literal/ceil/18c240.wgsl.expected.glsl | 6 +- .../gen/literal/ceil/18c240.wgsl.expected.msl | 2 +- .../literal/ceil/18c240.wgsl.expected.spvasm | 32 +++++----- .../literal/ceil/18c240.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/ceil/4bca2a.wgsl | 2 +- .../ceil/4bca2a.wgsl.expected.dxc.hlsl | 2 +- .../literal/ceil/4bca2a.wgsl.expected.glsl | 6 +- .../gen/literal/ceil/4bca2a.wgsl.expected.msl | 2 +- .../literal/ceil/4bca2a.wgsl.expected.spvasm | 32 +++++----- .../literal/ceil/4bca2a.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/ceil/f3f889.wgsl | 2 +- .../ceil/f3f889.wgsl.expected.dxc.hlsl | 2 +- .../literal/ceil/f3f889.wgsl.expected.glsl | 6 +- .../gen/literal/ceil/f3f889.wgsl.expected.msl | 2 +- .../literal/ceil/f3f889.wgsl.expected.spvasm | 31 +++++----- .../literal/ceil/f3f889.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/clamp/235b29.wgsl | 2 +- .../clamp/235b29.wgsl.expected.dxc.hlsl | 2 +- .../literal/clamp/235b29.wgsl.expected.glsl | 6 +- .../literal/clamp/235b29.wgsl.expected.msl | 2 +- .../literal/clamp/235b29.wgsl.expected.spvasm | 32 +++++----- .../literal/clamp/235b29.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/clamp/2c251b.wgsl | 2 +- .../clamp/2c251b.wgsl.expected.dxc.hlsl | 2 +- .../literal/clamp/2c251b.wgsl.expected.glsl | 6 +- .../literal/clamp/2c251b.wgsl.expected.msl | 2 +- .../literal/clamp/2c251b.wgsl.expected.spvasm | 32 +++++----- .../literal/clamp/2c251b.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/clamp/553ffb.wgsl | 2 +- .../clamp/553ffb.wgsl.expected.dxc.hlsl | 2 +- .../literal/clamp/553ffb.wgsl.expected.glsl | 6 +- .../literal/clamp/553ffb.wgsl.expected.msl | 2 +- .../literal/clamp/553ffb.wgsl.expected.spvasm | 31 +++++----- .../literal/clamp/553ffb.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/clamp/b195eb.wgsl | 2 +- .../clamp/b195eb.wgsl.expected.dxc.hlsl | 2 +- .../literal/clamp/b195eb.wgsl.expected.glsl | 6 +- .../literal/clamp/b195eb.wgsl.expected.msl | 2 +- .../literal/clamp/b195eb.wgsl.expected.spvasm | 32 +++++----- .../literal/clamp/b195eb.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/literal/cos/0835a8.wgsl | 2 +- .../literal/cos/0835a8.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/cos/0835a8.wgsl.expected.glsl | 6 +- .../gen/literal/cos/0835a8.wgsl.expected.msl | 2 +- .../literal/cos/0835a8.wgsl.expected.spvasm | 32 +++++----- .../gen/literal/cos/0835a8.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/literal/cos/0a89f7.wgsl | 2 +- .../literal/cos/0a89f7.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/cos/0a89f7.wgsl.expected.glsl | 6 +- .../gen/literal/cos/0a89f7.wgsl.expected.msl | 2 +- .../literal/cos/0a89f7.wgsl.expected.spvasm | 32 +++++----- .../gen/literal/cos/0a89f7.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/literal/cos/5bc2c6.wgsl | 2 +- .../literal/cos/5bc2c6.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/cos/5bc2c6.wgsl.expected.glsl | 6 +- .../gen/literal/cos/5bc2c6.wgsl.expected.msl | 2 +- .../literal/cos/5bc2c6.wgsl.expected.spvasm | 32 +++++----- .../gen/literal/cos/5bc2c6.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/literal/cos/fc047d.wgsl | 2 +- .../literal/cos/fc047d.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/cos/fc047d.wgsl.expected.glsl | 6 +- .../gen/literal/cos/fc047d.wgsl.expected.msl | 2 +- .../literal/cos/fc047d.wgsl.expected.spvasm | 31 +++++----- .../gen/literal/cos/fc047d.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/cosh/2ed778.wgsl | 2 +- .../cosh/2ed778.wgsl.expected.dxc.hlsl | 2 +- .../literal/cosh/2ed778.wgsl.expected.glsl | 6 +- .../gen/literal/cosh/2ed778.wgsl.expected.msl | 2 +- .../literal/cosh/2ed778.wgsl.expected.spvasm | 31 +++++----- .../literal/cosh/2ed778.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/cosh/3b7bbf.wgsl | 2 +- .../cosh/3b7bbf.wgsl.expected.dxc.hlsl | 2 +- .../literal/cosh/3b7bbf.wgsl.expected.glsl | 6 +- .../gen/literal/cosh/3b7bbf.wgsl.expected.msl | 2 +- .../literal/cosh/3b7bbf.wgsl.expected.spvasm | 32 +++++----- .../literal/cosh/3b7bbf.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/cosh/43b672.wgsl | 2 +- .../cosh/43b672.wgsl.expected.dxc.hlsl | 2 +- .../literal/cosh/43b672.wgsl.expected.glsl | 6 +- .../gen/literal/cosh/43b672.wgsl.expected.msl | 2 +- .../literal/cosh/43b672.wgsl.expected.spvasm | 32 +++++----- .../literal/cosh/43b672.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/cosh/b1b8a0.wgsl | 2 +- .../cosh/b1b8a0.wgsl.expected.dxc.hlsl | 2 +- .../literal/cosh/b1b8a0.wgsl.expected.glsl | 6 +- .../gen/literal/cosh/b1b8a0.wgsl.expected.msl | 2 +- .../literal/cosh/b1b8a0.wgsl.expected.spvasm | 32 +++++----- .../literal/cosh/b1b8a0.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/cross/9857cb.wgsl | 2 +- .../literal/cross/9857cb.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/degrees/3055d3.wgsl | 2 +- .../degrees/3055d3.wgsl.expected.dxc.hlsl | 2 +- .../literal/degrees/3055d3.wgsl.expected.glsl | 6 +- .../literal/degrees/3055d3.wgsl.expected.msl | 2 +- .../degrees/3055d3.wgsl.expected.spvasm | 32 +++++----- .../literal/degrees/3055d3.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/degrees/5e9805.wgsl | 2 +- .../degrees/5e9805.wgsl.expected.dxc.hlsl | 2 +- .../literal/degrees/5e9805.wgsl.expected.glsl | 6 +- .../literal/degrees/5e9805.wgsl.expected.msl | 2 +- .../degrees/5e9805.wgsl.expected.spvasm | 31 +++++----- .../literal/degrees/5e9805.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/degrees/dfe8f4.wgsl | 2 +- .../degrees/dfe8f4.wgsl.expected.dxc.hlsl | 2 +- .../literal/degrees/dfe8f4.wgsl.expected.glsl | 6 +- .../literal/degrees/dfe8f4.wgsl.expected.msl | 2 +- .../degrees/dfe8f4.wgsl.expected.spvasm | 32 +++++----- .../literal/degrees/dfe8f4.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/degrees/f59715.wgsl | 2 +- .../degrees/f59715.wgsl.expected.dxc.hlsl | 2 +- .../literal/degrees/f59715.wgsl.expected.glsl | 6 +- .../literal/degrees/f59715.wgsl.expected.msl | 2 +- .../degrees/f59715.wgsl.expected.spvasm | 32 +++++----- .../literal/degrees/f59715.wgsl.expected.wgsl | 2 +- .../gen/literal/determinant/32bfde.wgsl | 2 +- .../determinant/32bfde.wgsl.expected.dxc.hlsl | 2 +- .../determinant/32bfde.wgsl.expected.glsl | 6 +- .../determinant/32bfde.wgsl.expected.msl | 2 +- .../determinant/32bfde.wgsl.expected.spvasm | 34 ++++++----- .../determinant/32bfde.wgsl.expected.wgsl | 2 +- .../gen/literal/determinant/d7c86f.wgsl | 2 +- .../determinant/d7c86f.wgsl.expected.dxc.hlsl | 2 +- .../determinant/d7c86f.wgsl.expected.glsl | 6 +- .../determinant/d7c86f.wgsl.expected.msl | 2 +- .../determinant/d7c86f.wgsl.expected.spvasm | 34 ++++++----- .../determinant/d7c86f.wgsl.expected.wgsl | 2 +- .../gen/literal/determinant/fc12a5.wgsl | 2 +- .../determinant/fc12a5.wgsl.expected.dxc.hlsl | 2 +- .../determinant/fc12a5.wgsl.expected.glsl | 6 +- .../determinant/fc12a5.wgsl.expected.msl | 2 +- .../determinant/fc12a5.wgsl.expected.spvasm | 34 ++++++----- .../determinant/fc12a5.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/distance/7272f3.wgsl | 2 +- .../distance/7272f3.wgsl.expected.dxc.hlsl | 2 +- .../distance/7272f3.wgsl.expected.glsl | 6 +- .../literal/distance/7272f3.wgsl.expected.msl | 2 +- .../distance/7272f3.wgsl.expected.spvasm | 33 +++++----- .../distance/7272f3.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/distance/7d201f.wgsl | 2 +- .../distance/7d201f.wgsl.expected.dxc.hlsl | 2 +- .../distance/7d201f.wgsl.expected.glsl | 6 +- .../literal/distance/7d201f.wgsl.expected.msl | 2 +- .../distance/7d201f.wgsl.expected.spvasm | 31 +++++----- .../distance/7d201f.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/distance/892a5d.wgsl | 2 +- .../distance/892a5d.wgsl.expected.dxc.hlsl | 2 +- .../distance/892a5d.wgsl.expected.glsl | 6 +- .../literal/distance/892a5d.wgsl.expected.msl | 2 +- .../distance/892a5d.wgsl.expected.spvasm | 33 +++++----- .../distance/892a5d.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/distance/928fa0.wgsl | 2 +- .../distance/928fa0.wgsl.expected.dxc.hlsl | 2 +- .../distance/928fa0.wgsl.expected.glsl | 6 +- .../literal/distance/928fa0.wgsl.expected.msl | 2 +- .../distance/928fa0.wgsl.expected.spvasm | 33 +++++----- .../distance/928fa0.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/literal/dot/8e40f1.wgsl | 2 +- .../literal/dot/8e40f1.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/dot/8e40f1.wgsl.expected.glsl | 6 +- .../gen/literal/dot/8e40f1.wgsl.expected.msl | 2 +- .../literal/dot/8e40f1.wgsl.expected.spvasm | 33 +++++----- .../gen/literal/dot/8e40f1.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/literal/dot/cd5a04.wgsl | 2 +- .../literal/dot/cd5a04.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/dot/cd5a04.wgsl.expected.glsl | 6 +- .../gen/literal/dot/cd5a04.wgsl.expected.msl | 2 +- .../literal/dot/cd5a04.wgsl.expected.spvasm | 33 +++++----- .../gen/literal/dot/cd5a04.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/literal/dot/d0d179.wgsl | 2 +- .../literal/dot/d0d179.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/dot/d0d179.wgsl.expected.glsl | 6 +- .../gen/literal/dot/d0d179.wgsl.expected.msl | 2 +- .../literal/dot/d0d179.wgsl.expected.spvasm | 33 +++++----- .../gen/literal/dot/d0d179.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/literal/exp/13806d.wgsl | 2 +- .../literal/exp/13806d.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/exp/13806d.wgsl.expected.glsl | 6 +- .../gen/literal/exp/13806d.wgsl.expected.msl | 2 +- .../literal/exp/13806d.wgsl.expected.spvasm | 32 +++++----- .../gen/literal/exp/13806d.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/literal/exp/2e08e2.wgsl | 2 +- .../literal/exp/2e08e2.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/exp/2e08e2.wgsl.expected.glsl | 6 +- .../gen/literal/exp/2e08e2.wgsl.expected.msl | 2 +- .../literal/exp/2e08e2.wgsl.expected.spvasm | 32 +++++----- .../gen/literal/exp/2e08e2.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/literal/exp/611a87.wgsl | 2 +- .../literal/exp/611a87.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/exp/611a87.wgsl.expected.glsl | 6 +- .../gen/literal/exp/611a87.wgsl.expected.msl | 2 +- .../literal/exp/611a87.wgsl.expected.spvasm | 32 +++++----- .../gen/literal/exp/611a87.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/literal/exp/c18fe9.wgsl | 2 +- .../literal/exp/c18fe9.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/exp/c18fe9.wgsl.expected.glsl | 6 +- .../gen/literal/exp/c18fe9.wgsl.expected.msl | 2 +- .../literal/exp/c18fe9.wgsl.expected.spvasm | 31 +++++----- .../gen/literal/exp/c18fe9.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/exp2/151a4c.wgsl | 2 +- .../exp2/151a4c.wgsl.expected.dxc.hlsl | 2 +- .../literal/exp2/151a4c.wgsl.expected.glsl | 6 +- .../gen/literal/exp2/151a4c.wgsl.expected.msl | 2 +- .../literal/exp2/151a4c.wgsl.expected.spvasm | 32 +++++----- .../literal/exp2/151a4c.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/exp2/751377.wgsl | 2 +- .../exp2/751377.wgsl.expected.dxc.hlsl | 2 +- .../literal/exp2/751377.wgsl.expected.glsl | 6 +- .../gen/literal/exp2/751377.wgsl.expected.msl | 2 +- .../literal/exp2/751377.wgsl.expected.spvasm | 32 +++++----- .../literal/exp2/751377.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/exp2/b408e4.wgsl | 2 +- .../exp2/b408e4.wgsl.expected.dxc.hlsl | 2 +- .../literal/exp2/b408e4.wgsl.expected.glsl | 6 +- .../gen/literal/exp2/b408e4.wgsl.expected.msl | 2 +- .../literal/exp2/b408e4.wgsl.expected.spvasm | 31 +++++----- .../literal/exp2/b408e4.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/exp2/ffa827.wgsl | 2 +- .../exp2/ffa827.wgsl.expected.dxc.hlsl | 2 +- .../literal/exp2/ffa827.wgsl.expected.glsl | 6 +- .../gen/literal/exp2/ffa827.wgsl.expected.msl | 2 +- .../literal/exp2/ffa827.wgsl.expected.spvasm | 32 +++++----- .../literal/exp2/ffa827.wgsl.expected.wgsl | 2 +- .../gen/literal/faceForward/524986.wgsl | 2 +- .../faceForward/524986.wgsl.expected.dxc.hlsl | 2 +- .../faceForward/524986.wgsl.expected.glsl | 6 +- .../faceForward/524986.wgsl.expected.msl | 2 +- .../faceForward/524986.wgsl.expected.spvasm | 32 +++++----- .../faceForward/524986.wgsl.expected.wgsl | 2 +- .../gen/literal/faceForward/cc63dc.wgsl | 2 +- .../faceForward/cc63dc.wgsl.expected.dxc.hlsl | 2 +- .../faceForward/cc63dc.wgsl.expected.glsl | 6 +- .../faceForward/cc63dc.wgsl.expected.msl | 2 +- .../faceForward/cc63dc.wgsl.expected.spvasm | 32 +++++----- .../faceForward/cc63dc.wgsl.expected.wgsl | 2 +- .../gen/literal/faceForward/fb0f2e.wgsl | 2 +- .../faceForward/fb0f2e.wgsl.expected.dxc.hlsl | 2 +- .../faceForward/fb0f2e.wgsl.expected.glsl | 6 +- .../faceForward/fb0f2e.wgsl.expected.msl | 2 +- .../faceForward/fb0f2e.wgsl.expected.spvasm | 32 +++++----- .../faceForward/fb0f2e.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/floor/3802c0.wgsl | 2 +- .../floor/3802c0.wgsl.expected.dxc.hlsl | 2 +- .../literal/floor/3802c0.wgsl.expected.glsl | 6 +- .../literal/floor/3802c0.wgsl.expected.msl | 2 +- .../literal/floor/3802c0.wgsl.expected.spvasm | 32 +++++----- .../literal/floor/3802c0.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/floor/84658c.wgsl | 2 +- .../floor/84658c.wgsl.expected.dxc.hlsl | 2 +- .../literal/floor/84658c.wgsl.expected.glsl | 6 +- .../literal/floor/84658c.wgsl.expected.msl | 2 +- .../literal/floor/84658c.wgsl.expected.spvasm | 32 +++++----- .../literal/floor/84658c.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/floor/a2d31b.wgsl | 2 +- .../floor/a2d31b.wgsl.expected.dxc.hlsl | 2 +- .../literal/floor/a2d31b.wgsl.expected.glsl | 6 +- .../literal/floor/a2d31b.wgsl.expected.msl | 2 +- .../literal/floor/a2d31b.wgsl.expected.spvasm | 32 +++++----- .../literal/floor/a2d31b.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/floor/b6e09c.wgsl | 2 +- .../floor/b6e09c.wgsl.expected.dxc.hlsl | 2 +- .../literal/floor/b6e09c.wgsl.expected.glsl | 6 +- .../literal/floor/b6e09c.wgsl.expected.msl | 2 +- .../literal/floor/b6e09c.wgsl.expected.spvasm | 31 +++++----- .../literal/floor/b6e09c.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/literal/fma/ab7818.wgsl | 2 +- .../literal/fma/ab7818.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/fma/ab7818.wgsl.expected.glsl | 6 +- .../gen/literal/fma/ab7818.wgsl.expected.msl | 2 +- .../literal/fma/ab7818.wgsl.expected.spvasm | 32 +++++----- .../gen/literal/fma/ab7818.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/literal/fma/bf21b6.wgsl | 2 +- .../literal/fma/bf21b6.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/fma/bf21b6.wgsl.expected.glsl | 6 +- .../gen/literal/fma/bf21b6.wgsl.expected.msl | 2 +- .../literal/fma/bf21b6.wgsl.expected.spvasm | 32 +++++----- .../gen/literal/fma/bf21b6.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/literal/fma/c8abb3.wgsl | 2 +- .../literal/fma/c8abb3.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/fma/c8abb3.wgsl.expected.glsl | 6 +- .../gen/literal/fma/c8abb3.wgsl.expected.msl | 2 +- .../literal/fma/c8abb3.wgsl.expected.spvasm | 31 +++++----- .../gen/literal/fma/c8abb3.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/literal/fma/e7abdc.wgsl | 2 +- .../literal/fma/e7abdc.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/fma/e7abdc.wgsl.expected.glsl | 6 +- .../gen/literal/fma/e7abdc.wgsl.expected.msl | 2 +- .../literal/fma/e7abdc.wgsl.expected.spvasm | 32 +++++----- .../gen/literal/fma/e7abdc.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/fract/181aa9.wgsl | 2 +- .../fract/181aa9.wgsl.expected.dxc.hlsl | 2 +- .../literal/fract/181aa9.wgsl.expected.glsl | 6 +- .../literal/fract/181aa9.wgsl.expected.msl | 2 +- .../literal/fract/181aa9.wgsl.expected.spvasm | 32 +++++----- .../literal/fract/181aa9.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/fract/498c77.wgsl | 2 +- .../fract/498c77.wgsl.expected.dxc.hlsl | 2 +- .../literal/fract/498c77.wgsl.expected.glsl | 6 +- .../literal/fract/498c77.wgsl.expected.msl | 2 +- .../literal/fract/498c77.wgsl.expected.spvasm | 32 +++++----- .../literal/fract/498c77.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/fract/958a1d.wgsl | 2 +- .../fract/958a1d.wgsl.expected.dxc.hlsl | 2 +- .../literal/fract/958a1d.wgsl.expected.glsl | 6 +- .../literal/fract/958a1d.wgsl.expected.msl | 2 +- .../literal/fract/958a1d.wgsl.expected.spvasm | 32 +++++----- .../literal/fract/958a1d.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/fract/eb38ce.wgsl | 2 +- .../fract/eb38ce.wgsl.expected.dxc.hlsl | 2 +- .../literal/fract/eb38ce.wgsl.expected.glsl | 6 +- .../literal/fract/eb38ce.wgsl.expected.msl | 2 +- .../literal/fract/eb38ce.wgsl.expected.spvasm | 31 +++++----- .../literal/fract/eb38ce.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/frexp/3dd21e.wgsl | 2 +- .../frexp/3dd21e.wgsl.expected.dxc.hlsl | 2 +- .../literal/frexp/3dd21e.wgsl.expected.glsl | 6 +- .../literal/frexp/3dd21e.wgsl.expected.msl | 2 +- .../literal/frexp/3dd21e.wgsl.expected.spvasm | 33 +++++----- .../literal/frexp/3dd21e.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/frexp/5257dd.wgsl | 2 +- .../frexp/5257dd.wgsl.expected.dxc.hlsl | 2 +- .../literal/frexp/5257dd.wgsl.expected.glsl | 6 +- .../literal/frexp/5257dd.wgsl.expected.msl | 2 +- .../literal/frexp/5257dd.wgsl.expected.spvasm | 4 +- .../literal/frexp/5257dd.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/frexp/5f47bf.wgsl | 2 +- .../frexp/5f47bf.wgsl.expected.dxc.hlsl | 2 +- .../literal/frexp/5f47bf.wgsl.expected.glsl | 6 +- .../literal/frexp/5f47bf.wgsl.expected.msl | 2 +- .../literal/frexp/5f47bf.wgsl.expected.spvasm | 33 +++++----- .../literal/frexp/5f47bf.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/frexp/ae4a66.wgsl | 2 +- .../frexp/ae4a66.wgsl.expected.dxc.hlsl | 2 +- .../literal/frexp/ae4a66.wgsl.expected.glsl | 6 +- .../literal/frexp/ae4a66.wgsl.expected.msl | 2 +- .../literal/frexp/ae4a66.wgsl.expected.spvasm | 33 +++++----- .../literal/frexp/ae4a66.wgsl.expected.wgsl | 2 +- .../gen/literal/inverseSqrt/440300.wgsl | 2 +- .../inverseSqrt/440300.wgsl.expected.dxc.hlsl | 2 +- .../inverseSqrt/440300.wgsl.expected.glsl | 6 +- .../inverseSqrt/440300.wgsl.expected.msl | 2 +- .../inverseSqrt/440300.wgsl.expected.spvasm | 31 +++++----- .../inverseSqrt/440300.wgsl.expected.wgsl | 2 +- .../gen/literal/inverseSqrt/5f51f8.wgsl | 2 +- .../inverseSqrt/5f51f8.wgsl.expected.dxc.hlsl | 2 +- .../inverseSqrt/5f51f8.wgsl.expected.glsl | 6 +- .../inverseSqrt/5f51f8.wgsl.expected.msl | 2 +- .../inverseSqrt/5f51f8.wgsl.expected.spvasm | 32 +++++----- .../inverseSqrt/5f51f8.wgsl.expected.wgsl | 2 +- .../gen/literal/inverseSqrt/b85ebd.wgsl | 2 +- .../inverseSqrt/b85ebd.wgsl.expected.dxc.hlsl | 2 +- .../inverseSqrt/b85ebd.wgsl.expected.glsl | 6 +- .../inverseSqrt/b85ebd.wgsl.expected.msl | 2 +- .../inverseSqrt/b85ebd.wgsl.expected.spvasm | 32 +++++----- .../inverseSqrt/b85ebd.wgsl.expected.wgsl | 2 +- .../gen/literal/inverseSqrt/cbdc70.wgsl | 2 +- .../inverseSqrt/cbdc70.wgsl.expected.dxc.hlsl | 2 +- .../inverseSqrt/cbdc70.wgsl.expected.glsl | 6 +- .../inverseSqrt/cbdc70.wgsl.expected.msl | 2 +- .../inverseSqrt/cbdc70.wgsl.expected.spvasm | 32 +++++----- .../inverseSqrt/cbdc70.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/ldexp/3d90b4.wgsl | 2 +- .../ldexp/3d90b4.wgsl.expected.dxc.hlsl | 2 +- .../literal/ldexp/3d90b4.wgsl.expected.glsl | 6 +- .../literal/ldexp/3d90b4.wgsl.expected.msl | 2 +- .../literal/ldexp/3d90b4.wgsl.expected.spvasm | 34 ++++++----- .../literal/ldexp/3d90b4.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/ldexp/624e0c.wgsl | 2 +- .../ldexp/624e0c.wgsl.expected.dxc.hlsl | 2 +- .../literal/ldexp/624e0c.wgsl.expected.glsl | 6 +- .../literal/ldexp/624e0c.wgsl.expected.msl | 2 +- .../literal/ldexp/624e0c.wgsl.expected.spvasm | 31 +++++----- .../literal/ldexp/624e0c.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/ldexp/7485ce.wgsl | 2 +- .../ldexp/7485ce.wgsl.expected.dxc.hlsl | 2 +- .../literal/ldexp/7485ce.wgsl.expected.glsl | 6 +- .../literal/ldexp/7485ce.wgsl.expected.msl | 2 +- .../literal/ldexp/7485ce.wgsl.expected.spvasm | 34 ++++++----- .../literal/ldexp/7485ce.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/ldexp/7fa13c.wgsl | 2 +- .../ldexp/7fa13c.wgsl.expected.dxc.hlsl | 2 +- .../literal/ldexp/7fa13c.wgsl.expected.glsl | 6 +- .../literal/ldexp/7fa13c.wgsl.expected.msl | 2 +- .../literal/ldexp/7fa13c.wgsl.expected.spvasm | 34 ++++++----- .../literal/ldexp/7fa13c.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/length/3f0e13.wgsl | 2 +- .../length/3f0e13.wgsl.expected.dxc.hlsl | 2 +- .../literal/length/3f0e13.wgsl.expected.glsl | 6 +- .../literal/length/3f0e13.wgsl.expected.msl | 2 +- .../length/3f0e13.wgsl.expected.spvasm | 33 +++++----- .../literal/length/3f0e13.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/length/5b1a9b.wgsl | 2 +- .../length/5b1a9b.wgsl.expected.dxc.hlsl | 2 +- .../literal/length/5b1a9b.wgsl.expected.glsl | 6 +- .../literal/length/5b1a9b.wgsl.expected.msl | 2 +- .../length/5b1a9b.wgsl.expected.spvasm | 33 +++++----- .../literal/length/5b1a9b.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/length/ba16d6.wgsl | 2 +- .../length/ba16d6.wgsl.expected.dxc.hlsl | 2 +- .../literal/length/ba16d6.wgsl.expected.glsl | 6 +- .../literal/length/ba16d6.wgsl.expected.msl | 2 +- .../length/ba16d6.wgsl.expected.spvasm | 33 +++++----- .../literal/length/ba16d6.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/length/c158da.wgsl | 2 +- .../length/c158da.wgsl.expected.dxc.hlsl | 2 +- .../literal/length/c158da.wgsl.expected.glsl | 6 +- .../literal/length/c158da.wgsl.expected.msl | 2 +- .../length/c158da.wgsl.expected.spvasm | 31 +++++----- .../literal/length/c158da.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/literal/log/6ff86f.wgsl | 2 +- .../literal/log/6ff86f.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/log/6ff86f.wgsl.expected.glsl | 6 +- .../gen/literal/log/6ff86f.wgsl.expected.msl | 2 +- .../literal/log/6ff86f.wgsl.expected.spvasm | 32 +++++----- .../gen/literal/log/6ff86f.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/literal/log/8f0e32.wgsl | 2 +- .../literal/log/8f0e32.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/log/8f0e32.wgsl.expected.glsl | 6 +- .../gen/literal/log/8f0e32.wgsl.expected.msl | 2 +- .../literal/log/8f0e32.wgsl.expected.spvasm | 32 +++++----- .../gen/literal/log/8f0e32.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/literal/log/c9f489.wgsl | 2 +- .../literal/log/c9f489.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/log/c9f489.wgsl.expected.glsl | 6 +- .../gen/literal/log/c9f489.wgsl.expected.msl | 2 +- .../literal/log/c9f489.wgsl.expected.spvasm | 31 +++++----- .../gen/literal/log/c9f489.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/literal/log/cdbdc1.wgsl | 2 +- .../literal/log/cdbdc1.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/log/cdbdc1.wgsl.expected.glsl | 6 +- .../gen/literal/log/cdbdc1.wgsl.expected.msl | 2 +- .../literal/log/cdbdc1.wgsl.expected.spvasm | 32 +++++----- .../gen/literal/log/cdbdc1.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/log2/38b478.wgsl | 2 +- .../log2/38b478.wgsl.expected.dxc.hlsl | 2 +- .../literal/log2/38b478.wgsl.expected.glsl | 6 +- .../gen/literal/log2/38b478.wgsl.expected.msl | 2 +- .../literal/log2/38b478.wgsl.expected.spvasm | 32 +++++----- .../literal/log2/38b478.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/log2/776088.wgsl | 2 +- .../log2/776088.wgsl.expected.dxc.hlsl | 2 +- .../literal/log2/776088.wgsl.expected.glsl | 6 +- .../gen/literal/log2/776088.wgsl.expected.msl | 2 +- .../literal/log2/776088.wgsl.expected.spvasm | 32 +++++----- .../literal/log2/776088.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/log2/8c10b3.wgsl | 2 +- .../log2/8c10b3.wgsl.expected.dxc.hlsl | 2 +- .../literal/log2/8c10b3.wgsl.expected.glsl | 6 +- .../gen/literal/log2/8c10b3.wgsl.expected.msl | 2 +- .../literal/log2/8c10b3.wgsl.expected.spvasm | 31 +++++----- .../literal/log2/8c10b3.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/log2/fb9f0b.wgsl | 2 +- .../log2/fb9f0b.wgsl.expected.dxc.hlsl | 2 +- .../literal/log2/fb9f0b.wgsl.expected.glsl | 6 +- .../gen/literal/log2/fb9f0b.wgsl.expected.msl | 2 +- .../literal/log2/fb9f0b.wgsl.expected.spvasm | 32 +++++----- .../literal/log2/fb9f0b.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/literal/max/111ac0.wgsl | 2 +- .../literal/max/111ac0.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/max/111ac0.wgsl.expected.glsl | 6 +- .../gen/literal/max/111ac0.wgsl.expected.msl | 2 +- .../literal/max/111ac0.wgsl.expected.spvasm | 31 +++++----- .../gen/literal/max/111ac0.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/literal/max/34956e.wgsl | 2 +- .../literal/max/34956e.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/max/34956e.wgsl.expected.glsl | 6 +- .../gen/literal/max/34956e.wgsl.expected.msl | 2 +- .../literal/max/34956e.wgsl.expected.spvasm | 32 +++++----- .../gen/literal/max/34956e.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/literal/max/445169.wgsl | 2 +- .../literal/max/445169.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/max/445169.wgsl.expected.glsl | 6 +- .../gen/literal/max/445169.wgsl.expected.msl | 2 +- .../literal/max/445169.wgsl.expected.spvasm | 32 +++++----- .../gen/literal/max/445169.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/literal/max/e14f2b.wgsl | 2 +- .../literal/max/e14f2b.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/max/e14f2b.wgsl.expected.glsl | 6 +- .../gen/literal/max/e14f2b.wgsl.expected.msl | 2 +- .../literal/max/e14f2b.wgsl.expected.spvasm | 32 +++++----- .../gen/literal/max/e14f2b.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/literal/min/7c710a.wgsl | 2 +- .../literal/min/7c710a.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/min/7c710a.wgsl.expected.glsl | 6 +- .../gen/literal/min/7c710a.wgsl.expected.msl | 2 +- .../literal/min/7c710a.wgsl.expected.spvasm | 32 +++++----- .../gen/literal/min/7c710a.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/literal/min/ab0acd.wgsl | 2 +- .../literal/min/ab0acd.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/min/ab0acd.wgsl.expected.glsl | 6 +- .../gen/literal/min/ab0acd.wgsl.expected.msl | 2 +- .../literal/min/ab0acd.wgsl.expected.spvasm | 32 +++++----- .../gen/literal/min/ab0acd.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/literal/min/ac84d6.wgsl | 2 +- .../literal/min/ac84d6.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/min/ac84d6.wgsl.expected.glsl | 6 +- .../gen/literal/min/ac84d6.wgsl.expected.msl | 2 +- .../literal/min/ac84d6.wgsl.expected.spvasm | 31 +++++----- .../gen/literal/min/ac84d6.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/literal/min/e780f9.wgsl | 2 +- .../literal/min/e780f9.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/min/e780f9.wgsl.expected.glsl | 6 +- .../gen/literal/min/e780f9.wgsl.expected.msl | 2 +- .../literal/min/e780f9.wgsl.expected.spvasm | 32 +++++----- .../gen/literal/min/e780f9.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/literal/mix/38cbbb.wgsl | 2 +- .../literal/mix/38cbbb.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/mix/38cbbb.wgsl.expected.glsl | 6 +- .../gen/literal/mix/38cbbb.wgsl.expected.msl | 2 +- .../literal/mix/38cbbb.wgsl.expected.spvasm | 31 +++++----- .../gen/literal/mix/38cbbb.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/literal/mix/63f2fd.wgsl | 2 +- .../literal/mix/63f2fd.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/mix/63f2fd.wgsl.expected.glsl | 6 +- .../gen/literal/mix/63f2fd.wgsl.expected.msl | 2 +- .../literal/mix/63f2fd.wgsl.expected.spvasm | 32 +++++----- .../gen/literal/mix/63f2fd.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/literal/mix/98ee3e.wgsl | 2 +- .../literal/mix/98ee3e.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/mix/98ee3e.wgsl.expected.glsl | 6 +- .../gen/literal/mix/98ee3e.wgsl.expected.msl | 2 +- .../literal/mix/98ee3e.wgsl.expected.spvasm | 32 +++++----- .../gen/literal/mix/98ee3e.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/literal/mix/c1aec6.wgsl | 2 +- .../literal/mix/c1aec6.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/mix/c1aec6.wgsl.expected.glsl | 6 +- .../gen/literal/mix/c1aec6.wgsl.expected.msl | 2 +- .../literal/mix/c1aec6.wgsl.expected.spvasm | 37 ++++++------ .../gen/literal/mix/c1aec6.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/literal/mix/e46a83.wgsl | 2 +- .../literal/mix/e46a83.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/mix/e46a83.wgsl.expected.glsl | 6 +- .../gen/literal/mix/e46a83.wgsl.expected.msl | 2 +- .../literal/mix/e46a83.wgsl.expected.spvasm | 37 ++++++------ .../gen/literal/mix/e46a83.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/literal/mix/ee2468.wgsl | 2 +- .../literal/mix/ee2468.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/mix/ee2468.wgsl.expected.glsl | 6 +- .../gen/literal/mix/ee2468.wgsl.expected.msl | 2 +- .../literal/mix/ee2468.wgsl.expected.spvasm | 32 +++++----- .../gen/literal/mix/ee2468.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/literal/mix/f1a543.wgsl | 2 +- .../literal/mix/f1a543.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/mix/f1a543.wgsl.expected.glsl | 6 +- .../gen/literal/mix/f1a543.wgsl.expected.msl | 2 +- .../literal/mix/f1a543.wgsl.expected.spvasm | 37 ++++++------ .../gen/literal/mix/f1a543.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/modf/45005f.wgsl | 2 +- .../modf/45005f.wgsl.expected.dxc.hlsl | 2 +- .../literal/modf/45005f.wgsl.expected.glsl | 6 +- .../gen/literal/modf/45005f.wgsl.expected.msl | 2 +- .../literal/modf/45005f.wgsl.expected.spvasm | 33 +++++----- .../literal/modf/45005f.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/modf/8dbbbf.wgsl | 2 +- .../modf/8dbbbf.wgsl.expected.dxc.hlsl | 2 +- .../literal/modf/8dbbbf.wgsl.expected.glsl | 6 +- .../gen/literal/modf/8dbbbf.wgsl.expected.msl | 2 +- .../literal/modf/8dbbbf.wgsl.expected.spvasm | 4 +- .../literal/modf/8dbbbf.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/modf/995934.wgsl | 2 +- .../modf/995934.wgsl.expected.dxc.hlsl | 2 +- .../literal/modf/995934.wgsl.expected.glsl | 6 +- .../gen/literal/modf/995934.wgsl.expected.msl | 2 +- .../literal/modf/995934.wgsl.expected.spvasm | 33 +++++----- .../literal/modf/995934.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/modf/a545b9.wgsl | 2 +- .../modf/a545b9.wgsl.expected.dxc.hlsl | 2 +- .../literal/modf/a545b9.wgsl.expected.glsl | 6 +- .../gen/literal/modf/a545b9.wgsl.expected.msl | 2 +- .../literal/modf/a545b9.wgsl.expected.spvasm | 33 +++++----- .../literal/modf/a545b9.wgsl.expected.wgsl | 2 +- .../gen/literal/normalize/39d5ec.wgsl | 2 +- .../normalize/39d5ec.wgsl.expected.dxc.hlsl | 2 +- .../normalize/39d5ec.wgsl.expected.glsl | 6 +- .../normalize/39d5ec.wgsl.expected.msl | 2 +- .../normalize/39d5ec.wgsl.expected.spvasm | 32 +++++----- .../normalize/39d5ec.wgsl.expected.wgsl | 2 +- .../gen/literal/normalize/7990f3.wgsl | 2 +- .../normalize/7990f3.wgsl.expected.dxc.hlsl | 2 +- .../normalize/7990f3.wgsl.expected.glsl | 6 +- .../normalize/7990f3.wgsl.expected.msl | 2 +- .../normalize/7990f3.wgsl.expected.spvasm | 32 +++++----- .../normalize/7990f3.wgsl.expected.wgsl | 2 +- .../gen/literal/normalize/b8cb8d.wgsl | 2 +- .../normalize/b8cb8d.wgsl.expected.dxc.hlsl | 2 +- .../normalize/b8cb8d.wgsl.expected.glsl | 6 +- .../normalize/b8cb8d.wgsl.expected.msl | 2 +- .../normalize/b8cb8d.wgsl.expected.spvasm | 32 +++++----- .../normalize/b8cb8d.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/literal/pow/4f33b2.wgsl | 2 +- .../literal/pow/4f33b2.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/pow/4f33b2.wgsl.expected.glsl | 6 +- .../gen/literal/pow/4f33b2.wgsl.expected.msl | 2 +- .../literal/pow/4f33b2.wgsl.expected.spvasm | 32 +++++----- .../gen/literal/pow/4f33b2.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/literal/pow/ce9ef5.wgsl | 2 +- .../literal/pow/ce9ef5.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/pow/ce9ef5.wgsl.expected.glsl | 6 +- .../gen/literal/pow/ce9ef5.wgsl.expected.msl | 2 +- .../literal/pow/ce9ef5.wgsl.expected.spvasm | 31 +++++----- .../gen/literal/pow/ce9ef5.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/literal/pow/f37b25.wgsl | 2 +- .../literal/pow/f37b25.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/pow/f37b25.wgsl.expected.glsl | 6 +- .../gen/literal/pow/f37b25.wgsl.expected.msl | 2 +- .../literal/pow/f37b25.wgsl.expected.spvasm | 32 +++++----- .../gen/literal/pow/f37b25.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/literal/pow/fa5429.wgsl | 2 +- .../literal/pow/fa5429.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/pow/fa5429.wgsl.expected.glsl | 6 +- .../gen/literal/pow/fa5429.wgsl.expected.msl | 2 +- .../literal/pow/fa5429.wgsl.expected.spvasm | 32 +++++----- .../gen/literal/pow/fa5429.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/radians/208fd9.wgsl | 2 +- .../radians/208fd9.wgsl.expected.dxc.hlsl | 2 +- .../literal/radians/208fd9.wgsl.expected.glsl | 6 +- .../literal/radians/208fd9.wgsl.expected.msl | 2 +- .../radians/208fd9.wgsl.expected.spvasm | 31 +++++----- .../literal/radians/208fd9.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/radians/44f20b.wgsl | 2 +- .../radians/44f20b.wgsl.expected.dxc.hlsl | 2 +- .../literal/radians/44f20b.wgsl.expected.glsl | 6 +- .../literal/radians/44f20b.wgsl.expected.msl | 2 +- .../radians/44f20b.wgsl.expected.spvasm | 32 +++++----- .../literal/radians/44f20b.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/radians/7ea4c7.wgsl | 2 +- .../radians/7ea4c7.wgsl.expected.dxc.hlsl | 2 +- .../literal/radians/7ea4c7.wgsl.expected.glsl | 6 +- .../literal/radians/7ea4c7.wgsl.expected.msl | 2 +- .../radians/7ea4c7.wgsl.expected.spvasm | 32 +++++----- .../literal/radians/7ea4c7.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/radians/fbacf0.wgsl | 2 +- .../radians/fbacf0.wgsl.expected.dxc.hlsl | 2 +- .../literal/radians/fbacf0.wgsl.expected.glsl | 6 +- .../literal/radians/fbacf0.wgsl.expected.msl | 2 +- .../radians/fbacf0.wgsl.expected.spvasm | 32 +++++----- .../literal/radians/fbacf0.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/reflect/310de5.wgsl | 2 +- .../reflect/310de5.wgsl.expected.dxc.hlsl | 2 +- .../literal/reflect/310de5.wgsl.expected.glsl | 6 +- .../literal/reflect/310de5.wgsl.expected.msl | 2 +- .../reflect/310de5.wgsl.expected.spvasm | 32 +++++----- .../literal/reflect/310de5.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/reflect/61ca21.wgsl | 2 +- .../reflect/61ca21.wgsl.expected.dxc.hlsl | 2 +- .../literal/reflect/61ca21.wgsl.expected.glsl | 6 +- .../literal/reflect/61ca21.wgsl.expected.msl | 2 +- .../reflect/61ca21.wgsl.expected.spvasm | 32 +++++----- .../literal/reflect/61ca21.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/reflect/bb15ac.wgsl | 2 +- .../reflect/bb15ac.wgsl.expected.dxc.hlsl | 2 +- .../literal/reflect/bb15ac.wgsl.expected.glsl | 6 +- .../literal/reflect/bb15ac.wgsl.expected.msl | 2 +- .../reflect/bb15ac.wgsl.expected.spvasm | 32 +++++----- .../literal/reflect/bb15ac.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/refract/0594ba.wgsl | 2 +- .../refract/0594ba.wgsl.expected.dxc.hlsl | 2 +- .../literal/refract/0594ba.wgsl.expected.glsl | 6 +- .../literal/refract/0594ba.wgsl.expected.msl | 2 +- .../refract/0594ba.wgsl.expected.spvasm | 33 +++++----- .../literal/refract/0594ba.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/refract/570cb3.wgsl | 2 +- .../refract/570cb3.wgsl.expected.dxc.hlsl | 2 +- .../literal/refract/570cb3.wgsl.expected.glsl | 6 +- .../literal/refract/570cb3.wgsl.expected.msl | 2 +- .../refract/570cb3.wgsl.expected.spvasm | 33 +++++----- .../literal/refract/570cb3.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/refract/8984af.wgsl | 2 +- .../refract/8984af.wgsl.expected.dxc.hlsl | 2 +- .../literal/refract/8984af.wgsl.expected.glsl | 6 +- .../literal/refract/8984af.wgsl.expected.msl | 2 +- .../refract/8984af.wgsl.expected.spvasm | 33 +++++----- .../literal/refract/8984af.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/round/9078ef.wgsl | 2 +- .../round/9078ef.wgsl.expected.dxc.hlsl | 2 +- .../literal/round/9078ef.wgsl.expected.glsl | 6 +- .../literal/round/9078ef.wgsl.expected.msl | 2 +- .../literal/round/9078ef.wgsl.expected.spvasm | 31 +++++----- .../literal/round/9078ef.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/round/d87e84.wgsl | 2 +- .../round/d87e84.wgsl.expected.dxc.hlsl | 2 +- .../literal/round/d87e84.wgsl.expected.glsl | 6 +- .../literal/round/d87e84.wgsl.expected.msl | 2 +- .../literal/round/d87e84.wgsl.expected.spvasm | 32 +++++----- .../literal/round/d87e84.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/round/e1bba2.wgsl | 2 +- .../round/e1bba2.wgsl.expected.dxc.hlsl | 2 +- .../literal/round/e1bba2.wgsl.expected.glsl | 6 +- .../literal/round/e1bba2.wgsl.expected.msl | 2 +- .../literal/round/e1bba2.wgsl.expected.spvasm | 32 +++++----- .../literal/round/e1bba2.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/round/f665b5.wgsl | 2 +- .../round/f665b5.wgsl.expected.dxc.hlsl | 2 +- .../literal/round/f665b5.wgsl.expected.glsl | 6 +- .../literal/round/f665b5.wgsl.expected.msl | 2 +- .../literal/round/f665b5.wgsl.expected.spvasm | 32 +++++----- .../literal/round/f665b5.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/saturate/462535.wgsl | 2 +- .../saturate/462535.wgsl.expected.dxc.hlsl | 2 +- .../saturate/462535.wgsl.expected.glsl | 6 +- .../literal/saturate/462535.wgsl.expected.msl | 2 +- .../saturate/462535.wgsl.expected.spvasm | 32 +++++----- .../saturate/462535.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/saturate/cd2028.wgsl | 2 +- .../saturate/cd2028.wgsl.expected.dxc.hlsl | 2 +- .../saturate/cd2028.wgsl.expected.glsl | 6 +- .../literal/saturate/cd2028.wgsl.expected.msl | 2 +- .../saturate/cd2028.wgsl.expected.spvasm | 32 +++++----- .../saturate/cd2028.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/saturate/dcde71.wgsl | 2 +- .../saturate/dcde71.wgsl.expected.dxc.hlsl | 2 +- .../saturate/dcde71.wgsl.expected.glsl | 6 +- .../literal/saturate/dcde71.wgsl.expected.msl | 2 +- .../saturate/dcde71.wgsl.expected.spvasm | 32 +++++----- .../saturate/dcde71.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/saturate/e8df56.wgsl | 2 +- .../saturate/e8df56.wgsl.expected.dxc.hlsl | 2 +- .../saturate/e8df56.wgsl.expected.glsl | 6 +- .../literal/saturate/e8df56.wgsl.expected.msl | 2 +- .../saturate/e8df56.wgsl.expected.spvasm | 31 +++++----- .../saturate/e8df56.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/select/10e73b.wgsl | 2 +- .../select/10e73b.wgsl.expected.dxc.hlsl | 2 +- .../literal/select/10e73b.wgsl.expected.glsl | 6 +- .../literal/select/10e73b.wgsl.expected.msl | 2 +- .../select/10e73b.wgsl.expected.spvasm | 31 +++++----- .../literal/select/10e73b.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/select/1ada2a.wgsl | 2 +- .../select/1ada2a.wgsl.expected.dxc.hlsl | 2 +- .../literal/select/1ada2a.wgsl.expected.glsl | 6 +- .../literal/select/1ada2a.wgsl.expected.msl | 2 +- .../select/1ada2a.wgsl.expected.spvasm | 32 +++++----- .../literal/select/1ada2a.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/select/53d518.wgsl | 2 +- .../select/53d518.wgsl.expected.dxc.hlsl | 2 +- .../literal/select/53d518.wgsl.expected.glsl | 6 +- .../literal/select/53d518.wgsl.expected.msl | 2 +- .../select/53d518.wgsl.expected.spvasm | 32 +++++----- .../literal/select/53d518.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/select/830dd9.wgsl | 2 +- .../select/830dd9.wgsl.expected.dxc.hlsl | 2 +- .../literal/select/830dd9.wgsl.expected.glsl | 6 +- .../literal/select/830dd9.wgsl.expected.msl | 2 +- .../select/830dd9.wgsl.expected.spvasm | 32 +++++----- .../literal/select/830dd9.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/select/86f9bd.wgsl | 2 +- .../select/86f9bd.wgsl.expected.dxc.hlsl | 2 +- .../literal/select/86f9bd.wgsl.expected.glsl | 6 +- .../literal/select/86f9bd.wgsl.expected.msl | 2 +- .../select/86f9bd.wgsl.expected.spvasm | 32 +++++----- .../literal/select/86f9bd.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/select/a081f1.wgsl | 2 +- .../select/a081f1.wgsl.expected.dxc.hlsl | 2 +- .../literal/select/a081f1.wgsl.expected.glsl | 6 +- .../literal/select/a081f1.wgsl.expected.msl | 2 +- .../select/a081f1.wgsl.expected.spvasm | 32 +++++----- .../literal/select/a081f1.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/select/ed7c13.wgsl | 2 +- .../select/ed7c13.wgsl.expected.dxc.hlsl | 2 +- .../literal/select/ed7c13.wgsl.expected.glsl | 6 +- .../literal/select/ed7c13.wgsl.expected.msl | 2 +- .../select/ed7c13.wgsl.expected.spvasm | 32 +++++----- .../literal/select/ed7c13.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/sign/160933.wgsl | 2 +- .../sign/160933.wgsl.expected.dxc.hlsl | 2 +- .../literal/sign/160933.wgsl.expected.glsl | 6 +- .../gen/literal/sign/160933.wgsl.expected.msl | 2 +- .../literal/sign/160933.wgsl.expected.spvasm | 32 +++++----- .../literal/sign/160933.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/sign/5d283a.wgsl | 2 +- .../sign/5d283a.wgsl.expected.dxc.hlsl | 2 +- .../literal/sign/5d283a.wgsl.expected.glsl | 6 +- .../gen/literal/sign/5d283a.wgsl.expected.msl | 2 +- .../literal/sign/5d283a.wgsl.expected.spvasm | 32 +++++----- .../literal/sign/5d283a.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/sign/7c85ea.wgsl | 2 +- .../sign/7c85ea.wgsl.expected.dxc.hlsl | 2 +- .../literal/sign/7c85ea.wgsl.expected.glsl | 6 +- .../gen/literal/sign/7c85ea.wgsl.expected.msl | 2 +- .../literal/sign/7c85ea.wgsl.expected.spvasm | 31 +++++----- .../literal/sign/7c85ea.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/sign/ccdb3c.wgsl | 2 +- .../sign/ccdb3c.wgsl.expected.dxc.hlsl | 2 +- .../literal/sign/ccdb3c.wgsl.expected.glsl | 6 +- .../gen/literal/sign/ccdb3c.wgsl.expected.msl | 2 +- .../literal/sign/ccdb3c.wgsl.expected.spvasm | 32 +++++----- .../literal/sign/ccdb3c.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/literal/sin/2c903b.wgsl | 2 +- .../literal/sin/2c903b.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/sin/2c903b.wgsl.expected.glsl | 6 +- .../gen/literal/sin/2c903b.wgsl.expected.msl | 2 +- .../literal/sin/2c903b.wgsl.expected.spvasm | 32 +++++----- .../gen/literal/sin/2c903b.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/literal/sin/3cca11.wgsl | 2 +- .../literal/sin/3cca11.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/sin/3cca11.wgsl.expected.glsl | 6 +- .../gen/literal/sin/3cca11.wgsl.expected.msl | 2 +- .../literal/sin/3cca11.wgsl.expected.spvasm | 32 +++++----- .../gen/literal/sin/3cca11.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/literal/sin/5c0712.wgsl | 2 +- .../literal/sin/5c0712.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/sin/5c0712.wgsl.expected.glsl | 6 +- .../gen/literal/sin/5c0712.wgsl.expected.msl | 2 +- .../literal/sin/5c0712.wgsl.expected.spvasm | 32 +++++----- .../gen/literal/sin/5c0712.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/literal/sin/66a59f.wgsl | 2 +- .../literal/sin/66a59f.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/sin/66a59f.wgsl.expected.glsl | 6 +- .../gen/literal/sin/66a59f.wgsl.expected.msl | 2 +- .../literal/sin/66a59f.wgsl.expected.spvasm | 31 +++++----- .../gen/literal/sin/66a59f.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/sinh/0908c1.wgsl | 2 +- .../sinh/0908c1.wgsl.expected.dxc.hlsl | 2 +- .../literal/sinh/0908c1.wgsl.expected.glsl | 6 +- .../gen/literal/sinh/0908c1.wgsl.expected.msl | 2 +- .../literal/sinh/0908c1.wgsl.expected.spvasm | 32 +++++----- .../literal/sinh/0908c1.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/sinh/69cce2.wgsl | 2 +- .../sinh/69cce2.wgsl.expected.dxc.hlsl | 2 +- .../literal/sinh/69cce2.wgsl.expected.glsl | 6 +- .../gen/literal/sinh/69cce2.wgsl.expected.msl | 2 +- .../literal/sinh/69cce2.wgsl.expected.spvasm | 31 +++++----- .../literal/sinh/69cce2.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/sinh/924f19.wgsl | 2 +- .../sinh/924f19.wgsl.expected.dxc.hlsl | 2 +- .../literal/sinh/924f19.wgsl.expected.glsl | 6 +- .../gen/literal/sinh/924f19.wgsl.expected.msl | 2 +- .../literal/sinh/924f19.wgsl.expected.spvasm | 32 +++++----- .../literal/sinh/924f19.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/sinh/ba7e25.wgsl | 2 +- .../sinh/ba7e25.wgsl.expected.dxc.hlsl | 2 +- .../literal/sinh/ba7e25.wgsl.expected.glsl | 6 +- .../gen/literal/sinh/ba7e25.wgsl.expected.msl | 2 +- .../literal/sinh/ba7e25.wgsl.expected.spvasm | 32 +++++----- .../literal/sinh/ba7e25.wgsl.expected.wgsl | 2 +- .../gen/literal/smoothstep/12c031.wgsl | 2 +- .../smoothstep/12c031.wgsl.expected.dxc.hlsl | 2 +- .../smoothstep/12c031.wgsl.expected.glsl | 6 +- .../smoothstep/12c031.wgsl.expected.msl | 2 +- .../smoothstep/12c031.wgsl.expected.spvasm | 32 +++++----- .../smoothstep/12c031.wgsl.expected.wgsl | 2 +- .../gen/literal/smoothstep/586e12.wgsl | 2 +- .../smoothstep/586e12.wgsl.expected.dxc.hlsl | 2 +- .../smoothstep/586e12.wgsl.expected.glsl | 6 +- .../smoothstep/586e12.wgsl.expected.msl | 2 +- .../smoothstep/586e12.wgsl.expected.spvasm | 31 +++++----- .../smoothstep/586e12.wgsl.expected.wgsl | 2 +- .../gen/literal/smoothstep/6e7a74.wgsl | 2 +- .../smoothstep/6e7a74.wgsl.expected.dxc.hlsl | 2 +- .../smoothstep/6e7a74.wgsl.expected.glsl | 6 +- .../smoothstep/6e7a74.wgsl.expected.msl | 2 +- .../smoothstep/6e7a74.wgsl.expected.spvasm | 32 +++++----- .../smoothstep/6e7a74.wgsl.expected.wgsl | 2 +- .../gen/literal/smoothstep/c43ebd.wgsl | 2 +- .../smoothstep/c43ebd.wgsl.expected.dxc.hlsl | 2 +- .../smoothstep/c43ebd.wgsl.expected.glsl | 6 +- .../smoothstep/c43ebd.wgsl.expected.msl | 2 +- .../smoothstep/c43ebd.wgsl.expected.spvasm | 32 +++++----- .../smoothstep/c43ebd.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/sqrt/803d1c.wgsl | 2 +- .../sqrt/803d1c.wgsl.expected.dxc.hlsl | 2 +- .../literal/sqrt/803d1c.wgsl.expected.glsl | 6 +- .../gen/literal/sqrt/803d1c.wgsl.expected.msl | 2 +- .../literal/sqrt/803d1c.wgsl.expected.spvasm | 32 +++++----- .../literal/sqrt/803d1c.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/sqrt/895a0c.wgsl | 2 +- .../sqrt/895a0c.wgsl.expected.dxc.hlsl | 2 +- .../literal/sqrt/895a0c.wgsl.expected.glsl | 6 +- .../gen/literal/sqrt/895a0c.wgsl.expected.msl | 2 +- .../literal/sqrt/895a0c.wgsl.expected.spvasm | 32 +++++----- .../literal/sqrt/895a0c.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/sqrt/d9ab4d.wgsl | 2 +- .../sqrt/d9ab4d.wgsl.expected.dxc.hlsl | 2 +- .../literal/sqrt/d9ab4d.wgsl.expected.glsl | 6 +- .../gen/literal/sqrt/d9ab4d.wgsl.expected.msl | 2 +- .../literal/sqrt/d9ab4d.wgsl.expected.spvasm | 32 +++++----- .../literal/sqrt/d9ab4d.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/sqrt/ec33e9.wgsl | 2 +- .../sqrt/ec33e9.wgsl.expected.dxc.hlsl | 2 +- .../literal/sqrt/ec33e9.wgsl.expected.glsl | 6 +- .../gen/literal/sqrt/ec33e9.wgsl.expected.msl | 2 +- .../literal/sqrt/ec33e9.wgsl.expected.spvasm | 31 +++++----- .../literal/sqrt/ec33e9.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/step/07cb06.wgsl | 2 +- .../literal/step/07cb06.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/step/630d07.wgsl | 2 +- .../literal/step/630d07.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/step/baa320.wgsl | 2 +- .../literal/step/baa320.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/step/cc6b61.wgsl | 2 +- .../literal/step/cc6b61.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/literal/tan/539e54.wgsl | 2 +- .../literal/tan/539e54.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/tan/539e54.wgsl.expected.glsl | 6 +- .../gen/literal/tan/539e54.wgsl.expected.msl | 2 +- .../literal/tan/539e54.wgsl.expected.spvasm | 32 +++++----- .../gen/literal/tan/539e54.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/literal/tan/9f7c9c.wgsl | 2 +- .../literal/tan/9f7c9c.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/tan/9f7c9c.wgsl.expected.glsl | 6 +- .../gen/literal/tan/9f7c9c.wgsl.expected.msl | 2 +- .../literal/tan/9f7c9c.wgsl.expected.spvasm | 32 +++++----- .../gen/literal/tan/9f7c9c.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/literal/tan/d4d491.wgsl | 2 +- .../literal/tan/d4d491.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/tan/d4d491.wgsl.expected.glsl | 6 +- .../gen/literal/tan/d4d491.wgsl.expected.msl | 2 +- .../literal/tan/d4d491.wgsl.expected.spvasm | 31 +++++----- .../gen/literal/tan/d4d491.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/literal/tan/db0456.wgsl | 2 +- .../literal/tan/db0456.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/tan/db0456.wgsl.expected.glsl | 6 +- .../gen/literal/tan/db0456.wgsl.expected.msl | 2 +- .../literal/tan/db0456.wgsl.expected.spvasm | 32 +++++----- .../gen/literal/tan/db0456.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/tanh/06a4fe.wgsl | 2 +- .../tanh/06a4fe.wgsl.expected.dxc.hlsl | 2 +- .../literal/tanh/06a4fe.wgsl.expected.glsl | 6 +- .../gen/literal/tanh/06a4fe.wgsl.expected.msl | 2 +- .../literal/tanh/06a4fe.wgsl.expected.spvasm | 32 +++++----- .../literal/tanh/06a4fe.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/tanh/5b19af.wgsl | 2 +- .../tanh/5b19af.wgsl.expected.dxc.hlsl | 2 +- .../literal/tanh/5b19af.wgsl.expected.glsl | 6 +- .../gen/literal/tanh/5b19af.wgsl.expected.msl | 2 +- .../literal/tanh/5b19af.wgsl.expected.spvasm | 31 +++++----- .../literal/tanh/5b19af.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/tanh/6d105a.wgsl | 2 +- .../tanh/6d105a.wgsl.expected.dxc.hlsl | 2 +- .../literal/tanh/6d105a.wgsl.expected.glsl | 6 +- .../gen/literal/tanh/6d105a.wgsl.expected.msl | 2 +- .../literal/tanh/6d105a.wgsl.expected.spvasm | 32 +++++----- .../literal/tanh/6d105a.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/tanh/e8efb3.wgsl | 2 +- .../tanh/e8efb3.wgsl.expected.dxc.hlsl | 2 +- .../literal/tanh/e8efb3.wgsl.expected.glsl | 6 +- .../gen/literal/tanh/e8efb3.wgsl.expected.msl | 2 +- .../literal/tanh/e8efb3.wgsl.expected.spvasm | 32 +++++----- .../literal/tanh/e8efb3.wgsl.expected.wgsl | 2 +- .../gen/literal/transpose/06794e.wgsl | 2 +- .../transpose/06794e.wgsl.expected.dxc.hlsl | 2 +- .../transpose/06794e.wgsl.expected.glsl | 6 +- .../transpose/06794e.wgsl.expected.msl | 2 +- .../transpose/06794e.wgsl.expected.spvasm | 35 ++++++----- .../transpose/06794e.wgsl.expected.wgsl | 2 +- .../gen/literal/transpose/5edd96.wgsl | 2 +- .../transpose/5edd96.wgsl.expected.dxc.hlsl | 2 +- .../transpose/5edd96.wgsl.expected.glsl | 6 +- .../transpose/5edd96.wgsl.expected.msl | 2 +- .../transpose/5edd96.wgsl.expected.spvasm | 34 ++++++----- .../transpose/5edd96.wgsl.expected.wgsl | 2 +- .../gen/literal/transpose/5f36bf.wgsl | 2 +- .../transpose/5f36bf.wgsl.expected.dxc.hlsl | 2 +- .../transpose/5f36bf.wgsl.expected.glsl | 6 +- .../transpose/5f36bf.wgsl.expected.msl | 2 +- .../transpose/5f36bf.wgsl.expected.spvasm | 34 ++++++----- .../transpose/5f36bf.wgsl.expected.wgsl | 2 +- .../gen/literal/transpose/7be8b2.wgsl | 2 +- .../transpose/7be8b2.wgsl.expected.dxc.hlsl | 2 +- .../transpose/7be8b2.wgsl.expected.glsl | 6 +- .../transpose/7be8b2.wgsl.expected.msl | 2 +- .../transpose/7be8b2.wgsl.expected.spvasm | 35 ++++++----- .../transpose/7be8b2.wgsl.expected.wgsl | 2 +- .../gen/literal/transpose/844869.wgsl | 2 +- .../transpose/844869.wgsl.expected.dxc.hlsl | 2 +- .../transpose/844869.wgsl.expected.glsl | 6 +- .../transpose/844869.wgsl.expected.msl | 2 +- .../transpose/844869.wgsl.expected.spvasm | 35 ++++++----- .../transpose/844869.wgsl.expected.wgsl | 2 +- .../gen/literal/transpose/8c06ce.wgsl | 2 +- .../transpose/8c06ce.wgsl.expected.dxc.hlsl | 2 +- .../transpose/8c06ce.wgsl.expected.glsl | 6 +- .../transpose/8c06ce.wgsl.expected.msl | 2 +- .../transpose/8c06ce.wgsl.expected.spvasm | 34 ++++++----- .../transpose/8c06ce.wgsl.expected.wgsl | 2 +- .../gen/literal/transpose/b9ad1f.wgsl | 2 +- .../transpose/b9ad1f.wgsl.expected.dxc.hlsl | 2 +- .../transpose/b9ad1f.wgsl.expected.glsl | 6 +- .../transpose/b9ad1f.wgsl.expected.msl | 2 +- .../transpose/b9ad1f.wgsl.expected.spvasm | 34 ++++++----- .../transpose/b9ad1f.wgsl.expected.wgsl | 2 +- .../gen/literal/transpose/d6faec.wgsl | 2 +- .../transpose/d6faec.wgsl.expected.dxc.hlsl | 2 +- .../transpose/d6faec.wgsl.expected.glsl | 6 +- .../transpose/d6faec.wgsl.expected.msl | 2 +- .../transpose/d6faec.wgsl.expected.spvasm | 34 ++++++----- .../transpose/d6faec.wgsl.expected.wgsl | 2 +- .../gen/literal/transpose/faeb05.wgsl | 2 +- .../transpose/faeb05.wgsl.expected.dxc.hlsl | 2 +- .../transpose/faeb05.wgsl.expected.glsl | 6 +- .../transpose/faeb05.wgsl.expected.msl | 2 +- .../transpose/faeb05.wgsl.expected.spvasm | 34 ++++++----- .../transpose/faeb05.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/trunc/103ab8.wgsl | 2 +- .../trunc/103ab8.wgsl.expected.dxc.hlsl | 2 +- .../literal/trunc/103ab8.wgsl.expected.glsl | 6 +- .../literal/trunc/103ab8.wgsl.expected.msl | 2 +- .../literal/trunc/103ab8.wgsl.expected.spvasm | 32 +++++----- .../literal/trunc/103ab8.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/trunc/a56109.wgsl | 2 +- .../trunc/a56109.wgsl.expected.dxc.hlsl | 2 +- .../literal/trunc/a56109.wgsl.expected.glsl | 6 +- .../literal/trunc/a56109.wgsl.expected.msl | 2 +- .../literal/trunc/a56109.wgsl.expected.spvasm | 32 +++++----- .../literal/trunc/a56109.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/trunc/cc2b0d.wgsl | 2 +- .../trunc/cc2b0d.wgsl.expected.dxc.hlsl | 2 +- .../literal/trunc/cc2b0d.wgsl.expected.glsl | 6 +- .../literal/trunc/cc2b0d.wgsl.expected.msl | 2 +- .../literal/trunc/cc2b0d.wgsl.expected.spvasm | 31 +++++----- .../literal/trunc/cc2b0d.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/trunc/ce7c17.wgsl | 2 +- .../trunc/ce7c17.wgsl.expected.dxc.hlsl | 2 +- .../literal/trunc/ce7c17.wgsl.expected.glsl | 6 +- .../literal/trunc/ce7c17.wgsl.expected.msl | 2 +- .../literal/trunc/ce7c17.wgsl.expected.spvasm | 32 +++++----- .../literal/trunc/ce7c17.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/abs/421ca3.wgsl | 2 +- .../gen/var/abs/421ca3.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/abs/421ca3.wgsl.expected.glsl | 6 +- .../gen/var/abs/421ca3.wgsl.expected.msl | 2 +- .../gen/var/abs/421ca3.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/abs/421ca3.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/abs/538d29.wgsl | 2 +- .../gen/var/abs/538d29.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/abs/538d29.wgsl.expected.glsl | 6 +- .../gen/var/abs/538d29.wgsl.expected.msl | 2 +- .../gen/var/abs/538d29.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/abs/538d29.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/abs/5ae4fe.wgsl | 2 +- .../gen/var/abs/5ae4fe.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/abs/5ae4fe.wgsl.expected.glsl | 6 +- .../gen/var/abs/5ae4fe.wgsl.expected.msl | 2 +- .../gen/var/abs/5ae4fe.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/abs/5ae4fe.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/abs/fd247f.wgsl | 2 +- .../gen/var/abs/fd247f.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/abs/fd247f.wgsl.expected.glsl | 6 +- .../gen/var/abs/fd247f.wgsl.expected.msl | 2 +- .../gen/var/abs/fd247f.wgsl.expected.spvasm | 41 ++++++------- .../gen/var/abs/fd247f.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/acos/004aff.wgsl | 2 +- .../var/acos/004aff.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/acos/004aff.wgsl.expected.glsl | 6 +- .../gen/var/acos/004aff.wgsl.expected.msl | 2 +- .../gen/var/acos/004aff.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/acos/004aff.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/acos/203628.wgsl | 2 +- .../var/acos/203628.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/acos/203628.wgsl.expected.glsl | 6 +- .../gen/var/acos/203628.wgsl.expected.msl | 2 +- .../gen/var/acos/203628.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/acos/203628.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/acos/303e3d.wgsl | 2 +- .../var/acos/303e3d.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/acos/303e3d.wgsl.expected.glsl | 6 +- .../gen/var/acos/303e3d.wgsl.expected.msl | 2 +- .../gen/var/acos/303e3d.wgsl.expected.spvasm | 41 ++++++------- .../gen/var/acos/303e3d.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/acos/f47057.wgsl | 2 +- .../var/acos/f47057.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/acos/f47057.wgsl.expected.glsl | 6 +- .../gen/var/acos/f47057.wgsl.expected.msl | 2 +- .../gen/var/acos/f47057.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/acos/f47057.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/acosh/5f49d8.wgsl | 2 +- .../var/acosh/5f49d8.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/acosh/5f49d8.wgsl.expected.glsl | 6 +- .../gen/var/acosh/5f49d8.wgsl.expected.msl | 2 +- .../gen/var/acosh/5f49d8.wgsl.expected.spvasm | 2 +- .../gen/var/acosh/5f49d8.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/acosh/a37dfe.wgsl | 2 +- .../var/acosh/a37dfe.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/acosh/a37dfe.wgsl.expected.glsl | 6 +- .../gen/var/acosh/a37dfe.wgsl.expected.msl | 2 +- .../gen/var/acosh/a37dfe.wgsl.expected.spvasm | 2 +- .../gen/var/acosh/a37dfe.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/acosh/de60d8.wgsl | 2 +- .../var/acosh/de60d8.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/acosh/de60d8.wgsl.expected.glsl | 6 +- .../gen/var/acosh/de60d8.wgsl.expected.msl | 2 +- .../gen/var/acosh/de60d8.wgsl.expected.spvasm | 2 +- .../gen/var/acosh/de60d8.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/acosh/f56574.wgsl | 2 +- .../var/acosh/f56574.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/acosh/f56574.wgsl.expected.glsl | 6 +- .../gen/var/acosh/f56574.wgsl.expected.msl | 2 +- .../gen/var/acosh/f56574.wgsl.expected.spvasm | 2 +- .../gen/var/acosh/f56574.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/asin/11dfda.wgsl | 2 +- .../var/asin/11dfda.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/asin/11dfda.wgsl.expected.glsl | 6 +- .../gen/var/asin/11dfda.wgsl.expected.msl | 2 +- .../gen/var/asin/11dfda.wgsl.expected.spvasm | 41 ++++++------- .../gen/var/asin/11dfda.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/asin/2d8e29.wgsl | 2 +- .../var/asin/2d8e29.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/asin/2d8e29.wgsl.expected.glsl | 6 +- .../gen/var/asin/2d8e29.wgsl.expected.msl | 2 +- .../gen/var/asin/2d8e29.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/asin/2d8e29.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/asin/3cfbd4.wgsl | 2 +- .../var/asin/3cfbd4.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/asin/3cfbd4.wgsl.expected.glsl | 6 +- .../gen/var/asin/3cfbd4.wgsl.expected.msl | 2 +- .../gen/var/asin/3cfbd4.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/asin/3cfbd4.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/asin/b4aced.wgsl | 2 +- .../var/asin/b4aced.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/asin/b4aced.wgsl.expected.glsl | 6 +- .../gen/var/asin/b4aced.wgsl.expected.msl | 2 +- .../gen/var/asin/b4aced.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/asin/b4aced.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/asinh/468a48.wgsl | 2 +- .../var/asinh/468a48.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/asinh/468a48.wgsl.expected.glsl | 6 +- .../gen/var/asinh/468a48.wgsl.expected.msl | 2 +- .../gen/var/asinh/468a48.wgsl.expected.spvasm | 41 ++++++------- .../gen/var/asinh/468a48.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/asinh/95ab2b.wgsl | 2 +- .../var/asinh/95ab2b.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/asinh/95ab2b.wgsl.expected.glsl | 6 +- .../gen/var/asinh/95ab2b.wgsl.expected.msl | 2 +- .../gen/var/asinh/95ab2b.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/asinh/95ab2b.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/asinh/ad8f8b.wgsl | 2 +- .../var/asinh/ad8f8b.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/asinh/ad8f8b.wgsl.expected.glsl | 6 +- .../gen/var/asinh/ad8f8b.wgsl.expected.msl | 2 +- .../gen/var/asinh/ad8f8b.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/asinh/ad8f8b.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/asinh/fb5e8c.wgsl | 2 +- .../var/asinh/fb5e8c.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/asinh/fb5e8c.wgsl.expected.glsl | 6 +- .../gen/var/asinh/fb5e8c.wgsl.expected.msl | 2 +- .../gen/var/asinh/fb5e8c.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/asinh/fb5e8c.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/atan/19faea.wgsl | 2 +- .../var/atan/19faea.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/atan/19faea.wgsl.expected.glsl | 6 +- .../gen/var/atan/19faea.wgsl.expected.msl | 2 +- .../gen/var/atan/19faea.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/atan/19faea.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/atan/1e1764.wgsl | 2 +- .../var/atan/1e1764.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/atan/1e1764.wgsl.expected.glsl | 6 +- .../gen/var/atan/1e1764.wgsl.expected.msl | 2 +- .../gen/var/atan/1e1764.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/atan/1e1764.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/atan/a5f421.wgsl | 2 +- .../var/atan/a5f421.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/atan/a5f421.wgsl.expected.glsl | 6 +- .../gen/var/atan/a5f421.wgsl.expected.msl | 2 +- .../gen/var/atan/a5f421.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/atan/a5f421.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/atan/a7ba61.wgsl | 2 +- .../var/atan/a7ba61.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/atan/a7ba61.wgsl.expected.glsl | 6 +- .../gen/var/atan/a7ba61.wgsl.expected.msl | 2 +- .../gen/var/atan/a7ba61.wgsl.expected.spvasm | 41 ++++++------- .../gen/var/atan/a7ba61.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/atan2/21dfea.wgsl | 4 +- .../var/atan2/21dfea.wgsl.expected.dxc.hlsl | 4 +- .../gen/var/atan2/21dfea.wgsl.expected.glsl | 12 ++-- .../gen/var/atan2/21dfea.wgsl.expected.msl | 4 +- .../gen/var/atan2/21dfea.wgsl.expected.spvasm | 48 ++++++++------- .../gen/var/atan2/21dfea.wgsl.expected.wgsl | 4 +- test/tint/builtins/gen/var/atan2/93febc.wgsl | 4 +- .../var/atan2/93febc.wgsl.expected.dxc.hlsl | 4 +- .../gen/var/atan2/93febc.wgsl.expected.glsl | 12 ++-- .../gen/var/atan2/93febc.wgsl.expected.msl | 4 +- .../gen/var/atan2/93febc.wgsl.expected.spvasm | 48 ++++++++------- .../gen/var/atan2/93febc.wgsl.expected.wgsl | 4 +- test/tint/builtins/gen/var/atan2/ca698e.wgsl | 4 +- .../var/atan2/ca698e.wgsl.expected.dxc.hlsl | 4 +- .../gen/var/atan2/ca698e.wgsl.expected.glsl | 12 ++-- .../gen/var/atan2/ca698e.wgsl.expected.msl | 4 +- .../gen/var/atan2/ca698e.wgsl.expected.spvasm | 47 ++++++++------- .../gen/var/atan2/ca698e.wgsl.expected.wgsl | 4 +- test/tint/builtins/gen/var/atan2/d983ab.wgsl | 4 +- .../var/atan2/d983ab.wgsl.expected.dxc.hlsl | 4 +- .../gen/var/atan2/d983ab.wgsl.expected.glsl | 12 ++-- .../gen/var/atan2/d983ab.wgsl.expected.msl | 4 +- .../gen/var/atan2/d983ab.wgsl.expected.spvasm | 48 ++++++++------- .../gen/var/atan2/d983ab.wgsl.expected.wgsl | 4 +- test/tint/builtins/gen/var/atanh/5bf88d.wgsl | 2 +- .../var/atanh/5bf88d.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/atanh/5bf88d.wgsl.expected.glsl | 6 +- .../gen/var/atanh/5bf88d.wgsl.expected.msl | 2 +- .../gen/var/atanh/5bf88d.wgsl.expected.spvasm | 34 ++++++----- .../gen/var/atanh/5bf88d.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/atanh/d2d8cd.wgsl | 2 +- .../var/atanh/d2d8cd.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/atanh/d2d8cd.wgsl.expected.glsl | 6 +- .../gen/var/atanh/d2d8cd.wgsl.expected.msl | 2 +- .../gen/var/atanh/d2d8cd.wgsl.expected.spvasm | 33 +++++----- .../gen/var/atanh/d2d8cd.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/atanh/e3b450.wgsl | 2 +- .../var/atanh/e3b450.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/atanh/e3b450.wgsl.expected.glsl | 6 +- .../gen/var/atanh/e3b450.wgsl.expected.msl | 2 +- .../gen/var/atanh/e3b450.wgsl.expected.spvasm | 34 ++++++----- .../gen/var/atanh/e3b450.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/atanh/ec4b06.wgsl | 2 +- .../var/atanh/ec4b06.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/atanh/ec4b06.wgsl.expected.glsl | 6 +- .../gen/var/atanh/ec4b06.wgsl.expected.msl | 2 +- .../gen/var/atanh/ec4b06.wgsl.expected.spvasm | 34 ++++++----- .../gen/var/atanh/ec4b06.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/ceil/09bf52.wgsl | 2 +- .../var/ceil/09bf52.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/ceil/09bf52.wgsl.expected.glsl | 6 +- .../gen/var/ceil/09bf52.wgsl.expected.msl | 2 +- .../gen/var/ceil/09bf52.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/ceil/09bf52.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/ceil/18c240.wgsl | 2 +- .../var/ceil/18c240.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/ceil/18c240.wgsl.expected.glsl | 6 +- .../gen/var/ceil/18c240.wgsl.expected.msl | 2 +- .../gen/var/ceil/18c240.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/ceil/18c240.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/ceil/4bca2a.wgsl | 2 +- .../var/ceil/4bca2a.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/ceil/4bca2a.wgsl.expected.glsl | 6 +- .../gen/var/ceil/4bca2a.wgsl.expected.msl | 2 +- .../gen/var/ceil/4bca2a.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/ceil/4bca2a.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/ceil/f3f889.wgsl | 2 +- .../var/ceil/f3f889.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/ceil/f3f889.wgsl.expected.glsl | 6 +- .../gen/var/ceil/f3f889.wgsl.expected.msl | 2 +- .../gen/var/ceil/f3f889.wgsl.expected.spvasm | 41 ++++++------- .../gen/var/ceil/f3f889.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/clamp/235b29.wgsl | 6 +- .../var/clamp/235b29.wgsl.expected.dxc.hlsl | 6 +- .../gen/var/clamp/235b29.wgsl.expected.glsl | 18 +++--- .../gen/var/clamp/235b29.wgsl.expected.msl | 6 +- .../gen/var/clamp/235b29.wgsl.expected.spvasm | 54 +++++++++-------- .../gen/var/clamp/235b29.wgsl.expected.wgsl | 6 +- test/tint/builtins/gen/var/clamp/2c251b.wgsl | 6 +- .../var/clamp/2c251b.wgsl.expected.dxc.hlsl | 6 +- .../gen/var/clamp/2c251b.wgsl.expected.glsl | 18 +++--- .../gen/var/clamp/2c251b.wgsl.expected.msl | 6 +- .../gen/var/clamp/2c251b.wgsl.expected.spvasm | 54 +++++++++-------- .../gen/var/clamp/2c251b.wgsl.expected.wgsl | 6 +- test/tint/builtins/gen/var/clamp/553ffb.wgsl | 6 +- .../var/clamp/553ffb.wgsl.expected.dxc.hlsl | 6 +- .../gen/var/clamp/553ffb.wgsl.expected.glsl | 18 +++--- .../gen/var/clamp/553ffb.wgsl.expected.msl | 6 +- .../gen/var/clamp/553ffb.wgsl.expected.spvasm | 53 ++++++++-------- .../gen/var/clamp/553ffb.wgsl.expected.wgsl | 6 +- test/tint/builtins/gen/var/clamp/b195eb.wgsl | 6 +- .../var/clamp/b195eb.wgsl.expected.dxc.hlsl | 6 +- .../gen/var/clamp/b195eb.wgsl.expected.glsl | 18 +++--- .../gen/var/clamp/b195eb.wgsl.expected.msl | 6 +- .../gen/var/clamp/b195eb.wgsl.expected.spvasm | 54 +++++++++-------- .../gen/var/clamp/b195eb.wgsl.expected.wgsl | 6 +- test/tint/builtins/gen/var/cos/0835a8.wgsl | 2 +- .../gen/var/cos/0835a8.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/cos/0835a8.wgsl.expected.glsl | 6 +- .../gen/var/cos/0835a8.wgsl.expected.msl | 2 +- .../gen/var/cos/0835a8.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/cos/0835a8.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/cos/0a89f7.wgsl | 2 +- .../gen/var/cos/0a89f7.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/cos/0a89f7.wgsl.expected.glsl | 6 +- .../gen/var/cos/0a89f7.wgsl.expected.msl | 2 +- .../gen/var/cos/0a89f7.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/cos/0a89f7.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/cos/5bc2c6.wgsl | 2 +- .../gen/var/cos/5bc2c6.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/cos/5bc2c6.wgsl.expected.glsl | 6 +- .../gen/var/cos/5bc2c6.wgsl.expected.msl | 2 +- .../gen/var/cos/5bc2c6.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/cos/5bc2c6.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/cos/fc047d.wgsl | 2 +- .../gen/var/cos/fc047d.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/cos/fc047d.wgsl.expected.glsl | 6 +- .../gen/var/cos/fc047d.wgsl.expected.msl | 2 +- .../gen/var/cos/fc047d.wgsl.expected.spvasm | 41 ++++++------- .../gen/var/cos/fc047d.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/cosh/2ed778.wgsl | 2 +- .../var/cosh/2ed778.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/cosh/2ed778.wgsl.expected.glsl | 6 +- .../gen/var/cosh/2ed778.wgsl.expected.msl | 2 +- .../gen/var/cosh/2ed778.wgsl.expected.spvasm | 41 ++++++------- .../gen/var/cosh/2ed778.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/cosh/3b7bbf.wgsl | 2 +- .../var/cosh/3b7bbf.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/cosh/3b7bbf.wgsl.expected.glsl | 6 +- .../gen/var/cosh/3b7bbf.wgsl.expected.msl | 2 +- .../gen/var/cosh/3b7bbf.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/cosh/3b7bbf.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/cosh/43b672.wgsl | 2 +- .../var/cosh/43b672.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/cosh/43b672.wgsl.expected.glsl | 6 +- .../gen/var/cosh/43b672.wgsl.expected.msl | 2 +- .../gen/var/cosh/43b672.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/cosh/43b672.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/cosh/b1b8a0.wgsl | 2 +- .../var/cosh/b1b8a0.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/cosh/b1b8a0.wgsl.expected.glsl | 6 +- .../gen/var/cosh/b1b8a0.wgsl.expected.msl | 2 +- .../gen/var/cosh/b1b8a0.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/cosh/b1b8a0.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/cross/9857cb.wgsl | 4 +- .../var/cross/9857cb.wgsl.expected.dxc.hlsl | 4 +- .../gen/var/cross/9857cb.wgsl.expected.glsl | 12 ++-- .../gen/var/cross/9857cb.wgsl.expected.msl | 4 +- .../gen/var/cross/9857cb.wgsl.expected.spvasm | 48 ++++++++------- .../gen/var/cross/9857cb.wgsl.expected.wgsl | 4 +- .../tint/builtins/gen/var/degrees/3055d3.wgsl | 2 +- .../var/degrees/3055d3.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/degrees/3055d3.wgsl.expected.glsl | 6 +- .../gen/var/degrees/3055d3.wgsl.expected.msl | 2 +- .../var/degrees/3055d3.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/degrees/3055d3.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/var/degrees/5e9805.wgsl | 2 +- .../var/degrees/5e9805.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/degrees/5e9805.wgsl.expected.glsl | 6 +- .../gen/var/degrees/5e9805.wgsl.expected.msl | 2 +- .../var/degrees/5e9805.wgsl.expected.spvasm | 41 ++++++------- .../gen/var/degrees/5e9805.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/var/degrees/dfe8f4.wgsl | 2 +- .../var/degrees/dfe8f4.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/degrees/dfe8f4.wgsl.expected.glsl | 6 +- .../gen/var/degrees/dfe8f4.wgsl.expected.msl | 2 +- .../var/degrees/dfe8f4.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/degrees/dfe8f4.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/var/degrees/f59715.wgsl | 2 +- .../var/degrees/f59715.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/degrees/f59715.wgsl.expected.glsl | 6 +- .../gen/var/degrees/f59715.wgsl.expected.msl | 2 +- .../var/degrees/f59715.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/degrees/f59715.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/determinant/32bfde.wgsl | 2 +- .../determinant/32bfde.wgsl.expected.dxc.hlsl | 2 +- .../var/determinant/32bfde.wgsl.expected.glsl | 6 +- .../var/determinant/32bfde.wgsl.expected.msl | 2 +- .../determinant/32bfde.wgsl.expected.spvasm | 47 ++++++++------- .../var/determinant/32bfde.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/determinant/d7c86f.wgsl | 2 +- .../determinant/d7c86f.wgsl.expected.dxc.hlsl | 2 +- .../var/determinant/d7c86f.wgsl.expected.glsl | 6 +- .../var/determinant/d7c86f.wgsl.expected.msl | 2 +- .../determinant/d7c86f.wgsl.expected.spvasm | 47 ++++++++------- .../var/determinant/d7c86f.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/determinant/fc12a5.wgsl | 2 +- .../determinant/fc12a5.wgsl.expected.dxc.hlsl | 2 +- .../var/determinant/fc12a5.wgsl.expected.glsl | 6 +- .../var/determinant/fc12a5.wgsl.expected.msl | 2 +- .../determinant/fc12a5.wgsl.expected.spvasm | 47 ++++++++------- .../var/determinant/fc12a5.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/distance/7272f3.wgsl | 4 +- .../distance/7272f3.wgsl.expected.dxc.hlsl | 4 +- .../var/distance/7272f3.wgsl.expected.glsl | 12 ++-- .../gen/var/distance/7272f3.wgsl.expected.msl | 4 +- .../var/distance/7272f3.wgsl.expected.spvasm | 50 ++++++++-------- .../var/distance/7272f3.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/distance/7d201f.wgsl | 4 +- .../distance/7d201f.wgsl.expected.dxc.hlsl | 4 +- .../var/distance/7d201f.wgsl.expected.glsl | 12 ++-- .../gen/var/distance/7d201f.wgsl.expected.msl | 4 +- .../var/distance/7d201f.wgsl.expected.spvasm | 47 ++++++++------- .../var/distance/7d201f.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/distance/892a5d.wgsl | 4 +- .../distance/892a5d.wgsl.expected.dxc.hlsl | 4 +- .../var/distance/892a5d.wgsl.expected.glsl | 12 ++-- .../gen/var/distance/892a5d.wgsl.expected.msl | 4 +- .../var/distance/892a5d.wgsl.expected.spvasm | 50 ++++++++-------- .../var/distance/892a5d.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/distance/928fa0.wgsl | 4 +- .../distance/928fa0.wgsl.expected.dxc.hlsl | 4 +- .../var/distance/928fa0.wgsl.expected.glsl | 12 ++-- .../gen/var/distance/928fa0.wgsl.expected.msl | 4 +- .../var/distance/928fa0.wgsl.expected.spvasm | 50 ++++++++-------- .../var/distance/928fa0.wgsl.expected.wgsl | 4 +- test/tint/builtins/gen/var/dot/8e40f1.wgsl | 4 +- .../gen/var/dot/8e40f1.wgsl.expected.dxc.hlsl | 4 +- .../gen/var/dot/8e40f1.wgsl.expected.glsl | 12 ++-- .../gen/var/dot/8e40f1.wgsl.expected.msl | 4 +- .../gen/var/dot/8e40f1.wgsl.expected.spvasm | 48 ++++++++------- .../gen/var/dot/8e40f1.wgsl.expected.wgsl | 4 +- test/tint/builtins/gen/var/dot/cd5a04.wgsl | 4 +- .../gen/var/dot/cd5a04.wgsl.expected.dxc.hlsl | 4 +- .../gen/var/dot/cd5a04.wgsl.expected.glsl | 12 ++-- .../gen/var/dot/cd5a04.wgsl.expected.msl | 4 +- .../gen/var/dot/cd5a04.wgsl.expected.spvasm | 48 ++++++++------- .../gen/var/dot/cd5a04.wgsl.expected.wgsl | 4 +- test/tint/builtins/gen/var/dot/d0d179.wgsl | 4 +- .../gen/var/dot/d0d179.wgsl.expected.dxc.hlsl | 4 +- .../gen/var/dot/d0d179.wgsl.expected.glsl | 12 ++-- .../gen/var/dot/d0d179.wgsl.expected.msl | 4 +- .../gen/var/dot/d0d179.wgsl.expected.spvasm | 48 ++++++++------- .../gen/var/dot/d0d179.wgsl.expected.wgsl | 4 +- test/tint/builtins/gen/var/exp/13806d.wgsl | 2 +- .../gen/var/exp/13806d.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/exp/13806d.wgsl.expected.glsl | 6 +- .../gen/var/exp/13806d.wgsl.expected.msl | 2 +- .../gen/var/exp/13806d.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/exp/13806d.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/exp/2e08e2.wgsl | 2 +- .../gen/var/exp/2e08e2.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/exp/2e08e2.wgsl.expected.glsl | 6 +- .../gen/var/exp/2e08e2.wgsl.expected.msl | 2 +- .../gen/var/exp/2e08e2.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/exp/2e08e2.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/exp/611a87.wgsl | 2 +- .../gen/var/exp/611a87.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/exp/611a87.wgsl.expected.glsl | 6 +- .../gen/var/exp/611a87.wgsl.expected.msl | 2 +- .../gen/var/exp/611a87.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/exp/611a87.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/exp/c18fe9.wgsl | 2 +- .../gen/var/exp/c18fe9.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/exp/c18fe9.wgsl.expected.glsl | 6 +- .../gen/var/exp/c18fe9.wgsl.expected.msl | 2 +- .../gen/var/exp/c18fe9.wgsl.expected.spvasm | 41 ++++++------- .../gen/var/exp/c18fe9.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/exp2/151a4c.wgsl | 2 +- .../var/exp2/151a4c.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/exp2/151a4c.wgsl.expected.glsl | 6 +- .../gen/var/exp2/151a4c.wgsl.expected.msl | 2 +- .../gen/var/exp2/151a4c.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/exp2/151a4c.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/exp2/751377.wgsl | 2 +- .../var/exp2/751377.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/exp2/751377.wgsl.expected.glsl | 6 +- .../gen/var/exp2/751377.wgsl.expected.msl | 2 +- .../gen/var/exp2/751377.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/exp2/751377.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/exp2/b408e4.wgsl | 2 +- .../var/exp2/b408e4.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/exp2/b408e4.wgsl.expected.glsl | 6 +- .../gen/var/exp2/b408e4.wgsl.expected.msl | 2 +- .../gen/var/exp2/b408e4.wgsl.expected.spvasm | 41 ++++++------- .../gen/var/exp2/b408e4.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/exp2/ffa827.wgsl | 2 +- .../var/exp2/ffa827.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/exp2/ffa827.wgsl.expected.glsl | 6 +- .../gen/var/exp2/ffa827.wgsl.expected.msl | 2 +- .../gen/var/exp2/ffa827.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/exp2/ffa827.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/faceForward/524986.wgsl | 6 +- .../faceForward/524986.wgsl.expected.dxc.hlsl | 6 +- .../var/faceForward/524986.wgsl.expected.glsl | 18 +++--- .../var/faceForward/524986.wgsl.expected.msl | 6 +- .../faceForward/524986.wgsl.expected.spvasm | 54 +++++++++-------- .../var/faceForward/524986.wgsl.expected.wgsl | 6 +- .../builtins/gen/var/faceForward/cc63dc.wgsl | 6 +- .../faceForward/cc63dc.wgsl.expected.dxc.hlsl | 6 +- .../var/faceForward/cc63dc.wgsl.expected.glsl | 18 +++--- .../var/faceForward/cc63dc.wgsl.expected.msl | 6 +- .../faceForward/cc63dc.wgsl.expected.spvasm | 54 +++++++++-------- .../var/faceForward/cc63dc.wgsl.expected.wgsl | 6 +- .../builtins/gen/var/faceForward/fb0f2e.wgsl | 6 +- .../faceForward/fb0f2e.wgsl.expected.dxc.hlsl | 6 +- .../var/faceForward/fb0f2e.wgsl.expected.glsl | 18 +++--- .../var/faceForward/fb0f2e.wgsl.expected.msl | 6 +- .../faceForward/fb0f2e.wgsl.expected.spvasm | 54 +++++++++-------- .../var/faceForward/fb0f2e.wgsl.expected.wgsl | 6 +- test/tint/builtins/gen/var/floor/3802c0.wgsl | 2 +- .../var/floor/3802c0.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/floor/3802c0.wgsl.expected.glsl | 6 +- .../gen/var/floor/3802c0.wgsl.expected.msl | 2 +- .../gen/var/floor/3802c0.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/floor/3802c0.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/floor/84658c.wgsl | 2 +- .../var/floor/84658c.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/floor/84658c.wgsl.expected.glsl | 6 +- .../gen/var/floor/84658c.wgsl.expected.msl | 2 +- .../gen/var/floor/84658c.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/floor/84658c.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/floor/a2d31b.wgsl | 2 +- .../var/floor/a2d31b.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/floor/a2d31b.wgsl.expected.glsl | 6 +- .../gen/var/floor/a2d31b.wgsl.expected.msl | 2 +- .../gen/var/floor/a2d31b.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/floor/a2d31b.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/floor/b6e09c.wgsl | 2 +- .../var/floor/b6e09c.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/floor/b6e09c.wgsl.expected.glsl | 6 +- .../gen/var/floor/b6e09c.wgsl.expected.msl | 2 +- .../gen/var/floor/b6e09c.wgsl.expected.spvasm | 41 ++++++------- .../gen/var/floor/b6e09c.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/fma/ab7818.wgsl | 6 +- .../gen/var/fma/ab7818.wgsl.expected.dxc.hlsl | 6 +- .../gen/var/fma/ab7818.wgsl.expected.glsl | 18 +++--- .../gen/var/fma/ab7818.wgsl.expected.msl | 6 +- .../gen/var/fma/ab7818.wgsl.expected.spvasm | 54 +++++++++-------- .../gen/var/fma/ab7818.wgsl.expected.wgsl | 6 +- test/tint/builtins/gen/var/fma/bf21b6.wgsl | 6 +- .../gen/var/fma/bf21b6.wgsl.expected.dxc.hlsl | 6 +- .../gen/var/fma/bf21b6.wgsl.expected.glsl | 18 +++--- .../gen/var/fma/bf21b6.wgsl.expected.msl | 6 +- .../gen/var/fma/bf21b6.wgsl.expected.spvasm | 54 +++++++++-------- .../gen/var/fma/bf21b6.wgsl.expected.wgsl | 6 +- test/tint/builtins/gen/var/fma/c8abb3.wgsl | 6 +- .../gen/var/fma/c8abb3.wgsl.expected.dxc.hlsl | 6 +- .../gen/var/fma/c8abb3.wgsl.expected.glsl | 18 +++--- .../gen/var/fma/c8abb3.wgsl.expected.msl | 6 +- .../gen/var/fma/c8abb3.wgsl.expected.spvasm | 53 ++++++++-------- .../gen/var/fma/c8abb3.wgsl.expected.wgsl | 6 +- test/tint/builtins/gen/var/fma/e7abdc.wgsl | 6 +- .../gen/var/fma/e7abdc.wgsl.expected.dxc.hlsl | 6 +- .../gen/var/fma/e7abdc.wgsl.expected.glsl | 18 +++--- .../gen/var/fma/e7abdc.wgsl.expected.msl | 6 +- .../gen/var/fma/e7abdc.wgsl.expected.spvasm | 54 +++++++++-------- .../gen/var/fma/e7abdc.wgsl.expected.wgsl | 6 +- test/tint/builtins/gen/var/fract/181aa9.wgsl | 2 +- .../var/fract/181aa9.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/fract/181aa9.wgsl.expected.glsl | 6 +- .../gen/var/fract/181aa9.wgsl.expected.msl | 2 +- .../gen/var/fract/181aa9.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/fract/181aa9.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/fract/498c77.wgsl | 2 +- .../var/fract/498c77.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/fract/498c77.wgsl.expected.glsl | 6 +- .../gen/var/fract/498c77.wgsl.expected.msl | 2 +- .../gen/var/fract/498c77.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/fract/498c77.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/fract/958a1d.wgsl | 2 +- .../var/fract/958a1d.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/fract/958a1d.wgsl.expected.glsl | 6 +- .../gen/var/fract/958a1d.wgsl.expected.msl | 2 +- .../gen/var/fract/958a1d.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/fract/958a1d.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/fract/eb38ce.wgsl | 2 +- .../var/fract/eb38ce.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/fract/eb38ce.wgsl.expected.glsl | 6 +- .../gen/var/fract/eb38ce.wgsl.expected.msl | 2 +- .../gen/var/fract/eb38ce.wgsl.expected.spvasm | 41 ++++++------- .../gen/var/fract/eb38ce.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/frexp/3dd21e.wgsl | 2 +- .../var/frexp/3dd21e.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/frexp/3dd21e.wgsl.expected.glsl | 6 +- .../gen/var/frexp/3dd21e.wgsl.expected.msl | 2 +- .../gen/var/frexp/3dd21e.wgsl.expected.spvasm | 44 +++++++------- .../gen/var/frexp/3dd21e.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/frexp/5257dd.wgsl | 2 +- .../var/frexp/5257dd.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/frexp/5257dd.wgsl.expected.glsl | 6 +- .../gen/var/frexp/5257dd.wgsl.expected.msl | 2 +- .../gen/var/frexp/5257dd.wgsl.expected.spvasm | 43 ++++++------- .../gen/var/frexp/5257dd.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/frexp/5f47bf.wgsl | 2 +- .../var/frexp/5f47bf.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/frexp/5f47bf.wgsl.expected.glsl | 6 +- .../gen/var/frexp/5f47bf.wgsl.expected.msl | 2 +- .../gen/var/frexp/5f47bf.wgsl.expected.spvasm | 44 +++++++------- .../gen/var/frexp/5f47bf.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/frexp/ae4a66.wgsl | 2 +- .../var/frexp/ae4a66.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/frexp/ae4a66.wgsl.expected.glsl | 6 +- .../gen/var/frexp/ae4a66.wgsl.expected.msl | 2 +- .../gen/var/frexp/ae4a66.wgsl.expected.spvasm | 44 +++++++------- .../gen/var/frexp/ae4a66.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/inverseSqrt/440300.wgsl | 2 +- .../inverseSqrt/440300.wgsl.expected.dxc.hlsl | 2 +- .../var/inverseSqrt/440300.wgsl.expected.glsl | 6 +- .../var/inverseSqrt/440300.wgsl.expected.msl | 2 +- .../inverseSqrt/440300.wgsl.expected.spvasm | 41 ++++++------- .../var/inverseSqrt/440300.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/inverseSqrt/5f51f8.wgsl | 2 +- .../inverseSqrt/5f51f8.wgsl.expected.dxc.hlsl | 2 +- .../var/inverseSqrt/5f51f8.wgsl.expected.glsl | 6 +- .../var/inverseSqrt/5f51f8.wgsl.expected.msl | 2 +- .../inverseSqrt/5f51f8.wgsl.expected.spvasm | 42 ++++++------- .../var/inverseSqrt/5f51f8.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/inverseSqrt/b85ebd.wgsl | 2 +- .../inverseSqrt/b85ebd.wgsl.expected.dxc.hlsl | 2 +- .../var/inverseSqrt/b85ebd.wgsl.expected.glsl | 6 +- .../var/inverseSqrt/b85ebd.wgsl.expected.msl | 2 +- .../inverseSqrt/b85ebd.wgsl.expected.spvasm | 42 ++++++------- .../var/inverseSqrt/b85ebd.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/inverseSqrt/cbdc70.wgsl | 2 +- .../inverseSqrt/cbdc70.wgsl.expected.dxc.hlsl | 2 +- .../var/inverseSqrt/cbdc70.wgsl.expected.glsl | 6 +- .../var/inverseSqrt/cbdc70.wgsl.expected.msl | 2 +- .../inverseSqrt/cbdc70.wgsl.expected.spvasm | 42 ++++++------- .../var/inverseSqrt/cbdc70.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/ldexp/3d90b4.wgsl | 2 +- .../var/ldexp/3d90b4.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/ldexp/3d90b4.wgsl.expected.glsl | 6 +- .../gen/var/ldexp/3d90b4.wgsl.expected.msl | 2 +- .../gen/var/ldexp/3d90b4.wgsl.expected.spvasm | 52 ++++++++-------- .../gen/var/ldexp/3d90b4.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/ldexp/624e0c.wgsl | 2 +- .../var/ldexp/624e0c.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/ldexp/624e0c.wgsl.expected.glsl | 6 +- .../gen/var/ldexp/624e0c.wgsl.expected.msl | 2 +- .../gen/var/ldexp/624e0c.wgsl.expected.spvasm | 47 ++++++++------- .../gen/var/ldexp/624e0c.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/ldexp/7485ce.wgsl | 2 +- .../var/ldexp/7485ce.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/ldexp/7485ce.wgsl.expected.glsl | 6 +- .../gen/var/ldexp/7485ce.wgsl.expected.msl | 2 +- .../gen/var/ldexp/7485ce.wgsl.expected.spvasm | 52 ++++++++-------- .../gen/var/ldexp/7485ce.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/ldexp/7fa13c.wgsl | 2 +- .../var/ldexp/7fa13c.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/ldexp/7fa13c.wgsl.expected.glsl | 6 +- .../gen/var/ldexp/7fa13c.wgsl.expected.msl | 2 +- .../gen/var/ldexp/7fa13c.wgsl.expected.spvasm | 52 ++++++++-------- .../gen/var/ldexp/7fa13c.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/length/3f0e13.wgsl | 2 +- .../var/length/3f0e13.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/length/3f0e13.wgsl.expected.glsl | 6 +- .../gen/var/length/3f0e13.wgsl.expected.msl | 2 +- .../var/length/3f0e13.wgsl.expected.spvasm | 44 +++++++------- .../gen/var/length/3f0e13.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/length/5b1a9b.wgsl | 2 +- .../var/length/5b1a9b.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/length/5b1a9b.wgsl.expected.glsl | 6 +- .../gen/var/length/5b1a9b.wgsl.expected.msl | 2 +- .../var/length/5b1a9b.wgsl.expected.spvasm | 44 +++++++------- .../gen/var/length/5b1a9b.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/length/ba16d6.wgsl | 2 +- .../var/length/ba16d6.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/length/ba16d6.wgsl.expected.glsl | 6 +- .../gen/var/length/ba16d6.wgsl.expected.msl | 2 +- .../var/length/ba16d6.wgsl.expected.spvasm | 44 +++++++------- .../gen/var/length/ba16d6.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/length/c158da.wgsl | 2 +- .../var/length/c158da.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/length/c158da.wgsl.expected.glsl | 6 +- .../gen/var/length/c158da.wgsl.expected.msl | 2 +- .../var/length/c158da.wgsl.expected.spvasm | 41 ++++++------- .../gen/var/length/c158da.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/log/6ff86f.wgsl | 2 +- .../gen/var/log/6ff86f.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/log/6ff86f.wgsl.expected.glsl | 6 +- .../gen/var/log/6ff86f.wgsl.expected.msl | 2 +- .../gen/var/log/6ff86f.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/log/6ff86f.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/log/8f0e32.wgsl | 2 +- .../gen/var/log/8f0e32.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/log/8f0e32.wgsl.expected.glsl | 6 +- .../gen/var/log/8f0e32.wgsl.expected.msl | 2 +- .../gen/var/log/8f0e32.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/log/8f0e32.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/log/c9f489.wgsl | 2 +- .../gen/var/log/c9f489.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/log/c9f489.wgsl.expected.glsl | 6 +- .../gen/var/log/c9f489.wgsl.expected.msl | 2 +- .../gen/var/log/c9f489.wgsl.expected.spvasm | 41 ++++++------- .../gen/var/log/c9f489.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/log/cdbdc1.wgsl | 2 +- .../gen/var/log/cdbdc1.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/log/cdbdc1.wgsl.expected.glsl | 6 +- .../gen/var/log/cdbdc1.wgsl.expected.msl | 2 +- .../gen/var/log/cdbdc1.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/log/cdbdc1.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/log2/38b478.wgsl | 2 +- .../var/log2/38b478.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/log2/38b478.wgsl.expected.glsl | 6 +- .../gen/var/log2/38b478.wgsl.expected.msl | 2 +- .../gen/var/log2/38b478.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/log2/38b478.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/log2/776088.wgsl | 2 +- .../var/log2/776088.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/log2/776088.wgsl.expected.glsl | 6 +- .../gen/var/log2/776088.wgsl.expected.msl | 2 +- .../gen/var/log2/776088.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/log2/776088.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/log2/8c10b3.wgsl | 2 +- .../var/log2/8c10b3.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/log2/8c10b3.wgsl.expected.glsl | 6 +- .../gen/var/log2/8c10b3.wgsl.expected.msl | 2 +- .../gen/var/log2/8c10b3.wgsl.expected.spvasm | 41 ++++++------- .../gen/var/log2/8c10b3.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/log2/fb9f0b.wgsl | 2 +- .../var/log2/fb9f0b.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/log2/fb9f0b.wgsl.expected.glsl | 6 +- .../gen/var/log2/fb9f0b.wgsl.expected.msl | 2 +- .../gen/var/log2/fb9f0b.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/log2/fb9f0b.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/max/111ac0.wgsl | 4 +- .../gen/var/max/111ac0.wgsl.expected.dxc.hlsl | 4 +- .../gen/var/max/111ac0.wgsl.expected.glsl | 12 ++-- .../gen/var/max/111ac0.wgsl.expected.msl | 4 +- .../gen/var/max/111ac0.wgsl.expected.spvasm | 47 ++++++++------- .../gen/var/max/111ac0.wgsl.expected.wgsl | 4 +- test/tint/builtins/gen/var/max/34956e.wgsl | 4 +- .../gen/var/max/34956e.wgsl.expected.dxc.hlsl | 4 +- .../gen/var/max/34956e.wgsl.expected.glsl | 12 ++-- .../gen/var/max/34956e.wgsl.expected.msl | 4 +- .../gen/var/max/34956e.wgsl.expected.spvasm | 48 ++++++++------- .../gen/var/max/34956e.wgsl.expected.wgsl | 4 +- test/tint/builtins/gen/var/max/445169.wgsl | 4 +- .../gen/var/max/445169.wgsl.expected.dxc.hlsl | 4 +- .../gen/var/max/445169.wgsl.expected.glsl | 12 ++-- .../gen/var/max/445169.wgsl.expected.msl | 4 +- .../gen/var/max/445169.wgsl.expected.spvasm | 48 ++++++++------- .../gen/var/max/445169.wgsl.expected.wgsl | 4 +- test/tint/builtins/gen/var/max/e14f2b.wgsl | 4 +- .../gen/var/max/e14f2b.wgsl.expected.dxc.hlsl | 4 +- .../gen/var/max/e14f2b.wgsl.expected.glsl | 12 ++-- .../gen/var/max/e14f2b.wgsl.expected.msl | 4 +- .../gen/var/max/e14f2b.wgsl.expected.spvasm | 48 ++++++++------- .../gen/var/max/e14f2b.wgsl.expected.wgsl | 4 +- test/tint/builtins/gen/var/min/7c710a.wgsl | 4 +- .../gen/var/min/7c710a.wgsl.expected.dxc.hlsl | 4 +- .../gen/var/min/7c710a.wgsl.expected.glsl | 12 ++-- .../gen/var/min/7c710a.wgsl.expected.msl | 4 +- .../gen/var/min/7c710a.wgsl.expected.spvasm | 48 ++++++++------- .../gen/var/min/7c710a.wgsl.expected.wgsl | 4 +- test/tint/builtins/gen/var/min/ab0acd.wgsl | 4 +- .../gen/var/min/ab0acd.wgsl.expected.dxc.hlsl | 4 +- .../gen/var/min/ab0acd.wgsl.expected.glsl | 12 ++-- .../gen/var/min/ab0acd.wgsl.expected.msl | 4 +- .../gen/var/min/ab0acd.wgsl.expected.spvasm | 48 ++++++++------- .../gen/var/min/ab0acd.wgsl.expected.wgsl | 4 +- test/tint/builtins/gen/var/min/ac84d6.wgsl | 4 +- .../gen/var/min/ac84d6.wgsl.expected.dxc.hlsl | 4 +- .../gen/var/min/ac84d6.wgsl.expected.glsl | 12 ++-- .../gen/var/min/ac84d6.wgsl.expected.msl | 4 +- .../gen/var/min/ac84d6.wgsl.expected.spvasm | 47 ++++++++------- .../gen/var/min/ac84d6.wgsl.expected.wgsl | 4 +- test/tint/builtins/gen/var/min/e780f9.wgsl | 4 +- .../gen/var/min/e780f9.wgsl.expected.dxc.hlsl | 4 +- .../gen/var/min/e780f9.wgsl.expected.glsl | 12 ++-- .../gen/var/min/e780f9.wgsl.expected.msl | 4 +- .../gen/var/min/e780f9.wgsl.expected.spvasm | 48 ++++++++------- .../gen/var/min/e780f9.wgsl.expected.wgsl | 4 +- test/tint/builtins/gen/var/mix/38cbbb.wgsl | 6 +- .../gen/var/mix/38cbbb.wgsl.expected.dxc.hlsl | 6 +- .../gen/var/mix/38cbbb.wgsl.expected.glsl | 18 +++--- .../gen/var/mix/38cbbb.wgsl.expected.msl | 6 +- .../gen/var/mix/38cbbb.wgsl.expected.spvasm | 53 ++++++++-------- .../gen/var/mix/38cbbb.wgsl.expected.wgsl | 6 +- test/tint/builtins/gen/var/mix/63f2fd.wgsl | 6 +- .../gen/var/mix/63f2fd.wgsl.expected.dxc.hlsl | 6 +- .../gen/var/mix/63f2fd.wgsl.expected.glsl | 18 +++--- .../gen/var/mix/63f2fd.wgsl.expected.msl | 6 +- .../gen/var/mix/63f2fd.wgsl.expected.spvasm | 54 +++++++++-------- .../gen/var/mix/63f2fd.wgsl.expected.wgsl | 6 +- test/tint/builtins/gen/var/mix/98ee3e.wgsl | 6 +- .../gen/var/mix/98ee3e.wgsl.expected.dxc.hlsl | 6 +- .../gen/var/mix/98ee3e.wgsl.expected.glsl | 18 +++--- .../gen/var/mix/98ee3e.wgsl.expected.msl | 6 +- .../gen/var/mix/98ee3e.wgsl.expected.spvasm | 54 +++++++++-------- .../gen/var/mix/98ee3e.wgsl.expected.wgsl | 6 +- test/tint/builtins/gen/var/mix/c1aec6.wgsl | 6 +- .../gen/var/mix/c1aec6.wgsl.expected.dxc.hlsl | 6 +- .../gen/var/mix/c1aec6.wgsl.expected.glsl | 18 +++--- .../gen/var/mix/c1aec6.wgsl.expected.msl | 6 +- .../gen/var/mix/c1aec6.wgsl.expected.spvasm | 60 ++++++++++--------- .../gen/var/mix/c1aec6.wgsl.expected.wgsl | 6 +- test/tint/builtins/gen/var/mix/e46a83.wgsl | 6 +- .../gen/var/mix/e46a83.wgsl.expected.dxc.hlsl | 6 +- .../gen/var/mix/e46a83.wgsl.expected.glsl | 18 +++--- .../gen/var/mix/e46a83.wgsl.expected.msl | 6 +- .../gen/var/mix/e46a83.wgsl.expected.spvasm | 60 ++++++++++--------- .../gen/var/mix/e46a83.wgsl.expected.wgsl | 6 +- test/tint/builtins/gen/var/mix/ee2468.wgsl | 6 +- .../gen/var/mix/ee2468.wgsl.expected.dxc.hlsl | 6 +- .../gen/var/mix/ee2468.wgsl.expected.glsl | 18 +++--- .../gen/var/mix/ee2468.wgsl.expected.msl | 6 +- .../gen/var/mix/ee2468.wgsl.expected.spvasm | 54 +++++++++-------- .../gen/var/mix/ee2468.wgsl.expected.wgsl | 6 +- test/tint/builtins/gen/var/mix/f1a543.wgsl | 6 +- .../gen/var/mix/f1a543.wgsl.expected.dxc.hlsl | 6 +- .../gen/var/mix/f1a543.wgsl.expected.glsl | 18 +++--- .../gen/var/mix/f1a543.wgsl.expected.msl | 6 +- .../gen/var/mix/f1a543.wgsl.expected.spvasm | 60 ++++++++++--------- .../gen/var/mix/f1a543.wgsl.expected.wgsl | 6 +- test/tint/builtins/gen/var/modf/45005f.wgsl | 2 +- .../var/modf/45005f.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/modf/45005f.wgsl.expected.glsl | 6 +- .../gen/var/modf/45005f.wgsl.expected.msl | 2 +- .../gen/var/modf/45005f.wgsl.expected.spvasm | 44 +++++++------- .../gen/var/modf/45005f.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/modf/8dbbbf.wgsl | 2 +- .../var/modf/8dbbbf.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/modf/8dbbbf.wgsl.expected.glsl | 6 +- .../gen/var/modf/8dbbbf.wgsl.expected.msl | 2 +- .../gen/var/modf/8dbbbf.wgsl.expected.spvasm | 43 ++++++------- .../gen/var/modf/8dbbbf.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/modf/995934.wgsl | 2 +- .../var/modf/995934.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/modf/995934.wgsl.expected.glsl | 6 +- .../gen/var/modf/995934.wgsl.expected.msl | 2 +- .../gen/var/modf/995934.wgsl.expected.spvasm | 44 +++++++------- .../gen/var/modf/995934.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/modf/a545b9.wgsl | 2 +- .../var/modf/a545b9.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/modf/a545b9.wgsl.expected.glsl | 6 +- .../gen/var/modf/a545b9.wgsl.expected.msl | 2 +- .../gen/var/modf/a545b9.wgsl.expected.spvasm | 44 +++++++------- .../gen/var/modf/a545b9.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/normalize/39d5ec.wgsl | 2 +- .../normalize/39d5ec.wgsl.expected.dxc.hlsl | 2 +- .../var/normalize/39d5ec.wgsl.expected.glsl | 6 +- .../var/normalize/39d5ec.wgsl.expected.msl | 2 +- .../var/normalize/39d5ec.wgsl.expected.spvasm | 42 ++++++------- .../var/normalize/39d5ec.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/normalize/7990f3.wgsl | 2 +- .../normalize/7990f3.wgsl.expected.dxc.hlsl | 2 +- .../var/normalize/7990f3.wgsl.expected.glsl | 6 +- .../var/normalize/7990f3.wgsl.expected.msl | 2 +- .../var/normalize/7990f3.wgsl.expected.spvasm | 42 ++++++------- .../var/normalize/7990f3.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/normalize/b8cb8d.wgsl | 2 +- .../normalize/b8cb8d.wgsl.expected.dxc.hlsl | 2 +- .../var/normalize/b8cb8d.wgsl.expected.glsl | 6 +- .../var/normalize/b8cb8d.wgsl.expected.msl | 2 +- .../var/normalize/b8cb8d.wgsl.expected.spvasm | 42 ++++++------- .../var/normalize/b8cb8d.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/pow/4f33b2.wgsl | 4 +- .../gen/var/pow/4f33b2.wgsl.expected.dxc.hlsl | 4 +- .../gen/var/pow/4f33b2.wgsl.expected.glsl | 12 ++-- .../gen/var/pow/4f33b2.wgsl.expected.msl | 4 +- .../gen/var/pow/4f33b2.wgsl.expected.spvasm | 48 ++++++++------- .../gen/var/pow/4f33b2.wgsl.expected.wgsl | 4 +- test/tint/builtins/gen/var/pow/ce9ef5.wgsl | 4 +- .../gen/var/pow/ce9ef5.wgsl.expected.dxc.hlsl | 4 +- .../gen/var/pow/ce9ef5.wgsl.expected.glsl | 12 ++-- .../gen/var/pow/ce9ef5.wgsl.expected.msl | 4 +- .../gen/var/pow/ce9ef5.wgsl.expected.spvasm | 47 ++++++++------- .../gen/var/pow/ce9ef5.wgsl.expected.wgsl | 4 +- test/tint/builtins/gen/var/pow/f37b25.wgsl | 4 +- .../gen/var/pow/f37b25.wgsl.expected.dxc.hlsl | 4 +- .../gen/var/pow/f37b25.wgsl.expected.glsl | 12 ++-- .../gen/var/pow/f37b25.wgsl.expected.msl | 4 +- .../gen/var/pow/f37b25.wgsl.expected.spvasm | 48 ++++++++------- .../gen/var/pow/f37b25.wgsl.expected.wgsl | 4 +- test/tint/builtins/gen/var/pow/fa5429.wgsl | 4 +- .../gen/var/pow/fa5429.wgsl.expected.dxc.hlsl | 4 +- .../gen/var/pow/fa5429.wgsl.expected.glsl | 12 ++-- .../gen/var/pow/fa5429.wgsl.expected.msl | 4 +- .../gen/var/pow/fa5429.wgsl.expected.spvasm | 48 ++++++++------- .../gen/var/pow/fa5429.wgsl.expected.wgsl | 4 +- .../tint/builtins/gen/var/radians/208fd9.wgsl | 2 +- .../var/radians/208fd9.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/radians/208fd9.wgsl.expected.glsl | 6 +- .../gen/var/radians/208fd9.wgsl.expected.msl | 2 +- .../var/radians/208fd9.wgsl.expected.spvasm | 41 ++++++------- .../gen/var/radians/208fd9.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/var/radians/44f20b.wgsl | 2 +- .../var/radians/44f20b.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/radians/44f20b.wgsl.expected.glsl | 6 +- .../gen/var/radians/44f20b.wgsl.expected.msl | 2 +- .../var/radians/44f20b.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/radians/44f20b.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/var/radians/7ea4c7.wgsl | 2 +- .../var/radians/7ea4c7.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/radians/7ea4c7.wgsl.expected.glsl | 6 +- .../gen/var/radians/7ea4c7.wgsl.expected.msl | 2 +- .../var/radians/7ea4c7.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/radians/7ea4c7.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/var/radians/fbacf0.wgsl | 2 +- .../var/radians/fbacf0.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/radians/fbacf0.wgsl.expected.glsl | 6 +- .../gen/var/radians/fbacf0.wgsl.expected.msl | 2 +- .../var/radians/fbacf0.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/radians/fbacf0.wgsl.expected.wgsl | 2 +- .../tint/builtins/gen/var/reflect/310de5.wgsl | 4 +- .../var/reflect/310de5.wgsl.expected.dxc.hlsl | 4 +- .../gen/var/reflect/310de5.wgsl.expected.glsl | 12 ++-- .../gen/var/reflect/310de5.wgsl.expected.msl | 4 +- .../var/reflect/310de5.wgsl.expected.spvasm | 48 ++++++++------- .../gen/var/reflect/310de5.wgsl.expected.wgsl | 4 +- .../tint/builtins/gen/var/reflect/61ca21.wgsl | 4 +- .../var/reflect/61ca21.wgsl.expected.dxc.hlsl | 4 +- .../gen/var/reflect/61ca21.wgsl.expected.glsl | 12 ++-- .../gen/var/reflect/61ca21.wgsl.expected.msl | 4 +- .../var/reflect/61ca21.wgsl.expected.spvasm | 48 ++++++++------- .../gen/var/reflect/61ca21.wgsl.expected.wgsl | 4 +- .../tint/builtins/gen/var/reflect/bb15ac.wgsl | 4 +- .../var/reflect/bb15ac.wgsl.expected.dxc.hlsl | 4 +- .../gen/var/reflect/bb15ac.wgsl.expected.glsl | 12 ++-- .../gen/var/reflect/bb15ac.wgsl.expected.msl | 4 +- .../var/reflect/bb15ac.wgsl.expected.spvasm | 48 ++++++++------- .../gen/var/reflect/bb15ac.wgsl.expected.wgsl | 4 +- .../tint/builtins/gen/var/refract/0594ba.wgsl | 6 +- .../var/refract/0594ba.wgsl.expected.dxc.hlsl | 6 +- .../gen/var/refract/0594ba.wgsl.expected.glsl | 18 +++--- .../gen/var/refract/0594ba.wgsl.expected.msl | 6 +- .../var/refract/0594ba.wgsl.expected.spvasm | 56 ++++++++--------- .../gen/var/refract/0594ba.wgsl.expected.wgsl | 6 +- .../tint/builtins/gen/var/refract/570cb3.wgsl | 6 +- .../var/refract/570cb3.wgsl.expected.dxc.hlsl | 6 +- .../gen/var/refract/570cb3.wgsl.expected.glsl | 18 +++--- .../gen/var/refract/570cb3.wgsl.expected.msl | 6 +- .../var/refract/570cb3.wgsl.expected.spvasm | 56 ++++++++--------- .../gen/var/refract/570cb3.wgsl.expected.wgsl | 6 +- .../tint/builtins/gen/var/refract/8984af.wgsl | 6 +- .../var/refract/8984af.wgsl.expected.dxc.hlsl | 6 +- .../gen/var/refract/8984af.wgsl.expected.glsl | 18 +++--- .../gen/var/refract/8984af.wgsl.expected.msl | 6 +- .../var/refract/8984af.wgsl.expected.spvasm | 56 ++++++++--------- .../gen/var/refract/8984af.wgsl.expected.wgsl | 6 +- test/tint/builtins/gen/var/round/9078ef.wgsl | 2 +- .../var/round/9078ef.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/round/9078ef.wgsl.expected.glsl | 6 +- .../gen/var/round/9078ef.wgsl.expected.msl | 2 +- .../gen/var/round/9078ef.wgsl.expected.spvasm | 41 ++++++------- .../gen/var/round/9078ef.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/round/d87e84.wgsl | 2 +- .../var/round/d87e84.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/round/d87e84.wgsl.expected.glsl | 6 +- .../gen/var/round/d87e84.wgsl.expected.msl | 2 +- .../gen/var/round/d87e84.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/round/d87e84.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/round/e1bba2.wgsl | 2 +- .../var/round/e1bba2.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/round/e1bba2.wgsl.expected.glsl | 6 +- .../gen/var/round/e1bba2.wgsl.expected.msl | 2 +- .../gen/var/round/e1bba2.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/round/e1bba2.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/round/f665b5.wgsl | 2 +- .../var/round/f665b5.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/round/f665b5.wgsl.expected.glsl | 6 +- .../gen/var/round/f665b5.wgsl.expected.msl | 2 +- .../gen/var/round/f665b5.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/round/f665b5.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/saturate/462535.wgsl | 2 +- .../saturate/462535.wgsl.expected.dxc.hlsl | 2 +- .../var/saturate/462535.wgsl.expected.glsl | 6 +- .../gen/var/saturate/462535.wgsl.expected.msl | 2 +- .../var/saturate/462535.wgsl.expected.spvasm | 34 ++++++----- .../var/saturate/462535.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/saturate/cd2028.wgsl | 2 +- .../saturate/cd2028.wgsl.expected.dxc.hlsl | 2 +- .../var/saturate/cd2028.wgsl.expected.glsl | 6 +- .../gen/var/saturate/cd2028.wgsl.expected.msl | 2 +- .../var/saturate/cd2028.wgsl.expected.spvasm | 34 ++++++----- .../var/saturate/cd2028.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/saturate/dcde71.wgsl | 2 +- .../saturate/dcde71.wgsl.expected.dxc.hlsl | 2 +- .../var/saturate/dcde71.wgsl.expected.glsl | 6 +- .../gen/var/saturate/dcde71.wgsl.expected.msl | 2 +- .../var/saturate/dcde71.wgsl.expected.spvasm | 34 ++++++----- .../var/saturate/dcde71.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/saturate/e8df56.wgsl | 2 +- .../saturate/e8df56.wgsl.expected.dxc.hlsl | 2 +- .../var/saturate/e8df56.wgsl.expected.glsl | 6 +- .../gen/var/saturate/e8df56.wgsl.expected.msl | 2 +- .../var/saturate/e8df56.wgsl.expected.spvasm | 33 +++++----- .../var/saturate/e8df56.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/select/10e73b.wgsl | 4 +- .../var/select/10e73b.wgsl.expected.dxc.hlsl | 4 +- .../gen/var/select/10e73b.wgsl.expected.glsl | 12 ++-- .../gen/var/select/10e73b.wgsl.expected.msl | 4 +- .../var/select/10e73b.wgsl.expected.spvasm | 51 ++++++++-------- .../gen/var/select/10e73b.wgsl.expected.wgsl | 4 +- test/tint/builtins/gen/var/select/1ada2a.wgsl | 4 +- .../var/select/1ada2a.wgsl.expected.dxc.hlsl | 4 +- .../gen/var/select/1ada2a.wgsl.expected.glsl | 12 ++-- .../gen/var/select/1ada2a.wgsl.expected.msl | 4 +- .../var/select/1ada2a.wgsl.expected.spvasm | 58 +++++++++--------- .../gen/var/select/1ada2a.wgsl.expected.wgsl | 4 +- test/tint/builtins/gen/var/select/53d518.wgsl | 4 +- .../var/select/53d518.wgsl.expected.dxc.hlsl | 4 +- .../gen/var/select/53d518.wgsl.expected.glsl | 12 ++-- .../gen/var/select/53d518.wgsl.expected.msl | 4 +- .../var/select/53d518.wgsl.expected.spvasm | 56 ++++++++--------- .../gen/var/select/53d518.wgsl.expected.wgsl | 4 +- test/tint/builtins/gen/var/select/830dd9.wgsl | 4 +- .../var/select/830dd9.wgsl.expected.dxc.hlsl | 4 +- .../gen/var/select/830dd9.wgsl.expected.glsl | 12 ++-- .../gen/var/select/830dd9.wgsl.expected.msl | 4 +- .../var/select/830dd9.wgsl.expected.spvasm | 58 +++++++++--------- .../gen/var/select/830dd9.wgsl.expected.wgsl | 4 +- test/tint/builtins/gen/var/select/86f9bd.wgsl | 4 +- .../var/select/86f9bd.wgsl.expected.dxc.hlsl | 4 +- .../gen/var/select/86f9bd.wgsl.expected.glsl | 12 ++-- .../gen/var/select/86f9bd.wgsl.expected.msl | 4 +- .../var/select/86f9bd.wgsl.expected.spvasm | 58 +++++++++--------- .../gen/var/select/86f9bd.wgsl.expected.wgsl | 4 +- test/tint/builtins/gen/var/select/a081f1.wgsl | 4 +- .../var/select/a081f1.wgsl.expected.dxc.hlsl | 4 +- .../gen/var/select/a081f1.wgsl.expected.glsl | 12 ++-- .../gen/var/select/a081f1.wgsl.expected.msl | 4 +- .../var/select/a081f1.wgsl.expected.spvasm | 56 ++++++++--------- .../gen/var/select/a081f1.wgsl.expected.wgsl | 4 +- test/tint/builtins/gen/var/select/ed7c13.wgsl | 4 +- .../var/select/ed7c13.wgsl.expected.dxc.hlsl | 4 +- .../gen/var/select/ed7c13.wgsl.expected.glsl | 12 ++-- .../gen/var/select/ed7c13.wgsl.expected.msl | 4 +- .../var/select/ed7c13.wgsl.expected.spvasm | 56 ++++++++--------- .../gen/var/select/ed7c13.wgsl.expected.wgsl | 4 +- test/tint/builtins/gen/var/sign/160933.wgsl | 2 +- .../var/sign/160933.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/sign/160933.wgsl.expected.glsl | 6 +- .../gen/var/sign/160933.wgsl.expected.msl | 2 +- .../gen/var/sign/160933.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/sign/160933.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/sign/5d283a.wgsl | 2 +- .../var/sign/5d283a.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/sign/5d283a.wgsl.expected.glsl | 6 +- .../gen/var/sign/5d283a.wgsl.expected.msl | 2 +- .../gen/var/sign/5d283a.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/sign/5d283a.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/sign/7c85ea.wgsl | 2 +- .../var/sign/7c85ea.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/sign/7c85ea.wgsl.expected.glsl | 6 +- .../gen/var/sign/7c85ea.wgsl.expected.msl | 2 +- .../gen/var/sign/7c85ea.wgsl.expected.spvasm | 41 ++++++------- .../gen/var/sign/7c85ea.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/sign/ccdb3c.wgsl | 2 +- .../var/sign/ccdb3c.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/sign/ccdb3c.wgsl.expected.glsl | 6 +- .../gen/var/sign/ccdb3c.wgsl.expected.msl | 2 +- .../gen/var/sign/ccdb3c.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/sign/ccdb3c.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/sin/2c903b.wgsl | 2 +- .../gen/var/sin/2c903b.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/sin/2c903b.wgsl.expected.glsl | 6 +- .../gen/var/sin/2c903b.wgsl.expected.msl | 2 +- .../gen/var/sin/2c903b.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/sin/2c903b.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/sin/3cca11.wgsl | 2 +- .../gen/var/sin/3cca11.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/sin/3cca11.wgsl.expected.glsl | 6 +- .../gen/var/sin/3cca11.wgsl.expected.msl | 2 +- .../gen/var/sin/3cca11.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/sin/3cca11.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/sin/5c0712.wgsl | 2 +- .../gen/var/sin/5c0712.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/sin/5c0712.wgsl.expected.glsl | 6 +- .../gen/var/sin/5c0712.wgsl.expected.msl | 2 +- .../gen/var/sin/5c0712.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/sin/5c0712.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/sin/66a59f.wgsl | 2 +- .../gen/var/sin/66a59f.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/sin/66a59f.wgsl.expected.glsl | 6 +- .../gen/var/sin/66a59f.wgsl.expected.msl | 2 +- .../gen/var/sin/66a59f.wgsl.expected.spvasm | 41 ++++++------- .../gen/var/sin/66a59f.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/sinh/0908c1.wgsl | 2 +- .../var/sinh/0908c1.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/sinh/0908c1.wgsl.expected.glsl | 6 +- .../gen/var/sinh/0908c1.wgsl.expected.msl | 2 +- .../gen/var/sinh/0908c1.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/sinh/0908c1.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/sinh/69cce2.wgsl | 2 +- .../var/sinh/69cce2.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/sinh/69cce2.wgsl.expected.glsl | 6 +- .../gen/var/sinh/69cce2.wgsl.expected.msl | 2 +- .../gen/var/sinh/69cce2.wgsl.expected.spvasm | 41 ++++++------- .../gen/var/sinh/69cce2.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/sinh/924f19.wgsl | 2 +- .../var/sinh/924f19.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/sinh/924f19.wgsl.expected.glsl | 6 +- .../gen/var/sinh/924f19.wgsl.expected.msl | 2 +- .../gen/var/sinh/924f19.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/sinh/924f19.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/sinh/ba7e25.wgsl | 2 +- .../var/sinh/ba7e25.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/sinh/ba7e25.wgsl.expected.glsl | 6 +- .../gen/var/sinh/ba7e25.wgsl.expected.msl | 2 +- .../gen/var/sinh/ba7e25.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/sinh/ba7e25.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/smoothstep/12c031.wgsl | 6 +- .../smoothstep/12c031.wgsl.expected.dxc.hlsl | 6 +- .../var/smoothstep/12c031.wgsl.expected.glsl | 18 +++--- .../var/smoothstep/12c031.wgsl.expected.msl | 6 +- .../smoothstep/12c031.wgsl.expected.spvasm | 54 +++++++++-------- .../var/smoothstep/12c031.wgsl.expected.wgsl | 6 +- .../builtins/gen/var/smoothstep/586e12.wgsl | 6 +- .../smoothstep/586e12.wgsl.expected.dxc.hlsl | 6 +- .../var/smoothstep/586e12.wgsl.expected.glsl | 18 +++--- .../var/smoothstep/586e12.wgsl.expected.msl | 6 +- .../smoothstep/586e12.wgsl.expected.spvasm | 53 ++++++++-------- .../var/smoothstep/586e12.wgsl.expected.wgsl | 6 +- .../builtins/gen/var/smoothstep/6e7a74.wgsl | 6 +- .../smoothstep/6e7a74.wgsl.expected.dxc.hlsl | 6 +- .../var/smoothstep/6e7a74.wgsl.expected.glsl | 18 +++--- .../var/smoothstep/6e7a74.wgsl.expected.msl | 6 +- .../smoothstep/6e7a74.wgsl.expected.spvasm | 54 +++++++++-------- .../var/smoothstep/6e7a74.wgsl.expected.wgsl | 6 +- .../builtins/gen/var/smoothstep/c43ebd.wgsl | 6 +- .../smoothstep/c43ebd.wgsl.expected.dxc.hlsl | 6 +- .../var/smoothstep/c43ebd.wgsl.expected.glsl | 18 +++--- .../var/smoothstep/c43ebd.wgsl.expected.msl | 6 +- .../smoothstep/c43ebd.wgsl.expected.spvasm | 54 +++++++++-------- .../var/smoothstep/c43ebd.wgsl.expected.wgsl | 6 +- test/tint/builtins/gen/var/sqrt/803d1c.wgsl | 2 +- .../var/sqrt/803d1c.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/sqrt/803d1c.wgsl.expected.glsl | 6 +- .../gen/var/sqrt/803d1c.wgsl.expected.msl | 2 +- .../gen/var/sqrt/803d1c.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/sqrt/803d1c.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/sqrt/895a0c.wgsl | 2 +- .../var/sqrt/895a0c.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/sqrt/895a0c.wgsl.expected.glsl | 6 +- .../gen/var/sqrt/895a0c.wgsl.expected.msl | 2 +- .../gen/var/sqrt/895a0c.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/sqrt/895a0c.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl | 2 +- .../var/sqrt/d9ab4d.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/sqrt/d9ab4d.wgsl.expected.glsl | 6 +- .../gen/var/sqrt/d9ab4d.wgsl.expected.msl | 2 +- .../gen/var/sqrt/d9ab4d.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/sqrt/d9ab4d.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/sqrt/ec33e9.wgsl | 2 +- .../var/sqrt/ec33e9.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/sqrt/ec33e9.wgsl.expected.glsl | 6 +- .../gen/var/sqrt/ec33e9.wgsl.expected.msl | 2 +- .../gen/var/sqrt/ec33e9.wgsl.expected.spvasm | 41 ++++++------- .../gen/var/sqrt/ec33e9.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/step/07cb06.wgsl | 4 +- .../var/step/07cb06.wgsl.expected.dxc.hlsl | 4 +- .../gen/var/step/07cb06.wgsl.expected.glsl | 12 ++-- .../gen/var/step/07cb06.wgsl.expected.msl | 4 +- .../gen/var/step/07cb06.wgsl.expected.spvasm | 48 ++++++++------- .../gen/var/step/07cb06.wgsl.expected.wgsl | 4 +- test/tint/builtins/gen/var/step/630d07.wgsl | 4 +- .../var/step/630d07.wgsl.expected.dxc.hlsl | 4 +- .../gen/var/step/630d07.wgsl.expected.glsl | 12 ++-- .../gen/var/step/630d07.wgsl.expected.msl | 4 +- .../gen/var/step/630d07.wgsl.expected.spvasm | 47 ++++++++------- .../gen/var/step/630d07.wgsl.expected.wgsl | 4 +- test/tint/builtins/gen/var/step/baa320.wgsl | 4 +- .../var/step/baa320.wgsl.expected.dxc.hlsl | 4 +- .../gen/var/step/baa320.wgsl.expected.glsl | 12 ++-- .../gen/var/step/baa320.wgsl.expected.msl | 4 +- .../gen/var/step/baa320.wgsl.expected.spvasm | 48 ++++++++------- .../gen/var/step/baa320.wgsl.expected.wgsl | 4 +- test/tint/builtins/gen/var/step/cc6b61.wgsl | 4 +- .../var/step/cc6b61.wgsl.expected.dxc.hlsl | 4 +- .../gen/var/step/cc6b61.wgsl.expected.glsl | 12 ++-- .../gen/var/step/cc6b61.wgsl.expected.msl | 4 +- .../gen/var/step/cc6b61.wgsl.expected.spvasm | 48 ++++++++------- .../gen/var/step/cc6b61.wgsl.expected.wgsl | 4 +- test/tint/builtins/gen/var/tan/539e54.wgsl | 2 +- .../gen/var/tan/539e54.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/tan/539e54.wgsl.expected.glsl | 6 +- .../gen/var/tan/539e54.wgsl.expected.msl | 2 +- .../gen/var/tan/539e54.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/tan/539e54.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/tan/9f7c9c.wgsl | 2 +- .../gen/var/tan/9f7c9c.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/tan/9f7c9c.wgsl.expected.glsl | 6 +- .../gen/var/tan/9f7c9c.wgsl.expected.msl | 2 +- .../gen/var/tan/9f7c9c.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/tan/9f7c9c.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/tan/d4d491.wgsl | 2 +- .../gen/var/tan/d4d491.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/tan/d4d491.wgsl.expected.glsl | 6 +- .../gen/var/tan/d4d491.wgsl.expected.msl | 2 +- .../gen/var/tan/d4d491.wgsl.expected.spvasm | 41 ++++++------- .../gen/var/tan/d4d491.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/tan/db0456.wgsl | 2 +- .../gen/var/tan/db0456.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/tan/db0456.wgsl.expected.glsl | 6 +- .../gen/var/tan/db0456.wgsl.expected.msl | 2 +- .../gen/var/tan/db0456.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/tan/db0456.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/tanh/06a4fe.wgsl | 2 +- .../var/tanh/06a4fe.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/tanh/06a4fe.wgsl.expected.glsl | 6 +- .../gen/var/tanh/06a4fe.wgsl.expected.msl | 2 +- .../gen/var/tanh/06a4fe.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/tanh/06a4fe.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/tanh/5b19af.wgsl | 2 +- .../var/tanh/5b19af.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/tanh/5b19af.wgsl.expected.glsl | 6 +- .../gen/var/tanh/5b19af.wgsl.expected.msl | 2 +- .../gen/var/tanh/5b19af.wgsl.expected.spvasm | 41 ++++++------- .../gen/var/tanh/5b19af.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/tanh/6d105a.wgsl | 2 +- .../var/tanh/6d105a.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/tanh/6d105a.wgsl.expected.glsl | 6 +- .../gen/var/tanh/6d105a.wgsl.expected.msl | 2 +- .../gen/var/tanh/6d105a.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/tanh/6d105a.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/tanh/e8efb3.wgsl | 2 +- .../var/tanh/e8efb3.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/tanh/e8efb3.wgsl.expected.glsl | 6 +- .../gen/var/tanh/e8efb3.wgsl.expected.msl | 2 +- .../gen/var/tanh/e8efb3.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/tanh/e8efb3.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/transpose/06794e.wgsl | 2 +- .../transpose/06794e.wgsl.expected.dxc.hlsl | 2 +- .../var/transpose/06794e.wgsl.expected.glsl | 6 +- .../var/transpose/06794e.wgsl.expected.msl | 2 +- .../var/transpose/06794e.wgsl.expected.spvasm | 43 ++++++------- .../var/transpose/06794e.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/transpose/5edd96.wgsl | 2 +- .../transpose/5edd96.wgsl.expected.dxc.hlsl | 2 +- .../var/transpose/5edd96.wgsl.expected.glsl | 6 +- .../var/transpose/5edd96.wgsl.expected.msl | 2 +- .../var/transpose/5edd96.wgsl.expected.spvasm | 45 +++++++------- .../var/transpose/5edd96.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/transpose/5f36bf.wgsl | 2 +- .../transpose/5f36bf.wgsl.expected.dxc.hlsl | 2 +- .../var/transpose/5f36bf.wgsl.expected.glsl | 6 +- .../var/transpose/5f36bf.wgsl.expected.msl | 2 +- .../var/transpose/5f36bf.wgsl.expected.spvasm | 45 +++++++------- .../var/transpose/5f36bf.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/transpose/7be8b2.wgsl | 2 +- .../transpose/7be8b2.wgsl.expected.dxc.hlsl | 2 +- .../var/transpose/7be8b2.wgsl.expected.glsl | 6 +- .../var/transpose/7be8b2.wgsl.expected.msl | 2 +- .../var/transpose/7be8b2.wgsl.expected.spvasm | 43 ++++++------- .../var/transpose/7be8b2.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/transpose/844869.wgsl | 2 +- .../transpose/844869.wgsl.expected.dxc.hlsl | 2 +- .../var/transpose/844869.wgsl.expected.glsl | 6 +- .../var/transpose/844869.wgsl.expected.msl | 2 +- .../var/transpose/844869.wgsl.expected.spvasm | 43 ++++++------- .../var/transpose/844869.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/transpose/8c06ce.wgsl | 2 +- .../transpose/8c06ce.wgsl.expected.dxc.hlsl | 2 +- .../var/transpose/8c06ce.wgsl.expected.glsl | 6 +- .../var/transpose/8c06ce.wgsl.expected.msl | 2 +- .../var/transpose/8c06ce.wgsl.expected.spvasm | 45 +++++++------- .../var/transpose/8c06ce.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/transpose/b9ad1f.wgsl | 2 +- .../transpose/b9ad1f.wgsl.expected.dxc.hlsl | 2 +- .../var/transpose/b9ad1f.wgsl.expected.glsl | 6 +- .../var/transpose/b9ad1f.wgsl.expected.msl | 2 +- .../var/transpose/b9ad1f.wgsl.expected.spvasm | 45 +++++++------- .../var/transpose/b9ad1f.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/transpose/d6faec.wgsl | 2 +- .../transpose/d6faec.wgsl.expected.dxc.hlsl | 2 +- .../var/transpose/d6faec.wgsl.expected.glsl | 6 +- .../var/transpose/d6faec.wgsl.expected.msl | 2 +- .../var/transpose/d6faec.wgsl.expected.spvasm | 45 +++++++------- .../var/transpose/d6faec.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/transpose/faeb05.wgsl | 2 +- .../transpose/faeb05.wgsl.expected.dxc.hlsl | 2 +- .../var/transpose/faeb05.wgsl.expected.glsl | 6 +- .../var/transpose/faeb05.wgsl.expected.msl | 2 +- .../var/transpose/faeb05.wgsl.expected.spvasm | 45 +++++++------- .../var/transpose/faeb05.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/trunc/103ab8.wgsl | 2 +- .../var/trunc/103ab8.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/trunc/103ab8.wgsl.expected.glsl | 6 +- .../gen/var/trunc/103ab8.wgsl.expected.msl | 2 +- .../gen/var/trunc/103ab8.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/trunc/103ab8.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/trunc/a56109.wgsl | 2 +- .../var/trunc/a56109.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/trunc/a56109.wgsl.expected.glsl | 6 +- .../gen/var/trunc/a56109.wgsl.expected.msl | 2 +- .../gen/var/trunc/a56109.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/trunc/a56109.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/trunc/cc2b0d.wgsl | 2 +- .../var/trunc/cc2b0d.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/trunc/cc2b0d.wgsl.expected.glsl | 6 +- .../gen/var/trunc/cc2b0d.wgsl.expected.msl | 2 +- .../gen/var/trunc/cc2b0d.wgsl.expected.spvasm | 41 ++++++------- .../gen/var/trunc/cc2b0d.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/trunc/ce7c17.wgsl | 2 +- .../var/trunc/ce7c17.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/trunc/ce7c17.wgsl.expected.glsl | 6 +- .../gen/var/trunc/ce7c17.wgsl.expected.msl | 2 +- .../gen/var/trunc/ce7c17.wgsl.expected.spvasm | 42 ++++++------- .../gen/var/trunc/ce7c17.wgsl.expected.wgsl | 2 +- 2453 files changed, 11460 insertions(+), 10759 deletions(-) diff --git a/test/tint/builtins/gen/gen.wgsl.tmpl b/test/tint/builtins/gen/gen.wgsl.tmpl index 0dfe87949d..dd70b6c67b 100644 --- a/test/tint/builtins/gen/gen.wgsl.tmpl +++ b/test/tint/builtins/gen/gen.wgsl.tmpl @@ -273,6 +273,7 @@ enable f16; {{- if eq $ty.Target.Name "i32" -}}{{$value}}i {{- else if eq $ty.Target.Name "u32" -}}{{$value}}u {{- else if eq $ty.Target.Name "f32" -}}{{$float_value}}f +{{- else if eq $ty.Target.Name "f16" -}}{{$float_value}}h {{- else if eq $ty.Target.Name "fa" -}}{{$float_value}} {{- else if eq $ty.Target.Name "ia" -}}{{$value}} {{- else if eq $ty.Target.Name "bool" -}}true diff --git a/test/tint/builtins/gen/literal/abs/421ca3.wgsl b/test/tint/builtins/gen/literal/abs/421ca3.wgsl index 9319b46317..b2db3f77ba 100644 --- a/test/tint/builtins/gen/literal/abs/421ca3.wgsl +++ b/test/tint/builtins/gen/literal/abs/421ca3.wgsl @@ -25,7 +25,7 @@ enable f16; // fn abs(vec<3, f16>) -> vec<3, f16> fn abs_421ca3() { - var res: vec3 = abs(vec3(f16())); + var res: vec3 = abs(vec3(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/abs/421ca3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/abs/421ca3.wgsl.expected.dxc.hlsl index 602de2a98b..11f21b957f 100644 --- a/test/tint/builtins/gen/literal/abs/421ca3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/abs/421ca3.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void abs_421ca3() { - vector res = (float16_t(0.0h)).xxx; + vector res = (float16_t(1.0h)).xxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/abs/421ca3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/abs/421ca3.wgsl.expected.glsl index b924dc4a12..7cf612685b 100644 --- a/test/tint/builtins/gen/literal/abs/421ca3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/abs/421ca3.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void abs_421ca3() { - f16vec3 res = f16vec3(0.0hf); + f16vec3 res = f16vec3(1.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void abs_421ca3() { - f16vec3 res = f16vec3(0.0hf); + f16vec3 res = f16vec3(1.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void abs_421ca3() { - f16vec3 res = f16vec3(0.0hf); + f16vec3 res = f16vec3(1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/abs/421ca3.wgsl.expected.msl b/test/tint/builtins/gen/literal/abs/421ca3.wgsl.expected.msl index 77b55443b5..06dbe3ca2a 100644 --- a/test/tint/builtins/gen/literal/abs/421ca3.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/abs/421ca3.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void abs_421ca3() { - half3 res = half3(0.0h); + half3 res = half3(1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/abs/421ca3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/abs/421ca3.wgsl.expected.spvasm index 1761fe3131..dd58a96ebc 100644 --- a/test/tint/builtins/gen/literal/abs/421ca3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/abs/421ca3.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,35 +36,37 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %18 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %abs_421ca3 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %res %15 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %18 - %20 = OpLabel - %21 = OpFunctionCall %void %abs_421ca3 +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %abs_421ca3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %23 = OpLabel - %24 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %24 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %void %abs_421ca3 + %29 = OpLabel + %30 = OpFunctionCall %void %abs_421ca3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %abs_421ca3 + %32 = OpLabel + %33 = OpFunctionCall %void %abs_421ca3 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/abs/421ca3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/abs/421ca3.wgsl.expected.wgsl index e3f2507d78..35d4faaf5b 100644 --- a/test/tint/builtins/gen/literal/abs/421ca3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/abs/421ca3.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn abs_421ca3() { - var res : vec3 = abs(vec3(f16())); + var res : vec3 = abs(vec3(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/abs/538d29.wgsl b/test/tint/builtins/gen/literal/abs/538d29.wgsl index eaefc985b6..8e393c949b 100644 --- a/test/tint/builtins/gen/literal/abs/538d29.wgsl +++ b/test/tint/builtins/gen/literal/abs/538d29.wgsl @@ -25,7 +25,7 @@ enable f16; // fn abs(vec<4, f16>) -> vec<4, f16> fn abs_538d29() { - var res: vec4 = abs(vec4(f16())); + var res: vec4 = abs(vec4(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/abs/538d29.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/abs/538d29.wgsl.expected.dxc.hlsl index c42ede9cbc..dee1d6d103 100644 --- a/test/tint/builtins/gen/literal/abs/538d29.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/abs/538d29.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void abs_538d29() { - vector res = (float16_t(0.0h)).xxxx; + vector res = (float16_t(1.0h)).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/abs/538d29.wgsl.expected.glsl b/test/tint/builtins/gen/literal/abs/538d29.wgsl.expected.glsl index cf355d694a..5967742993 100644 --- a/test/tint/builtins/gen/literal/abs/538d29.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/abs/538d29.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void abs_538d29() { - f16vec4 res = f16vec4(0.0hf); + f16vec4 res = f16vec4(1.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void abs_538d29() { - f16vec4 res = f16vec4(0.0hf); + f16vec4 res = f16vec4(1.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void abs_538d29() { - f16vec4 res = f16vec4(0.0hf); + f16vec4 res = f16vec4(1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/abs/538d29.wgsl.expected.msl b/test/tint/builtins/gen/literal/abs/538d29.wgsl.expected.msl index c8c9f6a145..daab81325e 100644 --- a/test/tint/builtins/gen/literal/abs/538d29.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/abs/538d29.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void abs_538d29() { - half4 res = half4(0.0h); + half4 res = half4(1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/abs/538d29.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/abs/538d29.wgsl.expected.spvasm index 707e86f803..e897fcfdbf 100644 --- a/test/tint/builtins/gen/literal/abs/538d29.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/abs/538d29.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,35 +36,37 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %18 = OpTypeFunction %v4float + %19 = OpConstantNull %v4half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %abs_538d29 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %res %15 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %18 - %20 = OpLabel - %21 = OpFunctionCall %void %abs_538d29 +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %abs_538d29 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %23 = OpLabel - %24 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %24 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %void %abs_538d29 + %29 = OpLabel + %30 = OpFunctionCall %void %abs_538d29 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %abs_538d29 + %32 = OpLabel + %33 = OpFunctionCall %void %abs_538d29 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/abs/538d29.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/abs/538d29.wgsl.expected.wgsl index 5501b2326c..919eab8413 100644 --- a/test/tint/builtins/gen/literal/abs/538d29.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/abs/538d29.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn abs_538d29() { - var res : vec4 = abs(vec4(f16())); + var res : vec4 = abs(vec4(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl b/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl index d6c5261e63..e94d9932ba 100644 --- a/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl +++ b/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl @@ -25,7 +25,7 @@ enable f16; // fn abs(vec<2, f16>) -> vec<2, f16> fn abs_5ae4fe() { - var res: vec2 = abs(vec2(f16())); + var res: vec2 = abs(vec2(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl.expected.dxc.hlsl index 70b7ca65e0..218d736754 100644 --- a/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void abs_5ae4fe() { - vector res = (float16_t(0.0h)).xx; + vector res = (float16_t(1.0h)).xx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl.expected.glsl b/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl.expected.glsl index 1e088084c3..0211497b1f 100644 --- a/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void abs_5ae4fe() { - f16vec2 res = f16vec2(0.0hf); + f16vec2 res = f16vec2(1.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void abs_5ae4fe() { - f16vec2 res = f16vec2(0.0hf); + f16vec2 res = f16vec2(1.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void abs_5ae4fe() { - f16vec2 res = f16vec2(0.0hf); + f16vec2 res = f16vec2(1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl.expected.msl b/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl.expected.msl index 8b1b5bf737..7bd87a3a9b 100644 --- a/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void abs_5ae4fe() { - half2 res = half2(0.0h); + half2 res = half2(1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl.expected.spvasm index abebb5f12c..49a91ecf4f 100644 --- a/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,35 +36,37 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %18 = OpTypeFunction %v4float + %19 = OpConstantNull %v2half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %abs_5ae4fe = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %res %15 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %18 - %20 = OpLabel - %21 = OpFunctionCall %void %abs_5ae4fe +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %abs_5ae4fe OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %23 = OpLabel - %24 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %24 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %void %abs_5ae4fe + %29 = OpLabel + %30 = OpFunctionCall %void %abs_5ae4fe OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %abs_5ae4fe + %32 = OpLabel + %33 = OpFunctionCall %void %abs_5ae4fe OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl.expected.wgsl index c1e8f2453f..89f05c6a19 100644 --- a/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn abs_5ae4fe() { - var res : vec2 = abs(vec2(f16())); + var res : vec2 = abs(vec2(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/abs/fd247f.wgsl b/test/tint/builtins/gen/literal/abs/fd247f.wgsl index 63cc56db81..622a040532 100644 --- a/test/tint/builtins/gen/literal/abs/fd247f.wgsl +++ b/test/tint/builtins/gen/literal/abs/fd247f.wgsl @@ -25,7 +25,7 @@ enable f16; // fn abs(f16) -> f16 fn abs_fd247f() { - var res: f16 = abs(f16()); + var res: f16 = abs(1.h); } @vertex diff --git a/test/tint/builtins/gen/literal/abs/fd247f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/abs/fd247f.wgsl.expected.dxc.hlsl index e9cf905d09..21a9542467 100644 --- a/test/tint/builtins/gen/literal/abs/fd247f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/abs/fd247f.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void abs_fd247f() { - float16_t res = float16_t(0.0h); + float16_t res = float16_t(1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/abs/fd247f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/abs/fd247f.wgsl.expected.glsl index 451b053c4f..42d4ca1f78 100644 --- a/test/tint/builtins/gen/literal/abs/fd247f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/abs/fd247f.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void abs_fd247f() { - float16_t res = 0.0hf; + float16_t res = 1.0hf; } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void abs_fd247f() { - float16_t res = 0.0hf; + float16_t res = 1.0hf; } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void abs_fd247f() { - float16_t res = 0.0hf; + float16_t res = 1.0hf; } void compute_main() { diff --git a/test/tint/builtins/gen/literal/abs/fd247f.wgsl.expected.msl b/test/tint/builtins/gen/literal/abs/fd247f.wgsl.expected.msl index 524a54577c..5b56192f1c 100644 --- a/test/tint/builtins/gen/literal/abs/fd247f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/abs/fd247f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void abs_fd247f() { - half res = 0.0h; + half res = 1.0h; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/abs/fd247f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/abs/fd247f.wgsl.expected.spvasm index eb3438deb0..433ec40aa8 100644 --- a/test/tint/builtins/gen/literal/abs/fd247f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/abs/fd247f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -35,35 +35,36 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %17 = OpTypeFunction %v4float + %17 = OpConstantNull %half + %18 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %abs_fd247f = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_half Function %14 - OpStore %res %14 + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %res %half_0x1p_0 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %17 - %19 = OpLabel - %20 = OpFunctionCall %void %abs_fd247f +%vertex_main_inner = OpFunction %v4float None %18 + %20 = OpLabel + %21 = OpFunctionCall %void %abs_fd247f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %22 = OpLabel - %23 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %23 + %23 = OpLabel + %24 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %24 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %abs_fd247f + %27 = OpLabel + %28 = OpFunctionCall %void %abs_fd247f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %abs_fd247f + %30 = OpLabel + %31 = OpFunctionCall %void %abs_fd247f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/abs/fd247f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/abs/fd247f.wgsl.expected.wgsl index 28cbd46ad1..2701dbd517 100644 --- a/test/tint/builtins/gen/literal/abs/fd247f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/abs/fd247f.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn abs_fd247f() { - var res : f16 = abs(f16()); + var res : f16 = abs(1.0h); } @vertex diff --git a/test/tint/builtins/gen/literal/acos/004aff.wgsl b/test/tint/builtins/gen/literal/acos/004aff.wgsl index 35e62ea158..6646047f61 100644 --- a/test/tint/builtins/gen/literal/acos/004aff.wgsl +++ b/test/tint/builtins/gen/literal/acos/004aff.wgsl @@ -25,7 +25,7 @@ enable f16; // fn acos(vec<2, f16>) -> vec<2, f16> fn acos_004aff() { - var res: vec2 = acos(vec2(f16())); + var res: vec2 = acos(vec2(0.96891242171h)); } @vertex diff --git a/test/tint/builtins/gen/literal/acos/004aff.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/acos/004aff.wgsl.expected.dxc.hlsl index 4b568a1fa6..12356f0cf1 100644 --- a/test/tint/builtins/gen/literal/acos/004aff.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/acos/004aff.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void acos_004aff() { - vector res = (float16_t(1.5703125h)).xx; + vector res = (float16_t(0.250488281h)).xx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/acos/004aff.wgsl.expected.glsl b/test/tint/builtins/gen/literal/acos/004aff.wgsl.expected.glsl index 4fc451679d..015ed01c20 100644 --- a/test/tint/builtins/gen/literal/acos/004aff.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/acos/004aff.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void acos_004aff() { - f16vec2 res = f16vec2(1.5703125hf); + f16vec2 res = f16vec2(0.250488281hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void acos_004aff() { - f16vec2 res = f16vec2(1.5703125hf); + f16vec2 res = f16vec2(0.250488281hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void acos_004aff() { - f16vec2 res = f16vec2(1.5703125hf); + f16vec2 res = f16vec2(0.250488281hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/acos/004aff.wgsl.expected.msl b/test/tint/builtins/gen/literal/acos/004aff.wgsl.expected.msl index 4f26080b27..67bf3ab32a 100644 --- a/test/tint/builtins/gen/literal/acos/004aff.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/acos/004aff.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void acos_004aff() { - half2 res = half2(1.5703125h); + half2 res = half2(0.250488281h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/acos/004aff.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/acos/004aff.wgsl.expected.spvasm index 3f2143cd2e..34f105f6be 100644 --- a/test/tint/builtins/gen/literal/acos/004aff.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/acos/004aff.wgsl.expected.spvasm @@ -36,8 +36,8 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 -%half_0x1_92p_0 = OpConstant %half 0x1.92p+0 - %16 = OpConstantComposite %v2half %half_0x1_92p_0 %half_0x1_92p_0 +%half_0x1_008pn2 = OpConstant %half 0x1.008p-2 + %16 = OpConstantComposite %v2half %half_0x1_008pn2 %half_0x1_008pn2 %_ptr_Function_v2half = OpTypePointer Function %v2half %19 = OpConstantNull %v2half %20 = OpTypeFunction %v4float diff --git a/test/tint/builtins/gen/literal/acos/004aff.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/acos/004aff.wgsl.expected.wgsl index 57a6cb012a..dc523315d7 100644 --- a/test/tint/builtins/gen/literal/acos/004aff.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/acos/004aff.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn acos_004aff() { - var res : vec2 = acos(vec2(f16())); + var res : vec2 = acos(vec2(0.96875h)); } @vertex diff --git a/test/tint/builtins/gen/literal/acos/203628.wgsl b/test/tint/builtins/gen/literal/acos/203628.wgsl index e5f2df8673..886d04c14c 100644 --- a/test/tint/builtins/gen/literal/acos/203628.wgsl +++ b/test/tint/builtins/gen/literal/acos/203628.wgsl @@ -25,7 +25,7 @@ enable f16; // fn acos(vec<4, f16>) -> vec<4, f16> fn acos_203628() { - var res: vec4 = acos(vec4(f16())); + var res: vec4 = acos(vec4(0.96891242171h)); } @vertex diff --git a/test/tint/builtins/gen/literal/acos/203628.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/acos/203628.wgsl.expected.dxc.hlsl index 5e05dc01b3..1dff9cc10e 100644 --- a/test/tint/builtins/gen/literal/acos/203628.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/acos/203628.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void acos_203628() { - vector res = (float16_t(1.5703125h)).xxxx; + vector res = (float16_t(0.250488281h)).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/acos/203628.wgsl.expected.glsl b/test/tint/builtins/gen/literal/acos/203628.wgsl.expected.glsl index d46fc9bdc3..5831f92a1a 100644 --- a/test/tint/builtins/gen/literal/acos/203628.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/acos/203628.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void acos_203628() { - f16vec4 res = f16vec4(1.5703125hf); + f16vec4 res = f16vec4(0.250488281hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void acos_203628() { - f16vec4 res = f16vec4(1.5703125hf); + f16vec4 res = f16vec4(0.250488281hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void acos_203628() { - f16vec4 res = f16vec4(1.5703125hf); + f16vec4 res = f16vec4(0.250488281hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/acos/203628.wgsl.expected.msl b/test/tint/builtins/gen/literal/acos/203628.wgsl.expected.msl index b8aaeab349..718ec84935 100644 --- a/test/tint/builtins/gen/literal/acos/203628.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/acos/203628.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void acos_203628() { - half4 res = half4(1.5703125h); + half4 res = half4(0.250488281h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/acos/203628.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/acos/203628.wgsl.expected.spvasm index 396ce5a263..f607fb502a 100644 --- a/test/tint/builtins/gen/literal/acos/203628.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/acos/203628.wgsl.expected.spvasm @@ -36,8 +36,8 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 -%half_0x1_92p_0 = OpConstant %half 0x1.92p+0 - %16 = OpConstantComposite %v4half %half_0x1_92p_0 %half_0x1_92p_0 %half_0x1_92p_0 %half_0x1_92p_0 +%half_0x1_008pn2 = OpConstant %half 0x1.008p-2 + %16 = OpConstantComposite %v4half %half_0x1_008pn2 %half_0x1_008pn2 %half_0x1_008pn2 %half_0x1_008pn2 %_ptr_Function_v4half = OpTypePointer Function %v4half %19 = OpConstantNull %v4half %20 = OpTypeFunction %v4float diff --git a/test/tint/builtins/gen/literal/acos/203628.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/acos/203628.wgsl.expected.wgsl index ebbc42e95a..1764ae715d 100644 --- a/test/tint/builtins/gen/literal/acos/203628.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/acos/203628.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn acos_203628() { - var res : vec4 = acos(vec4(f16())); + var res : vec4 = acos(vec4(0.96875h)); } @vertex diff --git a/test/tint/builtins/gen/literal/acos/303e3d.wgsl b/test/tint/builtins/gen/literal/acos/303e3d.wgsl index 959d12936d..f8fdc38dac 100644 --- a/test/tint/builtins/gen/literal/acos/303e3d.wgsl +++ b/test/tint/builtins/gen/literal/acos/303e3d.wgsl @@ -25,7 +25,7 @@ enable f16; // fn acos(f16) -> f16 fn acos_303e3d() { - var res: f16 = acos(f16()); + var res: f16 = acos(0.96891242171h); } @vertex diff --git a/test/tint/builtins/gen/literal/acos/303e3d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/acos/303e3d.wgsl.expected.dxc.hlsl index 15b68db506..1ae3af9567 100644 --- a/test/tint/builtins/gen/literal/acos/303e3d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/acos/303e3d.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void acos_303e3d() { - float16_t res = float16_t(1.5703125h); + float16_t res = float16_t(0.250488281h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/acos/303e3d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/acos/303e3d.wgsl.expected.glsl index 0ff085628d..ffc7b257bc 100644 --- a/test/tint/builtins/gen/literal/acos/303e3d.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/acos/303e3d.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void acos_303e3d() { - float16_t res = 1.5703125hf; + float16_t res = 0.250488281hf; } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void acos_303e3d() { - float16_t res = 1.5703125hf; + float16_t res = 0.250488281hf; } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void acos_303e3d() { - float16_t res = 1.5703125hf; + float16_t res = 0.250488281hf; } void compute_main() { diff --git a/test/tint/builtins/gen/literal/acos/303e3d.wgsl.expected.msl b/test/tint/builtins/gen/literal/acos/303e3d.wgsl.expected.msl index d605822853..80a86d69cf 100644 --- a/test/tint/builtins/gen/literal/acos/303e3d.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/acos/303e3d.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void acos_303e3d() { - half res = 1.5703125h; + half res = 0.250488281h; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/acos/303e3d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/acos/303e3d.wgsl.expected.spvasm index 15253c43cc..6cccf82253 100644 --- a/test/tint/builtins/gen/literal/acos/303e3d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/acos/303e3d.wgsl.expected.spvasm @@ -35,7 +35,7 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 -%half_0x1_92p_0 = OpConstant %half 0x1.92p+0 +%half_0x1_008pn2 = OpConstant %half 0x1.008p-2 %_ptr_Function_half = OpTypePointer Function %half %17 = OpConstantNull %half %18 = OpTypeFunction %v4float @@ -43,7 +43,7 @@ %acos_303e3d = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_half Function %17 - OpStore %res %half_0x1_92p_0 + OpStore %res %half_0x1_008pn2 OpReturn OpFunctionEnd %vertex_main_inner = OpFunction %v4float None %18 diff --git a/test/tint/builtins/gen/literal/acos/303e3d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/acos/303e3d.wgsl.expected.wgsl index d9f5be3855..6d509d41c6 100644 --- a/test/tint/builtins/gen/literal/acos/303e3d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/acos/303e3d.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn acos_303e3d() { - var res : f16 = acos(f16()); + var res : f16 = acos(0.96875h); } @vertex diff --git a/test/tint/builtins/gen/literal/acos/f47057.wgsl b/test/tint/builtins/gen/literal/acos/f47057.wgsl index 9195ffb146..16b5967f0f 100644 --- a/test/tint/builtins/gen/literal/acos/f47057.wgsl +++ b/test/tint/builtins/gen/literal/acos/f47057.wgsl @@ -25,7 +25,7 @@ enable f16; // fn acos(vec<3, f16>) -> vec<3, f16> fn acos_f47057() { - var res: vec3 = acos(vec3(f16())); + var res: vec3 = acos(vec3(0.96891242171h)); } @vertex diff --git a/test/tint/builtins/gen/literal/acos/f47057.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/acos/f47057.wgsl.expected.dxc.hlsl index 87a5f7d3bc..c972d2e3e9 100644 --- a/test/tint/builtins/gen/literal/acos/f47057.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/acos/f47057.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void acos_f47057() { - vector res = (float16_t(1.5703125h)).xxx; + vector res = (float16_t(0.250488281h)).xxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/acos/f47057.wgsl.expected.glsl b/test/tint/builtins/gen/literal/acos/f47057.wgsl.expected.glsl index 60d4629919..51cfd5424a 100644 --- a/test/tint/builtins/gen/literal/acos/f47057.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/acos/f47057.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void acos_f47057() { - f16vec3 res = f16vec3(1.5703125hf); + f16vec3 res = f16vec3(0.250488281hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void acos_f47057() { - f16vec3 res = f16vec3(1.5703125hf); + f16vec3 res = f16vec3(0.250488281hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void acos_f47057() { - f16vec3 res = f16vec3(1.5703125hf); + f16vec3 res = f16vec3(0.250488281hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/acos/f47057.wgsl.expected.msl b/test/tint/builtins/gen/literal/acos/f47057.wgsl.expected.msl index 568f757ba8..547e7dbb83 100644 --- a/test/tint/builtins/gen/literal/acos/f47057.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/acos/f47057.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void acos_f47057() { - half3 res = half3(1.5703125h); + half3 res = half3(0.250488281h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/acos/f47057.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/acos/f47057.wgsl.expected.spvasm index 3d7723bdfc..38f068ae8e 100644 --- a/test/tint/builtins/gen/literal/acos/f47057.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/acos/f47057.wgsl.expected.spvasm @@ -36,8 +36,8 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 -%half_0x1_92p_0 = OpConstant %half 0x1.92p+0 - %16 = OpConstantComposite %v3half %half_0x1_92p_0 %half_0x1_92p_0 %half_0x1_92p_0 +%half_0x1_008pn2 = OpConstant %half 0x1.008p-2 + %16 = OpConstantComposite %v3half %half_0x1_008pn2 %half_0x1_008pn2 %half_0x1_008pn2 %_ptr_Function_v3half = OpTypePointer Function %v3half %19 = OpConstantNull %v3half %20 = OpTypeFunction %v4float diff --git a/test/tint/builtins/gen/literal/acos/f47057.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/acos/f47057.wgsl.expected.wgsl index fe4125dcee..d718a2fa41 100644 --- a/test/tint/builtins/gen/literal/acos/f47057.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/acos/f47057.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn acos_f47057() { - var res : vec3 = acos(vec3(f16())); + var res : vec3 = acos(vec3(0.96875h)); } @vertex diff --git a/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl b/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl index a4b0dab48b..9b223326b6 100644 --- a/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl +++ b/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl @@ -25,7 +25,7 @@ enable f16; // fn acosh(vec<2, f16>) -> vec<2, f16> fn acosh_5f49d8() { - var res: vec2 = acosh(vec2(f16())); + var res: vec2 = acosh(vec2(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl.expected.dxc.hlsl index 9ba3054eb2..f59544209b 100644 --- a/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ vector tint_acosh(vector x) { } void acosh_5f49d8() { - vector res = tint_acosh((float16_t(0.0h)).xx); + vector res = tint_acosh((float16_t(1.0h)).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl.expected.glsl b/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl.expected.glsl index 1297122b13..15b49cb118 100644 --- a/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl.expected.glsl @@ -6,7 +6,7 @@ f16vec2 tint_acosh(f16vec2 x) { } void acosh_5f49d8() { - f16vec2 res = tint_acosh(f16vec2(0.0hf)); + f16vec2 res = tint_acosh(f16vec2(1.0hf)); } vec4 vertex_main() { @@ -31,7 +31,7 @@ f16vec2 tint_acosh(f16vec2 x) { } void acosh_5f49d8() { - f16vec2 res = tint_acosh(f16vec2(0.0hf)); + f16vec2 res = tint_acosh(f16vec2(1.0hf)); } void fragment_main() { @@ -50,7 +50,7 @@ f16vec2 tint_acosh(f16vec2 x) { } void acosh_5f49d8() { - f16vec2 res = tint_acosh(f16vec2(0.0hf)); + f16vec2 res = tint_acosh(f16vec2(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl.expected.msl b/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl.expected.msl index 9245c572e9..54a7472343 100644 --- a/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl.expected.msl @@ -6,7 +6,7 @@ half2 tint_acosh(half2 x) { } void acosh_5f49d8() { - half2 res = tint_acosh(half2(0.0h)); + half2 res = tint_acosh(half2(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl.expected.spvasm index 79bf1ae20c..833c13dd6c 100644 --- a/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl.expected.spvasm @@ -59,7 +59,7 @@ %acosh_5f49d8 = OpFunction %void None %24 %27 = OpLabel %res = OpVariable %_ptr_Function_v2half Function %21 - %28 = OpFunctionCall %v2half %tint_acosh %21 + %28 = OpFunctionCall %v2half %tint_acosh %17 OpStore %res %28 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl.expected.wgsl index 54e3b93493..edbedffae6 100644 --- a/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn acosh_5f49d8() { - var res : vec2 = acosh(vec2(f16())); + var res : vec2 = acosh(vec2(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl b/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl index 9b93d25c77..6984829cff 100644 --- a/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl +++ b/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl @@ -25,7 +25,7 @@ enable f16; // fn acosh(f16) -> f16 fn acosh_a37dfe() { - var res: f16 = acosh(f16()); + var res: f16 = acosh(1.h); } @vertex diff --git a/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl.expected.dxc.hlsl index 0a48295874..7e00e5860f 100644 --- a/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ float16_t tint_acosh(float16_t x) { } void acosh_a37dfe() { - float16_t res = tint_acosh(float16_t(0.0h)); + float16_t res = tint_acosh(float16_t(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl.expected.glsl b/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl.expected.glsl index e7752e3799..53f616450c 100644 --- a/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl.expected.glsl @@ -6,7 +6,7 @@ float16_t tint_acosh(float16_t x) { } void acosh_a37dfe() { - float16_t res = tint_acosh(0.0hf); + float16_t res = tint_acosh(1.0hf); } vec4 vertex_main() { @@ -31,7 +31,7 @@ float16_t tint_acosh(float16_t x) { } void acosh_a37dfe() { - float16_t res = tint_acosh(0.0hf); + float16_t res = tint_acosh(1.0hf); } void fragment_main() { @@ -50,7 +50,7 @@ float16_t tint_acosh(float16_t x) { } void acosh_a37dfe() { - float16_t res = tint_acosh(0.0hf); + float16_t res = tint_acosh(1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl.expected.msl b/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl.expected.msl index 09a8e2d967..bc04673ef2 100644 --- a/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl.expected.msl @@ -6,7 +6,7 @@ half tint_acosh(half x) { } void acosh_a37dfe() { - half res = tint_acosh(0.0h); + half res = tint_acosh(1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl.expected.spvasm index e5071ef92a..a8f4cc6d82 100644 --- a/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl.expected.spvasm @@ -56,7 +56,7 @@ %acosh_a37dfe = OpFunction %void None %21 %24 = OpLabel %res = OpVariable %_ptr_Function_half Function %18 - %25 = OpFunctionCall %half %tint_acosh %18 + %25 = OpFunctionCall %half %tint_acosh %half_0x1p_0 OpStore %res %25 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl.expected.wgsl index 983b91cdb3..ee0b95ab06 100644 --- a/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn acosh_a37dfe() { - var res : f16 = acosh(f16()); + var res : f16 = acosh(1.0h); } @vertex diff --git a/test/tint/builtins/gen/literal/acosh/de60d8.wgsl b/test/tint/builtins/gen/literal/acosh/de60d8.wgsl index 4f64c073c9..40e850182c 100644 --- a/test/tint/builtins/gen/literal/acosh/de60d8.wgsl +++ b/test/tint/builtins/gen/literal/acosh/de60d8.wgsl @@ -25,7 +25,7 @@ enable f16; // fn acosh(vec<4, f16>) -> vec<4, f16> fn acosh_de60d8() { - var res: vec4 = acosh(vec4(f16())); + var res: vec4 = acosh(vec4(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/acosh/de60d8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/acosh/de60d8.wgsl.expected.dxc.hlsl index 5de3f3b567..f4e9e04e85 100644 --- a/test/tint/builtins/gen/literal/acosh/de60d8.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/acosh/de60d8.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ vector tint_acosh(vector x) { } void acosh_de60d8() { - vector res = tint_acosh((float16_t(0.0h)).xxxx); + vector res = tint_acosh((float16_t(1.0h)).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/acosh/de60d8.wgsl.expected.glsl b/test/tint/builtins/gen/literal/acosh/de60d8.wgsl.expected.glsl index 439999ffd8..7076bfa6c2 100644 --- a/test/tint/builtins/gen/literal/acosh/de60d8.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/acosh/de60d8.wgsl.expected.glsl @@ -6,7 +6,7 @@ f16vec4 tint_acosh(f16vec4 x) { } void acosh_de60d8() { - f16vec4 res = tint_acosh(f16vec4(0.0hf)); + f16vec4 res = tint_acosh(f16vec4(1.0hf)); } vec4 vertex_main() { @@ -31,7 +31,7 @@ f16vec4 tint_acosh(f16vec4 x) { } void acosh_de60d8() { - f16vec4 res = tint_acosh(f16vec4(0.0hf)); + f16vec4 res = tint_acosh(f16vec4(1.0hf)); } void fragment_main() { @@ -50,7 +50,7 @@ f16vec4 tint_acosh(f16vec4 x) { } void acosh_de60d8() { - f16vec4 res = tint_acosh(f16vec4(0.0hf)); + f16vec4 res = tint_acosh(f16vec4(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/acosh/de60d8.wgsl.expected.msl b/test/tint/builtins/gen/literal/acosh/de60d8.wgsl.expected.msl index 39b26d79dc..6b8bdcc03c 100644 --- a/test/tint/builtins/gen/literal/acosh/de60d8.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/acosh/de60d8.wgsl.expected.msl @@ -6,7 +6,7 @@ half4 tint_acosh(half4 x) { } void acosh_de60d8() { - half4 res = tint_acosh(half4(0.0h)); + half4 res = tint_acosh(half4(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/acosh/de60d8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/acosh/de60d8.wgsl.expected.spvasm index 220c72ab1b..0c0218aa41 100644 --- a/test/tint/builtins/gen/literal/acosh/de60d8.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/acosh/de60d8.wgsl.expected.spvasm @@ -59,7 +59,7 @@ %acosh_de60d8 = OpFunction %void None %24 %27 = OpLabel %res = OpVariable %_ptr_Function_v4half Function %21 - %28 = OpFunctionCall %v4half %tint_acosh %21 + %28 = OpFunctionCall %v4half %tint_acosh %17 OpStore %res %28 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/acosh/de60d8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/acosh/de60d8.wgsl.expected.wgsl index 1fdbcb0902..9e2d557faf 100644 --- a/test/tint/builtins/gen/literal/acosh/de60d8.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/acosh/de60d8.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn acosh_de60d8() { - var res : vec4 = acosh(vec4(f16())); + var res : vec4 = acosh(vec4(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/acosh/f56574.wgsl b/test/tint/builtins/gen/literal/acosh/f56574.wgsl index 40db5d303f..192966a893 100644 --- a/test/tint/builtins/gen/literal/acosh/f56574.wgsl +++ b/test/tint/builtins/gen/literal/acosh/f56574.wgsl @@ -25,7 +25,7 @@ enable f16; // fn acosh(vec<3, f16>) -> vec<3, f16> fn acosh_f56574() { - var res: vec3 = acosh(vec3(f16())); + var res: vec3 = acosh(vec3(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/acosh/f56574.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/acosh/f56574.wgsl.expected.dxc.hlsl index 72b7eb7fa0..738ab20ccf 100644 --- a/test/tint/builtins/gen/literal/acosh/f56574.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/acosh/f56574.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ vector tint_acosh(vector x) { } void acosh_f56574() { - vector res = tint_acosh((float16_t(0.0h)).xxx); + vector res = tint_acosh((float16_t(1.0h)).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/acosh/f56574.wgsl.expected.glsl b/test/tint/builtins/gen/literal/acosh/f56574.wgsl.expected.glsl index 20527af655..522b80a557 100644 --- a/test/tint/builtins/gen/literal/acosh/f56574.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/acosh/f56574.wgsl.expected.glsl @@ -6,7 +6,7 @@ f16vec3 tint_acosh(f16vec3 x) { } void acosh_f56574() { - f16vec3 res = tint_acosh(f16vec3(0.0hf)); + f16vec3 res = tint_acosh(f16vec3(1.0hf)); } vec4 vertex_main() { @@ -31,7 +31,7 @@ f16vec3 tint_acosh(f16vec3 x) { } void acosh_f56574() { - f16vec3 res = tint_acosh(f16vec3(0.0hf)); + f16vec3 res = tint_acosh(f16vec3(1.0hf)); } void fragment_main() { @@ -50,7 +50,7 @@ f16vec3 tint_acosh(f16vec3 x) { } void acosh_f56574() { - f16vec3 res = tint_acosh(f16vec3(0.0hf)); + f16vec3 res = tint_acosh(f16vec3(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/acosh/f56574.wgsl.expected.msl b/test/tint/builtins/gen/literal/acosh/f56574.wgsl.expected.msl index df354ba738..ef82790a64 100644 --- a/test/tint/builtins/gen/literal/acosh/f56574.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/acosh/f56574.wgsl.expected.msl @@ -6,7 +6,7 @@ half3 tint_acosh(half3 x) { } void acosh_f56574() { - half3 res = tint_acosh(half3(0.0h)); + half3 res = tint_acosh(half3(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/acosh/f56574.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/acosh/f56574.wgsl.expected.spvasm index c1bec972c0..a5502a5400 100644 --- a/test/tint/builtins/gen/literal/acosh/f56574.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/acosh/f56574.wgsl.expected.spvasm @@ -59,7 +59,7 @@ %acosh_f56574 = OpFunction %void None %24 %27 = OpLabel %res = OpVariable %_ptr_Function_v3half Function %21 - %28 = OpFunctionCall %v3half %tint_acosh %21 + %28 = OpFunctionCall %v3half %tint_acosh %17 OpStore %res %28 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/acosh/f56574.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/acosh/f56574.wgsl.expected.wgsl index 2eff0f0d56..ffb973ab10 100644 --- a/test/tint/builtins/gen/literal/acosh/f56574.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/acosh/f56574.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn acosh_f56574() { - var res : vec3 = acosh(vec3(f16())); + var res : vec3 = acosh(vec3(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/asin/11dfda.wgsl b/test/tint/builtins/gen/literal/asin/11dfda.wgsl index 83b5763b66..a7cea137c4 100644 --- a/test/tint/builtins/gen/literal/asin/11dfda.wgsl +++ b/test/tint/builtins/gen/literal/asin/11dfda.wgsl @@ -25,7 +25,7 @@ enable f16; // fn asin(f16) -> f16 fn asin_11dfda() { - var res: f16 = asin(f16()); + var res: f16 = asin(0.479425538604h); } @vertex diff --git a/test/tint/builtins/gen/literal/asin/11dfda.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/asin/11dfda.wgsl.expected.dxc.hlsl index 16da374302..21b8491c4d 100644 --- a/test/tint/builtins/gen/literal/asin/11dfda.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/asin/11dfda.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void asin_11dfda() { - float16_t res = float16_t(0.0h); + float16_t res = float16_t(0.499755859h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asin/11dfda.wgsl.expected.glsl b/test/tint/builtins/gen/literal/asin/11dfda.wgsl.expected.glsl index cacb7fd814..ee0dcabc9d 100644 --- a/test/tint/builtins/gen/literal/asin/11dfda.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/asin/11dfda.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void asin_11dfda() { - float16_t res = 0.0hf; + float16_t res = 0.499755859hf; } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void asin_11dfda() { - float16_t res = 0.0hf; + float16_t res = 0.499755859hf; } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void asin_11dfda() { - float16_t res = 0.0hf; + float16_t res = 0.499755859hf; } void compute_main() { diff --git a/test/tint/builtins/gen/literal/asin/11dfda.wgsl.expected.msl b/test/tint/builtins/gen/literal/asin/11dfda.wgsl.expected.msl index 7a0180cfce..5bb00b3575 100644 --- a/test/tint/builtins/gen/literal/asin/11dfda.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/asin/11dfda.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void asin_11dfda() { - half res = 0.0h; + half res = 0.499755859h; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asin/11dfda.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/asin/11dfda.wgsl.expected.spvasm index 47a6e66d95..5d30cab319 100644 --- a/test/tint/builtins/gen/literal/asin/11dfda.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/asin/11dfda.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -35,35 +35,36 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1_ffcpn2 = OpConstant %half 0x1.ffcp-2 %_ptr_Function_half = OpTypePointer Function %half - %17 = OpTypeFunction %v4float + %17 = OpConstantNull %half + %18 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %asin_11dfda = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_half Function %14 - OpStore %res %14 + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %res %half_0x1_ffcpn2 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %17 - %19 = OpLabel - %20 = OpFunctionCall %void %asin_11dfda +%vertex_main_inner = OpFunction %v4float None %18 + %20 = OpLabel + %21 = OpFunctionCall %void %asin_11dfda OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %22 = OpLabel - %23 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %23 + %23 = OpLabel + %24 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %24 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %asin_11dfda + %27 = OpLabel + %28 = OpFunctionCall %void %asin_11dfda OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %asin_11dfda + %30 = OpLabel + %31 = OpFunctionCall %void %asin_11dfda OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/asin/11dfda.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/asin/11dfda.wgsl.expected.wgsl index d1b597675e..434bded762 100644 --- a/test/tint/builtins/gen/literal/asin/11dfda.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/asin/11dfda.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn asin_11dfda() { - var res : f16 = asin(f16()); + var res : f16 = asin(0.479248047h); } @vertex diff --git a/test/tint/builtins/gen/literal/asin/2d8e29.wgsl b/test/tint/builtins/gen/literal/asin/2d8e29.wgsl index d21bfd5e28..92914743be 100644 --- a/test/tint/builtins/gen/literal/asin/2d8e29.wgsl +++ b/test/tint/builtins/gen/literal/asin/2d8e29.wgsl @@ -25,7 +25,7 @@ enable f16; // fn asin(vec<3, f16>) -> vec<3, f16> fn asin_2d8e29() { - var res: vec3 = asin(vec3(f16())); + var res: vec3 = asin(vec3(0.479425538604h)); } @vertex diff --git a/test/tint/builtins/gen/literal/asin/2d8e29.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/asin/2d8e29.wgsl.expected.dxc.hlsl index 6fdb472227..b39bb3ebe3 100644 --- a/test/tint/builtins/gen/literal/asin/2d8e29.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/asin/2d8e29.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void asin_2d8e29() { - vector res = (float16_t(0.0h)).xxx; + vector res = (float16_t(0.499755859h)).xxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asin/2d8e29.wgsl.expected.glsl b/test/tint/builtins/gen/literal/asin/2d8e29.wgsl.expected.glsl index 6d5368fc07..1f946d07c5 100644 --- a/test/tint/builtins/gen/literal/asin/2d8e29.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/asin/2d8e29.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void asin_2d8e29() { - f16vec3 res = f16vec3(0.0hf); + f16vec3 res = f16vec3(0.499755859hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void asin_2d8e29() { - f16vec3 res = f16vec3(0.0hf); + f16vec3 res = f16vec3(0.499755859hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void asin_2d8e29() { - f16vec3 res = f16vec3(0.0hf); + f16vec3 res = f16vec3(0.499755859hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/asin/2d8e29.wgsl.expected.msl b/test/tint/builtins/gen/literal/asin/2d8e29.wgsl.expected.msl index 22e88c919c..f71b867e37 100644 --- a/test/tint/builtins/gen/literal/asin/2d8e29.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/asin/2d8e29.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void asin_2d8e29() { - half3 res = half3(0.0h); + half3 res = half3(0.499755859h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asin/2d8e29.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/asin/2d8e29.wgsl.expected.spvasm index fd68919300..2768bf7e3b 100644 --- a/test/tint/builtins/gen/literal/asin/2d8e29.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/asin/2d8e29.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,35 +36,37 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1_ffcpn2 = OpConstant %half 0x1.ffcp-2 + %16 = OpConstantComposite %v3half %half_0x1_ffcpn2 %half_0x1_ffcpn2 %half_0x1_ffcpn2 %_ptr_Function_v3half = OpTypePointer Function %v3half - %18 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %asin_2d8e29 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %res %15 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %18 - %20 = OpLabel - %21 = OpFunctionCall %void %asin_2d8e29 +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %asin_2d8e29 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %23 = OpLabel - %24 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %24 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %void %asin_2d8e29 + %29 = OpLabel + %30 = OpFunctionCall %void %asin_2d8e29 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %asin_2d8e29 + %32 = OpLabel + %33 = OpFunctionCall %void %asin_2d8e29 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/asin/2d8e29.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/asin/2d8e29.wgsl.expected.wgsl index 2f97bd2eba..0a0207ce7d 100644 --- a/test/tint/builtins/gen/literal/asin/2d8e29.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/asin/2d8e29.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn asin_2d8e29() { - var res : vec3 = asin(vec3(f16())); + var res : vec3 = asin(vec3(0.479248047h)); } @vertex diff --git a/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl b/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl index 44991ef243..6e46f9104f 100644 --- a/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl +++ b/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl @@ -25,7 +25,7 @@ enable f16; // fn asin(vec<4, f16>) -> vec<4, f16> fn asin_3cfbd4() { - var res: vec4 = asin(vec4(f16())); + var res: vec4 = asin(vec4(0.479425538604h)); } @vertex diff --git a/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl.expected.dxc.hlsl index 71cc9bf09e..62589e53cd 100644 --- a/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void asin_3cfbd4() { - vector res = (float16_t(0.0h)).xxxx; + vector res = (float16_t(0.499755859h)).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl.expected.glsl index b2afaf4693..1c607386fa 100644 --- a/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void asin_3cfbd4() { - f16vec4 res = f16vec4(0.0hf); + f16vec4 res = f16vec4(0.499755859hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void asin_3cfbd4() { - f16vec4 res = f16vec4(0.0hf); + f16vec4 res = f16vec4(0.499755859hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void asin_3cfbd4() { - f16vec4 res = f16vec4(0.0hf); + f16vec4 res = f16vec4(0.499755859hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl.expected.msl b/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl.expected.msl index dc266c61db..6283ba07f3 100644 --- a/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void asin_3cfbd4() { - half4 res = half4(0.0h); + half4 res = half4(0.499755859h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl.expected.spvasm index 7a57a86257..f110573fad 100644 --- a/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,35 +36,37 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1_ffcpn2 = OpConstant %half 0x1.ffcp-2 + %16 = OpConstantComposite %v4half %half_0x1_ffcpn2 %half_0x1_ffcpn2 %half_0x1_ffcpn2 %half_0x1_ffcpn2 %_ptr_Function_v4half = OpTypePointer Function %v4half - %18 = OpTypeFunction %v4float + %19 = OpConstantNull %v4half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %asin_3cfbd4 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %res %15 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %18 - %20 = OpLabel - %21 = OpFunctionCall %void %asin_3cfbd4 +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %asin_3cfbd4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %23 = OpLabel - %24 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %24 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %void %asin_3cfbd4 + %29 = OpLabel + %30 = OpFunctionCall %void %asin_3cfbd4 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %asin_3cfbd4 + %32 = OpLabel + %33 = OpFunctionCall %void %asin_3cfbd4 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl.expected.wgsl index 63c66a16f4..e646e00e32 100644 --- a/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn asin_3cfbd4() { - var res : vec4 = asin(vec4(f16())); + var res : vec4 = asin(vec4(0.479248047h)); } @vertex diff --git a/test/tint/builtins/gen/literal/asin/b4aced.wgsl b/test/tint/builtins/gen/literal/asin/b4aced.wgsl index 591bac3948..792e6f6805 100644 --- a/test/tint/builtins/gen/literal/asin/b4aced.wgsl +++ b/test/tint/builtins/gen/literal/asin/b4aced.wgsl @@ -25,7 +25,7 @@ enable f16; // fn asin(vec<2, f16>) -> vec<2, f16> fn asin_b4aced() { - var res: vec2 = asin(vec2(f16())); + var res: vec2 = asin(vec2(0.479425538604h)); } @vertex diff --git a/test/tint/builtins/gen/literal/asin/b4aced.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/asin/b4aced.wgsl.expected.dxc.hlsl index dc1aea153c..870f92bbe0 100644 --- a/test/tint/builtins/gen/literal/asin/b4aced.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/asin/b4aced.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void asin_b4aced() { - vector res = (float16_t(0.0h)).xx; + vector res = (float16_t(0.499755859h)).xx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asin/b4aced.wgsl.expected.glsl b/test/tint/builtins/gen/literal/asin/b4aced.wgsl.expected.glsl index 1018bd17ed..b462aa02a1 100644 --- a/test/tint/builtins/gen/literal/asin/b4aced.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/asin/b4aced.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void asin_b4aced() { - f16vec2 res = f16vec2(0.0hf); + f16vec2 res = f16vec2(0.499755859hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void asin_b4aced() { - f16vec2 res = f16vec2(0.0hf); + f16vec2 res = f16vec2(0.499755859hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void asin_b4aced() { - f16vec2 res = f16vec2(0.0hf); + f16vec2 res = f16vec2(0.499755859hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/asin/b4aced.wgsl.expected.msl b/test/tint/builtins/gen/literal/asin/b4aced.wgsl.expected.msl index 0bd37c5895..56a0113f02 100644 --- a/test/tint/builtins/gen/literal/asin/b4aced.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/asin/b4aced.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void asin_b4aced() { - half2 res = half2(0.0h); + half2 res = half2(0.499755859h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asin/b4aced.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/asin/b4aced.wgsl.expected.spvasm index f93ae262f9..d61e3367a5 100644 --- a/test/tint/builtins/gen/literal/asin/b4aced.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/asin/b4aced.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,35 +36,37 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1_ffcpn2 = OpConstant %half 0x1.ffcp-2 + %16 = OpConstantComposite %v2half %half_0x1_ffcpn2 %half_0x1_ffcpn2 %_ptr_Function_v2half = OpTypePointer Function %v2half - %18 = OpTypeFunction %v4float + %19 = OpConstantNull %v2half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %asin_b4aced = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %res %15 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %18 - %20 = OpLabel - %21 = OpFunctionCall %void %asin_b4aced +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %asin_b4aced OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %23 = OpLabel - %24 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %24 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %void %asin_b4aced + %29 = OpLabel + %30 = OpFunctionCall %void %asin_b4aced OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %asin_b4aced + %32 = OpLabel + %33 = OpFunctionCall %void %asin_b4aced OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/asin/b4aced.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/asin/b4aced.wgsl.expected.wgsl index 545e7c403a..81b0b44467 100644 --- a/test/tint/builtins/gen/literal/asin/b4aced.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/asin/b4aced.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn asin_b4aced() { - var res : vec2 = asin(vec2(f16())); + var res : vec2 = asin(vec2(0.479248047h)); } @vertex diff --git a/test/tint/builtins/gen/literal/asinh/468a48.wgsl b/test/tint/builtins/gen/literal/asinh/468a48.wgsl index 884a6b2ca0..661f08ed63 100644 --- a/test/tint/builtins/gen/literal/asinh/468a48.wgsl +++ b/test/tint/builtins/gen/literal/asinh/468a48.wgsl @@ -25,7 +25,7 @@ enable f16; // fn asinh(f16) -> f16 fn asinh_468a48() { - var res: f16 = asinh(f16()); + var res: f16 = asinh(1.h); } @vertex diff --git a/test/tint/builtins/gen/literal/asinh/468a48.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/asinh/468a48.wgsl.expected.dxc.hlsl index 895988b068..16f004b26a 100644 --- a/test/tint/builtins/gen/literal/asinh/468a48.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/asinh/468a48.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void asinh_468a48() { - float16_t res = float16_t(0.0h); + float16_t res = float16_t(0.881347656h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asinh/468a48.wgsl.expected.glsl b/test/tint/builtins/gen/literal/asinh/468a48.wgsl.expected.glsl index 0b42f0a005..d5da6f48ef 100644 --- a/test/tint/builtins/gen/literal/asinh/468a48.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/asinh/468a48.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void asinh_468a48() { - float16_t res = 0.0hf; + float16_t res = 0.881347656hf; } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void asinh_468a48() { - float16_t res = 0.0hf; + float16_t res = 0.881347656hf; } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void asinh_468a48() { - float16_t res = 0.0hf; + float16_t res = 0.881347656hf; } void compute_main() { diff --git a/test/tint/builtins/gen/literal/asinh/468a48.wgsl.expected.msl b/test/tint/builtins/gen/literal/asinh/468a48.wgsl.expected.msl index 6f6d727787..eecb9b7443 100644 --- a/test/tint/builtins/gen/literal/asinh/468a48.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/asinh/468a48.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void asinh_468a48() { - half res = 0.0h; + half res = 0.881347656h; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asinh/468a48.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/asinh/468a48.wgsl.expected.spvasm index 21f9b59362..9e2b885b68 100644 --- a/test/tint/builtins/gen/literal/asinh/468a48.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/asinh/468a48.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -35,35 +35,36 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1_c34pn1 = OpConstant %half 0x1.c34p-1 %_ptr_Function_half = OpTypePointer Function %half - %17 = OpTypeFunction %v4float + %17 = OpConstantNull %half + %18 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %asinh_468a48 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_half Function %14 - OpStore %res %14 + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %res %half_0x1_c34pn1 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %17 - %19 = OpLabel - %20 = OpFunctionCall %void %asinh_468a48 +%vertex_main_inner = OpFunction %v4float None %18 + %20 = OpLabel + %21 = OpFunctionCall %void %asinh_468a48 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %22 = OpLabel - %23 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %23 + %23 = OpLabel + %24 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %24 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %asinh_468a48 + %27 = OpLabel + %28 = OpFunctionCall %void %asinh_468a48 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %asinh_468a48 + %30 = OpLabel + %31 = OpFunctionCall %void %asinh_468a48 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/asinh/468a48.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/asinh/468a48.wgsl.expected.wgsl index a546ede0fb..fc555c072c 100644 --- a/test/tint/builtins/gen/literal/asinh/468a48.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/asinh/468a48.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn asinh_468a48() { - var res : f16 = asinh(f16()); + var res : f16 = asinh(1.0h); } @vertex diff --git a/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl b/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl index dfa3c2903c..d3df0c6bee 100644 --- a/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl +++ b/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl @@ -25,7 +25,7 @@ enable f16; // fn asinh(vec<4, f16>) -> vec<4, f16> fn asinh_95ab2b() { - var res: vec4 = asinh(vec4(f16())); + var res: vec4 = asinh(vec4(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl.expected.dxc.hlsl index a429606b4f..aceecc0c37 100644 --- a/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void asinh_95ab2b() { - vector res = (float16_t(0.0h)).xxxx; + vector res = (float16_t(0.881347656h)).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl.expected.glsl index d3e28ea96e..7033652e18 100644 --- a/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void asinh_95ab2b() { - f16vec4 res = f16vec4(0.0hf); + f16vec4 res = f16vec4(0.881347656hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void asinh_95ab2b() { - f16vec4 res = f16vec4(0.0hf); + f16vec4 res = f16vec4(0.881347656hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void asinh_95ab2b() { - f16vec4 res = f16vec4(0.0hf); + f16vec4 res = f16vec4(0.881347656hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl.expected.msl b/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl.expected.msl index 6066d30191..d294e1aff9 100644 --- a/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void asinh_95ab2b() { - half4 res = half4(0.0h); + half4 res = half4(0.881347656h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl.expected.spvasm index a85a653e51..8a5fa6aef9 100644 --- a/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,35 +36,37 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1_c34pn1 = OpConstant %half 0x1.c34p-1 + %16 = OpConstantComposite %v4half %half_0x1_c34pn1 %half_0x1_c34pn1 %half_0x1_c34pn1 %half_0x1_c34pn1 %_ptr_Function_v4half = OpTypePointer Function %v4half - %18 = OpTypeFunction %v4float + %19 = OpConstantNull %v4half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %asinh_95ab2b = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %res %15 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %18 - %20 = OpLabel - %21 = OpFunctionCall %void %asinh_95ab2b +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %asinh_95ab2b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %23 = OpLabel - %24 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %24 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %void %asinh_95ab2b + %29 = OpLabel + %30 = OpFunctionCall %void %asinh_95ab2b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %asinh_95ab2b + %32 = OpLabel + %33 = OpFunctionCall %void %asinh_95ab2b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl.expected.wgsl index ca02f94158..e22c6a89df 100644 --- a/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn asinh_95ab2b() { - var res : vec4 = asinh(vec4(f16())); + var res : vec4 = asinh(vec4(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl b/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl index fa045bb3a1..3b284fa665 100644 --- a/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl +++ b/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl @@ -25,7 +25,7 @@ enable f16; // fn asinh(vec<2, f16>) -> vec<2, f16> fn asinh_ad8f8b() { - var res: vec2 = asinh(vec2(f16())); + var res: vec2 = asinh(vec2(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl.expected.dxc.hlsl index fa23693f75..7a2f4f0fe5 100644 --- a/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void asinh_ad8f8b() { - vector res = (float16_t(0.0h)).xx; + vector res = (float16_t(0.881347656h)).xx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl.expected.glsl index 483c51467d..b6efd56d84 100644 --- a/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void asinh_ad8f8b() { - f16vec2 res = f16vec2(0.0hf); + f16vec2 res = f16vec2(0.881347656hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void asinh_ad8f8b() { - f16vec2 res = f16vec2(0.0hf); + f16vec2 res = f16vec2(0.881347656hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void asinh_ad8f8b() { - f16vec2 res = f16vec2(0.0hf); + f16vec2 res = f16vec2(0.881347656hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl.expected.msl b/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl.expected.msl index 9f70a7d232..4d9d5b50dc 100644 --- a/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void asinh_ad8f8b() { - half2 res = half2(0.0h); + half2 res = half2(0.881347656h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl.expected.spvasm index f7cf1203c6..027fbe294e 100644 --- a/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,35 +36,37 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1_c34pn1 = OpConstant %half 0x1.c34p-1 + %16 = OpConstantComposite %v2half %half_0x1_c34pn1 %half_0x1_c34pn1 %_ptr_Function_v2half = OpTypePointer Function %v2half - %18 = OpTypeFunction %v4float + %19 = OpConstantNull %v2half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %asinh_ad8f8b = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %res %15 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %18 - %20 = OpLabel - %21 = OpFunctionCall %void %asinh_ad8f8b +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %asinh_ad8f8b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %23 = OpLabel - %24 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %24 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %void %asinh_ad8f8b + %29 = OpLabel + %30 = OpFunctionCall %void %asinh_ad8f8b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %asinh_ad8f8b + %32 = OpLabel + %33 = OpFunctionCall %void %asinh_ad8f8b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl.expected.wgsl index 3bd274ef3b..150062da31 100644 --- a/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn asinh_ad8f8b() { - var res : vec2 = asinh(vec2(f16())); + var res : vec2 = asinh(vec2(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl b/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl index 67d2c9d3d5..8f84a91ac2 100644 --- a/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl +++ b/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl @@ -25,7 +25,7 @@ enable f16; // fn asinh(vec<3, f16>) -> vec<3, f16> fn asinh_fb5e8c() { - var res: vec3 = asinh(vec3(f16())); + var res: vec3 = asinh(vec3(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl.expected.dxc.hlsl index 30cea256ce..611ab3ee4e 100644 --- a/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void asinh_fb5e8c() { - vector res = (float16_t(0.0h)).xxx; + vector res = (float16_t(0.881347656h)).xxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl.expected.glsl index 251733ebf7..f5e2e87092 100644 --- a/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void asinh_fb5e8c() { - f16vec3 res = f16vec3(0.0hf); + f16vec3 res = f16vec3(0.881347656hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void asinh_fb5e8c() { - f16vec3 res = f16vec3(0.0hf); + f16vec3 res = f16vec3(0.881347656hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void asinh_fb5e8c() { - f16vec3 res = f16vec3(0.0hf); + f16vec3 res = f16vec3(0.881347656hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl.expected.msl b/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl.expected.msl index 5ca1c10ae8..a7d247d8f5 100644 --- a/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void asinh_fb5e8c() { - half3 res = half3(0.0h); + half3 res = half3(0.881347656h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl.expected.spvasm index ab6521d161..50f37006d5 100644 --- a/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,35 +36,37 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1_c34pn1 = OpConstant %half 0x1.c34p-1 + %16 = OpConstantComposite %v3half %half_0x1_c34pn1 %half_0x1_c34pn1 %half_0x1_c34pn1 %_ptr_Function_v3half = OpTypePointer Function %v3half - %18 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %asinh_fb5e8c = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %res %15 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %18 - %20 = OpLabel - %21 = OpFunctionCall %void %asinh_fb5e8c +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %asinh_fb5e8c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %23 = OpLabel - %24 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %24 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %void %asinh_fb5e8c + %29 = OpLabel + %30 = OpFunctionCall %void %asinh_fb5e8c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %asinh_fb5e8c + %32 = OpLabel + %33 = OpFunctionCall %void %asinh_fb5e8c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl.expected.wgsl index 953a9d1238..9187eb3fb8 100644 --- a/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn asinh_fb5e8c() { - var res : vec3 = asinh(vec3(f16())); + var res : vec3 = asinh(vec3(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/atan/19faea.wgsl b/test/tint/builtins/gen/literal/atan/19faea.wgsl index 250ddc50d4..66ea29f634 100644 --- a/test/tint/builtins/gen/literal/atan/19faea.wgsl +++ b/test/tint/builtins/gen/literal/atan/19faea.wgsl @@ -25,7 +25,7 @@ enable f16; // fn atan(vec<4, f16>) -> vec<4, f16> fn atan_19faea() { - var res: vec4 = atan(vec4(f16())); + var res: vec4 = atan(vec4(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/atan/19faea.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atan/19faea.wgsl.expected.dxc.hlsl index db14b4843a..216328d697 100644 --- a/test/tint/builtins/gen/literal/atan/19faea.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/atan/19faea.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void atan_19faea() { - vector res = (float16_t(0.0h)).xxxx; + vector res = (float16_t(0.78515625h)).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/atan/19faea.wgsl.expected.glsl b/test/tint/builtins/gen/literal/atan/19faea.wgsl.expected.glsl index ad63e477bd..7130595163 100644 --- a/test/tint/builtins/gen/literal/atan/19faea.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/atan/19faea.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void atan_19faea() { - f16vec4 res = f16vec4(0.0hf); + f16vec4 res = f16vec4(0.78515625hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void atan_19faea() { - f16vec4 res = f16vec4(0.0hf); + f16vec4 res = f16vec4(0.78515625hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void atan_19faea() { - f16vec4 res = f16vec4(0.0hf); + f16vec4 res = f16vec4(0.78515625hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/atan/19faea.wgsl.expected.msl b/test/tint/builtins/gen/literal/atan/19faea.wgsl.expected.msl index 183c5606e6..0b34640f09 100644 --- a/test/tint/builtins/gen/literal/atan/19faea.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/atan/19faea.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void atan_19faea() { - half4 res = half4(0.0h); + half4 res = half4(0.78515625h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/atan/19faea.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/atan/19faea.wgsl.expected.spvasm index 4fa1e97064..30a969f1c0 100644 --- a/test/tint/builtins/gen/literal/atan/19faea.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/atan/19faea.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,35 +36,37 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1_92pn1 = OpConstant %half 0x1.92p-1 + %16 = OpConstantComposite %v4half %half_0x1_92pn1 %half_0x1_92pn1 %half_0x1_92pn1 %half_0x1_92pn1 %_ptr_Function_v4half = OpTypePointer Function %v4half - %18 = OpTypeFunction %v4float + %19 = OpConstantNull %v4half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %atan_19faea = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %res %15 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %18 - %20 = OpLabel - %21 = OpFunctionCall %void %atan_19faea +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %atan_19faea OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %23 = OpLabel - %24 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %24 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %void %atan_19faea + %29 = OpLabel + %30 = OpFunctionCall %void %atan_19faea OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %atan_19faea + %32 = OpLabel + %33 = OpFunctionCall %void %atan_19faea OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/atan/19faea.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/atan/19faea.wgsl.expected.wgsl index ecac9552a7..b0ac4df53d 100644 --- a/test/tint/builtins/gen/literal/atan/19faea.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/atan/19faea.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn atan_19faea() { - var res : vec4 = atan(vec4(f16())); + var res : vec4 = atan(vec4(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/atan/1e1764.wgsl b/test/tint/builtins/gen/literal/atan/1e1764.wgsl index 013ab6e285..78b48d4891 100644 --- a/test/tint/builtins/gen/literal/atan/1e1764.wgsl +++ b/test/tint/builtins/gen/literal/atan/1e1764.wgsl @@ -25,7 +25,7 @@ enable f16; // fn atan(vec<2, f16>) -> vec<2, f16> fn atan_1e1764() { - var res: vec2 = atan(vec2(f16())); + var res: vec2 = atan(vec2(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/atan/1e1764.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atan/1e1764.wgsl.expected.dxc.hlsl index 04d8dbe08a..05f6914657 100644 --- a/test/tint/builtins/gen/literal/atan/1e1764.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/atan/1e1764.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void atan_1e1764() { - vector res = (float16_t(0.0h)).xx; + vector res = (float16_t(0.78515625h)).xx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/atan/1e1764.wgsl.expected.glsl b/test/tint/builtins/gen/literal/atan/1e1764.wgsl.expected.glsl index f0bca0468e..5b0496c8b2 100644 --- a/test/tint/builtins/gen/literal/atan/1e1764.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/atan/1e1764.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void atan_1e1764() { - f16vec2 res = f16vec2(0.0hf); + f16vec2 res = f16vec2(0.78515625hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void atan_1e1764() { - f16vec2 res = f16vec2(0.0hf); + f16vec2 res = f16vec2(0.78515625hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void atan_1e1764() { - f16vec2 res = f16vec2(0.0hf); + f16vec2 res = f16vec2(0.78515625hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/atan/1e1764.wgsl.expected.msl b/test/tint/builtins/gen/literal/atan/1e1764.wgsl.expected.msl index ed6033e028..b488b7e062 100644 --- a/test/tint/builtins/gen/literal/atan/1e1764.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/atan/1e1764.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void atan_1e1764() { - half2 res = half2(0.0h); + half2 res = half2(0.78515625h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/atan/1e1764.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/atan/1e1764.wgsl.expected.spvasm index e51b794c3a..b557b0100c 100644 --- a/test/tint/builtins/gen/literal/atan/1e1764.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/atan/1e1764.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,35 +36,37 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1_92pn1 = OpConstant %half 0x1.92p-1 + %16 = OpConstantComposite %v2half %half_0x1_92pn1 %half_0x1_92pn1 %_ptr_Function_v2half = OpTypePointer Function %v2half - %18 = OpTypeFunction %v4float + %19 = OpConstantNull %v2half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %atan_1e1764 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %res %15 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %18 - %20 = OpLabel - %21 = OpFunctionCall %void %atan_1e1764 +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %atan_1e1764 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %23 = OpLabel - %24 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %24 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %void %atan_1e1764 + %29 = OpLabel + %30 = OpFunctionCall %void %atan_1e1764 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %atan_1e1764 + %32 = OpLabel + %33 = OpFunctionCall %void %atan_1e1764 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/atan/1e1764.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/atan/1e1764.wgsl.expected.wgsl index 8278671c33..bf65b926db 100644 --- a/test/tint/builtins/gen/literal/atan/1e1764.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/atan/1e1764.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn atan_1e1764() { - var res : vec2 = atan(vec2(f16())); + var res : vec2 = atan(vec2(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/atan/a5f421.wgsl b/test/tint/builtins/gen/literal/atan/a5f421.wgsl index 766fcb3958..32968c9027 100644 --- a/test/tint/builtins/gen/literal/atan/a5f421.wgsl +++ b/test/tint/builtins/gen/literal/atan/a5f421.wgsl @@ -25,7 +25,7 @@ enable f16; // fn atan(vec<3, f16>) -> vec<3, f16> fn atan_a5f421() { - var res: vec3 = atan(vec3(f16())); + var res: vec3 = atan(vec3(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/atan/a5f421.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atan/a5f421.wgsl.expected.dxc.hlsl index 913e3e2b85..effc7b5e65 100644 --- a/test/tint/builtins/gen/literal/atan/a5f421.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/atan/a5f421.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void atan_a5f421() { - vector res = (float16_t(0.0h)).xxx; + vector res = (float16_t(0.78515625h)).xxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/atan/a5f421.wgsl.expected.glsl b/test/tint/builtins/gen/literal/atan/a5f421.wgsl.expected.glsl index ced4a20008..85d1d521d8 100644 --- a/test/tint/builtins/gen/literal/atan/a5f421.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/atan/a5f421.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void atan_a5f421() { - f16vec3 res = f16vec3(0.0hf); + f16vec3 res = f16vec3(0.78515625hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void atan_a5f421() { - f16vec3 res = f16vec3(0.0hf); + f16vec3 res = f16vec3(0.78515625hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void atan_a5f421() { - f16vec3 res = f16vec3(0.0hf); + f16vec3 res = f16vec3(0.78515625hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/atan/a5f421.wgsl.expected.msl b/test/tint/builtins/gen/literal/atan/a5f421.wgsl.expected.msl index fd9e130018..e28095eb5f 100644 --- a/test/tint/builtins/gen/literal/atan/a5f421.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/atan/a5f421.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void atan_a5f421() { - half3 res = half3(0.0h); + half3 res = half3(0.78515625h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/atan/a5f421.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/atan/a5f421.wgsl.expected.spvasm index 8464422b3c..e7b6e05e59 100644 --- a/test/tint/builtins/gen/literal/atan/a5f421.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/atan/a5f421.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,35 +36,37 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1_92pn1 = OpConstant %half 0x1.92p-1 + %16 = OpConstantComposite %v3half %half_0x1_92pn1 %half_0x1_92pn1 %half_0x1_92pn1 %_ptr_Function_v3half = OpTypePointer Function %v3half - %18 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %atan_a5f421 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %res %15 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %18 - %20 = OpLabel - %21 = OpFunctionCall %void %atan_a5f421 +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %atan_a5f421 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %23 = OpLabel - %24 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %24 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %void %atan_a5f421 + %29 = OpLabel + %30 = OpFunctionCall %void %atan_a5f421 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %atan_a5f421 + %32 = OpLabel + %33 = OpFunctionCall %void %atan_a5f421 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/atan/a5f421.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/atan/a5f421.wgsl.expected.wgsl index 356793ca07..3fdca85a92 100644 --- a/test/tint/builtins/gen/literal/atan/a5f421.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/atan/a5f421.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn atan_a5f421() { - var res : vec3 = atan(vec3(f16())); + var res : vec3 = atan(vec3(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/atan/a7ba61.wgsl b/test/tint/builtins/gen/literal/atan/a7ba61.wgsl index 9467660bb8..4fe638ff61 100644 --- a/test/tint/builtins/gen/literal/atan/a7ba61.wgsl +++ b/test/tint/builtins/gen/literal/atan/a7ba61.wgsl @@ -25,7 +25,7 @@ enable f16; // fn atan(f16) -> f16 fn atan_a7ba61() { - var res: f16 = atan(f16()); + var res: f16 = atan(1.h); } @vertex diff --git a/test/tint/builtins/gen/literal/atan/a7ba61.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atan/a7ba61.wgsl.expected.dxc.hlsl index c68aeb5244..7917730e02 100644 --- a/test/tint/builtins/gen/literal/atan/a7ba61.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/atan/a7ba61.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void atan_a7ba61() { - float16_t res = float16_t(0.0h); + float16_t res = float16_t(0.78515625h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/atan/a7ba61.wgsl.expected.glsl b/test/tint/builtins/gen/literal/atan/a7ba61.wgsl.expected.glsl index d6262bda41..b1a4614e6a 100644 --- a/test/tint/builtins/gen/literal/atan/a7ba61.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/atan/a7ba61.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void atan_a7ba61() { - float16_t res = 0.0hf; + float16_t res = 0.78515625hf; } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void atan_a7ba61() { - float16_t res = 0.0hf; + float16_t res = 0.78515625hf; } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void atan_a7ba61() { - float16_t res = 0.0hf; + float16_t res = 0.78515625hf; } void compute_main() { diff --git a/test/tint/builtins/gen/literal/atan/a7ba61.wgsl.expected.msl b/test/tint/builtins/gen/literal/atan/a7ba61.wgsl.expected.msl index c35f48fb1d..fa272513ae 100644 --- a/test/tint/builtins/gen/literal/atan/a7ba61.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/atan/a7ba61.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void atan_a7ba61() { - half res = 0.0h; + half res = 0.78515625h; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/atan/a7ba61.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/atan/a7ba61.wgsl.expected.spvasm index 7ff9f39113..8e2d6b5357 100644 --- a/test/tint/builtins/gen/literal/atan/a7ba61.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/atan/a7ba61.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -35,35 +35,36 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1_92pn1 = OpConstant %half 0x1.92p-1 %_ptr_Function_half = OpTypePointer Function %half - %17 = OpTypeFunction %v4float + %17 = OpConstantNull %half + %18 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %atan_a7ba61 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_half Function %14 - OpStore %res %14 + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %res %half_0x1_92pn1 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %17 - %19 = OpLabel - %20 = OpFunctionCall %void %atan_a7ba61 +%vertex_main_inner = OpFunction %v4float None %18 + %20 = OpLabel + %21 = OpFunctionCall %void %atan_a7ba61 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %22 = OpLabel - %23 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %23 + %23 = OpLabel + %24 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %24 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %atan_a7ba61 + %27 = OpLabel + %28 = OpFunctionCall %void %atan_a7ba61 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %atan_a7ba61 + %30 = OpLabel + %31 = OpFunctionCall %void %atan_a7ba61 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/atan/a7ba61.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/atan/a7ba61.wgsl.expected.wgsl index 891c5e3e7a..f589885d1d 100644 --- a/test/tint/builtins/gen/literal/atan/a7ba61.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/atan/a7ba61.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn atan_a7ba61() { - var res : f16 = atan(f16()); + var res : f16 = atan(1.0h); } @vertex diff --git a/test/tint/builtins/gen/literal/atan2/21dfea.wgsl b/test/tint/builtins/gen/literal/atan2/21dfea.wgsl index 5a1889f2b4..bd3fda3d91 100644 --- a/test/tint/builtins/gen/literal/atan2/21dfea.wgsl +++ b/test/tint/builtins/gen/literal/atan2/21dfea.wgsl @@ -25,7 +25,7 @@ enable f16; // fn atan2(vec<3, f16>, vec<3, f16>) -> vec<3, f16> fn atan2_21dfea() { - var res: vec3 = atan2(vec3(f16()), vec3(f16())); + var res: vec3 = atan2(vec3(1.h), vec3(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/atan2/21dfea.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atan2/21dfea.wgsl.expected.dxc.hlsl index f40c95d00a..e43a600e92 100644 --- a/test/tint/builtins/gen/literal/atan2/21dfea.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/atan2/21dfea.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void atan2_21dfea() { - vector res = (float16_t(0.0h)).xxx; + vector res = (float16_t(0.78515625h)).xxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/atan2/21dfea.wgsl.expected.glsl b/test/tint/builtins/gen/literal/atan2/21dfea.wgsl.expected.glsl index 489c3b5683..51b0410952 100644 --- a/test/tint/builtins/gen/literal/atan2/21dfea.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/atan2/21dfea.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void atan2_21dfea() { - f16vec3 res = f16vec3(0.0hf); + f16vec3 res = f16vec3(0.78515625hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void atan2_21dfea() { - f16vec3 res = f16vec3(0.0hf); + f16vec3 res = f16vec3(0.78515625hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void atan2_21dfea() { - f16vec3 res = f16vec3(0.0hf); + f16vec3 res = f16vec3(0.78515625hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/atan2/21dfea.wgsl.expected.msl b/test/tint/builtins/gen/literal/atan2/21dfea.wgsl.expected.msl index 871202c34e..bea4a82153 100644 --- a/test/tint/builtins/gen/literal/atan2/21dfea.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/atan2/21dfea.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void atan2_21dfea() { - half3 res = half3(0.0h); + half3 res = half3(0.78515625h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/atan2/21dfea.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/atan2/21dfea.wgsl.expected.spvasm index 25707d7867..57a1b0d486 100644 --- a/test/tint/builtins/gen/literal/atan2/21dfea.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/atan2/21dfea.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,35 +36,37 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1_92pn1 = OpConstant %half 0x1.92p-1 + %16 = OpConstantComposite %v3half %half_0x1_92pn1 %half_0x1_92pn1 %half_0x1_92pn1 %_ptr_Function_v3half = OpTypePointer Function %v3half - %18 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %atan2_21dfea = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %res %15 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %18 - %20 = OpLabel - %21 = OpFunctionCall %void %atan2_21dfea +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %atan2_21dfea OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %23 = OpLabel - %24 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %24 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %void %atan2_21dfea + %29 = OpLabel + %30 = OpFunctionCall %void %atan2_21dfea OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %atan2_21dfea + %32 = OpLabel + %33 = OpFunctionCall %void %atan2_21dfea OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/atan2/21dfea.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/atan2/21dfea.wgsl.expected.wgsl index a5251d4e57..9e00206929 100644 --- a/test/tint/builtins/gen/literal/atan2/21dfea.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/atan2/21dfea.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn atan2_21dfea() { - var res : vec3 = atan2(vec3(f16()), vec3(f16())); + var res : vec3 = atan2(vec3(1.0h), vec3(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/atan2/93febc.wgsl b/test/tint/builtins/gen/literal/atan2/93febc.wgsl index 6a5abcb1c1..26219a8d21 100644 --- a/test/tint/builtins/gen/literal/atan2/93febc.wgsl +++ b/test/tint/builtins/gen/literal/atan2/93febc.wgsl @@ -25,7 +25,7 @@ enable f16; // fn atan2(vec<2, f16>, vec<2, f16>) -> vec<2, f16> fn atan2_93febc() { - var res: vec2 = atan2(vec2(f16()), vec2(f16())); + var res: vec2 = atan2(vec2(1.h), vec2(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/atan2/93febc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atan2/93febc.wgsl.expected.dxc.hlsl index 29acbb210f..8c872a08fa 100644 --- a/test/tint/builtins/gen/literal/atan2/93febc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/atan2/93febc.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void atan2_93febc() { - vector res = (float16_t(0.0h)).xx; + vector res = (float16_t(0.78515625h)).xx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/atan2/93febc.wgsl.expected.glsl b/test/tint/builtins/gen/literal/atan2/93febc.wgsl.expected.glsl index 1de833b62c..a3692f6fa1 100644 --- a/test/tint/builtins/gen/literal/atan2/93febc.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/atan2/93febc.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void atan2_93febc() { - f16vec2 res = f16vec2(0.0hf); + f16vec2 res = f16vec2(0.78515625hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void atan2_93febc() { - f16vec2 res = f16vec2(0.0hf); + f16vec2 res = f16vec2(0.78515625hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void atan2_93febc() { - f16vec2 res = f16vec2(0.0hf); + f16vec2 res = f16vec2(0.78515625hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/atan2/93febc.wgsl.expected.msl b/test/tint/builtins/gen/literal/atan2/93febc.wgsl.expected.msl index 7f6e188aef..1c73f44302 100644 --- a/test/tint/builtins/gen/literal/atan2/93febc.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/atan2/93febc.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void atan2_93febc() { - half2 res = half2(0.0h); + half2 res = half2(0.78515625h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/atan2/93febc.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/atan2/93febc.wgsl.expected.spvasm index 4404d85411..40fbed8010 100644 --- a/test/tint/builtins/gen/literal/atan2/93febc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/atan2/93febc.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,35 +36,37 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1_92pn1 = OpConstant %half 0x1.92p-1 + %16 = OpConstantComposite %v2half %half_0x1_92pn1 %half_0x1_92pn1 %_ptr_Function_v2half = OpTypePointer Function %v2half - %18 = OpTypeFunction %v4float + %19 = OpConstantNull %v2half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %atan2_93febc = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %res %15 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %18 - %20 = OpLabel - %21 = OpFunctionCall %void %atan2_93febc +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %atan2_93febc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %23 = OpLabel - %24 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %24 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %void %atan2_93febc + %29 = OpLabel + %30 = OpFunctionCall %void %atan2_93febc OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %atan2_93febc + %32 = OpLabel + %33 = OpFunctionCall %void %atan2_93febc OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/atan2/93febc.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/atan2/93febc.wgsl.expected.wgsl index 23d923aec6..bc501ed6b0 100644 --- a/test/tint/builtins/gen/literal/atan2/93febc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/atan2/93febc.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn atan2_93febc() { - var res : vec2 = atan2(vec2(f16()), vec2(f16())); + var res : vec2 = atan2(vec2(1.0h), vec2(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/atan2/ca698e.wgsl b/test/tint/builtins/gen/literal/atan2/ca698e.wgsl index c22ba397cb..06f7c6bf3f 100644 --- a/test/tint/builtins/gen/literal/atan2/ca698e.wgsl +++ b/test/tint/builtins/gen/literal/atan2/ca698e.wgsl @@ -25,7 +25,7 @@ enable f16; // fn atan2(f16, f16) -> f16 fn atan2_ca698e() { - var res: f16 = atan2(f16(), f16()); + var res: f16 = atan2(1.h, 1.h); } @vertex diff --git a/test/tint/builtins/gen/literal/atan2/ca698e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atan2/ca698e.wgsl.expected.dxc.hlsl index 68471d9206..f6e9588412 100644 --- a/test/tint/builtins/gen/literal/atan2/ca698e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/atan2/ca698e.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void atan2_ca698e() { - float16_t res = float16_t(0.0h); + float16_t res = float16_t(0.78515625h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/atan2/ca698e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/atan2/ca698e.wgsl.expected.glsl index d310b708f9..244e8ebfa5 100644 --- a/test/tint/builtins/gen/literal/atan2/ca698e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/atan2/ca698e.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void atan2_ca698e() { - float16_t res = 0.0hf; + float16_t res = 0.78515625hf; } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void atan2_ca698e() { - float16_t res = 0.0hf; + float16_t res = 0.78515625hf; } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void atan2_ca698e() { - float16_t res = 0.0hf; + float16_t res = 0.78515625hf; } void compute_main() { diff --git a/test/tint/builtins/gen/literal/atan2/ca698e.wgsl.expected.msl b/test/tint/builtins/gen/literal/atan2/ca698e.wgsl.expected.msl index f4e7539422..a875213975 100644 --- a/test/tint/builtins/gen/literal/atan2/ca698e.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/atan2/ca698e.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void atan2_ca698e() { - half res = 0.0h; + half res = 0.78515625h; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/atan2/ca698e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/atan2/ca698e.wgsl.expected.spvasm index 63ae0e46a5..dee8585874 100644 --- a/test/tint/builtins/gen/literal/atan2/ca698e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/atan2/ca698e.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -35,35 +35,36 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1_92pn1 = OpConstant %half 0x1.92p-1 %_ptr_Function_half = OpTypePointer Function %half - %17 = OpTypeFunction %v4float + %17 = OpConstantNull %half + %18 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %atan2_ca698e = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_half Function %14 - OpStore %res %14 + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %res %half_0x1_92pn1 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %17 - %19 = OpLabel - %20 = OpFunctionCall %void %atan2_ca698e +%vertex_main_inner = OpFunction %v4float None %18 + %20 = OpLabel + %21 = OpFunctionCall %void %atan2_ca698e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %22 = OpLabel - %23 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %23 + %23 = OpLabel + %24 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %24 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %atan2_ca698e + %27 = OpLabel + %28 = OpFunctionCall %void %atan2_ca698e OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %atan2_ca698e + %30 = OpLabel + %31 = OpFunctionCall %void %atan2_ca698e OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/atan2/ca698e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/atan2/ca698e.wgsl.expected.wgsl index fe62d18d96..26f362d3aa 100644 --- a/test/tint/builtins/gen/literal/atan2/ca698e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/atan2/ca698e.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn atan2_ca698e() { - var res : f16 = atan2(f16(), f16()); + var res : f16 = atan2(1.0h, 1.0h); } @vertex diff --git a/test/tint/builtins/gen/literal/atan2/d983ab.wgsl b/test/tint/builtins/gen/literal/atan2/d983ab.wgsl index bc8410c862..c4f18a7a82 100644 --- a/test/tint/builtins/gen/literal/atan2/d983ab.wgsl +++ b/test/tint/builtins/gen/literal/atan2/d983ab.wgsl @@ -25,7 +25,7 @@ enable f16; // fn atan2(vec<4, f16>, vec<4, f16>) -> vec<4, f16> fn atan2_d983ab() { - var res: vec4 = atan2(vec4(f16()), vec4(f16())); + var res: vec4 = atan2(vec4(1.h), vec4(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/atan2/d983ab.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atan2/d983ab.wgsl.expected.dxc.hlsl index b7ee7943bb..12db57910a 100644 --- a/test/tint/builtins/gen/literal/atan2/d983ab.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/atan2/d983ab.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void atan2_d983ab() { - vector res = (float16_t(0.0h)).xxxx; + vector res = (float16_t(0.78515625h)).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/atan2/d983ab.wgsl.expected.glsl b/test/tint/builtins/gen/literal/atan2/d983ab.wgsl.expected.glsl index 6f6529db5b..0c70c9016e 100644 --- a/test/tint/builtins/gen/literal/atan2/d983ab.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/atan2/d983ab.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void atan2_d983ab() { - f16vec4 res = f16vec4(0.0hf); + f16vec4 res = f16vec4(0.78515625hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void atan2_d983ab() { - f16vec4 res = f16vec4(0.0hf); + f16vec4 res = f16vec4(0.78515625hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void atan2_d983ab() { - f16vec4 res = f16vec4(0.0hf); + f16vec4 res = f16vec4(0.78515625hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/atan2/d983ab.wgsl.expected.msl b/test/tint/builtins/gen/literal/atan2/d983ab.wgsl.expected.msl index 227ba1f722..dbd659fb5d 100644 --- a/test/tint/builtins/gen/literal/atan2/d983ab.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/atan2/d983ab.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void atan2_d983ab() { - half4 res = half4(0.0h); + half4 res = half4(0.78515625h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/atan2/d983ab.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/atan2/d983ab.wgsl.expected.spvasm index d6c52b97a3..d0060ea87d 100644 --- a/test/tint/builtins/gen/literal/atan2/d983ab.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/atan2/d983ab.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,35 +36,37 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1_92pn1 = OpConstant %half 0x1.92p-1 + %16 = OpConstantComposite %v4half %half_0x1_92pn1 %half_0x1_92pn1 %half_0x1_92pn1 %half_0x1_92pn1 %_ptr_Function_v4half = OpTypePointer Function %v4half - %18 = OpTypeFunction %v4float + %19 = OpConstantNull %v4half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %atan2_d983ab = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %res %15 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %18 - %20 = OpLabel - %21 = OpFunctionCall %void %atan2_d983ab +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %atan2_d983ab OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %23 = OpLabel - %24 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %24 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %void %atan2_d983ab + %29 = OpLabel + %30 = OpFunctionCall %void %atan2_d983ab OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %atan2_d983ab + %32 = OpLabel + %33 = OpFunctionCall %void %atan2_d983ab OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/atan2/d983ab.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/atan2/d983ab.wgsl.expected.wgsl index 50719cb68f..29a290c68d 100644 --- a/test/tint/builtins/gen/literal/atan2/d983ab.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/atan2/d983ab.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn atan2_d983ab() { - var res : vec4 = atan2(vec4(f16()), vec4(f16())); + var res : vec4 = atan2(vec4(1.0h), vec4(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl b/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl index f82815681b..7dd84b6a88 100644 --- a/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl +++ b/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl @@ -25,7 +25,7 @@ enable f16; // fn atanh(vec<2, f16>) -> vec<2, f16> fn atanh_5bf88d() { - var res: vec2 = atanh(vec2(f16())); + var res: vec2 = atanh(vec2(0.5h)); } @vertex diff --git a/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl.expected.dxc.hlsl index 1ab477791d..f50d739ffe 100644 --- a/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void atanh_5bf88d() { - vector res = (float16_t(0.0h)).xx; + vector res = (float16_t(0.548828125h)).xx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl.expected.glsl index 17a23e66a9..2b14c65e3b 100644 --- a/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void atanh_5bf88d() { - f16vec2 res = f16vec2(0.0hf); + f16vec2 res = f16vec2(0.548828125hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void atanh_5bf88d() { - f16vec2 res = f16vec2(0.0hf); + f16vec2 res = f16vec2(0.548828125hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void atanh_5bf88d() { - f16vec2 res = f16vec2(0.0hf); + f16vec2 res = f16vec2(0.548828125hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl.expected.msl b/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl.expected.msl index eb31ae2b04..142f58e601 100644 --- a/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void atanh_5bf88d() { - half2 res = half2(0.0h); + half2 res = half2(0.548828125h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl.expected.spvasm index e89e54e6ee..3bc631f90d 100644 --- a/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,35 +36,37 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1_19pn1 = OpConstant %half 0x1.19p-1 + %16 = OpConstantComposite %v2half %half_0x1_19pn1 %half_0x1_19pn1 %_ptr_Function_v2half = OpTypePointer Function %v2half - %18 = OpTypeFunction %v4float + %19 = OpConstantNull %v2half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %atanh_5bf88d = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %res %15 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %18 - %20 = OpLabel - %21 = OpFunctionCall %void %atanh_5bf88d +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %atanh_5bf88d OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %23 = OpLabel - %24 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %24 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %void %atanh_5bf88d + %29 = OpLabel + %30 = OpFunctionCall %void %atanh_5bf88d OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %atanh_5bf88d + %32 = OpLabel + %33 = OpFunctionCall %void %atanh_5bf88d OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl.expected.wgsl index b399e07dc4..a4f24f6418 100644 --- a/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn atanh_5bf88d() { - var res : vec2 = atanh(vec2(f16())); + var res : vec2 = atanh(vec2(0.5h)); } @vertex diff --git a/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl b/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl index 2fa4e3c9fd..f3d7acd8a8 100644 --- a/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl +++ b/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl @@ -25,7 +25,7 @@ enable f16; // fn atanh(f16) -> f16 fn atanh_d2d8cd() { - var res: f16 = atanh(f16()); + var res: f16 = atanh(0.5h); } @vertex diff --git a/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl.expected.dxc.hlsl index d4b3294a8f..a915f4ed71 100644 --- a/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void atanh_d2d8cd() { - float16_t res = float16_t(0.0h); + float16_t res = float16_t(0.548828125h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl.expected.glsl b/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl.expected.glsl index 2164d934b2..7d40b3a4df 100644 --- a/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void atanh_d2d8cd() { - float16_t res = 0.0hf; + float16_t res = 0.548828125hf; } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void atanh_d2d8cd() { - float16_t res = 0.0hf; + float16_t res = 0.548828125hf; } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void atanh_d2d8cd() { - float16_t res = 0.0hf; + float16_t res = 0.548828125hf; } void compute_main() { diff --git a/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl.expected.msl b/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl.expected.msl index 8d4995a6a1..fecb05d1ea 100644 --- a/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void atanh_d2d8cd() { - half res = 0.0h; + half res = 0.548828125h; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl.expected.spvasm index 343a043793..3cf767bf8e 100644 --- a/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -35,35 +35,36 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1_19pn1 = OpConstant %half 0x1.19p-1 %_ptr_Function_half = OpTypePointer Function %half - %17 = OpTypeFunction %v4float + %17 = OpConstantNull %half + %18 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %atanh_d2d8cd = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_half Function %14 - OpStore %res %14 + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %res %half_0x1_19pn1 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %17 - %19 = OpLabel - %20 = OpFunctionCall %void %atanh_d2d8cd +%vertex_main_inner = OpFunction %v4float None %18 + %20 = OpLabel + %21 = OpFunctionCall %void %atanh_d2d8cd OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %22 = OpLabel - %23 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %23 + %23 = OpLabel + %24 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %24 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %atanh_d2d8cd + %27 = OpLabel + %28 = OpFunctionCall %void %atanh_d2d8cd OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %atanh_d2d8cd + %30 = OpLabel + %31 = OpFunctionCall %void %atanh_d2d8cd OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl.expected.wgsl index 7f127435af..a71dd5050d 100644 --- a/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn atanh_d2d8cd() { - var res : f16 = atanh(f16()); + var res : f16 = atanh(0.5h); } @vertex diff --git a/test/tint/builtins/gen/literal/atanh/e3b450.wgsl b/test/tint/builtins/gen/literal/atanh/e3b450.wgsl index 23c6e104ea..5cdfb19235 100644 --- a/test/tint/builtins/gen/literal/atanh/e3b450.wgsl +++ b/test/tint/builtins/gen/literal/atanh/e3b450.wgsl @@ -25,7 +25,7 @@ enable f16; // fn atanh(vec<4, f16>) -> vec<4, f16> fn atanh_e3b450() { - var res: vec4 = atanh(vec4(f16())); + var res: vec4 = atanh(vec4(0.5h)); } @vertex diff --git a/test/tint/builtins/gen/literal/atanh/e3b450.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atanh/e3b450.wgsl.expected.dxc.hlsl index f3ac16c604..ddfc0cedb9 100644 --- a/test/tint/builtins/gen/literal/atanh/e3b450.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/atanh/e3b450.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void atanh_e3b450() { - vector res = (float16_t(0.0h)).xxxx; + vector res = (float16_t(0.548828125h)).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/atanh/e3b450.wgsl.expected.glsl b/test/tint/builtins/gen/literal/atanh/e3b450.wgsl.expected.glsl index 73f8e70142..6f61acdcd1 100644 --- a/test/tint/builtins/gen/literal/atanh/e3b450.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/atanh/e3b450.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void atanh_e3b450() { - f16vec4 res = f16vec4(0.0hf); + f16vec4 res = f16vec4(0.548828125hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void atanh_e3b450() { - f16vec4 res = f16vec4(0.0hf); + f16vec4 res = f16vec4(0.548828125hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void atanh_e3b450() { - f16vec4 res = f16vec4(0.0hf); + f16vec4 res = f16vec4(0.548828125hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/atanh/e3b450.wgsl.expected.msl b/test/tint/builtins/gen/literal/atanh/e3b450.wgsl.expected.msl index b659da600c..585ed1c3d8 100644 --- a/test/tint/builtins/gen/literal/atanh/e3b450.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/atanh/e3b450.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void atanh_e3b450() { - half4 res = half4(0.0h); + half4 res = half4(0.548828125h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/atanh/e3b450.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/atanh/e3b450.wgsl.expected.spvasm index 64e46bdaa4..38694bb36c 100644 --- a/test/tint/builtins/gen/literal/atanh/e3b450.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/atanh/e3b450.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,35 +36,37 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1_19pn1 = OpConstant %half 0x1.19p-1 + %16 = OpConstantComposite %v4half %half_0x1_19pn1 %half_0x1_19pn1 %half_0x1_19pn1 %half_0x1_19pn1 %_ptr_Function_v4half = OpTypePointer Function %v4half - %18 = OpTypeFunction %v4float + %19 = OpConstantNull %v4half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %atanh_e3b450 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %res %15 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %18 - %20 = OpLabel - %21 = OpFunctionCall %void %atanh_e3b450 +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %atanh_e3b450 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %23 = OpLabel - %24 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %24 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %void %atanh_e3b450 + %29 = OpLabel + %30 = OpFunctionCall %void %atanh_e3b450 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %atanh_e3b450 + %32 = OpLabel + %33 = OpFunctionCall %void %atanh_e3b450 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/atanh/e3b450.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/atanh/e3b450.wgsl.expected.wgsl index d0a85777af..a2b2337a07 100644 --- a/test/tint/builtins/gen/literal/atanh/e3b450.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/atanh/e3b450.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn atanh_e3b450() { - var res : vec4 = atanh(vec4(f16())); + var res : vec4 = atanh(vec4(0.5h)); } @vertex diff --git a/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl b/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl index 708c3b3732..3995aab170 100644 --- a/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl +++ b/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl @@ -25,7 +25,7 @@ enable f16; // fn atanh(vec<3, f16>) -> vec<3, f16> fn atanh_ec4b06() { - var res: vec3 = atanh(vec3(f16())); + var res: vec3 = atanh(vec3(0.5h)); } @vertex diff --git a/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl.expected.dxc.hlsl index fc6fa462e0..a7a9231d0c 100644 --- a/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void atanh_ec4b06() { - vector res = (float16_t(0.0h)).xxx; + vector res = (float16_t(0.548828125h)).xxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl.expected.glsl b/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl.expected.glsl index fc4864988f..a9cbf80f19 100644 --- a/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void atanh_ec4b06() { - f16vec3 res = f16vec3(0.0hf); + f16vec3 res = f16vec3(0.548828125hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void atanh_ec4b06() { - f16vec3 res = f16vec3(0.0hf); + f16vec3 res = f16vec3(0.548828125hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void atanh_ec4b06() { - f16vec3 res = f16vec3(0.0hf); + f16vec3 res = f16vec3(0.548828125hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl.expected.msl b/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl.expected.msl index 12909485f1..5154b8c261 100644 --- a/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void atanh_ec4b06() { - half3 res = half3(0.0h); + half3 res = half3(0.548828125h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl.expected.spvasm index 49e6e5ae39..9842aa3531 100644 --- a/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,35 +36,37 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1_19pn1 = OpConstant %half 0x1.19p-1 + %16 = OpConstantComposite %v3half %half_0x1_19pn1 %half_0x1_19pn1 %half_0x1_19pn1 %_ptr_Function_v3half = OpTypePointer Function %v3half - %18 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %atanh_ec4b06 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %res %15 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %18 - %20 = OpLabel - %21 = OpFunctionCall %void %atanh_ec4b06 +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %atanh_ec4b06 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %23 = OpLabel - %24 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %24 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %void %atanh_ec4b06 + %29 = OpLabel + %30 = OpFunctionCall %void %atanh_ec4b06 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %atanh_ec4b06 + %32 = OpLabel + %33 = OpFunctionCall %void %atanh_ec4b06 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl.expected.wgsl index 4570d2ba66..26a5c3bd50 100644 --- a/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn atanh_ec4b06() { - var res : vec3 = atanh(vec3(f16())); + var res : vec3 = atanh(vec3(0.5h)); } @vertex diff --git a/test/tint/builtins/gen/literal/ceil/09bf52.wgsl b/test/tint/builtins/gen/literal/ceil/09bf52.wgsl index 6705f27d4b..d78383151d 100644 --- a/test/tint/builtins/gen/literal/ceil/09bf52.wgsl +++ b/test/tint/builtins/gen/literal/ceil/09bf52.wgsl @@ -25,7 +25,7 @@ enable f16; // fn ceil(vec<3, f16>) -> vec<3, f16> fn ceil_09bf52() { - var res: vec3 = ceil(vec3(f16())); + var res: vec3 = ceil(vec3(1.5h)); } @vertex diff --git a/test/tint/builtins/gen/literal/ceil/09bf52.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/ceil/09bf52.wgsl.expected.dxc.hlsl index 7bd42e4eef..375efffbd1 100644 --- a/test/tint/builtins/gen/literal/ceil/09bf52.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/ceil/09bf52.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void ceil_09bf52() { - vector res = (float16_t(0.0h)).xxx; + vector res = (float16_t(2.0h)).xxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/ceil/09bf52.wgsl.expected.glsl b/test/tint/builtins/gen/literal/ceil/09bf52.wgsl.expected.glsl index 48a58ee9df..ec5f3bc758 100644 --- a/test/tint/builtins/gen/literal/ceil/09bf52.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/ceil/09bf52.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void ceil_09bf52() { - f16vec3 res = f16vec3(0.0hf); + f16vec3 res = f16vec3(2.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void ceil_09bf52() { - f16vec3 res = f16vec3(0.0hf); + f16vec3 res = f16vec3(2.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void ceil_09bf52() { - f16vec3 res = f16vec3(0.0hf); + f16vec3 res = f16vec3(2.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/ceil/09bf52.wgsl.expected.msl b/test/tint/builtins/gen/literal/ceil/09bf52.wgsl.expected.msl index 8ff7786940..46a5ec36bb 100644 --- a/test/tint/builtins/gen/literal/ceil/09bf52.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/ceil/09bf52.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void ceil_09bf52() { - half3 res = half3(0.0h); + half3 res = half3(2.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/ceil/09bf52.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/ceil/09bf52.wgsl.expected.spvasm index 926482e1fc..049a6c86db 100644 --- a/test/tint/builtins/gen/literal/ceil/09bf52.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/ceil/09bf52.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,35 +36,37 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_1 = OpConstant %half 0x1p+1 + %16 = OpConstantComposite %v3half %half_0x1p_1 %half_0x1p_1 %half_0x1p_1 %_ptr_Function_v3half = OpTypePointer Function %v3half - %18 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %ceil_09bf52 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %res %15 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %18 - %20 = OpLabel - %21 = OpFunctionCall %void %ceil_09bf52 +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %ceil_09bf52 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %23 = OpLabel - %24 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %24 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %void %ceil_09bf52 + %29 = OpLabel + %30 = OpFunctionCall %void %ceil_09bf52 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %ceil_09bf52 + %32 = OpLabel + %33 = OpFunctionCall %void %ceil_09bf52 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/ceil/09bf52.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/ceil/09bf52.wgsl.expected.wgsl index 1d5fc84e33..7c6fe63593 100644 --- a/test/tint/builtins/gen/literal/ceil/09bf52.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/ceil/09bf52.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn ceil_09bf52() { - var res : vec3 = ceil(vec3(f16())); + var res : vec3 = ceil(vec3(1.5h)); } @vertex diff --git a/test/tint/builtins/gen/literal/ceil/18c240.wgsl b/test/tint/builtins/gen/literal/ceil/18c240.wgsl index 002bcdc5fc..59ea5c4272 100644 --- a/test/tint/builtins/gen/literal/ceil/18c240.wgsl +++ b/test/tint/builtins/gen/literal/ceil/18c240.wgsl @@ -25,7 +25,7 @@ enable f16; // fn ceil(vec<2, f16>) -> vec<2, f16> fn ceil_18c240() { - var res: vec2 = ceil(vec2(f16())); + var res: vec2 = ceil(vec2(1.5h)); } @vertex diff --git a/test/tint/builtins/gen/literal/ceil/18c240.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/ceil/18c240.wgsl.expected.dxc.hlsl index 7d4e24b426..4b5e394fdd 100644 --- a/test/tint/builtins/gen/literal/ceil/18c240.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/ceil/18c240.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void ceil_18c240() { - vector res = (float16_t(0.0h)).xx; + vector res = (float16_t(2.0h)).xx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/ceil/18c240.wgsl.expected.glsl b/test/tint/builtins/gen/literal/ceil/18c240.wgsl.expected.glsl index b63b07a29c..fca89d9e90 100644 --- a/test/tint/builtins/gen/literal/ceil/18c240.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/ceil/18c240.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void ceil_18c240() { - f16vec2 res = f16vec2(0.0hf); + f16vec2 res = f16vec2(2.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void ceil_18c240() { - f16vec2 res = f16vec2(0.0hf); + f16vec2 res = f16vec2(2.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void ceil_18c240() { - f16vec2 res = f16vec2(0.0hf); + f16vec2 res = f16vec2(2.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/ceil/18c240.wgsl.expected.msl b/test/tint/builtins/gen/literal/ceil/18c240.wgsl.expected.msl index 9e480ef75c..8881bb76eb 100644 --- a/test/tint/builtins/gen/literal/ceil/18c240.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/ceil/18c240.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void ceil_18c240() { - half2 res = half2(0.0h); + half2 res = half2(2.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/ceil/18c240.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/ceil/18c240.wgsl.expected.spvasm index 7fe9ff42ad..2207042d13 100644 --- a/test/tint/builtins/gen/literal/ceil/18c240.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/ceil/18c240.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,35 +36,37 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1p_1 = OpConstant %half 0x1p+1 + %16 = OpConstantComposite %v2half %half_0x1p_1 %half_0x1p_1 %_ptr_Function_v2half = OpTypePointer Function %v2half - %18 = OpTypeFunction %v4float + %19 = OpConstantNull %v2half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %ceil_18c240 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %res %15 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %18 - %20 = OpLabel - %21 = OpFunctionCall %void %ceil_18c240 +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %ceil_18c240 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %23 = OpLabel - %24 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %24 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %void %ceil_18c240 + %29 = OpLabel + %30 = OpFunctionCall %void %ceil_18c240 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %ceil_18c240 + %32 = OpLabel + %33 = OpFunctionCall %void %ceil_18c240 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/ceil/18c240.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/ceil/18c240.wgsl.expected.wgsl index dad05fe866..559f2e57b1 100644 --- a/test/tint/builtins/gen/literal/ceil/18c240.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/ceil/18c240.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn ceil_18c240() { - var res : vec2 = ceil(vec2(f16())); + var res : vec2 = ceil(vec2(1.5h)); } @vertex diff --git a/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl b/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl index 0e7ce3cbf9..6ee53d96c0 100644 --- a/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl +++ b/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl @@ -25,7 +25,7 @@ enable f16; // fn ceil(vec<4, f16>) -> vec<4, f16> fn ceil_4bca2a() { - var res: vec4 = ceil(vec4(f16())); + var res: vec4 = ceil(vec4(1.5h)); } @vertex diff --git a/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl.expected.dxc.hlsl index ba26727629..f7c44b6d7c 100644 --- a/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void ceil_4bca2a() { - vector res = (float16_t(0.0h)).xxxx; + vector res = (float16_t(2.0h)).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl.expected.glsl index ff7d3d7ddc..221237f091 100644 --- a/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void ceil_4bca2a() { - f16vec4 res = f16vec4(0.0hf); + f16vec4 res = f16vec4(2.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void ceil_4bca2a() { - f16vec4 res = f16vec4(0.0hf); + f16vec4 res = f16vec4(2.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void ceil_4bca2a() { - f16vec4 res = f16vec4(0.0hf); + f16vec4 res = f16vec4(2.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl.expected.msl b/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl.expected.msl index 046f92d5b0..d870cea7e7 100644 --- a/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void ceil_4bca2a() { - half4 res = half4(0.0h); + half4 res = half4(2.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl.expected.spvasm index abbd917ab7..cff6dd3638 100644 --- a/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,35 +36,37 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1p_1 = OpConstant %half 0x1p+1 + %16 = OpConstantComposite %v4half %half_0x1p_1 %half_0x1p_1 %half_0x1p_1 %half_0x1p_1 %_ptr_Function_v4half = OpTypePointer Function %v4half - %18 = OpTypeFunction %v4float + %19 = OpConstantNull %v4half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %ceil_4bca2a = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %res %15 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %18 - %20 = OpLabel - %21 = OpFunctionCall %void %ceil_4bca2a +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %ceil_4bca2a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %23 = OpLabel - %24 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %24 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %void %ceil_4bca2a + %29 = OpLabel + %30 = OpFunctionCall %void %ceil_4bca2a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %ceil_4bca2a + %32 = OpLabel + %33 = OpFunctionCall %void %ceil_4bca2a OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl.expected.wgsl index 881715fa57..01463782f7 100644 --- a/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn ceil_4bca2a() { - var res : vec4 = ceil(vec4(f16())); + var res : vec4 = ceil(vec4(1.5h)); } @vertex diff --git a/test/tint/builtins/gen/literal/ceil/f3f889.wgsl b/test/tint/builtins/gen/literal/ceil/f3f889.wgsl index 439e88e183..c494500a57 100644 --- a/test/tint/builtins/gen/literal/ceil/f3f889.wgsl +++ b/test/tint/builtins/gen/literal/ceil/f3f889.wgsl @@ -25,7 +25,7 @@ enable f16; // fn ceil(f16) -> f16 fn ceil_f3f889() { - var res: f16 = ceil(f16()); + var res: f16 = ceil(1.5h); } @vertex diff --git a/test/tint/builtins/gen/literal/ceil/f3f889.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/ceil/f3f889.wgsl.expected.dxc.hlsl index 1dbabc67f4..8ffd6618b2 100644 --- a/test/tint/builtins/gen/literal/ceil/f3f889.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/ceil/f3f889.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void ceil_f3f889() { - float16_t res = float16_t(0.0h); + float16_t res = float16_t(2.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/ceil/f3f889.wgsl.expected.glsl b/test/tint/builtins/gen/literal/ceil/f3f889.wgsl.expected.glsl index dffe515ba3..ae674d56c9 100644 --- a/test/tint/builtins/gen/literal/ceil/f3f889.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/ceil/f3f889.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void ceil_f3f889() { - float16_t res = 0.0hf; + float16_t res = 2.0hf; } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void ceil_f3f889() { - float16_t res = 0.0hf; + float16_t res = 2.0hf; } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void ceil_f3f889() { - float16_t res = 0.0hf; + float16_t res = 2.0hf; } void compute_main() { diff --git a/test/tint/builtins/gen/literal/ceil/f3f889.wgsl.expected.msl b/test/tint/builtins/gen/literal/ceil/f3f889.wgsl.expected.msl index 214d57035a..4f3948a2b8 100644 --- a/test/tint/builtins/gen/literal/ceil/f3f889.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/ceil/f3f889.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void ceil_f3f889() { - half res = 0.0h; + half res = 2.0h; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/ceil/f3f889.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/ceil/f3f889.wgsl.expected.spvasm index 2f13171338..dda48729ce 100644 --- a/test/tint/builtins/gen/literal/ceil/f3f889.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/ceil/f3f889.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -35,35 +35,36 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1p_1 = OpConstant %half 0x1p+1 %_ptr_Function_half = OpTypePointer Function %half - %17 = OpTypeFunction %v4float + %17 = OpConstantNull %half + %18 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %ceil_f3f889 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_half Function %14 - OpStore %res %14 + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %res %half_0x1p_1 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %17 - %19 = OpLabel - %20 = OpFunctionCall %void %ceil_f3f889 +%vertex_main_inner = OpFunction %v4float None %18 + %20 = OpLabel + %21 = OpFunctionCall %void %ceil_f3f889 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %22 = OpLabel - %23 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %23 + %23 = OpLabel + %24 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %24 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %ceil_f3f889 + %27 = OpLabel + %28 = OpFunctionCall %void %ceil_f3f889 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %ceil_f3f889 + %30 = OpLabel + %31 = OpFunctionCall %void %ceil_f3f889 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/ceil/f3f889.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/ceil/f3f889.wgsl.expected.wgsl index 288d3c2882..300bb86175 100644 --- a/test/tint/builtins/gen/literal/ceil/f3f889.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/ceil/f3f889.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn ceil_f3f889() { - var res : f16 = ceil(f16()); + var res : f16 = ceil(1.5h); } @vertex diff --git a/test/tint/builtins/gen/literal/clamp/235b29.wgsl b/test/tint/builtins/gen/literal/clamp/235b29.wgsl index fcb634e934..59e9629e9c 100644 --- a/test/tint/builtins/gen/literal/clamp/235b29.wgsl +++ b/test/tint/builtins/gen/literal/clamp/235b29.wgsl @@ -25,7 +25,7 @@ enable f16; // fn clamp(vec<2, f16>, vec<2, f16>, vec<2, f16>) -> vec<2, f16> fn clamp_235b29() { - var res: vec2 = clamp(vec2(f16()), vec2(f16()), vec2(f16())); + var res: vec2 = clamp(vec2(1.h), vec2(1.h), vec2(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/clamp/235b29.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/clamp/235b29.wgsl.expected.dxc.hlsl index 02fc88275c..689753da0f 100644 --- a/test/tint/builtins/gen/literal/clamp/235b29.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/clamp/235b29.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void clamp_235b29() { - vector res = (float16_t(0.0h)).xx; + vector res = (float16_t(1.0h)).xx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/235b29.wgsl.expected.glsl b/test/tint/builtins/gen/literal/clamp/235b29.wgsl.expected.glsl index 3a90e739c0..5ca5bcc7a7 100644 --- a/test/tint/builtins/gen/literal/clamp/235b29.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/clamp/235b29.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void clamp_235b29() { - f16vec2 res = f16vec2(0.0hf); + f16vec2 res = f16vec2(1.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void clamp_235b29() { - f16vec2 res = f16vec2(0.0hf); + f16vec2 res = f16vec2(1.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void clamp_235b29() { - f16vec2 res = f16vec2(0.0hf); + f16vec2 res = f16vec2(1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/clamp/235b29.wgsl.expected.msl b/test/tint/builtins/gen/literal/clamp/235b29.wgsl.expected.msl index cd5723f4c5..e16b9e73eb 100644 --- a/test/tint/builtins/gen/literal/clamp/235b29.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/clamp/235b29.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void clamp_235b29() { - half2 res = half2(0.0h); + half2 res = half2(1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/235b29.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/clamp/235b29.wgsl.expected.spvasm index 70a6d4920f..6bc85643ca 100644 --- a/test/tint/builtins/gen/literal/clamp/235b29.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/clamp/235b29.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,35 +36,37 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %18 = OpTypeFunction %v4float + %19 = OpConstantNull %v2half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %clamp_235b29 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %res %15 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %18 - %20 = OpLabel - %21 = OpFunctionCall %void %clamp_235b29 +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %clamp_235b29 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %23 = OpLabel - %24 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %24 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %void %clamp_235b29 + %29 = OpLabel + %30 = OpFunctionCall %void %clamp_235b29 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %clamp_235b29 + %32 = OpLabel + %33 = OpFunctionCall %void %clamp_235b29 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/clamp/235b29.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/clamp/235b29.wgsl.expected.wgsl index ba5303c1c6..9f3cf424ad 100644 --- a/test/tint/builtins/gen/literal/clamp/235b29.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/clamp/235b29.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn clamp_235b29() { - var res : vec2 = clamp(vec2(f16()), vec2(f16()), vec2(f16())); + var res : vec2 = clamp(vec2(1.0h), vec2(1.0h), vec2(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/clamp/2c251b.wgsl b/test/tint/builtins/gen/literal/clamp/2c251b.wgsl index 9c5f382a57..d46e3073d4 100644 --- a/test/tint/builtins/gen/literal/clamp/2c251b.wgsl +++ b/test/tint/builtins/gen/literal/clamp/2c251b.wgsl @@ -25,7 +25,7 @@ enable f16; // fn clamp(vec<4, f16>, vec<4, f16>, vec<4, f16>) -> vec<4, f16> fn clamp_2c251b() { - var res: vec4 = clamp(vec4(f16()), vec4(f16()), vec4(f16())); + var res: vec4 = clamp(vec4(1.h), vec4(1.h), vec4(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/clamp/2c251b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/clamp/2c251b.wgsl.expected.dxc.hlsl index 79e81c9619..e790a46d23 100644 --- a/test/tint/builtins/gen/literal/clamp/2c251b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/clamp/2c251b.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void clamp_2c251b() { - vector res = (float16_t(0.0h)).xxxx; + vector res = (float16_t(1.0h)).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/2c251b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/clamp/2c251b.wgsl.expected.glsl index e1cfbbe948..3044fefa57 100644 --- a/test/tint/builtins/gen/literal/clamp/2c251b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/clamp/2c251b.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void clamp_2c251b() { - f16vec4 res = f16vec4(0.0hf); + f16vec4 res = f16vec4(1.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void clamp_2c251b() { - f16vec4 res = f16vec4(0.0hf); + f16vec4 res = f16vec4(1.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void clamp_2c251b() { - f16vec4 res = f16vec4(0.0hf); + f16vec4 res = f16vec4(1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/clamp/2c251b.wgsl.expected.msl b/test/tint/builtins/gen/literal/clamp/2c251b.wgsl.expected.msl index 5168d3d93d..a3a99b3c11 100644 --- a/test/tint/builtins/gen/literal/clamp/2c251b.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/clamp/2c251b.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void clamp_2c251b() { - half4 res = half4(0.0h); + half4 res = half4(1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/2c251b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/clamp/2c251b.wgsl.expected.spvasm index 8c74f7d3cb..c179c90080 100644 --- a/test/tint/builtins/gen/literal/clamp/2c251b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/clamp/2c251b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,35 +36,37 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %18 = OpTypeFunction %v4float + %19 = OpConstantNull %v4half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %clamp_2c251b = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %res %15 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %18 - %20 = OpLabel - %21 = OpFunctionCall %void %clamp_2c251b +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %clamp_2c251b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %23 = OpLabel - %24 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %24 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %void %clamp_2c251b + %29 = OpLabel + %30 = OpFunctionCall %void %clamp_2c251b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %clamp_2c251b + %32 = OpLabel + %33 = OpFunctionCall %void %clamp_2c251b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/clamp/2c251b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/clamp/2c251b.wgsl.expected.wgsl index 15be6c8080..b7e50a0a89 100644 --- a/test/tint/builtins/gen/literal/clamp/2c251b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/clamp/2c251b.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn clamp_2c251b() { - var res : vec4 = clamp(vec4(f16()), vec4(f16()), vec4(f16())); + var res : vec4 = clamp(vec4(1.0h), vec4(1.0h), vec4(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/clamp/553ffb.wgsl b/test/tint/builtins/gen/literal/clamp/553ffb.wgsl index b6f3eb9257..62e2d980fc 100644 --- a/test/tint/builtins/gen/literal/clamp/553ffb.wgsl +++ b/test/tint/builtins/gen/literal/clamp/553ffb.wgsl @@ -25,7 +25,7 @@ enable f16; // fn clamp(f16, f16, f16) -> f16 fn clamp_553ffb() { - var res: f16 = clamp(f16(), f16(), f16()); + var res: f16 = clamp(1.h, 1.h, 1.h); } @vertex diff --git a/test/tint/builtins/gen/literal/clamp/553ffb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/clamp/553ffb.wgsl.expected.dxc.hlsl index 0343bfd45b..13664d086b 100644 --- a/test/tint/builtins/gen/literal/clamp/553ffb.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/clamp/553ffb.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void clamp_553ffb() { - float16_t res = float16_t(0.0h); + float16_t res = float16_t(1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/553ffb.wgsl.expected.glsl b/test/tint/builtins/gen/literal/clamp/553ffb.wgsl.expected.glsl index 060c13f3c4..58b0e15224 100644 --- a/test/tint/builtins/gen/literal/clamp/553ffb.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/clamp/553ffb.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void clamp_553ffb() { - float16_t res = 0.0hf; + float16_t res = 1.0hf; } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void clamp_553ffb() { - float16_t res = 0.0hf; + float16_t res = 1.0hf; } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void clamp_553ffb() { - float16_t res = 0.0hf; + float16_t res = 1.0hf; } void compute_main() { diff --git a/test/tint/builtins/gen/literal/clamp/553ffb.wgsl.expected.msl b/test/tint/builtins/gen/literal/clamp/553ffb.wgsl.expected.msl index 34e8f69f00..72b5e78779 100644 --- a/test/tint/builtins/gen/literal/clamp/553ffb.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/clamp/553ffb.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void clamp_553ffb() { - half res = 0.0h; + half res = 1.0h; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/553ffb.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/clamp/553ffb.wgsl.expected.spvasm index c4abe0dd4a..e36bfdb8f4 100644 --- a/test/tint/builtins/gen/literal/clamp/553ffb.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/clamp/553ffb.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -35,35 +35,36 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %17 = OpTypeFunction %v4float + %17 = OpConstantNull %half + %18 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %clamp_553ffb = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_half Function %14 - OpStore %res %14 + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %res %half_0x1p_0 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %17 - %19 = OpLabel - %20 = OpFunctionCall %void %clamp_553ffb +%vertex_main_inner = OpFunction %v4float None %18 + %20 = OpLabel + %21 = OpFunctionCall %void %clamp_553ffb OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %22 = OpLabel - %23 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %23 + %23 = OpLabel + %24 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %24 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %clamp_553ffb + %27 = OpLabel + %28 = OpFunctionCall %void %clamp_553ffb OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %clamp_553ffb + %30 = OpLabel + %31 = OpFunctionCall %void %clamp_553ffb OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/clamp/553ffb.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/clamp/553ffb.wgsl.expected.wgsl index 48f3ab3692..51e5047025 100644 --- a/test/tint/builtins/gen/literal/clamp/553ffb.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/clamp/553ffb.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn clamp_553ffb() { - var res : f16 = clamp(f16(), f16(), f16()); + var res : f16 = clamp(1.0h, 1.0h, 1.0h); } @vertex diff --git a/test/tint/builtins/gen/literal/clamp/b195eb.wgsl b/test/tint/builtins/gen/literal/clamp/b195eb.wgsl index f03c28a98b..10e7a357b6 100644 --- a/test/tint/builtins/gen/literal/clamp/b195eb.wgsl +++ b/test/tint/builtins/gen/literal/clamp/b195eb.wgsl @@ -25,7 +25,7 @@ enable f16; // fn clamp(vec<3, f16>, vec<3, f16>, vec<3, f16>) -> vec<3, f16> fn clamp_b195eb() { - var res: vec3 = clamp(vec3(f16()), vec3(f16()), vec3(f16())); + var res: vec3 = clamp(vec3(1.h), vec3(1.h), vec3(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/clamp/b195eb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/clamp/b195eb.wgsl.expected.dxc.hlsl index c94442f095..251c2154a5 100644 --- a/test/tint/builtins/gen/literal/clamp/b195eb.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/clamp/b195eb.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void clamp_b195eb() { - vector res = (float16_t(0.0h)).xxx; + vector res = (float16_t(1.0h)).xxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/b195eb.wgsl.expected.glsl b/test/tint/builtins/gen/literal/clamp/b195eb.wgsl.expected.glsl index 500588f1fb..887817bcfb 100644 --- a/test/tint/builtins/gen/literal/clamp/b195eb.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/clamp/b195eb.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void clamp_b195eb() { - f16vec3 res = f16vec3(0.0hf); + f16vec3 res = f16vec3(1.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void clamp_b195eb() { - f16vec3 res = f16vec3(0.0hf); + f16vec3 res = f16vec3(1.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void clamp_b195eb() { - f16vec3 res = f16vec3(0.0hf); + f16vec3 res = f16vec3(1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/clamp/b195eb.wgsl.expected.msl b/test/tint/builtins/gen/literal/clamp/b195eb.wgsl.expected.msl index 58d111aa08..0570ea12f5 100644 --- a/test/tint/builtins/gen/literal/clamp/b195eb.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/clamp/b195eb.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void clamp_b195eb() { - half3 res = half3(0.0h); + half3 res = half3(1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/b195eb.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/clamp/b195eb.wgsl.expected.spvasm index 4beb74d53a..066e6d4953 100644 --- a/test/tint/builtins/gen/literal/clamp/b195eb.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/clamp/b195eb.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,35 +36,37 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %18 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %clamp_b195eb = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %res %15 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %18 - %20 = OpLabel - %21 = OpFunctionCall %void %clamp_b195eb +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %clamp_b195eb OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %23 = OpLabel - %24 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %24 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %void %clamp_b195eb + %29 = OpLabel + %30 = OpFunctionCall %void %clamp_b195eb OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %clamp_b195eb + %32 = OpLabel + %33 = OpFunctionCall %void %clamp_b195eb OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/clamp/b195eb.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/clamp/b195eb.wgsl.expected.wgsl index bd88ab4fed..dc537e08ce 100644 --- a/test/tint/builtins/gen/literal/clamp/b195eb.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/clamp/b195eb.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn clamp_b195eb() { - var res : vec3 = clamp(vec3(f16()), vec3(f16()), vec3(f16())); + var res : vec3 = clamp(vec3(1.0h), vec3(1.0h), vec3(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/cos/0835a8.wgsl b/test/tint/builtins/gen/literal/cos/0835a8.wgsl index 07bd88811a..658ff3ffb1 100644 --- a/test/tint/builtins/gen/literal/cos/0835a8.wgsl +++ b/test/tint/builtins/gen/literal/cos/0835a8.wgsl @@ -25,7 +25,7 @@ enable f16; // fn cos(vec<3, f16>) -> vec<3, f16> fn cos_0835a8() { - var res: vec3 = cos(vec3(f16())); + var res: vec3 = cos(vec3(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/cos/0835a8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/cos/0835a8.wgsl.expected.dxc.hlsl index ef1328a2f3..41ab0488a4 100644 --- a/test/tint/builtins/gen/literal/cos/0835a8.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/cos/0835a8.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void cos_0835a8() { - vector res = cos((float16_t(0.0h)).xxx); + vector res = cos((float16_t(1.0h)).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/cos/0835a8.wgsl.expected.glsl b/test/tint/builtins/gen/literal/cos/0835a8.wgsl.expected.glsl index f8f69c4a1d..50495bb5ac 100644 --- a/test/tint/builtins/gen/literal/cos/0835a8.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/cos/0835a8.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void cos_0835a8() { - f16vec3 res = cos(f16vec3(0.0hf)); + f16vec3 res = cos(f16vec3(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void cos_0835a8() { - f16vec3 res = cos(f16vec3(0.0hf)); + f16vec3 res = cos(f16vec3(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void cos_0835a8() { - f16vec3 res = cos(f16vec3(0.0hf)); + f16vec3 res = cos(f16vec3(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/cos/0835a8.wgsl.expected.msl b/test/tint/builtins/gen/literal/cos/0835a8.wgsl.expected.msl index 790a32d15d..3f5c8a13d4 100644 --- a/test/tint/builtins/gen/literal/cos/0835a8.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/cos/0835a8.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void cos_0835a8() { - half3 res = cos(half3(0.0h)); + half3 res = cos(half3(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/cos/0835a8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/cos/0835a8.wgsl.expected.spvasm index d151e5cefd..1ea6d2667c 100644 --- a/test/tint/builtins/gen/literal/cos/0835a8.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/cos/0835a8.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %17 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v3half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %cos_0835a8 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3half Function %17 - %13 = OpExtInst %v3half %16 Cos %17 + %res = OpVariable %_ptr_Function_v3half Function %21 + %13 = OpExtInst %v3half %16 Cos %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %cos_0835a8 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %cos_0835a8 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %cos_0835a8 + %31 = OpLabel + %32 = OpFunctionCall %void %cos_0835a8 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %cos_0835a8 + %34 = OpLabel + %35 = OpFunctionCall %void %cos_0835a8 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/cos/0835a8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/cos/0835a8.wgsl.expected.wgsl index 94f028ab80..6ef5216d4f 100644 --- a/test/tint/builtins/gen/literal/cos/0835a8.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/cos/0835a8.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn cos_0835a8() { - var res : vec3 = cos(vec3(f16())); + var res : vec3 = cos(vec3(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/cos/0a89f7.wgsl b/test/tint/builtins/gen/literal/cos/0a89f7.wgsl index 6bcbb878a1..661ceb1b15 100644 --- a/test/tint/builtins/gen/literal/cos/0a89f7.wgsl +++ b/test/tint/builtins/gen/literal/cos/0a89f7.wgsl @@ -25,7 +25,7 @@ enable f16; // fn cos(vec<4, f16>) -> vec<4, f16> fn cos_0a89f7() { - var res: vec4 = cos(vec4(f16())); + var res: vec4 = cos(vec4(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/cos/0a89f7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/cos/0a89f7.wgsl.expected.dxc.hlsl index 2a00fd01fa..65a7dc437c 100644 --- a/test/tint/builtins/gen/literal/cos/0a89f7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/cos/0a89f7.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void cos_0a89f7() { - vector res = cos((float16_t(0.0h)).xxxx); + vector res = cos((float16_t(1.0h)).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/cos/0a89f7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/cos/0a89f7.wgsl.expected.glsl index 9daaaff23e..acc022218d 100644 --- a/test/tint/builtins/gen/literal/cos/0a89f7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/cos/0a89f7.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void cos_0a89f7() { - f16vec4 res = cos(f16vec4(0.0hf)); + f16vec4 res = cos(f16vec4(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void cos_0a89f7() { - f16vec4 res = cos(f16vec4(0.0hf)); + f16vec4 res = cos(f16vec4(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void cos_0a89f7() { - f16vec4 res = cos(f16vec4(0.0hf)); + f16vec4 res = cos(f16vec4(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/cos/0a89f7.wgsl.expected.msl b/test/tint/builtins/gen/literal/cos/0a89f7.wgsl.expected.msl index fe465acd64..d8c7d2426a 100644 --- a/test/tint/builtins/gen/literal/cos/0a89f7.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/cos/0a89f7.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void cos_0a89f7() { - half4 res = cos(half4(0.0h)); + half4 res = cos(half4(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/cos/0a89f7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/cos/0a89f7.wgsl.expected.spvasm index 5f966233f3..0f37534982 100644 --- a/test/tint/builtins/gen/literal/cos/0a89f7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/cos/0a89f7.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %17 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v4half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %cos_0a89f7 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4half Function %17 - %13 = OpExtInst %v4half %16 Cos %17 + %res = OpVariable %_ptr_Function_v4half Function %21 + %13 = OpExtInst %v4half %16 Cos %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %cos_0a89f7 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %cos_0a89f7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %cos_0a89f7 + %31 = OpLabel + %32 = OpFunctionCall %void %cos_0a89f7 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %cos_0a89f7 + %34 = OpLabel + %35 = OpFunctionCall %void %cos_0a89f7 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/cos/0a89f7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/cos/0a89f7.wgsl.expected.wgsl index 536f85f268..2617a7f81c 100644 --- a/test/tint/builtins/gen/literal/cos/0a89f7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/cos/0a89f7.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn cos_0a89f7() { - var res : vec4 = cos(vec4(f16())); + var res : vec4 = cos(vec4(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl b/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl index c233d3c67d..5bb51fa2c2 100644 --- a/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl +++ b/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl @@ -25,7 +25,7 @@ enable f16; // fn cos(vec<2, f16>) -> vec<2, f16> fn cos_5bc2c6() { - var res: vec2 = cos(vec2(f16())); + var res: vec2 = cos(vec2(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl.expected.dxc.hlsl index a27a2293f5..2bf3bea507 100644 --- a/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void cos_5bc2c6() { - vector res = cos((float16_t(0.0h)).xx); + vector res = cos((float16_t(1.0h)).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl.expected.glsl b/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl.expected.glsl index 6da1c94dd8..e0f5f471bf 100644 --- a/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void cos_5bc2c6() { - f16vec2 res = cos(f16vec2(0.0hf)); + f16vec2 res = cos(f16vec2(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void cos_5bc2c6() { - f16vec2 res = cos(f16vec2(0.0hf)); + f16vec2 res = cos(f16vec2(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void cos_5bc2c6() { - f16vec2 res = cos(f16vec2(0.0hf)); + f16vec2 res = cos(f16vec2(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl.expected.msl b/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl.expected.msl index 91434e1496..96d7029d7a 100644 --- a/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void cos_5bc2c6() { - half2 res = cos(half2(0.0h)); + half2 res = cos(half2(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl.expected.spvasm index 278c3e1150..3ad7b966ee 100644 --- a/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %17 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v2half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %cos_5bc2c6 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2half Function %17 - %13 = OpExtInst %v2half %16 Cos %17 + %res = OpVariable %_ptr_Function_v2half Function %21 + %13 = OpExtInst %v2half %16 Cos %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %cos_5bc2c6 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %cos_5bc2c6 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %cos_5bc2c6 + %31 = OpLabel + %32 = OpFunctionCall %void %cos_5bc2c6 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %cos_5bc2c6 + %34 = OpLabel + %35 = OpFunctionCall %void %cos_5bc2c6 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl.expected.wgsl index 2010e95cbd..fc78f888ea 100644 --- a/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn cos_5bc2c6() { - var res : vec2 = cos(vec2(f16())); + var res : vec2 = cos(vec2(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/cos/fc047d.wgsl b/test/tint/builtins/gen/literal/cos/fc047d.wgsl index 630e2fd3a3..d1adddbf52 100644 --- a/test/tint/builtins/gen/literal/cos/fc047d.wgsl +++ b/test/tint/builtins/gen/literal/cos/fc047d.wgsl @@ -25,7 +25,7 @@ enable f16; // fn cos(f16) -> f16 fn cos_fc047d() { - var res: f16 = cos(f16()); + var res: f16 = cos(1.h); } @vertex diff --git a/test/tint/builtins/gen/literal/cos/fc047d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/cos/fc047d.wgsl.expected.dxc.hlsl index f240327915..7064a16ad1 100644 --- a/test/tint/builtins/gen/literal/cos/fc047d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/cos/fc047d.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void cos_fc047d() { - float16_t res = cos(float16_t(0.0h)); + float16_t res = cos(float16_t(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/cos/fc047d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/cos/fc047d.wgsl.expected.glsl index 01af81ddf0..83be5ac455 100644 --- a/test/tint/builtins/gen/literal/cos/fc047d.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/cos/fc047d.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void cos_fc047d() { - float16_t res = cos(0.0hf); + float16_t res = cos(1.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void cos_fc047d() { - float16_t res = cos(0.0hf); + float16_t res = cos(1.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void cos_fc047d() { - float16_t res = cos(0.0hf); + float16_t res = cos(1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/cos/fc047d.wgsl.expected.msl b/test/tint/builtins/gen/literal/cos/fc047d.wgsl.expected.msl index e38b8e955a..e2a8560680 100644 --- a/test/tint/builtins/gen/literal/cos/fc047d.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/cos/fc047d.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void cos_fc047d() { - half res = cos(0.0h); + half res = cos(1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/cos/fc047d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/cos/fc047d.wgsl.expected.spvasm index d4c73fe0c1..7ddb4157a1 100644 --- a/test/tint/builtins/gen/literal/cos/fc047d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/cos/fc047d.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,36 +36,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %16 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %19 = OpTypeFunction %v4float + %19 = OpConstantNull %half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %cos_fc047d = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_half Function %16 - %13 = OpExtInst %half %15 Cos %16 + %res = OpVariable %_ptr_Function_half Function %19 + %13 = OpExtInst %half %15 Cos %half_0x1p_0 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %cos_fc047d +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %cos_fc047d OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %cos_fc047d + %29 = OpLabel + %30 = OpFunctionCall %void %cos_fc047d OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %cos_fc047d + %32 = OpLabel + %33 = OpFunctionCall %void %cos_fc047d OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/cos/fc047d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/cos/fc047d.wgsl.expected.wgsl index 5671f4cc1e..390ba278c8 100644 --- a/test/tint/builtins/gen/literal/cos/fc047d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/cos/fc047d.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn cos_fc047d() { - var res : f16 = cos(f16()); + var res : f16 = cos(1.0h); } @vertex diff --git a/test/tint/builtins/gen/literal/cosh/2ed778.wgsl b/test/tint/builtins/gen/literal/cosh/2ed778.wgsl index a8fcdf8a37..661f836c74 100644 --- a/test/tint/builtins/gen/literal/cosh/2ed778.wgsl +++ b/test/tint/builtins/gen/literal/cosh/2ed778.wgsl @@ -25,7 +25,7 @@ enable f16; // fn cosh(f16) -> f16 fn cosh_2ed778() { - var res: f16 = cosh(f16()); + var res: f16 = cosh(1.h); } @vertex diff --git a/test/tint/builtins/gen/literal/cosh/2ed778.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/cosh/2ed778.wgsl.expected.dxc.hlsl index f032f20dea..7ad4887173 100644 --- a/test/tint/builtins/gen/literal/cosh/2ed778.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/cosh/2ed778.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void cosh_2ed778() { - float16_t res = cosh(float16_t(0.0h)); + float16_t res = cosh(float16_t(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/cosh/2ed778.wgsl.expected.glsl b/test/tint/builtins/gen/literal/cosh/2ed778.wgsl.expected.glsl index 798c9bcb64..976d9521cf 100644 --- a/test/tint/builtins/gen/literal/cosh/2ed778.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/cosh/2ed778.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void cosh_2ed778() { - float16_t res = cosh(0.0hf); + float16_t res = cosh(1.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void cosh_2ed778() { - float16_t res = cosh(0.0hf); + float16_t res = cosh(1.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void cosh_2ed778() { - float16_t res = cosh(0.0hf); + float16_t res = cosh(1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/cosh/2ed778.wgsl.expected.msl b/test/tint/builtins/gen/literal/cosh/2ed778.wgsl.expected.msl index 5fa15c3821..32e7d120bf 100644 --- a/test/tint/builtins/gen/literal/cosh/2ed778.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/cosh/2ed778.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void cosh_2ed778() { - half res = cosh(0.0h); + half res = cosh(1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/cosh/2ed778.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/cosh/2ed778.wgsl.expected.spvasm index bba06a4533..1495e9fa80 100644 --- a/test/tint/builtins/gen/literal/cosh/2ed778.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/cosh/2ed778.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,36 +36,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %16 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %19 = OpTypeFunction %v4float + %19 = OpConstantNull %half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %cosh_2ed778 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_half Function %16 - %13 = OpExtInst %half %15 Cosh %16 + %res = OpVariable %_ptr_Function_half Function %19 + %13 = OpExtInst %half %15 Cosh %half_0x1p_0 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %cosh_2ed778 +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %cosh_2ed778 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %cosh_2ed778 + %29 = OpLabel + %30 = OpFunctionCall %void %cosh_2ed778 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %cosh_2ed778 + %32 = OpLabel + %33 = OpFunctionCall %void %cosh_2ed778 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/cosh/2ed778.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/cosh/2ed778.wgsl.expected.wgsl index 00b8f277c9..c710cf767d 100644 --- a/test/tint/builtins/gen/literal/cosh/2ed778.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/cosh/2ed778.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn cosh_2ed778() { - var res : f16 = cosh(f16()); + var res : f16 = cosh(1.0h); } @vertex diff --git a/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl b/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl index d1e959aef0..d42f4b236d 100644 --- a/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl +++ b/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl @@ -25,7 +25,7 @@ enable f16; // fn cosh(vec<4, f16>) -> vec<4, f16> fn cosh_3b7bbf() { - var res: vec4 = cosh(vec4(f16())); + var res: vec4 = cosh(vec4(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl.expected.dxc.hlsl index ede2f1a20e..384a1ed0b6 100644 --- a/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void cosh_3b7bbf() { - vector res = cosh((float16_t(0.0h)).xxxx); + vector res = cosh((float16_t(1.0h)).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl.expected.glsl b/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl.expected.glsl index 73e0dc9272..d3f5e3f297 100644 --- a/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void cosh_3b7bbf() { - f16vec4 res = cosh(f16vec4(0.0hf)); + f16vec4 res = cosh(f16vec4(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void cosh_3b7bbf() { - f16vec4 res = cosh(f16vec4(0.0hf)); + f16vec4 res = cosh(f16vec4(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void cosh_3b7bbf() { - f16vec4 res = cosh(f16vec4(0.0hf)); + f16vec4 res = cosh(f16vec4(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl.expected.msl b/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl.expected.msl index c0d6580131..84b1af2e21 100644 --- a/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void cosh_3b7bbf() { - half4 res = cosh(half4(0.0h)); + half4 res = cosh(half4(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl.expected.spvasm index da245fd39a..fce9adab4a 100644 --- a/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %17 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v4half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %cosh_3b7bbf = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4half Function %17 - %13 = OpExtInst %v4half %16 Cosh %17 + %res = OpVariable %_ptr_Function_v4half Function %21 + %13 = OpExtInst %v4half %16 Cosh %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %cosh_3b7bbf +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %cosh_3b7bbf OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %cosh_3b7bbf + %31 = OpLabel + %32 = OpFunctionCall %void %cosh_3b7bbf OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %cosh_3b7bbf + %34 = OpLabel + %35 = OpFunctionCall %void %cosh_3b7bbf OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl.expected.wgsl index 09eaedea4c..37fbc9172d 100644 --- a/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn cosh_3b7bbf() { - var res : vec4 = cosh(vec4(f16())); + var res : vec4 = cosh(vec4(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/cosh/43b672.wgsl b/test/tint/builtins/gen/literal/cosh/43b672.wgsl index a3d55056a0..059f9f16ce 100644 --- a/test/tint/builtins/gen/literal/cosh/43b672.wgsl +++ b/test/tint/builtins/gen/literal/cosh/43b672.wgsl @@ -25,7 +25,7 @@ enable f16; // fn cosh(vec<2, f16>) -> vec<2, f16> fn cosh_43b672() { - var res: vec2 = cosh(vec2(f16())); + var res: vec2 = cosh(vec2(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/cosh/43b672.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/cosh/43b672.wgsl.expected.dxc.hlsl index 8b54430cc6..6034f72e36 100644 --- a/test/tint/builtins/gen/literal/cosh/43b672.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/cosh/43b672.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void cosh_43b672() { - vector res = cosh((float16_t(0.0h)).xx); + vector res = cosh((float16_t(1.0h)).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/cosh/43b672.wgsl.expected.glsl b/test/tint/builtins/gen/literal/cosh/43b672.wgsl.expected.glsl index 8b04b98826..ef9046b8c7 100644 --- a/test/tint/builtins/gen/literal/cosh/43b672.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/cosh/43b672.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void cosh_43b672() { - f16vec2 res = cosh(f16vec2(0.0hf)); + f16vec2 res = cosh(f16vec2(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void cosh_43b672() { - f16vec2 res = cosh(f16vec2(0.0hf)); + f16vec2 res = cosh(f16vec2(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void cosh_43b672() { - f16vec2 res = cosh(f16vec2(0.0hf)); + f16vec2 res = cosh(f16vec2(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/cosh/43b672.wgsl.expected.msl b/test/tint/builtins/gen/literal/cosh/43b672.wgsl.expected.msl index 697c07981c..9c17ff636e 100644 --- a/test/tint/builtins/gen/literal/cosh/43b672.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/cosh/43b672.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void cosh_43b672() { - half2 res = cosh(half2(0.0h)); + half2 res = cosh(half2(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/cosh/43b672.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/cosh/43b672.wgsl.expected.spvasm index 76983acbc7..2fda139e63 100644 --- a/test/tint/builtins/gen/literal/cosh/43b672.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/cosh/43b672.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %17 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v2half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %cosh_43b672 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2half Function %17 - %13 = OpExtInst %v2half %16 Cosh %17 + %res = OpVariable %_ptr_Function_v2half Function %21 + %13 = OpExtInst %v2half %16 Cosh %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %cosh_43b672 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %cosh_43b672 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %cosh_43b672 + %31 = OpLabel + %32 = OpFunctionCall %void %cosh_43b672 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %cosh_43b672 + %34 = OpLabel + %35 = OpFunctionCall %void %cosh_43b672 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/cosh/43b672.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/cosh/43b672.wgsl.expected.wgsl index 6646f2d1dc..6b5901940c 100644 --- a/test/tint/builtins/gen/literal/cosh/43b672.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/cosh/43b672.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn cosh_43b672() { - var res : vec2 = cosh(vec2(f16())); + var res : vec2 = cosh(vec2(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl b/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl index 99a4004f2a..69df244596 100644 --- a/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl +++ b/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl @@ -25,7 +25,7 @@ enable f16; // fn cosh(vec<3, f16>) -> vec<3, f16> fn cosh_b1b8a0() { - var res: vec3 = cosh(vec3(f16())); + var res: vec3 = cosh(vec3(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl.expected.dxc.hlsl index 5be4cfe6e4..718e0ea453 100644 --- a/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void cosh_b1b8a0() { - vector res = cosh((float16_t(0.0h)).xxx); + vector res = cosh((float16_t(1.0h)).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl.expected.glsl index 995b0d7a09..9b5a615b0a 100644 --- a/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void cosh_b1b8a0() { - f16vec3 res = cosh(f16vec3(0.0hf)); + f16vec3 res = cosh(f16vec3(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void cosh_b1b8a0() { - f16vec3 res = cosh(f16vec3(0.0hf)); + f16vec3 res = cosh(f16vec3(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void cosh_b1b8a0() { - f16vec3 res = cosh(f16vec3(0.0hf)); + f16vec3 res = cosh(f16vec3(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl.expected.msl b/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl.expected.msl index b426dbb310..0bf61439f0 100644 --- a/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void cosh_b1b8a0() { - half3 res = cosh(half3(0.0h)); + half3 res = cosh(half3(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl.expected.spvasm index 9a5a56621c..e3491c5bf4 100644 --- a/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %17 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v3half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %cosh_b1b8a0 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3half Function %17 - %13 = OpExtInst %v3half %16 Cosh %17 + %res = OpVariable %_ptr_Function_v3half Function %21 + %13 = OpExtInst %v3half %16 Cosh %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %cosh_b1b8a0 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %cosh_b1b8a0 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %cosh_b1b8a0 + %31 = OpLabel + %32 = OpFunctionCall %void %cosh_b1b8a0 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %cosh_b1b8a0 + %34 = OpLabel + %35 = OpFunctionCall %void %cosh_b1b8a0 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl.expected.wgsl index bf06df51a6..d81410751e 100644 --- a/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn cosh_b1b8a0() { - var res : vec3 = cosh(vec3(f16())); + var res : vec3 = cosh(vec3(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/cross/9857cb.wgsl b/test/tint/builtins/gen/literal/cross/9857cb.wgsl index aaae266229..fffed9289c 100644 --- a/test/tint/builtins/gen/literal/cross/9857cb.wgsl +++ b/test/tint/builtins/gen/literal/cross/9857cb.wgsl @@ -25,7 +25,7 @@ enable f16; // fn cross(vec3, vec3) -> vec3 fn cross_9857cb() { - var res: vec3 = cross(vec3(f16()), vec3(f16())); + var res: vec3 = cross(vec3(1.h), vec3(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/cross/9857cb.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/cross/9857cb.wgsl.expected.wgsl index f991031d6f..04296c9394 100644 --- a/test/tint/builtins/gen/literal/cross/9857cb.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/cross/9857cb.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn cross_9857cb() { - var res : vec3 = cross(vec3(f16()), vec3(f16())); + var res : vec3 = cross(vec3(1.0h), vec3(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/degrees/3055d3.wgsl b/test/tint/builtins/gen/literal/degrees/3055d3.wgsl index f749565726..1a55b08bfe 100644 --- a/test/tint/builtins/gen/literal/degrees/3055d3.wgsl +++ b/test/tint/builtins/gen/literal/degrees/3055d3.wgsl @@ -25,7 +25,7 @@ enable f16; // fn degrees(vec<4, f16>) -> vec<4, f16> fn degrees_3055d3() { - var res: vec4 = degrees(vec4(f16())); + var res: vec4 = degrees(vec4(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/degrees/3055d3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/degrees/3055d3.wgsl.expected.dxc.hlsl index 196bdf52ed..ff572fdde1 100644 --- a/test/tint/builtins/gen/literal/degrees/3055d3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/degrees/3055d3.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ vector tint_degrees(vector param_0) { } void degrees_3055d3() { - vector res = tint_degrees((float16_t(0.0h)).xxxx); + vector res = tint_degrees((float16_t(1.0h)).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/degrees/3055d3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/degrees/3055d3.wgsl.expected.glsl index a9e5f5dfdc..b9788e1936 100644 --- a/test/tint/builtins/gen/literal/degrees/3055d3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/degrees/3055d3.wgsl.expected.glsl @@ -7,7 +7,7 @@ f16vec4 tint_degrees(f16vec4 param_0) { void degrees_3055d3() { - f16vec4 res = tint_degrees(f16vec4(0.0hf)); + f16vec4 res = tint_degrees(f16vec4(1.0hf)); } vec4 vertex_main() { @@ -33,7 +33,7 @@ f16vec4 tint_degrees(f16vec4 param_0) { void degrees_3055d3() { - f16vec4 res = tint_degrees(f16vec4(0.0hf)); + f16vec4 res = tint_degrees(f16vec4(1.0hf)); } void fragment_main() { @@ -53,7 +53,7 @@ f16vec4 tint_degrees(f16vec4 param_0) { void degrees_3055d3() { - f16vec4 res = tint_degrees(f16vec4(0.0hf)); + f16vec4 res = tint_degrees(f16vec4(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/degrees/3055d3.wgsl.expected.msl b/test/tint/builtins/gen/literal/degrees/3055d3.wgsl.expected.msl index 2075cbd3c7..e9fe3c7e14 100644 --- a/test/tint/builtins/gen/literal/degrees/3055d3.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/degrees/3055d3.wgsl.expected.msl @@ -7,7 +7,7 @@ half4 tint_degrees(half4 param_0) { } void degrees_3055d3() { - half4 res = tint_degrees(half4(0.0h)); + half4 res = tint_degrees(half4(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/degrees/3055d3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/degrees/3055d3.wgsl.expected.spvasm index 2d68e4ea46..171e19c7ca 100644 --- a/test/tint/builtins/gen/literal/degrees/3055d3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/degrees/3055d3.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %17 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v4half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %degrees_3055d3 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4half Function %17 - %13 = OpExtInst %v4half %16 Degrees %17 + %res = OpVariable %_ptr_Function_v4half Function %21 + %13 = OpExtInst %v4half %16 Degrees %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %degrees_3055d3 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %degrees_3055d3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %degrees_3055d3 + %31 = OpLabel + %32 = OpFunctionCall %void %degrees_3055d3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %degrees_3055d3 + %34 = OpLabel + %35 = OpFunctionCall %void %degrees_3055d3 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/degrees/3055d3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/degrees/3055d3.wgsl.expected.wgsl index 58d6ef5441..e58a8a04df 100644 --- a/test/tint/builtins/gen/literal/degrees/3055d3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/degrees/3055d3.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn degrees_3055d3() { - var res : vec4 = degrees(vec4(f16())); + var res : vec4 = degrees(vec4(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/degrees/5e9805.wgsl b/test/tint/builtins/gen/literal/degrees/5e9805.wgsl index cdd9a50ac1..e1e9537a7b 100644 --- a/test/tint/builtins/gen/literal/degrees/5e9805.wgsl +++ b/test/tint/builtins/gen/literal/degrees/5e9805.wgsl @@ -25,7 +25,7 @@ enable f16; // fn degrees(f16) -> f16 fn degrees_5e9805() { - var res: f16 = degrees(f16()); + var res: f16 = degrees(1.h); } @vertex diff --git a/test/tint/builtins/gen/literal/degrees/5e9805.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/degrees/5e9805.wgsl.expected.dxc.hlsl index 209c5b44bf..930472f282 100644 --- a/test/tint/builtins/gen/literal/degrees/5e9805.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/degrees/5e9805.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ float16_t tint_degrees(float16_t param_0) { } void degrees_5e9805() { - float16_t res = tint_degrees(float16_t(0.0h)); + float16_t res = tint_degrees(float16_t(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/degrees/5e9805.wgsl.expected.glsl b/test/tint/builtins/gen/literal/degrees/5e9805.wgsl.expected.glsl index 1a87241032..3042f4c218 100644 --- a/test/tint/builtins/gen/literal/degrees/5e9805.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/degrees/5e9805.wgsl.expected.glsl @@ -7,7 +7,7 @@ float16_t tint_degrees(float16_t param_0) { void degrees_5e9805() { - float16_t res = tint_degrees(0.0hf); + float16_t res = tint_degrees(1.0hf); } vec4 vertex_main() { @@ -33,7 +33,7 @@ float16_t tint_degrees(float16_t param_0) { void degrees_5e9805() { - float16_t res = tint_degrees(0.0hf); + float16_t res = tint_degrees(1.0hf); } void fragment_main() { @@ -53,7 +53,7 @@ float16_t tint_degrees(float16_t param_0) { void degrees_5e9805() { - float16_t res = tint_degrees(0.0hf); + float16_t res = tint_degrees(1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/degrees/5e9805.wgsl.expected.msl b/test/tint/builtins/gen/literal/degrees/5e9805.wgsl.expected.msl index 1aacda2ef3..280c0bca1d 100644 --- a/test/tint/builtins/gen/literal/degrees/5e9805.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/degrees/5e9805.wgsl.expected.msl @@ -7,7 +7,7 @@ half tint_degrees(half param_0) { } void degrees_5e9805() { - half res = tint_degrees(0.0h); + half res = tint_degrees(1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/degrees/5e9805.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/degrees/5e9805.wgsl.expected.spvasm index 028d4a8910..9a33ca6b02 100644 --- a/test/tint/builtins/gen/literal/degrees/5e9805.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/degrees/5e9805.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,36 +36,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %16 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %19 = OpTypeFunction %v4float + %19 = OpConstantNull %half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %degrees_5e9805 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_half Function %16 - %13 = OpExtInst %half %15 Degrees %16 + %res = OpVariable %_ptr_Function_half Function %19 + %13 = OpExtInst %half %15 Degrees %half_0x1p_0 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %degrees_5e9805 +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %degrees_5e9805 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %degrees_5e9805 + %29 = OpLabel + %30 = OpFunctionCall %void %degrees_5e9805 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %degrees_5e9805 + %32 = OpLabel + %33 = OpFunctionCall %void %degrees_5e9805 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/degrees/5e9805.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/degrees/5e9805.wgsl.expected.wgsl index 647c580f09..4056d0b1b2 100644 --- a/test/tint/builtins/gen/literal/degrees/5e9805.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/degrees/5e9805.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn degrees_5e9805() { - var res : f16 = degrees(f16()); + var res : f16 = degrees(1.0h); } @vertex diff --git a/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl b/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl index c30a280190..6ab63b2baf 100644 --- a/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl +++ b/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl @@ -25,7 +25,7 @@ enable f16; // fn degrees(vec<3, f16>) -> vec<3, f16> fn degrees_dfe8f4() { - var res: vec3 = degrees(vec3(f16())); + var res: vec3 = degrees(vec3(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl.expected.dxc.hlsl index 0dd63bf276..b54ef763ca 100644 --- a/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ vector tint_degrees(vector param_0) { } void degrees_dfe8f4() { - vector res = tint_degrees((float16_t(0.0h)).xxx); + vector res = tint_degrees((float16_t(1.0h)).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl.expected.glsl index 59962ab016..576497a38e 100644 --- a/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl.expected.glsl @@ -7,7 +7,7 @@ f16vec3 tint_degrees(f16vec3 param_0) { void degrees_dfe8f4() { - f16vec3 res = tint_degrees(f16vec3(0.0hf)); + f16vec3 res = tint_degrees(f16vec3(1.0hf)); } vec4 vertex_main() { @@ -33,7 +33,7 @@ f16vec3 tint_degrees(f16vec3 param_0) { void degrees_dfe8f4() { - f16vec3 res = tint_degrees(f16vec3(0.0hf)); + f16vec3 res = tint_degrees(f16vec3(1.0hf)); } void fragment_main() { @@ -53,7 +53,7 @@ f16vec3 tint_degrees(f16vec3 param_0) { void degrees_dfe8f4() { - f16vec3 res = tint_degrees(f16vec3(0.0hf)); + f16vec3 res = tint_degrees(f16vec3(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl.expected.msl b/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl.expected.msl index f6ef443fa1..419df21560 100644 --- a/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl.expected.msl @@ -7,7 +7,7 @@ half3 tint_degrees(half3 param_0) { } void degrees_dfe8f4() { - half3 res = tint_degrees(half3(0.0h)); + half3 res = tint_degrees(half3(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl.expected.spvasm index fb059e81a2..ca76456687 100644 --- a/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %17 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v3half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %degrees_dfe8f4 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3half Function %17 - %13 = OpExtInst %v3half %16 Degrees %17 + %res = OpVariable %_ptr_Function_v3half Function %21 + %13 = OpExtInst %v3half %16 Degrees %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %degrees_dfe8f4 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %degrees_dfe8f4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %degrees_dfe8f4 + %31 = OpLabel + %32 = OpFunctionCall %void %degrees_dfe8f4 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %degrees_dfe8f4 + %34 = OpLabel + %35 = OpFunctionCall %void %degrees_dfe8f4 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl.expected.wgsl index 3d2cd7ab4e..885b2b944a 100644 --- a/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn degrees_dfe8f4() { - var res : vec3 = degrees(vec3(f16())); + var res : vec3 = degrees(vec3(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/degrees/f59715.wgsl b/test/tint/builtins/gen/literal/degrees/f59715.wgsl index 7cfc4a234f..4c5bb056ab 100644 --- a/test/tint/builtins/gen/literal/degrees/f59715.wgsl +++ b/test/tint/builtins/gen/literal/degrees/f59715.wgsl @@ -25,7 +25,7 @@ enable f16; // fn degrees(vec<2, f16>) -> vec<2, f16> fn degrees_f59715() { - var res: vec2 = degrees(vec2(f16())); + var res: vec2 = degrees(vec2(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/degrees/f59715.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/degrees/f59715.wgsl.expected.dxc.hlsl index 8aac00fc98..68de11a4f2 100644 --- a/test/tint/builtins/gen/literal/degrees/f59715.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/degrees/f59715.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ vector tint_degrees(vector param_0) { } void degrees_f59715() { - vector res = tint_degrees((float16_t(0.0h)).xx); + vector res = tint_degrees((float16_t(1.0h)).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/degrees/f59715.wgsl.expected.glsl b/test/tint/builtins/gen/literal/degrees/f59715.wgsl.expected.glsl index 99ed077df0..7a7c686429 100644 --- a/test/tint/builtins/gen/literal/degrees/f59715.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/degrees/f59715.wgsl.expected.glsl @@ -7,7 +7,7 @@ f16vec2 tint_degrees(f16vec2 param_0) { void degrees_f59715() { - f16vec2 res = tint_degrees(f16vec2(0.0hf)); + f16vec2 res = tint_degrees(f16vec2(1.0hf)); } vec4 vertex_main() { @@ -33,7 +33,7 @@ f16vec2 tint_degrees(f16vec2 param_0) { void degrees_f59715() { - f16vec2 res = tint_degrees(f16vec2(0.0hf)); + f16vec2 res = tint_degrees(f16vec2(1.0hf)); } void fragment_main() { @@ -53,7 +53,7 @@ f16vec2 tint_degrees(f16vec2 param_0) { void degrees_f59715() { - f16vec2 res = tint_degrees(f16vec2(0.0hf)); + f16vec2 res = tint_degrees(f16vec2(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/degrees/f59715.wgsl.expected.msl b/test/tint/builtins/gen/literal/degrees/f59715.wgsl.expected.msl index 2c0932577b..af8aa3038f 100644 --- a/test/tint/builtins/gen/literal/degrees/f59715.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/degrees/f59715.wgsl.expected.msl @@ -7,7 +7,7 @@ half2 tint_degrees(half2 param_0) { } void degrees_f59715() { - half2 res = tint_degrees(half2(0.0h)); + half2 res = tint_degrees(half2(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/degrees/f59715.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/degrees/f59715.wgsl.expected.spvasm index d9b7fb5716..ca83372ca9 100644 --- a/test/tint/builtins/gen/literal/degrees/f59715.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/degrees/f59715.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %17 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v2half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %degrees_f59715 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2half Function %17 - %13 = OpExtInst %v2half %16 Degrees %17 + %res = OpVariable %_ptr_Function_v2half Function %21 + %13 = OpExtInst %v2half %16 Degrees %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %degrees_f59715 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %degrees_f59715 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %degrees_f59715 + %31 = OpLabel + %32 = OpFunctionCall %void %degrees_f59715 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %degrees_f59715 + %34 = OpLabel + %35 = OpFunctionCall %void %degrees_f59715 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/degrees/f59715.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/degrees/f59715.wgsl.expected.wgsl index b3b6057a07..0971312018 100644 --- a/test/tint/builtins/gen/literal/degrees/f59715.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/degrees/f59715.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn degrees_f59715() { - var res : vec2 = degrees(vec2(f16())); + var res : vec2 = degrees(vec2(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/determinant/32bfde.wgsl b/test/tint/builtins/gen/literal/determinant/32bfde.wgsl index 9ff80ceb9b..0add05edff 100644 --- a/test/tint/builtins/gen/literal/determinant/32bfde.wgsl +++ b/test/tint/builtins/gen/literal/determinant/32bfde.wgsl @@ -25,7 +25,7 @@ enable f16; // fn determinant(mat<4, 4, f16>) -> f16 fn determinant_32bfde() { - var res: f16 = determinant(mat4x4(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16())); + var res: f16 = determinant(mat4x4(1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/determinant/32bfde.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/determinant/32bfde.wgsl.expected.dxc.hlsl index 123af604e0..bae350d219 100644 --- a/test/tint/builtins/gen/literal/determinant/32bfde.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/determinant/32bfde.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void determinant_32bfde() { - float16_t res = determinant(matrix((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx)); + float16_t res = determinant(matrix((float16_t(1.0h)).xxxx, (float16_t(1.0h)).xxxx, (float16_t(1.0h)).xxxx, (float16_t(1.0h)).xxxx)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/determinant/32bfde.wgsl.expected.glsl b/test/tint/builtins/gen/literal/determinant/32bfde.wgsl.expected.glsl index 32fc171cf0..f94a854c71 100644 --- a/test/tint/builtins/gen/literal/determinant/32bfde.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/determinant/32bfde.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void determinant_32bfde() { - float16_t res = determinant(f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))); + float16_t res = determinant(f16mat4(f16vec4(1.0hf), f16vec4(1.0hf), f16vec4(1.0hf), f16vec4(1.0hf))); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void determinant_32bfde() { - float16_t res = determinant(f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))); + float16_t res = determinant(f16mat4(f16vec4(1.0hf), f16vec4(1.0hf), f16vec4(1.0hf), f16vec4(1.0hf))); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void determinant_32bfde() { - float16_t res = determinant(f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))); + float16_t res = determinant(f16mat4(f16vec4(1.0hf), f16vec4(1.0hf), f16vec4(1.0hf), f16vec4(1.0hf))); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/determinant/32bfde.wgsl.expected.msl b/test/tint/builtins/gen/literal/determinant/32bfde.wgsl.expected.msl index 0f0a75d7db..f416fbf507 100644 --- a/test/tint/builtins/gen/literal/determinant/32bfde.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/determinant/32bfde.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void determinant_32bfde() { - half res = determinant(half4x4(half4(0.0h), half4(0.0h), half4(0.0h), half4(0.0h))); + half res = determinant(half4x4(half4(1.0h), half4(1.0h), half4(1.0h), half4(1.0h))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/determinant/32bfde.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/determinant/32bfde.wgsl.expected.spvasm index c3e9627c6b..ffe5e4d393 100644 --- a/test/tint/builtins/gen/literal/determinant/32bfde.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/determinant/32bfde.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -38,37 +38,39 @@ %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 %mat4v4half = OpTypeMatrix %v4half 4 - %18 = OpConstantNull %mat4v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %19 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 + %20 = OpConstantComposite %mat4v4half %19 %19 %19 %19 %_ptr_Function_half = OpTypePointer Function %half - %21 = OpConstantNull %half - %22 = OpTypeFunction %v4float + %23 = OpConstantNull %half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %determinant_32bfde = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_half Function %21 - %13 = OpExtInst %half %15 Determinant %18 + %res = OpVariable %_ptr_Function_half Function %23 + %13 = OpExtInst %half %15 Determinant %20 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %determinant_32bfde +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %determinant_32bfde OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %determinant_32bfde + %33 = OpLabel + %34 = OpFunctionCall %void %determinant_32bfde OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %determinant_32bfde + %36 = OpLabel + %37 = OpFunctionCall %void %determinant_32bfde OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/determinant/32bfde.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/determinant/32bfde.wgsl.expected.wgsl index 5d3cce92f4..237cc232e7 100644 --- a/test/tint/builtins/gen/literal/determinant/32bfde.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/determinant/32bfde.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn determinant_32bfde() { - var res : f16 = determinant(mat4x4(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16())); + var res : f16 = determinant(mat4x4(1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl b/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl index bb81d5be13..5154ef7058 100644 --- a/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl +++ b/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl @@ -25,7 +25,7 @@ enable f16; // fn determinant(mat<3, 3, f16>) -> f16 fn determinant_d7c86f() { - var res: f16 = determinant(mat3x3(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16())); + var res: f16 = determinant(mat3x3(1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl.expected.dxc.hlsl index 4971b2eb09..083d524dfc 100644 --- a/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void determinant_d7c86f() { - float16_t res = determinant(matrix((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx)); + float16_t res = determinant(matrix((float16_t(1.0h)).xxx, (float16_t(1.0h)).xxx, (float16_t(1.0h)).xxx)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl.expected.glsl index 13f877ca77..064604cedf 100644 --- a/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void determinant_d7c86f() { - float16_t res = determinant(f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))); + float16_t res = determinant(f16mat3(f16vec3(1.0hf), f16vec3(1.0hf), f16vec3(1.0hf))); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void determinant_d7c86f() { - float16_t res = determinant(f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))); + float16_t res = determinant(f16mat3(f16vec3(1.0hf), f16vec3(1.0hf), f16vec3(1.0hf))); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void determinant_d7c86f() { - float16_t res = determinant(f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))); + float16_t res = determinant(f16mat3(f16vec3(1.0hf), f16vec3(1.0hf), f16vec3(1.0hf))); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl.expected.msl b/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl.expected.msl index cfb43b5e41..17c01fbbd4 100644 --- a/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void determinant_d7c86f() { - half res = determinant(half3x3(half3(0.0h), half3(0.0h), half3(0.0h))); + half res = determinant(half3x3(half3(1.0h), half3(1.0h), half3(1.0h))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl.expected.spvasm index e3ed5ccb94..c4cb0a3b00 100644 --- a/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -38,37 +38,39 @@ %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 %mat3v3half = OpTypeMatrix %v3half 3 - %18 = OpConstantNull %mat3v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %19 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 + %20 = OpConstantComposite %mat3v3half %19 %19 %19 %_ptr_Function_half = OpTypePointer Function %half - %21 = OpConstantNull %half - %22 = OpTypeFunction %v4float + %23 = OpConstantNull %half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %determinant_d7c86f = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_half Function %21 - %13 = OpExtInst %half %15 Determinant %18 + %res = OpVariable %_ptr_Function_half Function %23 + %13 = OpExtInst %half %15 Determinant %20 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %determinant_d7c86f +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %determinant_d7c86f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %determinant_d7c86f + %33 = OpLabel + %34 = OpFunctionCall %void %determinant_d7c86f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %determinant_d7c86f + %36 = OpLabel + %37 = OpFunctionCall %void %determinant_d7c86f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl.expected.wgsl index 2623778210..d578f32ba9 100644 --- a/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn determinant_d7c86f() { - var res : f16 = determinant(mat3x3(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16())); + var res : f16 = determinant(mat3x3(1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl b/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl index 2b22f37372..2741b6def5 100644 --- a/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl +++ b/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl @@ -25,7 +25,7 @@ enable f16; // fn determinant(mat<2, 2, f16>) -> f16 fn determinant_fc12a5() { - var res: f16 = determinant(mat2x2(f16(), f16(), f16(), f16())); + var res: f16 = determinant(mat2x2(1.h, 1.h, 1.h, 1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl.expected.dxc.hlsl index f1f2a237ab..698a14c9bb 100644 --- a/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void determinant_fc12a5() { - float16_t res = determinant(matrix((float16_t(0.0h)).xx, (float16_t(0.0h)).xx)); + float16_t res = determinant(matrix((float16_t(1.0h)).xx, (float16_t(1.0h)).xx)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl.expected.glsl index 5239eec2ab..b647997531 100644 --- a/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void determinant_fc12a5() { - float16_t res = determinant(f16mat2(f16vec2(0.0hf), f16vec2(0.0hf))); + float16_t res = determinant(f16mat2(f16vec2(1.0hf), f16vec2(1.0hf))); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void determinant_fc12a5() { - float16_t res = determinant(f16mat2(f16vec2(0.0hf), f16vec2(0.0hf))); + float16_t res = determinant(f16mat2(f16vec2(1.0hf), f16vec2(1.0hf))); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void determinant_fc12a5() { - float16_t res = determinant(f16mat2(f16vec2(0.0hf), f16vec2(0.0hf))); + float16_t res = determinant(f16mat2(f16vec2(1.0hf), f16vec2(1.0hf))); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl.expected.msl b/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl.expected.msl index ef6ccaf3f6..a639c13a93 100644 --- a/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void determinant_fc12a5() { - half res = determinant(half2x2(half2(0.0h), half2(0.0h))); + half res = determinant(half2x2(half2(1.0h), half2(1.0h))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl.expected.spvasm index 77251639e6..28542451af 100644 --- a/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -38,37 +38,39 @@ %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 %mat2v2half = OpTypeMatrix %v2half 2 - %18 = OpConstantNull %mat2v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %19 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 + %20 = OpConstantComposite %mat2v2half %19 %19 %_ptr_Function_half = OpTypePointer Function %half - %21 = OpConstantNull %half - %22 = OpTypeFunction %v4float + %23 = OpConstantNull %half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %determinant_fc12a5 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_half Function %21 - %13 = OpExtInst %half %15 Determinant %18 + %res = OpVariable %_ptr_Function_half Function %23 + %13 = OpExtInst %half %15 Determinant %20 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %determinant_fc12a5 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %determinant_fc12a5 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %determinant_fc12a5 + %33 = OpLabel + %34 = OpFunctionCall %void %determinant_fc12a5 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %determinant_fc12a5 + %36 = OpLabel + %37 = OpFunctionCall %void %determinant_fc12a5 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl.expected.wgsl index 0a10d8ebcd..2a13c30b7f 100644 --- a/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn determinant_fc12a5() { - var res : f16 = determinant(mat2x2(f16(), f16(), f16(), f16())); + var res : f16 = determinant(mat2x2(1.0h, 1.0h, 1.0h, 1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/distance/7272f3.wgsl b/test/tint/builtins/gen/literal/distance/7272f3.wgsl index 1752332b22..78785ef85d 100644 --- a/test/tint/builtins/gen/literal/distance/7272f3.wgsl +++ b/test/tint/builtins/gen/literal/distance/7272f3.wgsl @@ -25,7 +25,7 @@ enable f16; // fn distance(vec<4, f16>, vec<4, f16>) -> f16 fn distance_7272f3() { - var res: f16 = distance(vec4(f16()), vec4(f16())); + var res: f16 = distance(vec4(1.h), vec4(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/distance/7272f3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/distance/7272f3.wgsl.expected.dxc.hlsl index 4e34e085df..43150f3617 100644 --- a/test/tint/builtins/gen/literal/distance/7272f3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/distance/7272f3.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void distance_7272f3() { - float16_t res = distance((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx); + float16_t res = distance((float16_t(1.0h)).xxxx, (float16_t(1.0h)).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/distance/7272f3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/distance/7272f3.wgsl.expected.glsl index 3ecf59a4f5..def5558116 100644 --- a/test/tint/builtins/gen/literal/distance/7272f3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/distance/7272f3.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void distance_7272f3() { - float16_t res = distance(f16vec4(0.0hf), f16vec4(0.0hf)); + float16_t res = distance(f16vec4(1.0hf), f16vec4(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void distance_7272f3() { - float16_t res = distance(f16vec4(0.0hf), f16vec4(0.0hf)); + float16_t res = distance(f16vec4(1.0hf), f16vec4(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void distance_7272f3() { - float16_t res = distance(f16vec4(0.0hf), f16vec4(0.0hf)); + float16_t res = distance(f16vec4(1.0hf), f16vec4(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/distance/7272f3.wgsl.expected.msl b/test/tint/builtins/gen/literal/distance/7272f3.wgsl.expected.msl index 87c9be80e7..881f16802a 100644 --- a/test/tint/builtins/gen/literal/distance/7272f3.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/distance/7272f3.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void distance_7272f3() { - half res = distance(half4(0.0h), half4(0.0h)); + half res = distance(half4(1.0h), half4(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/distance/7272f3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/distance/7272f3.wgsl.expected.spvasm index 491038ea6d..508e80c503 100644 --- a/test/tint/builtins/gen/literal/distance/7272f3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/distance/7272f3.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,37 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %17 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_half = OpTypePointer Function %half - %20 = OpConstantNull %half - %21 = OpTypeFunction %v4float + %21 = OpConstantNull %half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %distance_7272f3 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_half Function %20 - %13 = OpExtInst %half %15 Distance %17 %17 + %res = OpVariable %_ptr_Function_half Function %21 + %13 = OpExtInst %half %15 Distance %18 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %distance_7272f3 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %distance_7272f3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %distance_7272f3 + %31 = OpLabel + %32 = OpFunctionCall %void %distance_7272f3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %distance_7272f3 + %34 = OpLabel + %35 = OpFunctionCall %void %distance_7272f3 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/distance/7272f3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/distance/7272f3.wgsl.expected.wgsl index 5472c32ceb..22004c9f46 100644 --- a/test/tint/builtins/gen/literal/distance/7272f3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/distance/7272f3.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn distance_7272f3() { - var res : f16 = distance(vec4(f16()), vec4(f16())); + var res : f16 = distance(vec4(1.0h), vec4(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/distance/7d201f.wgsl b/test/tint/builtins/gen/literal/distance/7d201f.wgsl index a03bad71aa..4a27b52580 100644 --- a/test/tint/builtins/gen/literal/distance/7d201f.wgsl +++ b/test/tint/builtins/gen/literal/distance/7d201f.wgsl @@ -25,7 +25,7 @@ enable f16; // fn distance(f16, f16) -> f16 fn distance_7d201f() { - var res: f16 = distance(f16(), f16()); + var res: f16 = distance(1.h, 1.h); } @vertex diff --git a/test/tint/builtins/gen/literal/distance/7d201f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/distance/7d201f.wgsl.expected.dxc.hlsl index 10efc6d0bf..d8b616f682 100644 --- a/test/tint/builtins/gen/literal/distance/7d201f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/distance/7d201f.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void distance_7d201f() { - float16_t res = distance(float16_t(0.0h), float16_t(0.0h)); + float16_t res = distance(float16_t(1.0h), float16_t(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/distance/7d201f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/distance/7d201f.wgsl.expected.glsl index 30aee9f2c8..00663ecaed 100644 --- a/test/tint/builtins/gen/literal/distance/7d201f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/distance/7d201f.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void distance_7d201f() { - float16_t res = distance(0.0hf, 0.0hf); + float16_t res = distance(1.0hf, 1.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void distance_7d201f() { - float16_t res = distance(0.0hf, 0.0hf); + float16_t res = distance(1.0hf, 1.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void distance_7d201f() { - float16_t res = distance(0.0hf, 0.0hf); + float16_t res = distance(1.0hf, 1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/distance/7d201f.wgsl.expected.msl b/test/tint/builtins/gen/literal/distance/7d201f.wgsl.expected.msl index e7baa97561..fc5149e8ce 100644 --- a/test/tint/builtins/gen/literal/distance/7d201f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/distance/7d201f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void distance_7d201f() { - half res = fabs(0.0h - 0.0h); + half res = fabs(1.0h - 1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/distance/7d201f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/distance/7d201f.wgsl.expected.spvasm index 8a0a548a2f..e5a3ac285c 100644 --- a/test/tint/builtins/gen/literal/distance/7d201f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/distance/7d201f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,36 +36,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %16 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %19 = OpTypeFunction %v4float + %19 = OpConstantNull %half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %distance_7d201f = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_half Function %16 - %13 = OpExtInst %half %15 Distance %16 %16 + %res = OpVariable %_ptr_Function_half Function %19 + %13 = OpExtInst %half %15 Distance %half_0x1p_0 %half_0x1p_0 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %distance_7d201f +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %distance_7d201f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %distance_7d201f + %29 = OpLabel + %30 = OpFunctionCall %void %distance_7d201f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %distance_7d201f + %32 = OpLabel + %33 = OpFunctionCall %void %distance_7d201f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/distance/7d201f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/distance/7d201f.wgsl.expected.wgsl index 8de385102d..c664ae0c83 100644 --- a/test/tint/builtins/gen/literal/distance/7d201f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/distance/7d201f.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn distance_7d201f() { - var res : f16 = distance(f16(), f16()); + var res : f16 = distance(1.0h, 1.0h); } @vertex diff --git a/test/tint/builtins/gen/literal/distance/892a5d.wgsl b/test/tint/builtins/gen/literal/distance/892a5d.wgsl index affa3a3990..502dfaa451 100644 --- a/test/tint/builtins/gen/literal/distance/892a5d.wgsl +++ b/test/tint/builtins/gen/literal/distance/892a5d.wgsl @@ -25,7 +25,7 @@ enable f16; // fn distance(vec<2, f16>, vec<2, f16>) -> f16 fn distance_892a5d() { - var res: f16 = distance(vec2(f16()), vec2(f16())); + var res: f16 = distance(vec2(1.h), vec2(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/distance/892a5d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/distance/892a5d.wgsl.expected.dxc.hlsl index d35b1478a8..ade1134d99 100644 --- a/test/tint/builtins/gen/literal/distance/892a5d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/distance/892a5d.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void distance_892a5d() { - float16_t res = distance((float16_t(0.0h)).xx, (float16_t(0.0h)).xx); + float16_t res = distance((float16_t(1.0h)).xx, (float16_t(1.0h)).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/distance/892a5d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/distance/892a5d.wgsl.expected.glsl index 6c6b7523d7..903ffc5263 100644 --- a/test/tint/builtins/gen/literal/distance/892a5d.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/distance/892a5d.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void distance_892a5d() { - float16_t res = distance(f16vec2(0.0hf), f16vec2(0.0hf)); + float16_t res = distance(f16vec2(1.0hf), f16vec2(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void distance_892a5d() { - float16_t res = distance(f16vec2(0.0hf), f16vec2(0.0hf)); + float16_t res = distance(f16vec2(1.0hf), f16vec2(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void distance_892a5d() { - float16_t res = distance(f16vec2(0.0hf), f16vec2(0.0hf)); + float16_t res = distance(f16vec2(1.0hf), f16vec2(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/distance/892a5d.wgsl.expected.msl b/test/tint/builtins/gen/literal/distance/892a5d.wgsl.expected.msl index 8977f6729d..627969b36c 100644 --- a/test/tint/builtins/gen/literal/distance/892a5d.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/distance/892a5d.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void distance_892a5d() { - half res = distance(half2(0.0h), half2(0.0h)); + half res = distance(half2(1.0h), half2(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/distance/892a5d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/distance/892a5d.wgsl.expected.spvasm index 8f00450255..4ddc3266f2 100644 --- a/test/tint/builtins/gen/literal/distance/892a5d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/distance/892a5d.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,37 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %17 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_half = OpTypePointer Function %half - %20 = OpConstantNull %half - %21 = OpTypeFunction %v4float + %21 = OpConstantNull %half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %distance_892a5d = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_half Function %20 - %13 = OpExtInst %half %15 Distance %17 %17 + %res = OpVariable %_ptr_Function_half Function %21 + %13 = OpExtInst %half %15 Distance %18 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %distance_892a5d +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %distance_892a5d OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %distance_892a5d + %31 = OpLabel + %32 = OpFunctionCall %void %distance_892a5d OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %distance_892a5d + %34 = OpLabel + %35 = OpFunctionCall %void %distance_892a5d OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/distance/892a5d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/distance/892a5d.wgsl.expected.wgsl index 71ed2d0177..53390b3258 100644 --- a/test/tint/builtins/gen/literal/distance/892a5d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/distance/892a5d.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn distance_892a5d() { - var res : f16 = distance(vec2(f16()), vec2(f16())); + var res : f16 = distance(vec2(1.0h), vec2(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/distance/928fa0.wgsl b/test/tint/builtins/gen/literal/distance/928fa0.wgsl index 80353c820a..5d5a2d2f48 100644 --- a/test/tint/builtins/gen/literal/distance/928fa0.wgsl +++ b/test/tint/builtins/gen/literal/distance/928fa0.wgsl @@ -25,7 +25,7 @@ enable f16; // fn distance(vec<3, f16>, vec<3, f16>) -> f16 fn distance_928fa0() { - var res: f16 = distance(vec3(f16()), vec3(f16())); + var res: f16 = distance(vec3(1.h), vec3(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/distance/928fa0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/distance/928fa0.wgsl.expected.dxc.hlsl index c21d1447db..852e284932 100644 --- a/test/tint/builtins/gen/literal/distance/928fa0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/distance/928fa0.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void distance_928fa0() { - float16_t res = distance((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx); + float16_t res = distance((float16_t(1.0h)).xxx, (float16_t(1.0h)).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/distance/928fa0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/distance/928fa0.wgsl.expected.glsl index c68cb1079d..30f8cf3428 100644 --- a/test/tint/builtins/gen/literal/distance/928fa0.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/distance/928fa0.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void distance_928fa0() { - float16_t res = distance(f16vec3(0.0hf), f16vec3(0.0hf)); + float16_t res = distance(f16vec3(1.0hf), f16vec3(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void distance_928fa0() { - float16_t res = distance(f16vec3(0.0hf), f16vec3(0.0hf)); + float16_t res = distance(f16vec3(1.0hf), f16vec3(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void distance_928fa0() { - float16_t res = distance(f16vec3(0.0hf), f16vec3(0.0hf)); + float16_t res = distance(f16vec3(1.0hf), f16vec3(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/distance/928fa0.wgsl.expected.msl b/test/tint/builtins/gen/literal/distance/928fa0.wgsl.expected.msl index 0e034abc4b..9c928e6e13 100644 --- a/test/tint/builtins/gen/literal/distance/928fa0.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/distance/928fa0.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void distance_928fa0() { - half res = distance(half3(0.0h), half3(0.0h)); + half res = distance(half3(1.0h), half3(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/distance/928fa0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/distance/928fa0.wgsl.expected.spvasm index 63605caa7a..d272d09f91 100644 --- a/test/tint/builtins/gen/literal/distance/928fa0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/distance/928fa0.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,37 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %17 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_half = OpTypePointer Function %half - %20 = OpConstantNull %half - %21 = OpTypeFunction %v4float + %21 = OpConstantNull %half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %distance_928fa0 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_half Function %20 - %13 = OpExtInst %half %15 Distance %17 %17 + %res = OpVariable %_ptr_Function_half Function %21 + %13 = OpExtInst %half %15 Distance %18 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %distance_928fa0 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %distance_928fa0 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %distance_928fa0 + %31 = OpLabel + %32 = OpFunctionCall %void %distance_928fa0 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %distance_928fa0 + %34 = OpLabel + %35 = OpFunctionCall %void %distance_928fa0 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/distance/928fa0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/distance/928fa0.wgsl.expected.wgsl index 81c645190a..3a283dd33f 100644 --- a/test/tint/builtins/gen/literal/distance/928fa0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/distance/928fa0.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn distance_928fa0() { - var res : f16 = distance(vec3(f16()), vec3(f16())); + var res : f16 = distance(vec3(1.0h), vec3(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/dot/8e40f1.wgsl b/test/tint/builtins/gen/literal/dot/8e40f1.wgsl index 84f71c0aa6..52cd2994d1 100644 --- a/test/tint/builtins/gen/literal/dot/8e40f1.wgsl +++ b/test/tint/builtins/gen/literal/dot/8e40f1.wgsl @@ -25,7 +25,7 @@ enable f16; // fn dot(vec<3, f16>, vec<3, f16>) -> f16 fn dot_8e40f1() { - var res: f16 = dot(vec3(f16()), vec3(f16())); + var res: f16 = dot(vec3(1.h), vec3(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/dot/8e40f1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/dot/8e40f1.wgsl.expected.dxc.hlsl index 6e108ce8a2..45e55deba0 100644 --- a/test/tint/builtins/gen/literal/dot/8e40f1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/dot/8e40f1.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void dot_8e40f1() { - float16_t res = dot((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx); + float16_t res = dot((float16_t(1.0h)).xxx, (float16_t(1.0h)).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/dot/8e40f1.wgsl.expected.glsl b/test/tint/builtins/gen/literal/dot/8e40f1.wgsl.expected.glsl index 434219455a..069a38d69f 100644 --- a/test/tint/builtins/gen/literal/dot/8e40f1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/dot/8e40f1.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void dot_8e40f1() { - float16_t res = dot(f16vec3(0.0hf), f16vec3(0.0hf)); + float16_t res = dot(f16vec3(1.0hf), f16vec3(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void dot_8e40f1() { - float16_t res = dot(f16vec3(0.0hf), f16vec3(0.0hf)); + float16_t res = dot(f16vec3(1.0hf), f16vec3(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void dot_8e40f1() { - float16_t res = dot(f16vec3(0.0hf), f16vec3(0.0hf)); + float16_t res = dot(f16vec3(1.0hf), f16vec3(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/dot/8e40f1.wgsl.expected.msl b/test/tint/builtins/gen/literal/dot/8e40f1.wgsl.expected.msl index 1c34dc5296..9299636cf2 100644 --- a/test/tint/builtins/gen/literal/dot/8e40f1.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/dot/8e40f1.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void dot_8e40f1() { - half res = dot(half3(0.0h), half3(0.0h)); + half res = dot(half3(1.0h), half3(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/dot/8e40f1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/dot/8e40f1.wgsl.expected.spvasm index 7fc21ecc72..005fa5a7ff 100644 --- a/test/tint/builtins/gen/literal/dot/8e40f1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/dot/8e40f1.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 35 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,37 +36,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %16 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %17 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_half = OpTypePointer Function %half - %19 = OpConstantNull %half - %20 = OpTypeFunction %v4float + %20 = OpConstantNull %half + %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %dot_8e40f1 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_half Function %19 - %13 = OpDot %half %16 %16 + %res = OpVariable %_ptr_Function_half Function %20 + %13 = OpDot %half %17 %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %dot_8e40f1 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %dot_8e40f1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %dot_8e40f1 + %30 = OpLabel + %31 = OpFunctionCall %void %dot_8e40f1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %dot_8e40f1 + %33 = OpLabel + %34 = OpFunctionCall %void %dot_8e40f1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/dot/8e40f1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/dot/8e40f1.wgsl.expected.wgsl index 5b8c1a658d..609ecd00e1 100644 --- a/test/tint/builtins/gen/literal/dot/8e40f1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/dot/8e40f1.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn dot_8e40f1() { - var res : f16 = dot(vec3(f16()), vec3(f16())); + var res : f16 = dot(vec3(1.0h), vec3(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/dot/cd5a04.wgsl b/test/tint/builtins/gen/literal/dot/cd5a04.wgsl index e300f3179e..08461821a0 100644 --- a/test/tint/builtins/gen/literal/dot/cd5a04.wgsl +++ b/test/tint/builtins/gen/literal/dot/cd5a04.wgsl @@ -25,7 +25,7 @@ enable f16; // fn dot(vec<2, f16>, vec<2, f16>) -> f16 fn dot_cd5a04() { - var res: f16 = dot(vec2(f16()), vec2(f16())); + var res: f16 = dot(vec2(1.h), vec2(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/dot/cd5a04.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/dot/cd5a04.wgsl.expected.dxc.hlsl index 04adad0292..75f9749f95 100644 --- a/test/tint/builtins/gen/literal/dot/cd5a04.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/dot/cd5a04.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void dot_cd5a04() { - float16_t res = dot((float16_t(0.0h)).xx, (float16_t(0.0h)).xx); + float16_t res = dot((float16_t(1.0h)).xx, (float16_t(1.0h)).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/dot/cd5a04.wgsl.expected.glsl b/test/tint/builtins/gen/literal/dot/cd5a04.wgsl.expected.glsl index c14d0ae8f4..e49873a002 100644 --- a/test/tint/builtins/gen/literal/dot/cd5a04.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/dot/cd5a04.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void dot_cd5a04() { - float16_t res = dot(f16vec2(0.0hf), f16vec2(0.0hf)); + float16_t res = dot(f16vec2(1.0hf), f16vec2(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void dot_cd5a04() { - float16_t res = dot(f16vec2(0.0hf), f16vec2(0.0hf)); + float16_t res = dot(f16vec2(1.0hf), f16vec2(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void dot_cd5a04() { - float16_t res = dot(f16vec2(0.0hf), f16vec2(0.0hf)); + float16_t res = dot(f16vec2(1.0hf), f16vec2(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/dot/cd5a04.wgsl.expected.msl b/test/tint/builtins/gen/literal/dot/cd5a04.wgsl.expected.msl index 243b15aef2..01e75626d8 100644 --- a/test/tint/builtins/gen/literal/dot/cd5a04.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/dot/cd5a04.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void dot_cd5a04() { - half res = dot(half2(0.0h), half2(0.0h)); + half res = dot(half2(1.0h), half2(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/dot/cd5a04.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/dot/cd5a04.wgsl.expected.spvasm index 7fbae9809a..0d140a4df9 100644 --- a/test/tint/builtins/gen/literal/dot/cd5a04.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/dot/cd5a04.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 35 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,37 +36,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %16 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %17 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_half = OpTypePointer Function %half - %19 = OpConstantNull %half - %20 = OpTypeFunction %v4float + %20 = OpConstantNull %half + %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %dot_cd5a04 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_half Function %19 - %13 = OpDot %half %16 %16 + %res = OpVariable %_ptr_Function_half Function %20 + %13 = OpDot %half %17 %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %dot_cd5a04 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %dot_cd5a04 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %dot_cd5a04 + %30 = OpLabel + %31 = OpFunctionCall %void %dot_cd5a04 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %dot_cd5a04 + %33 = OpLabel + %34 = OpFunctionCall %void %dot_cd5a04 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/dot/cd5a04.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/dot/cd5a04.wgsl.expected.wgsl index 25778c7de4..3547523615 100644 --- a/test/tint/builtins/gen/literal/dot/cd5a04.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/dot/cd5a04.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn dot_cd5a04() { - var res : f16 = dot(vec2(f16()), vec2(f16())); + var res : f16 = dot(vec2(1.0h), vec2(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/dot/d0d179.wgsl b/test/tint/builtins/gen/literal/dot/d0d179.wgsl index 39d1e51fc6..2b47d38a4b 100644 --- a/test/tint/builtins/gen/literal/dot/d0d179.wgsl +++ b/test/tint/builtins/gen/literal/dot/d0d179.wgsl @@ -25,7 +25,7 @@ enable f16; // fn dot(vec<4, f16>, vec<4, f16>) -> f16 fn dot_d0d179() { - var res: f16 = dot(vec4(f16()), vec4(f16())); + var res: f16 = dot(vec4(1.h), vec4(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/dot/d0d179.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/dot/d0d179.wgsl.expected.dxc.hlsl index f05dcec1ce..fd310339d1 100644 --- a/test/tint/builtins/gen/literal/dot/d0d179.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/dot/d0d179.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void dot_d0d179() { - float16_t res = dot((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx); + float16_t res = dot((float16_t(1.0h)).xxxx, (float16_t(1.0h)).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/dot/d0d179.wgsl.expected.glsl b/test/tint/builtins/gen/literal/dot/d0d179.wgsl.expected.glsl index 90dbe8ae34..c48a12d9aa 100644 --- a/test/tint/builtins/gen/literal/dot/d0d179.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/dot/d0d179.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void dot_d0d179() { - float16_t res = dot(f16vec4(0.0hf), f16vec4(0.0hf)); + float16_t res = dot(f16vec4(1.0hf), f16vec4(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void dot_d0d179() { - float16_t res = dot(f16vec4(0.0hf), f16vec4(0.0hf)); + float16_t res = dot(f16vec4(1.0hf), f16vec4(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void dot_d0d179() { - float16_t res = dot(f16vec4(0.0hf), f16vec4(0.0hf)); + float16_t res = dot(f16vec4(1.0hf), f16vec4(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/dot/d0d179.wgsl.expected.msl b/test/tint/builtins/gen/literal/dot/d0d179.wgsl.expected.msl index becad5b54d..1110c66efe 100644 --- a/test/tint/builtins/gen/literal/dot/d0d179.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/dot/d0d179.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void dot_d0d179() { - half res = dot(half4(0.0h), half4(0.0h)); + half res = dot(half4(1.0h), half4(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/dot/d0d179.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/dot/d0d179.wgsl.expected.spvasm index 379f0238a5..b465609419 100644 --- a/test/tint/builtins/gen/literal/dot/d0d179.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/dot/d0d179.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 35 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,37 +36,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %16 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %17 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_half = OpTypePointer Function %half - %19 = OpConstantNull %half - %20 = OpTypeFunction %v4float + %20 = OpConstantNull %half + %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %dot_d0d179 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_half Function %19 - %13 = OpDot %half %16 %16 + %res = OpVariable %_ptr_Function_half Function %20 + %13 = OpDot %half %17 %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %dot_d0d179 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %dot_d0d179 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %dot_d0d179 + %30 = OpLabel + %31 = OpFunctionCall %void %dot_d0d179 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %dot_d0d179 + %33 = OpLabel + %34 = OpFunctionCall %void %dot_d0d179 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/dot/d0d179.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/dot/d0d179.wgsl.expected.wgsl index 7e94f8b831..17c0bba9b7 100644 --- a/test/tint/builtins/gen/literal/dot/d0d179.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/dot/d0d179.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn dot_d0d179() { - var res : f16 = dot(vec4(f16()), vec4(f16())); + var res : f16 = dot(vec4(1.0h), vec4(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/exp/13806d.wgsl b/test/tint/builtins/gen/literal/exp/13806d.wgsl index 04d8cc6223..ae8492eca8 100644 --- a/test/tint/builtins/gen/literal/exp/13806d.wgsl +++ b/test/tint/builtins/gen/literal/exp/13806d.wgsl @@ -25,7 +25,7 @@ enable f16; // fn exp(vec<3, f16>) -> vec<3, f16> fn exp_13806d() { - var res: vec3 = exp(vec3(f16())); + var res: vec3 = exp(vec3(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/exp/13806d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/exp/13806d.wgsl.expected.dxc.hlsl index 6d8ae98452..8a2a30af0c 100644 --- a/test/tint/builtins/gen/literal/exp/13806d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/exp/13806d.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void exp_13806d() { - vector res = exp((float16_t(0.0h)).xxx); + vector res = exp((float16_t(1.0h)).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/exp/13806d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/exp/13806d.wgsl.expected.glsl index e2a7b73d87..18dca94751 100644 --- a/test/tint/builtins/gen/literal/exp/13806d.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/exp/13806d.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void exp_13806d() { - f16vec3 res = exp(f16vec3(0.0hf)); + f16vec3 res = exp(f16vec3(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void exp_13806d() { - f16vec3 res = exp(f16vec3(0.0hf)); + f16vec3 res = exp(f16vec3(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void exp_13806d() { - f16vec3 res = exp(f16vec3(0.0hf)); + f16vec3 res = exp(f16vec3(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/exp/13806d.wgsl.expected.msl b/test/tint/builtins/gen/literal/exp/13806d.wgsl.expected.msl index 1f4af8c67b..715069264d 100644 --- a/test/tint/builtins/gen/literal/exp/13806d.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/exp/13806d.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void exp_13806d() { - half3 res = exp(half3(0.0h)); + half3 res = exp(half3(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/exp/13806d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/exp/13806d.wgsl.expected.spvasm index a3679ff7f8..039b69b3fd 100644 --- a/test/tint/builtins/gen/literal/exp/13806d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/exp/13806d.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %17 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v3half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %exp_13806d = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3half Function %17 - %13 = OpExtInst %v3half %16 Exp %17 + %res = OpVariable %_ptr_Function_v3half Function %21 + %13 = OpExtInst %v3half %16 Exp %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %exp_13806d +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %exp_13806d OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %exp_13806d + %31 = OpLabel + %32 = OpFunctionCall %void %exp_13806d OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %exp_13806d + %34 = OpLabel + %35 = OpFunctionCall %void %exp_13806d OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/exp/13806d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/exp/13806d.wgsl.expected.wgsl index 7ccb13f5f6..4e78600082 100644 --- a/test/tint/builtins/gen/literal/exp/13806d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/exp/13806d.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn exp_13806d() { - var res : vec3 = exp(vec3(f16())); + var res : vec3 = exp(vec3(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/exp/2e08e2.wgsl b/test/tint/builtins/gen/literal/exp/2e08e2.wgsl index d2d1bb2579..47f53209e0 100644 --- a/test/tint/builtins/gen/literal/exp/2e08e2.wgsl +++ b/test/tint/builtins/gen/literal/exp/2e08e2.wgsl @@ -25,7 +25,7 @@ enable f16; // fn exp(vec<2, f16>) -> vec<2, f16> fn exp_2e08e2() { - var res: vec2 = exp(vec2(f16())); + var res: vec2 = exp(vec2(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/exp/2e08e2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/exp/2e08e2.wgsl.expected.dxc.hlsl index 52dca1d7a8..a9d2ab8d30 100644 --- a/test/tint/builtins/gen/literal/exp/2e08e2.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/exp/2e08e2.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void exp_2e08e2() { - vector res = exp((float16_t(0.0h)).xx); + vector res = exp((float16_t(1.0h)).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/exp/2e08e2.wgsl.expected.glsl b/test/tint/builtins/gen/literal/exp/2e08e2.wgsl.expected.glsl index 04a9c64e66..ead6fec810 100644 --- a/test/tint/builtins/gen/literal/exp/2e08e2.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/exp/2e08e2.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void exp_2e08e2() { - f16vec2 res = exp(f16vec2(0.0hf)); + f16vec2 res = exp(f16vec2(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void exp_2e08e2() { - f16vec2 res = exp(f16vec2(0.0hf)); + f16vec2 res = exp(f16vec2(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void exp_2e08e2() { - f16vec2 res = exp(f16vec2(0.0hf)); + f16vec2 res = exp(f16vec2(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/exp/2e08e2.wgsl.expected.msl b/test/tint/builtins/gen/literal/exp/2e08e2.wgsl.expected.msl index fd0c319607..5336de7231 100644 --- a/test/tint/builtins/gen/literal/exp/2e08e2.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/exp/2e08e2.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void exp_2e08e2() { - half2 res = exp(half2(0.0h)); + half2 res = exp(half2(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/exp/2e08e2.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/exp/2e08e2.wgsl.expected.spvasm index 9d11ae312d..25e43ebd80 100644 --- a/test/tint/builtins/gen/literal/exp/2e08e2.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/exp/2e08e2.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %17 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v2half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %exp_2e08e2 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2half Function %17 - %13 = OpExtInst %v2half %16 Exp %17 + %res = OpVariable %_ptr_Function_v2half Function %21 + %13 = OpExtInst %v2half %16 Exp %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %exp_2e08e2 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %exp_2e08e2 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %exp_2e08e2 + %31 = OpLabel + %32 = OpFunctionCall %void %exp_2e08e2 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %exp_2e08e2 + %34 = OpLabel + %35 = OpFunctionCall %void %exp_2e08e2 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/exp/2e08e2.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/exp/2e08e2.wgsl.expected.wgsl index 9962f0eea7..31ce15961e 100644 --- a/test/tint/builtins/gen/literal/exp/2e08e2.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/exp/2e08e2.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn exp_2e08e2() { - var res : vec2 = exp(vec2(f16())); + var res : vec2 = exp(vec2(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/exp/611a87.wgsl b/test/tint/builtins/gen/literal/exp/611a87.wgsl index 53ee480b1c..947bb879ed 100644 --- a/test/tint/builtins/gen/literal/exp/611a87.wgsl +++ b/test/tint/builtins/gen/literal/exp/611a87.wgsl @@ -25,7 +25,7 @@ enable f16; // fn exp(vec<4, f16>) -> vec<4, f16> fn exp_611a87() { - var res: vec4 = exp(vec4(f16())); + var res: vec4 = exp(vec4(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/exp/611a87.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/exp/611a87.wgsl.expected.dxc.hlsl index 47b6a044b0..4083b4d5b9 100644 --- a/test/tint/builtins/gen/literal/exp/611a87.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/exp/611a87.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void exp_611a87() { - vector res = exp((float16_t(0.0h)).xxxx); + vector res = exp((float16_t(1.0h)).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/exp/611a87.wgsl.expected.glsl b/test/tint/builtins/gen/literal/exp/611a87.wgsl.expected.glsl index f5b6a25e79..f9ec5fb84b 100644 --- a/test/tint/builtins/gen/literal/exp/611a87.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/exp/611a87.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void exp_611a87() { - f16vec4 res = exp(f16vec4(0.0hf)); + f16vec4 res = exp(f16vec4(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void exp_611a87() { - f16vec4 res = exp(f16vec4(0.0hf)); + f16vec4 res = exp(f16vec4(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void exp_611a87() { - f16vec4 res = exp(f16vec4(0.0hf)); + f16vec4 res = exp(f16vec4(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/exp/611a87.wgsl.expected.msl b/test/tint/builtins/gen/literal/exp/611a87.wgsl.expected.msl index 32163a817c..72cfc9ec1e 100644 --- a/test/tint/builtins/gen/literal/exp/611a87.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/exp/611a87.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void exp_611a87() { - half4 res = exp(half4(0.0h)); + half4 res = exp(half4(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/exp/611a87.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/exp/611a87.wgsl.expected.spvasm index 749740ee16..2883d1e846 100644 --- a/test/tint/builtins/gen/literal/exp/611a87.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/exp/611a87.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %17 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v4half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %exp_611a87 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4half Function %17 - %13 = OpExtInst %v4half %16 Exp %17 + %res = OpVariable %_ptr_Function_v4half Function %21 + %13 = OpExtInst %v4half %16 Exp %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %exp_611a87 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %exp_611a87 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %exp_611a87 + %31 = OpLabel + %32 = OpFunctionCall %void %exp_611a87 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %exp_611a87 + %34 = OpLabel + %35 = OpFunctionCall %void %exp_611a87 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/exp/611a87.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/exp/611a87.wgsl.expected.wgsl index 63f247c126..3b2b8d9d3c 100644 --- a/test/tint/builtins/gen/literal/exp/611a87.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/exp/611a87.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn exp_611a87() { - var res : vec4 = exp(vec4(f16())); + var res : vec4 = exp(vec4(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/exp/c18fe9.wgsl b/test/tint/builtins/gen/literal/exp/c18fe9.wgsl index 6572643472..d265bf3501 100644 --- a/test/tint/builtins/gen/literal/exp/c18fe9.wgsl +++ b/test/tint/builtins/gen/literal/exp/c18fe9.wgsl @@ -25,7 +25,7 @@ enable f16; // fn exp(f16) -> f16 fn exp_c18fe9() { - var res: f16 = exp(f16()); + var res: f16 = exp(1.h); } @vertex diff --git a/test/tint/builtins/gen/literal/exp/c18fe9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/exp/c18fe9.wgsl.expected.dxc.hlsl index 03ed79f373..5d32e2d4f0 100644 --- a/test/tint/builtins/gen/literal/exp/c18fe9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/exp/c18fe9.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void exp_c18fe9() { - float16_t res = exp(float16_t(0.0h)); + float16_t res = exp(float16_t(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/exp/c18fe9.wgsl.expected.glsl b/test/tint/builtins/gen/literal/exp/c18fe9.wgsl.expected.glsl index a937a441ba..be9113a492 100644 --- a/test/tint/builtins/gen/literal/exp/c18fe9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/exp/c18fe9.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void exp_c18fe9() { - float16_t res = exp(0.0hf); + float16_t res = exp(1.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void exp_c18fe9() { - float16_t res = exp(0.0hf); + float16_t res = exp(1.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void exp_c18fe9() { - float16_t res = exp(0.0hf); + float16_t res = exp(1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/exp/c18fe9.wgsl.expected.msl b/test/tint/builtins/gen/literal/exp/c18fe9.wgsl.expected.msl index d933e7b2c2..120d3794d0 100644 --- a/test/tint/builtins/gen/literal/exp/c18fe9.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/exp/c18fe9.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void exp_c18fe9() { - half res = exp(0.0h); + half res = exp(1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/exp/c18fe9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/exp/c18fe9.wgsl.expected.spvasm index 050b62d463..fab791b69f 100644 --- a/test/tint/builtins/gen/literal/exp/c18fe9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/exp/c18fe9.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,36 +36,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %16 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %19 = OpTypeFunction %v4float + %19 = OpConstantNull %half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %exp_c18fe9 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_half Function %16 - %13 = OpExtInst %half %15 Exp %16 + %res = OpVariable %_ptr_Function_half Function %19 + %13 = OpExtInst %half %15 Exp %half_0x1p_0 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %exp_c18fe9 +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %exp_c18fe9 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %exp_c18fe9 + %29 = OpLabel + %30 = OpFunctionCall %void %exp_c18fe9 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %exp_c18fe9 + %32 = OpLabel + %33 = OpFunctionCall %void %exp_c18fe9 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/exp/c18fe9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/exp/c18fe9.wgsl.expected.wgsl index a2dec578bf..e9ea41ff40 100644 --- a/test/tint/builtins/gen/literal/exp/c18fe9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/exp/c18fe9.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn exp_c18fe9() { - var res : f16 = exp(f16()); + var res : f16 = exp(1.0h); } @vertex diff --git a/test/tint/builtins/gen/literal/exp2/151a4c.wgsl b/test/tint/builtins/gen/literal/exp2/151a4c.wgsl index 104c4bbce7..1726a87874 100644 --- a/test/tint/builtins/gen/literal/exp2/151a4c.wgsl +++ b/test/tint/builtins/gen/literal/exp2/151a4c.wgsl @@ -25,7 +25,7 @@ enable f16; // fn exp2(vec<2, f16>) -> vec<2, f16> fn exp2_151a4c() { - var res: vec2 = exp2(vec2(f16())); + var res: vec2 = exp2(vec2(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/exp2/151a4c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/exp2/151a4c.wgsl.expected.dxc.hlsl index a205613449..b86be997d0 100644 --- a/test/tint/builtins/gen/literal/exp2/151a4c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/exp2/151a4c.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void exp2_151a4c() { - vector res = exp2((float16_t(0.0h)).xx); + vector res = exp2((float16_t(1.0h)).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/exp2/151a4c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/exp2/151a4c.wgsl.expected.glsl index 78394dc70e..e7a27302b9 100644 --- a/test/tint/builtins/gen/literal/exp2/151a4c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/exp2/151a4c.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void exp2_151a4c() { - f16vec2 res = exp2(f16vec2(0.0hf)); + f16vec2 res = exp2(f16vec2(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void exp2_151a4c() { - f16vec2 res = exp2(f16vec2(0.0hf)); + f16vec2 res = exp2(f16vec2(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void exp2_151a4c() { - f16vec2 res = exp2(f16vec2(0.0hf)); + f16vec2 res = exp2(f16vec2(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/exp2/151a4c.wgsl.expected.msl b/test/tint/builtins/gen/literal/exp2/151a4c.wgsl.expected.msl index e8e65eaf8e..648a584452 100644 --- a/test/tint/builtins/gen/literal/exp2/151a4c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/exp2/151a4c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void exp2_151a4c() { - half2 res = exp2(half2(0.0h)); + half2 res = exp2(half2(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/exp2/151a4c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/exp2/151a4c.wgsl.expected.spvasm index 3b271fa5ca..21a8c06c35 100644 --- a/test/tint/builtins/gen/literal/exp2/151a4c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/exp2/151a4c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %17 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v2half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %exp2_151a4c = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2half Function %17 - %13 = OpExtInst %v2half %16 Exp2 %17 + %res = OpVariable %_ptr_Function_v2half Function %21 + %13 = OpExtInst %v2half %16 Exp2 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %exp2_151a4c +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %exp2_151a4c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %exp2_151a4c + %31 = OpLabel + %32 = OpFunctionCall %void %exp2_151a4c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %exp2_151a4c + %34 = OpLabel + %35 = OpFunctionCall %void %exp2_151a4c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/exp2/151a4c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/exp2/151a4c.wgsl.expected.wgsl index 698ac46724..7c28484747 100644 --- a/test/tint/builtins/gen/literal/exp2/151a4c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/exp2/151a4c.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn exp2_151a4c() { - var res : vec2 = exp2(vec2(f16())); + var res : vec2 = exp2(vec2(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/exp2/751377.wgsl b/test/tint/builtins/gen/literal/exp2/751377.wgsl index 790a5b1cac..dc570f2895 100644 --- a/test/tint/builtins/gen/literal/exp2/751377.wgsl +++ b/test/tint/builtins/gen/literal/exp2/751377.wgsl @@ -25,7 +25,7 @@ enable f16; // fn exp2(vec<3, f16>) -> vec<3, f16> fn exp2_751377() { - var res: vec3 = exp2(vec3(f16())); + var res: vec3 = exp2(vec3(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/exp2/751377.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/exp2/751377.wgsl.expected.dxc.hlsl index 46be6259bb..df31b7435f 100644 --- a/test/tint/builtins/gen/literal/exp2/751377.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/exp2/751377.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void exp2_751377() { - vector res = exp2((float16_t(0.0h)).xxx); + vector res = exp2((float16_t(1.0h)).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/exp2/751377.wgsl.expected.glsl b/test/tint/builtins/gen/literal/exp2/751377.wgsl.expected.glsl index af02e20882..92bdff72bc 100644 --- a/test/tint/builtins/gen/literal/exp2/751377.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/exp2/751377.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void exp2_751377() { - f16vec3 res = exp2(f16vec3(0.0hf)); + f16vec3 res = exp2(f16vec3(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void exp2_751377() { - f16vec3 res = exp2(f16vec3(0.0hf)); + f16vec3 res = exp2(f16vec3(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void exp2_751377() { - f16vec3 res = exp2(f16vec3(0.0hf)); + f16vec3 res = exp2(f16vec3(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/exp2/751377.wgsl.expected.msl b/test/tint/builtins/gen/literal/exp2/751377.wgsl.expected.msl index 201f1e2cdb..94ad2ef6e1 100644 --- a/test/tint/builtins/gen/literal/exp2/751377.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/exp2/751377.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void exp2_751377() { - half3 res = exp2(half3(0.0h)); + half3 res = exp2(half3(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/exp2/751377.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/exp2/751377.wgsl.expected.spvasm index b255fb10de..c9e1e3a21e 100644 --- a/test/tint/builtins/gen/literal/exp2/751377.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/exp2/751377.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %17 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v3half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %exp2_751377 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3half Function %17 - %13 = OpExtInst %v3half %16 Exp2 %17 + %res = OpVariable %_ptr_Function_v3half Function %21 + %13 = OpExtInst %v3half %16 Exp2 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %exp2_751377 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %exp2_751377 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %exp2_751377 + %31 = OpLabel + %32 = OpFunctionCall %void %exp2_751377 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %exp2_751377 + %34 = OpLabel + %35 = OpFunctionCall %void %exp2_751377 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/exp2/751377.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/exp2/751377.wgsl.expected.wgsl index 5730ea28b4..effbce193c 100644 --- a/test/tint/builtins/gen/literal/exp2/751377.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/exp2/751377.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn exp2_751377() { - var res : vec3 = exp2(vec3(f16())); + var res : vec3 = exp2(vec3(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/exp2/b408e4.wgsl b/test/tint/builtins/gen/literal/exp2/b408e4.wgsl index 74f45c4469..99e021edfd 100644 --- a/test/tint/builtins/gen/literal/exp2/b408e4.wgsl +++ b/test/tint/builtins/gen/literal/exp2/b408e4.wgsl @@ -25,7 +25,7 @@ enable f16; // fn exp2(f16) -> f16 fn exp2_b408e4() { - var res: f16 = exp2(f16()); + var res: f16 = exp2(1.h); } @vertex diff --git a/test/tint/builtins/gen/literal/exp2/b408e4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/exp2/b408e4.wgsl.expected.dxc.hlsl index 1161b51086..b551f3fba8 100644 --- a/test/tint/builtins/gen/literal/exp2/b408e4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/exp2/b408e4.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void exp2_b408e4() { - float16_t res = exp2(float16_t(0.0h)); + float16_t res = exp2(float16_t(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/exp2/b408e4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/exp2/b408e4.wgsl.expected.glsl index 5c041fccfc..84e9ac152b 100644 --- a/test/tint/builtins/gen/literal/exp2/b408e4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/exp2/b408e4.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void exp2_b408e4() { - float16_t res = exp2(0.0hf); + float16_t res = exp2(1.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void exp2_b408e4() { - float16_t res = exp2(0.0hf); + float16_t res = exp2(1.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void exp2_b408e4() { - float16_t res = exp2(0.0hf); + float16_t res = exp2(1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/exp2/b408e4.wgsl.expected.msl b/test/tint/builtins/gen/literal/exp2/b408e4.wgsl.expected.msl index 144f5ad812..d28fe02132 100644 --- a/test/tint/builtins/gen/literal/exp2/b408e4.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/exp2/b408e4.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void exp2_b408e4() { - half res = exp2(0.0h); + half res = exp2(1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/exp2/b408e4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/exp2/b408e4.wgsl.expected.spvasm index 00de130b01..ce19204a64 100644 --- a/test/tint/builtins/gen/literal/exp2/b408e4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/exp2/b408e4.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,36 +36,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %16 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %19 = OpTypeFunction %v4float + %19 = OpConstantNull %half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %exp2_b408e4 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_half Function %16 - %13 = OpExtInst %half %15 Exp2 %16 + %res = OpVariable %_ptr_Function_half Function %19 + %13 = OpExtInst %half %15 Exp2 %half_0x1p_0 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %exp2_b408e4 +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %exp2_b408e4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %exp2_b408e4 + %29 = OpLabel + %30 = OpFunctionCall %void %exp2_b408e4 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %exp2_b408e4 + %32 = OpLabel + %33 = OpFunctionCall %void %exp2_b408e4 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/exp2/b408e4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/exp2/b408e4.wgsl.expected.wgsl index 65c1649034..b1c358ebc4 100644 --- a/test/tint/builtins/gen/literal/exp2/b408e4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/exp2/b408e4.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn exp2_b408e4() { - var res : f16 = exp2(f16()); + var res : f16 = exp2(1.0h); } @vertex diff --git a/test/tint/builtins/gen/literal/exp2/ffa827.wgsl b/test/tint/builtins/gen/literal/exp2/ffa827.wgsl index 4bbdb03d17..654851e7ce 100644 --- a/test/tint/builtins/gen/literal/exp2/ffa827.wgsl +++ b/test/tint/builtins/gen/literal/exp2/ffa827.wgsl @@ -25,7 +25,7 @@ enable f16; // fn exp2(vec<4, f16>) -> vec<4, f16> fn exp2_ffa827() { - var res: vec4 = exp2(vec4(f16())); + var res: vec4 = exp2(vec4(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/exp2/ffa827.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/exp2/ffa827.wgsl.expected.dxc.hlsl index 744ae477b8..1e8314191f 100644 --- a/test/tint/builtins/gen/literal/exp2/ffa827.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/exp2/ffa827.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void exp2_ffa827() { - vector res = exp2((float16_t(0.0h)).xxxx); + vector res = exp2((float16_t(1.0h)).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/exp2/ffa827.wgsl.expected.glsl b/test/tint/builtins/gen/literal/exp2/ffa827.wgsl.expected.glsl index 960c753ecd..90847d522d 100644 --- a/test/tint/builtins/gen/literal/exp2/ffa827.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/exp2/ffa827.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void exp2_ffa827() { - f16vec4 res = exp2(f16vec4(0.0hf)); + f16vec4 res = exp2(f16vec4(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void exp2_ffa827() { - f16vec4 res = exp2(f16vec4(0.0hf)); + f16vec4 res = exp2(f16vec4(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void exp2_ffa827() { - f16vec4 res = exp2(f16vec4(0.0hf)); + f16vec4 res = exp2(f16vec4(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/exp2/ffa827.wgsl.expected.msl b/test/tint/builtins/gen/literal/exp2/ffa827.wgsl.expected.msl index add3f5e0d4..46061e3f3d 100644 --- a/test/tint/builtins/gen/literal/exp2/ffa827.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/exp2/ffa827.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void exp2_ffa827() { - half4 res = exp2(half4(0.0h)); + half4 res = exp2(half4(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/exp2/ffa827.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/exp2/ffa827.wgsl.expected.spvasm index 9520e91090..71e376e433 100644 --- a/test/tint/builtins/gen/literal/exp2/ffa827.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/exp2/ffa827.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %17 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v4half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %exp2_ffa827 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4half Function %17 - %13 = OpExtInst %v4half %16 Exp2 %17 + %res = OpVariable %_ptr_Function_v4half Function %21 + %13 = OpExtInst %v4half %16 Exp2 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %exp2_ffa827 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %exp2_ffa827 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %exp2_ffa827 + %31 = OpLabel + %32 = OpFunctionCall %void %exp2_ffa827 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %exp2_ffa827 + %34 = OpLabel + %35 = OpFunctionCall %void %exp2_ffa827 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/exp2/ffa827.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/exp2/ffa827.wgsl.expected.wgsl index 230ad07811..1bd743f125 100644 --- a/test/tint/builtins/gen/literal/exp2/ffa827.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/exp2/ffa827.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn exp2_ffa827() { - var res : vec4 = exp2(vec4(f16())); + var res : vec4 = exp2(vec4(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/faceForward/524986.wgsl b/test/tint/builtins/gen/literal/faceForward/524986.wgsl index b790070087..aeb6d720a7 100644 --- a/test/tint/builtins/gen/literal/faceForward/524986.wgsl +++ b/test/tint/builtins/gen/literal/faceForward/524986.wgsl @@ -25,7 +25,7 @@ enable f16; // fn faceForward(vec<3, f16>, vec<3, f16>, vec<3, f16>) -> vec<3, f16> fn faceForward_524986() { - var res: vec3 = faceForward(vec3(f16()), vec3(f16()), vec3(f16())); + var res: vec3 = faceForward(vec3(1.h), vec3(1.h), vec3(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/faceForward/524986.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/faceForward/524986.wgsl.expected.dxc.hlsl index f9ff2727b4..d6cf67af89 100644 --- a/test/tint/builtins/gen/literal/faceForward/524986.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/faceForward/524986.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void faceForward_524986() { - vector res = faceforward((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx); + vector res = faceforward((float16_t(1.0h)).xxx, (float16_t(1.0h)).xxx, (float16_t(1.0h)).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/faceForward/524986.wgsl.expected.glsl b/test/tint/builtins/gen/literal/faceForward/524986.wgsl.expected.glsl index 7f2224323f..4a03ffeb0e 100644 --- a/test/tint/builtins/gen/literal/faceForward/524986.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/faceForward/524986.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void faceForward_524986() { - f16vec3 res = faceforward(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)); + f16vec3 res = faceforward(f16vec3(1.0hf), f16vec3(1.0hf), f16vec3(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void faceForward_524986() { - f16vec3 res = faceforward(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)); + f16vec3 res = faceforward(f16vec3(1.0hf), f16vec3(1.0hf), f16vec3(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void faceForward_524986() { - f16vec3 res = faceforward(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)); + f16vec3 res = faceforward(f16vec3(1.0hf), f16vec3(1.0hf), f16vec3(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/faceForward/524986.wgsl.expected.msl b/test/tint/builtins/gen/literal/faceForward/524986.wgsl.expected.msl index 39be077b6e..9eea5a11ea 100644 --- a/test/tint/builtins/gen/literal/faceForward/524986.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/faceForward/524986.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void faceForward_524986() { - half3 res = faceforward(half3(0.0h), half3(0.0h), half3(0.0h)); + half3 res = faceforward(half3(1.0h), half3(1.0h), half3(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/faceForward/524986.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/faceForward/524986.wgsl.expected.spvasm index e9ff4a62c2..ad5e4f5a39 100644 --- a/test/tint/builtins/gen/literal/faceForward/524986.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/faceForward/524986.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %17 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v3half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %faceForward_524986 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3half Function %17 - %13 = OpExtInst %v3half %16 FaceForward %17 %17 %17 + %res = OpVariable %_ptr_Function_v3half Function %21 + %13 = OpExtInst %v3half %16 FaceForward %18 %18 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %faceForward_524986 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %faceForward_524986 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %faceForward_524986 + %31 = OpLabel + %32 = OpFunctionCall %void %faceForward_524986 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %faceForward_524986 + %34 = OpLabel + %35 = OpFunctionCall %void %faceForward_524986 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/faceForward/524986.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/faceForward/524986.wgsl.expected.wgsl index 9c4ec2bcb4..43b0b359ad 100644 --- a/test/tint/builtins/gen/literal/faceForward/524986.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/faceForward/524986.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn faceForward_524986() { - var res : vec3 = faceForward(vec3(f16()), vec3(f16()), vec3(f16())); + var res : vec3 = faceForward(vec3(1.0h), vec3(1.0h), vec3(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl b/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl index fb1dcfb4a9..d2b290a4bf 100644 --- a/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl +++ b/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl @@ -25,7 +25,7 @@ enable f16; // fn faceForward(vec<4, f16>, vec<4, f16>, vec<4, f16>) -> vec<4, f16> fn faceForward_cc63dc() { - var res: vec4 = faceForward(vec4(f16()), vec4(f16()), vec4(f16())); + var res: vec4 = faceForward(vec4(1.h), vec4(1.h), vec4(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl.expected.dxc.hlsl index b59f3b0d92..ec3d4f84bc 100644 --- a/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void faceForward_cc63dc() { - vector res = faceforward((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx); + vector res = faceforward((float16_t(1.0h)).xxxx, (float16_t(1.0h)).xxxx, (float16_t(1.0h)).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl.expected.glsl b/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl.expected.glsl index ab00ae17f1..6a53621707 100644 --- a/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void faceForward_cc63dc() { - f16vec4 res = faceforward(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf)); + f16vec4 res = faceforward(f16vec4(1.0hf), f16vec4(1.0hf), f16vec4(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void faceForward_cc63dc() { - f16vec4 res = faceforward(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf)); + f16vec4 res = faceforward(f16vec4(1.0hf), f16vec4(1.0hf), f16vec4(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void faceForward_cc63dc() { - f16vec4 res = faceforward(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf)); + f16vec4 res = faceforward(f16vec4(1.0hf), f16vec4(1.0hf), f16vec4(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl.expected.msl b/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl.expected.msl index 982ab0a85e..423f02e55b 100644 --- a/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void faceForward_cc63dc() { - half4 res = faceforward(half4(0.0h), half4(0.0h), half4(0.0h)); + half4 res = faceforward(half4(1.0h), half4(1.0h), half4(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl.expected.spvasm index bfa79fb729..a5052c50d5 100644 --- a/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %17 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v4half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %faceForward_cc63dc = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4half Function %17 - %13 = OpExtInst %v4half %16 FaceForward %17 %17 %17 + %res = OpVariable %_ptr_Function_v4half Function %21 + %13 = OpExtInst %v4half %16 FaceForward %18 %18 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %faceForward_cc63dc +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %faceForward_cc63dc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %faceForward_cc63dc + %31 = OpLabel + %32 = OpFunctionCall %void %faceForward_cc63dc OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %faceForward_cc63dc + %34 = OpLabel + %35 = OpFunctionCall %void %faceForward_cc63dc OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl.expected.wgsl index 1fca87128c..5a7e113f51 100644 --- a/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn faceForward_cc63dc() { - var res : vec4 = faceForward(vec4(f16()), vec4(f16()), vec4(f16())); + var res : vec4 = faceForward(vec4(1.0h), vec4(1.0h), vec4(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl b/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl index bf8db4f6d0..69a787ba2c 100644 --- a/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl +++ b/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl @@ -25,7 +25,7 @@ enable f16; // fn faceForward(vec<2, f16>, vec<2, f16>, vec<2, f16>) -> vec<2, f16> fn faceForward_fb0f2e() { - var res: vec2 = faceForward(vec2(f16()), vec2(f16()), vec2(f16())); + var res: vec2 = faceForward(vec2(1.h), vec2(1.h), vec2(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl.expected.dxc.hlsl index a4205ab370..0cea4d4e6b 100644 --- a/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void faceForward_fb0f2e() { - vector res = faceforward((float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx); + vector res = faceforward((float16_t(1.0h)).xx, (float16_t(1.0h)).xx, (float16_t(1.0h)).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl.expected.glsl index 6682c02cda..91747bf50d 100644 --- a/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void faceForward_fb0f2e() { - f16vec2 res = faceforward(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf)); + f16vec2 res = faceforward(f16vec2(1.0hf), f16vec2(1.0hf), f16vec2(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void faceForward_fb0f2e() { - f16vec2 res = faceforward(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf)); + f16vec2 res = faceforward(f16vec2(1.0hf), f16vec2(1.0hf), f16vec2(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void faceForward_fb0f2e() { - f16vec2 res = faceforward(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf)); + f16vec2 res = faceforward(f16vec2(1.0hf), f16vec2(1.0hf), f16vec2(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl.expected.msl b/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl.expected.msl index 9c07359dab..ef0dd6db54 100644 --- a/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void faceForward_fb0f2e() { - half2 res = faceforward(half2(0.0h), half2(0.0h), half2(0.0h)); + half2 res = faceforward(half2(1.0h), half2(1.0h), half2(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl.expected.spvasm index 20da05411e..b3e1ff05af 100644 --- a/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %17 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v2half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %faceForward_fb0f2e = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2half Function %17 - %13 = OpExtInst %v2half %16 FaceForward %17 %17 %17 + %res = OpVariable %_ptr_Function_v2half Function %21 + %13 = OpExtInst %v2half %16 FaceForward %18 %18 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %faceForward_fb0f2e +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %faceForward_fb0f2e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %faceForward_fb0f2e + %31 = OpLabel + %32 = OpFunctionCall %void %faceForward_fb0f2e OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %faceForward_fb0f2e + %34 = OpLabel + %35 = OpFunctionCall %void %faceForward_fb0f2e OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl.expected.wgsl index 96b39add4a..6f9ce4c73d 100644 --- a/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn faceForward_fb0f2e() { - var res : vec2 = faceForward(vec2(f16()), vec2(f16()), vec2(f16())); + var res : vec2 = faceForward(vec2(1.0h), vec2(1.0h), vec2(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/floor/3802c0.wgsl b/test/tint/builtins/gen/literal/floor/3802c0.wgsl index bbe70eeaef..a8cfcea9ba 100644 --- a/test/tint/builtins/gen/literal/floor/3802c0.wgsl +++ b/test/tint/builtins/gen/literal/floor/3802c0.wgsl @@ -25,7 +25,7 @@ enable f16; // fn floor(vec<3, f16>) -> vec<3, f16> fn floor_3802c0() { - var res: vec3 = floor(vec3(f16())); + var res: vec3 = floor(vec3(1.5h)); } @vertex diff --git a/test/tint/builtins/gen/literal/floor/3802c0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/floor/3802c0.wgsl.expected.dxc.hlsl index 9974a5b9f6..446e09688a 100644 --- a/test/tint/builtins/gen/literal/floor/3802c0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/floor/3802c0.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void floor_3802c0() { - vector res = (float16_t(0.0h)).xxx; + vector res = (float16_t(1.0h)).xxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/floor/3802c0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/floor/3802c0.wgsl.expected.glsl index 1007c7d686..c3920b3067 100644 --- a/test/tint/builtins/gen/literal/floor/3802c0.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/floor/3802c0.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void floor_3802c0() { - f16vec3 res = f16vec3(0.0hf); + f16vec3 res = f16vec3(1.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void floor_3802c0() { - f16vec3 res = f16vec3(0.0hf); + f16vec3 res = f16vec3(1.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void floor_3802c0() { - f16vec3 res = f16vec3(0.0hf); + f16vec3 res = f16vec3(1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/floor/3802c0.wgsl.expected.msl b/test/tint/builtins/gen/literal/floor/3802c0.wgsl.expected.msl index 90432ada35..0a637cdc48 100644 --- a/test/tint/builtins/gen/literal/floor/3802c0.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/floor/3802c0.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void floor_3802c0() { - half3 res = half3(0.0h); + half3 res = half3(1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/floor/3802c0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/floor/3802c0.wgsl.expected.spvasm index 51bbbe3faf..f2c70558a7 100644 --- a/test/tint/builtins/gen/literal/floor/3802c0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/floor/3802c0.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,35 +36,37 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %18 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %floor_3802c0 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %res %15 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %18 - %20 = OpLabel - %21 = OpFunctionCall %void %floor_3802c0 +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %floor_3802c0 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %23 = OpLabel - %24 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %24 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %void %floor_3802c0 + %29 = OpLabel + %30 = OpFunctionCall %void %floor_3802c0 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %floor_3802c0 + %32 = OpLabel + %33 = OpFunctionCall %void %floor_3802c0 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/floor/3802c0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/floor/3802c0.wgsl.expected.wgsl index 454c66907c..5840b5425c 100644 --- a/test/tint/builtins/gen/literal/floor/3802c0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/floor/3802c0.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn floor_3802c0() { - var res : vec3 = floor(vec3(f16())); + var res : vec3 = floor(vec3(1.5h)); } @vertex diff --git a/test/tint/builtins/gen/literal/floor/84658c.wgsl b/test/tint/builtins/gen/literal/floor/84658c.wgsl index 77a94d5e7c..9cf2adbbb9 100644 --- a/test/tint/builtins/gen/literal/floor/84658c.wgsl +++ b/test/tint/builtins/gen/literal/floor/84658c.wgsl @@ -25,7 +25,7 @@ enable f16; // fn floor(vec<2, f16>) -> vec<2, f16> fn floor_84658c() { - var res: vec2 = floor(vec2(f16())); + var res: vec2 = floor(vec2(1.5h)); } @vertex diff --git a/test/tint/builtins/gen/literal/floor/84658c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/floor/84658c.wgsl.expected.dxc.hlsl index 5f5a3b6dce..dbdd75f9dd 100644 --- a/test/tint/builtins/gen/literal/floor/84658c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/floor/84658c.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void floor_84658c() { - vector res = (float16_t(0.0h)).xx; + vector res = (float16_t(1.0h)).xx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/floor/84658c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/floor/84658c.wgsl.expected.glsl index ef5b290ed6..dce9c856b0 100644 --- a/test/tint/builtins/gen/literal/floor/84658c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/floor/84658c.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void floor_84658c() { - f16vec2 res = f16vec2(0.0hf); + f16vec2 res = f16vec2(1.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void floor_84658c() { - f16vec2 res = f16vec2(0.0hf); + f16vec2 res = f16vec2(1.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void floor_84658c() { - f16vec2 res = f16vec2(0.0hf); + f16vec2 res = f16vec2(1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/floor/84658c.wgsl.expected.msl b/test/tint/builtins/gen/literal/floor/84658c.wgsl.expected.msl index 5ee3802d9c..c619d7c1cd 100644 --- a/test/tint/builtins/gen/literal/floor/84658c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/floor/84658c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void floor_84658c() { - half2 res = half2(0.0h); + half2 res = half2(1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/floor/84658c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/floor/84658c.wgsl.expected.spvasm index 72b7f51996..b6a4945561 100644 --- a/test/tint/builtins/gen/literal/floor/84658c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/floor/84658c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,35 +36,37 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %18 = OpTypeFunction %v4float + %19 = OpConstantNull %v2half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %floor_84658c = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %res %15 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %18 - %20 = OpLabel - %21 = OpFunctionCall %void %floor_84658c +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %floor_84658c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %23 = OpLabel - %24 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %24 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %void %floor_84658c + %29 = OpLabel + %30 = OpFunctionCall %void %floor_84658c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %floor_84658c + %32 = OpLabel + %33 = OpFunctionCall %void %floor_84658c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/floor/84658c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/floor/84658c.wgsl.expected.wgsl index bbf2ee4968..4b7c4d6141 100644 --- a/test/tint/builtins/gen/literal/floor/84658c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/floor/84658c.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn floor_84658c() { - var res : vec2 = floor(vec2(f16())); + var res : vec2 = floor(vec2(1.5h)); } @vertex diff --git a/test/tint/builtins/gen/literal/floor/a2d31b.wgsl b/test/tint/builtins/gen/literal/floor/a2d31b.wgsl index f64f4ec30c..f5d0a8854a 100644 --- a/test/tint/builtins/gen/literal/floor/a2d31b.wgsl +++ b/test/tint/builtins/gen/literal/floor/a2d31b.wgsl @@ -25,7 +25,7 @@ enable f16; // fn floor(vec<4, f16>) -> vec<4, f16> fn floor_a2d31b() { - var res: vec4 = floor(vec4(f16())); + var res: vec4 = floor(vec4(1.5h)); } @vertex diff --git a/test/tint/builtins/gen/literal/floor/a2d31b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/floor/a2d31b.wgsl.expected.dxc.hlsl index 334112b6df..e8e43d8373 100644 --- a/test/tint/builtins/gen/literal/floor/a2d31b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/floor/a2d31b.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void floor_a2d31b() { - vector res = (float16_t(0.0h)).xxxx; + vector res = (float16_t(1.0h)).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/floor/a2d31b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/floor/a2d31b.wgsl.expected.glsl index 4d06c11288..3463a7f14c 100644 --- a/test/tint/builtins/gen/literal/floor/a2d31b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/floor/a2d31b.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void floor_a2d31b() { - f16vec4 res = f16vec4(0.0hf); + f16vec4 res = f16vec4(1.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void floor_a2d31b() { - f16vec4 res = f16vec4(0.0hf); + f16vec4 res = f16vec4(1.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void floor_a2d31b() { - f16vec4 res = f16vec4(0.0hf); + f16vec4 res = f16vec4(1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/floor/a2d31b.wgsl.expected.msl b/test/tint/builtins/gen/literal/floor/a2d31b.wgsl.expected.msl index 0e3e4ee9fb..a1b0f04d5a 100644 --- a/test/tint/builtins/gen/literal/floor/a2d31b.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/floor/a2d31b.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void floor_a2d31b() { - half4 res = half4(0.0h); + half4 res = half4(1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/floor/a2d31b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/floor/a2d31b.wgsl.expected.spvasm index a877d97797..6f84fa2376 100644 --- a/test/tint/builtins/gen/literal/floor/a2d31b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/floor/a2d31b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,35 +36,37 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %18 = OpTypeFunction %v4float + %19 = OpConstantNull %v4half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %floor_a2d31b = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %res %15 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %18 - %20 = OpLabel - %21 = OpFunctionCall %void %floor_a2d31b +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %floor_a2d31b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %23 = OpLabel - %24 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %24 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %void %floor_a2d31b + %29 = OpLabel + %30 = OpFunctionCall %void %floor_a2d31b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %floor_a2d31b + %32 = OpLabel + %33 = OpFunctionCall %void %floor_a2d31b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/floor/a2d31b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/floor/a2d31b.wgsl.expected.wgsl index 54977de3dc..1772e94264 100644 --- a/test/tint/builtins/gen/literal/floor/a2d31b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/floor/a2d31b.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn floor_a2d31b() { - var res : vec4 = floor(vec4(f16())); + var res : vec4 = floor(vec4(1.5h)); } @vertex diff --git a/test/tint/builtins/gen/literal/floor/b6e09c.wgsl b/test/tint/builtins/gen/literal/floor/b6e09c.wgsl index 5defc3121b..9eb9fa7e85 100644 --- a/test/tint/builtins/gen/literal/floor/b6e09c.wgsl +++ b/test/tint/builtins/gen/literal/floor/b6e09c.wgsl @@ -25,7 +25,7 @@ enable f16; // fn floor(f16) -> f16 fn floor_b6e09c() { - var res: f16 = floor(f16()); + var res: f16 = floor(1.5h); } @vertex diff --git a/test/tint/builtins/gen/literal/floor/b6e09c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/floor/b6e09c.wgsl.expected.dxc.hlsl index 13f7908a43..fb8121ea37 100644 --- a/test/tint/builtins/gen/literal/floor/b6e09c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/floor/b6e09c.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void floor_b6e09c() { - float16_t res = float16_t(0.0h); + float16_t res = float16_t(1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/floor/b6e09c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/floor/b6e09c.wgsl.expected.glsl index 3970d69b2d..4cf7082699 100644 --- a/test/tint/builtins/gen/literal/floor/b6e09c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/floor/b6e09c.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void floor_b6e09c() { - float16_t res = 0.0hf; + float16_t res = 1.0hf; } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void floor_b6e09c() { - float16_t res = 0.0hf; + float16_t res = 1.0hf; } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void floor_b6e09c() { - float16_t res = 0.0hf; + float16_t res = 1.0hf; } void compute_main() { diff --git a/test/tint/builtins/gen/literal/floor/b6e09c.wgsl.expected.msl b/test/tint/builtins/gen/literal/floor/b6e09c.wgsl.expected.msl index 5f14018b3d..b84aca858b 100644 --- a/test/tint/builtins/gen/literal/floor/b6e09c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/floor/b6e09c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void floor_b6e09c() { - half res = 0.0h; + half res = 1.0h; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/floor/b6e09c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/floor/b6e09c.wgsl.expected.spvasm index 8e6ff79f4c..bb1076b0f8 100644 --- a/test/tint/builtins/gen/literal/floor/b6e09c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/floor/b6e09c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -35,35 +35,36 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %17 = OpTypeFunction %v4float + %17 = OpConstantNull %half + %18 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %floor_b6e09c = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_half Function %14 - OpStore %res %14 + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %res %half_0x1p_0 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %17 - %19 = OpLabel - %20 = OpFunctionCall %void %floor_b6e09c +%vertex_main_inner = OpFunction %v4float None %18 + %20 = OpLabel + %21 = OpFunctionCall %void %floor_b6e09c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %22 = OpLabel - %23 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %23 + %23 = OpLabel + %24 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %24 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %floor_b6e09c + %27 = OpLabel + %28 = OpFunctionCall %void %floor_b6e09c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %floor_b6e09c + %30 = OpLabel + %31 = OpFunctionCall %void %floor_b6e09c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/floor/b6e09c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/floor/b6e09c.wgsl.expected.wgsl index 59a04ccd30..35c231612e 100644 --- a/test/tint/builtins/gen/literal/floor/b6e09c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/floor/b6e09c.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn floor_b6e09c() { - var res : f16 = floor(f16()); + var res : f16 = floor(1.5h); } @vertex diff --git a/test/tint/builtins/gen/literal/fma/ab7818.wgsl b/test/tint/builtins/gen/literal/fma/ab7818.wgsl index 025402375f..ab5ebb97c0 100644 --- a/test/tint/builtins/gen/literal/fma/ab7818.wgsl +++ b/test/tint/builtins/gen/literal/fma/ab7818.wgsl @@ -25,7 +25,7 @@ enable f16; // fn fma(vec<4, f16>, vec<4, f16>, vec<4, f16>) -> vec<4, f16> fn fma_ab7818() { - var res: vec4 = fma(vec4(f16()), vec4(f16()), vec4(f16())); + var res: vec4 = fma(vec4(1.h), vec4(1.h), vec4(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/fma/ab7818.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/fma/ab7818.wgsl.expected.dxc.hlsl index 0621f2a731..3336b31ee2 100644 --- a/test/tint/builtins/gen/literal/fma/ab7818.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/fma/ab7818.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void fma_ab7818() { - vector res = mad((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx); + vector res = mad((float16_t(1.0h)).xxxx, (float16_t(1.0h)).xxxx, (float16_t(1.0h)).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/fma/ab7818.wgsl.expected.glsl b/test/tint/builtins/gen/literal/fma/ab7818.wgsl.expected.glsl index ea533429c1..fa4e7607bd 100644 --- a/test/tint/builtins/gen/literal/fma/ab7818.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/fma/ab7818.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void fma_ab7818() { - f16vec4 res = ((f16vec4(0.0hf)) * (f16vec4(0.0hf)) + (f16vec4(0.0hf))); + f16vec4 res = ((f16vec4(1.0hf)) * (f16vec4(1.0hf)) + (f16vec4(1.0hf))); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void fma_ab7818() { - f16vec4 res = ((f16vec4(0.0hf)) * (f16vec4(0.0hf)) + (f16vec4(0.0hf))); + f16vec4 res = ((f16vec4(1.0hf)) * (f16vec4(1.0hf)) + (f16vec4(1.0hf))); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void fma_ab7818() { - f16vec4 res = ((f16vec4(0.0hf)) * (f16vec4(0.0hf)) + (f16vec4(0.0hf))); + f16vec4 res = ((f16vec4(1.0hf)) * (f16vec4(1.0hf)) + (f16vec4(1.0hf))); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/fma/ab7818.wgsl.expected.msl b/test/tint/builtins/gen/literal/fma/ab7818.wgsl.expected.msl index 1e222235cf..eb2484d7ae 100644 --- a/test/tint/builtins/gen/literal/fma/ab7818.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/fma/ab7818.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void fma_ab7818() { - half4 res = fma(half4(0.0h), half4(0.0h), half4(0.0h)); + half4 res = fma(half4(1.0h), half4(1.0h), half4(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/fma/ab7818.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/fma/ab7818.wgsl.expected.spvasm index a5bc45f0a8..ccf40ea391 100644 --- a/test/tint/builtins/gen/literal/fma/ab7818.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/fma/ab7818.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %17 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v4half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %fma_ab7818 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4half Function %17 - %13 = OpExtInst %v4half %16 Fma %17 %17 %17 + %res = OpVariable %_ptr_Function_v4half Function %21 + %13 = OpExtInst %v4half %16 Fma %18 %18 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %fma_ab7818 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %fma_ab7818 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %fma_ab7818 + %31 = OpLabel + %32 = OpFunctionCall %void %fma_ab7818 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %fma_ab7818 + %34 = OpLabel + %35 = OpFunctionCall %void %fma_ab7818 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/fma/ab7818.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/fma/ab7818.wgsl.expected.wgsl index 0732ab88bc..d0f3ce4690 100644 --- a/test/tint/builtins/gen/literal/fma/ab7818.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/fma/ab7818.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn fma_ab7818() { - var res : vec4 = fma(vec4(f16()), vec4(f16()), vec4(f16())); + var res : vec4 = fma(vec4(1.0h), vec4(1.0h), vec4(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/fma/bf21b6.wgsl b/test/tint/builtins/gen/literal/fma/bf21b6.wgsl index 332799fe60..abfb8df837 100644 --- a/test/tint/builtins/gen/literal/fma/bf21b6.wgsl +++ b/test/tint/builtins/gen/literal/fma/bf21b6.wgsl @@ -25,7 +25,7 @@ enable f16; // fn fma(vec<2, f16>, vec<2, f16>, vec<2, f16>) -> vec<2, f16> fn fma_bf21b6() { - var res: vec2 = fma(vec2(f16()), vec2(f16()), vec2(f16())); + var res: vec2 = fma(vec2(1.h), vec2(1.h), vec2(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/fma/bf21b6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/fma/bf21b6.wgsl.expected.dxc.hlsl index 85963f933f..9e48041ae2 100644 --- a/test/tint/builtins/gen/literal/fma/bf21b6.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/fma/bf21b6.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void fma_bf21b6() { - vector res = mad((float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx); + vector res = mad((float16_t(1.0h)).xx, (float16_t(1.0h)).xx, (float16_t(1.0h)).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/fma/bf21b6.wgsl.expected.glsl b/test/tint/builtins/gen/literal/fma/bf21b6.wgsl.expected.glsl index 576c850f0d..627c7c9ade 100644 --- a/test/tint/builtins/gen/literal/fma/bf21b6.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/fma/bf21b6.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void fma_bf21b6() { - f16vec2 res = ((f16vec2(0.0hf)) * (f16vec2(0.0hf)) + (f16vec2(0.0hf))); + f16vec2 res = ((f16vec2(1.0hf)) * (f16vec2(1.0hf)) + (f16vec2(1.0hf))); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void fma_bf21b6() { - f16vec2 res = ((f16vec2(0.0hf)) * (f16vec2(0.0hf)) + (f16vec2(0.0hf))); + f16vec2 res = ((f16vec2(1.0hf)) * (f16vec2(1.0hf)) + (f16vec2(1.0hf))); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void fma_bf21b6() { - f16vec2 res = ((f16vec2(0.0hf)) * (f16vec2(0.0hf)) + (f16vec2(0.0hf))); + f16vec2 res = ((f16vec2(1.0hf)) * (f16vec2(1.0hf)) + (f16vec2(1.0hf))); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/fma/bf21b6.wgsl.expected.msl b/test/tint/builtins/gen/literal/fma/bf21b6.wgsl.expected.msl index 7d0d9dfe47..54c227bc22 100644 --- a/test/tint/builtins/gen/literal/fma/bf21b6.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/fma/bf21b6.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void fma_bf21b6() { - half2 res = fma(half2(0.0h), half2(0.0h), half2(0.0h)); + half2 res = fma(half2(1.0h), half2(1.0h), half2(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/fma/bf21b6.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/fma/bf21b6.wgsl.expected.spvasm index 4759d350cd..6b33758ad3 100644 --- a/test/tint/builtins/gen/literal/fma/bf21b6.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/fma/bf21b6.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %17 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v2half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %fma_bf21b6 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2half Function %17 - %13 = OpExtInst %v2half %16 Fma %17 %17 %17 + %res = OpVariable %_ptr_Function_v2half Function %21 + %13 = OpExtInst %v2half %16 Fma %18 %18 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %fma_bf21b6 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %fma_bf21b6 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %fma_bf21b6 + %31 = OpLabel + %32 = OpFunctionCall %void %fma_bf21b6 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %fma_bf21b6 + %34 = OpLabel + %35 = OpFunctionCall %void %fma_bf21b6 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/fma/bf21b6.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/fma/bf21b6.wgsl.expected.wgsl index dcd733b4e5..6d9f0bd331 100644 --- a/test/tint/builtins/gen/literal/fma/bf21b6.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/fma/bf21b6.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn fma_bf21b6() { - var res : vec2 = fma(vec2(f16()), vec2(f16()), vec2(f16())); + var res : vec2 = fma(vec2(1.0h), vec2(1.0h), vec2(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/fma/c8abb3.wgsl b/test/tint/builtins/gen/literal/fma/c8abb3.wgsl index 5e605cc7a6..3dfeb73f22 100644 --- a/test/tint/builtins/gen/literal/fma/c8abb3.wgsl +++ b/test/tint/builtins/gen/literal/fma/c8abb3.wgsl @@ -25,7 +25,7 @@ enable f16; // fn fma(f16, f16, f16) -> f16 fn fma_c8abb3() { - var res: f16 = fma(f16(), f16(), f16()); + var res: f16 = fma(1.h, 1.h, 1.h); } @vertex diff --git a/test/tint/builtins/gen/literal/fma/c8abb3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/fma/c8abb3.wgsl.expected.dxc.hlsl index 02d0e31166..f6e79c58c6 100644 --- a/test/tint/builtins/gen/literal/fma/c8abb3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/fma/c8abb3.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void fma_c8abb3() { - float16_t res = mad(float16_t(0.0h), float16_t(0.0h), float16_t(0.0h)); + float16_t res = mad(float16_t(1.0h), float16_t(1.0h), float16_t(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/fma/c8abb3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/fma/c8abb3.wgsl.expected.glsl index 86e6a49ed2..8540f07399 100644 --- a/test/tint/builtins/gen/literal/fma/c8abb3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/fma/c8abb3.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void fma_c8abb3() { - float16_t res = ((0.0hf) * (0.0hf) + (0.0hf)); + float16_t res = ((1.0hf) * (1.0hf) + (1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void fma_c8abb3() { - float16_t res = ((0.0hf) * (0.0hf) + (0.0hf)); + float16_t res = ((1.0hf) * (1.0hf) + (1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void fma_c8abb3() { - float16_t res = ((0.0hf) * (0.0hf) + (0.0hf)); + float16_t res = ((1.0hf) * (1.0hf) + (1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/fma/c8abb3.wgsl.expected.msl b/test/tint/builtins/gen/literal/fma/c8abb3.wgsl.expected.msl index 9222c9b236..1152af9b3b 100644 --- a/test/tint/builtins/gen/literal/fma/c8abb3.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/fma/c8abb3.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void fma_c8abb3() { - half res = fma(0.0h, 0.0h, 0.0h); + half res = fma(1.0h, 1.0h, 1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/fma/c8abb3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/fma/c8abb3.wgsl.expected.spvasm index bc7d248451..8bde975503 100644 --- a/test/tint/builtins/gen/literal/fma/c8abb3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/fma/c8abb3.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,36 +36,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %16 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %19 = OpTypeFunction %v4float + %19 = OpConstantNull %half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %fma_c8abb3 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_half Function %16 - %13 = OpExtInst %half %15 Fma %16 %16 %16 + %res = OpVariable %_ptr_Function_half Function %19 + %13 = OpExtInst %half %15 Fma %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %fma_c8abb3 +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %fma_c8abb3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %fma_c8abb3 + %29 = OpLabel + %30 = OpFunctionCall %void %fma_c8abb3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %fma_c8abb3 + %32 = OpLabel + %33 = OpFunctionCall %void %fma_c8abb3 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/fma/c8abb3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/fma/c8abb3.wgsl.expected.wgsl index 44eba4373c..400a45ee59 100644 --- a/test/tint/builtins/gen/literal/fma/c8abb3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/fma/c8abb3.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn fma_c8abb3() { - var res : f16 = fma(f16(), f16(), f16()); + var res : f16 = fma(1.0h, 1.0h, 1.0h); } @vertex diff --git a/test/tint/builtins/gen/literal/fma/e7abdc.wgsl b/test/tint/builtins/gen/literal/fma/e7abdc.wgsl index 765d3e6349..1d0b5833ad 100644 --- a/test/tint/builtins/gen/literal/fma/e7abdc.wgsl +++ b/test/tint/builtins/gen/literal/fma/e7abdc.wgsl @@ -25,7 +25,7 @@ enable f16; // fn fma(vec<3, f16>, vec<3, f16>, vec<3, f16>) -> vec<3, f16> fn fma_e7abdc() { - var res: vec3 = fma(vec3(f16()), vec3(f16()), vec3(f16())); + var res: vec3 = fma(vec3(1.h), vec3(1.h), vec3(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/fma/e7abdc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/fma/e7abdc.wgsl.expected.dxc.hlsl index 5ab1666763..4930e9ec54 100644 --- a/test/tint/builtins/gen/literal/fma/e7abdc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/fma/e7abdc.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void fma_e7abdc() { - vector res = mad((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx); + vector res = mad((float16_t(1.0h)).xxx, (float16_t(1.0h)).xxx, (float16_t(1.0h)).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/fma/e7abdc.wgsl.expected.glsl b/test/tint/builtins/gen/literal/fma/e7abdc.wgsl.expected.glsl index c4e4c74171..182adeec3c 100644 --- a/test/tint/builtins/gen/literal/fma/e7abdc.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/fma/e7abdc.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void fma_e7abdc() { - f16vec3 res = ((f16vec3(0.0hf)) * (f16vec3(0.0hf)) + (f16vec3(0.0hf))); + f16vec3 res = ((f16vec3(1.0hf)) * (f16vec3(1.0hf)) + (f16vec3(1.0hf))); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void fma_e7abdc() { - f16vec3 res = ((f16vec3(0.0hf)) * (f16vec3(0.0hf)) + (f16vec3(0.0hf))); + f16vec3 res = ((f16vec3(1.0hf)) * (f16vec3(1.0hf)) + (f16vec3(1.0hf))); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void fma_e7abdc() { - f16vec3 res = ((f16vec3(0.0hf)) * (f16vec3(0.0hf)) + (f16vec3(0.0hf))); + f16vec3 res = ((f16vec3(1.0hf)) * (f16vec3(1.0hf)) + (f16vec3(1.0hf))); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/fma/e7abdc.wgsl.expected.msl b/test/tint/builtins/gen/literal/fma/e7abdc.wgsl.expected.msl index 3622508c6c..2360c4d41f 100644 --- a/test/tint/builtins/gen/literal/fma/e7abdc.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/fma/e7abdc.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void fma_e7abdc() { - half3 res = fma(half3(0.0h), half3(0.0h), half3(0.0h)); + half3 res = fma(half3(1.0h), half3(1.0h), half3(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/fma/e7abdc.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/fma/e7abdc.wgsl.expected.spvasm index daa3de58c5..b2d0b4c4d7 100644 --- a/test/tint/builtins/gen/literal/fma/e7abdc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/fma/e7abdc.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %17 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v3half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %fma_e7abdc = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3half Function %17 - %13 = OpExtInst %v3half %16 Fma %17 %17 %17 + %res = OpVariable %_ptr_Function_v3half Function %21 + %13 = OpExtInst %v3half %16 Fma %18 %18 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %fma_e7abdc +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %fma_e7abdc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %fma_e7abdc + %31 = OpLabel + %32 = OpFunctionCall %void %fma_e7abdc OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %fma_e7abdc + %34 = OpLabel + %35 = OpFunctionCall %void %fma_e7abdc OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/fma/e7abdc.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/fma/e7abdc.wgsl.expected.wgsl index 45afac175a..b83db18d42 100644 --- a/test/tint/builtins/gen/literal/fma/e7abdc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/fma/e7abdc.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn fma_e7abdc() { - var res : vec3 = fma(vec3(f16()), vec3(f16()), vec3(f16())); + var res : vec3 = fma(vec3(1.0h), vec3(1.0h), vec3(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/fract/181aa9.wgsl b/test/tint/builtins/gen/literal/fract/181aa9.wgsl index df799a0bec..835b78a305 100644 --- a/test/tint/builtins/gen/literal/fract/181aa9.wgsl +++ b/test/tint/builtins/gen/literal/fract/181aa9.wgsl @@ -25,7 +25,7 @@ enable f16; // fn fract(vec<2, f16>) -> vec<2, f16> fn fract_181aa9() { - var res: vec2 = fract(vec2(f16())); + var res: vec2 = fract(vec2(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/fract/181aa9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/fract/181aa9.wgsl.expected.dxc.hlsl index ff11d3850a..e602eda4f7 100644 --- a/test/tint/builtins/gen/literal/fract/181aa9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/fract/181aa9.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void fract_181aa9() { - vector res = frac((float16_t(0.0h)).xx); + vector res = frac((float16_t(1.0h)).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/fract/181aa9.wgsl.expected.glsl b/test/tint/builtins/gen/literal/fract/181aa9.wgsl.expected.glsl index 1e4d6bf48b..c837c60586 100644 --- a/test/tint/builtins/gen/literal/fract/181aa9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/fract/181aa9.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void fract_181aa9() { - f16vec2 res = fract(f16vec2(0.0hf)); + f16vec2 res = fract(f16vec2(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void fract_181aa9() { - f16vec2 res = fract(f16vec2(0.0hf)); + f16vec2 res = fract(f16vec2(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void fract_181aa9() { - f16vec2 res = fract(f16vec2(0.0hf)); + f16vec2 res = fract(f16vec2(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/fract/181aa9.wgsl.expected.msl b/test/tint/builtins/gen/literal/fract/181aa9.wgsl.expected.msl index b807118476..c9a1ea8ef1 100644 --- a/test/tint/builtins/gen/literal/fract/181aa9.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/fract/181aa9.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void fract_181aa9() { - half2 res = fract(half2(0.0h)); + half2 res = fract(half2(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/fract/181aa9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/fract/181aa9.wgsl.expected.spvasm index 1bd3c4f73b..9f1b31c882 100644 --- a/test/tint/builtins/gen/literal/fract/181aa9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/fract/181aa9.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %17 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v2half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %fract_181aa9 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2half Function %17 - %13 = OpExtInst %v2half %16 Fract %17 + %res = OpVariable %_ptr_Function_v2half Function %21 + %13 = OpExtInst %v2half %16 Fract %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %fract_181aa9 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %fract_181aa9 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %fract_181aa9 + %31 = OpLabel + %32 = OpFunctionCall %void %fract_181aa9 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %fract_181aa9 + %34 = OpLabel + %35 = OpFunctionCall %void %fract_181aa9 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/fract/181aa9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/fract/181aa9.wgsl.expected.wgsl index fbad3966ae..c67b41575d 100644 --- a/test/tint/builtins/gen/literal/fract/181aa9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/fract/181aa9.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn fract_181aa9() { - var res : vec2 = fract(vec2(f16())); + var res : vec2 = fract(vec2(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/fract/498c77.wgsl b/test/tint/builtins/gen/literal/fract/498c77.wgsl index 5f4dd0e9f0..13cadd78a9 100644 --- a/test/tint/builtins/gen/literal/fract/498c77.wgsl +++ b/test/tint/builtins/gen/literal/fract/498c77.wgsl @@ -25,7 +25,7 @@ enable f16; // fn fract(vec<4, f16>) -> vec<4, f16> fn fract_498c77() { - var res: vec4 = fract(vec4(f16())); + var res: vec4 = fract(vec4(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/fract/498c77.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/fract/498c77.wgsl.expected.dxc.hlsl index b6fe7b1074..b58ad69fb2 100644 --- a/test/tint/builtins/gen/literal/fract/498c77.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/fract/498c77.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void fract_498c77() { - vector res = frac((float16_t(0.0h)).xxxx); + vector res = frac((float16_t(1.0h)).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/fract/498c77.wgsl.expected.glsl b/test/tint/builtins/gen/literal/fract/498c77.wgsl.expected.glsl index 352a8ee81f..b4f58b93da 100644 --- a/test/tint/builtins/gen/literal/fract/498c77.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/fract/498c77.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void fract_498c77() { - f16vec4 res = fract(f16vec4(0.0hf)); + f16vec4 res = fract(f16vec4(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void fract_498c77() { - f16vec4 res = fract(f16vec4(0.0hf)); + f16vec4 res = fract(f16vec4(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void fract_498c77() { - f16vec4 res = fract(f16vec4(0.0hf)); + f16vec4 res = fract(f16vec4(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/fract/498c77.wgsl.expected.msl b/test/tint/builtins/gen/literal/fract/498c77.wgsl.expected.msl index 02f42f436c..521e56d60d 100644 --- a/test/tint/builtins/gen/literal/fract/498c77.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/fract/498c77.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void fract_498c77() { - half4 res = fract(half4(0.0h)); + half4 res = fract(half4(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/fract/498c77.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/fract/498c77.wgsl.expected.spvasm index 8ab3fda8d6..d4bf7206f0 100644 --- a/test/tint/builtins/gen/literal/fract/498c77.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/fract/498c77.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %17 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v4half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %fract_498c77 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4half Function %17 - %13 = OpExtInst %v4half %16 Fract %17 + %res = OpVariable %_ptr_Function_v4half Function %21 + %13 = OpExtInst %v4half %16 Fract %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %fract_498c77 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %fract_498c77 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %fract_498c77 + %31 = OpLabel + %32 = OpFunctionCall %void %fract_498c77 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %fract_498c77 + %34 = OpLabel + %35 = OpFunctionCall %void %fract_498c77 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/fract/498c77.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/fract/498c77.wgsl.expected.wgsl index 33a0794881..3c8ac4e24d 100644 --- a/test/tint/builtins/gen/literal/fract/498c77.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/fract/498c77.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn fract_498c77() { - var res : vec4 = fract(vec4(f16())); + var res : vec4 = fract(vec4(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/fract/958a1d.wgsl b/test/tint/builtins/gen/literal/fract/958a1d.wgsl index a2c98fd09f..27348ee537 100644 --- a/test/tint/builtins/gen/literal/fract/958a1d.wgsl +++ b/test/tint/builtins/gen/literal/fract/958a1d.wgsl @@ -25,7 +25,7 @@ enable f16; // fn fract(vec<3, f16>) -> vec<3, f16> fn fract_958a1d() { - var res: vec3 = fract(vec3(f16())); + var res: vec3 = fract(vec3(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/fract/958a1d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/fract/958a1d.wgsl.expected.dxc.hlsl index 0c8e9a6ccc..998cc750ff 100644 --- a/test/tint/builtins/gen/literal/fract/958a1d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/fract/958a1d.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void fract_958a1d() { - vector res = frac((float16_t(0.0h)).xxx); + vector res = frac((float16_t(1.0h)).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/fract/958a1d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/fract/958a1d.wgsl.expected.glsl index 19520f77f3..de3b9eef84 100644 --- a/test/tint/builtins/gen/literal/fract/958a1d.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/fract/958a1d.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void fract_958a1d() { - f16vec3 res = fract(f16vec3(0.0hf)); + f16vec3 res = fract(f16vec3(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void fract_958a1d() { - f16vec3 res = fract(f16vec3(0.0hf)); + f16vec3 res = fract(f16vec3(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void fract_958a1d() { - f16vec3 res = fract(f16vec3(0.0hf)); + f16vec3 res = fract(f16vec3(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/fract/958a1d.wgsl.expected.msl b/test/tint/builtins/gen/literal/fract/958a1d.wgsl.expected.msl index fb0e54ae3e..9a814ffb7e 100644 --- a/test/tint/builtins/gen/literal/fract/958a1d.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/fract/958a1d.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void fract_958a1d() { - half3 res = fract(half3(0.0h)); + half3 res = fract(half3(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/fract/958a1d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/fract/958a1d.wgsl.expected.spvasm index ea074c7a12..79831a45ab 100644 --- a/test/tint/builtins/gen/literal/fract/958a1d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/fract/958a1d.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %17 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v3half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %fract_958a1d = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3half Function %17 - %13 = OpExtInst %v3half %16 Fract %17 + %res = OpVariable %_ptr_Function_v3half Function %21 + %13 = OpExtInst %v3half %16 Fract %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %fract_958a1d +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %fract_958a1d OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %fract_958a1d + %31 = OpLabel + %32 = OpFunctionCall %void %fract_958a1d OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %fract_958a1d + %34 = OpLabel + %35 = OpFunctionCall %void %fract_958a1d OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/fract/958a1d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/fract/958a1d.wgsl.expected.wgsl index c5cafe6b0e..5fdd153dca 100644 --- a/test/tint/builtins/gen/literal/fract/958a1d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/fract/958a1d.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn fract_958a1d() { - var res : vec3 = fract(vec3(f16())); + var res : vec3 = fract(vec3(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/fract/eb38ce.wgsl b/test/tint/builtins/gen/literal/fract/eb38ce.wgsl index e502ba9884..8ea12ea477 100644 --- a/test/tint/builtins/gen/literal/fract/eb38ce.wgsl +++ b/test/tint/builtins/gen/literal/fract/eb38ce.wgsl @@ -25,7 +25,7 @@ enable f16; // fn fract(f16) -> f16 fn fract_eb38ce() { - var res: f16 = fract(f16()); + var res: f16 = fract(1.h); } @vertex diff --git a/test/tint/builtins/gen/literal/fract/eb38ce.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/fract/eb38ce.wgsl.expected.dxc.hlsl index ffebafe253..a4e26daec3 100644 --- a/test/tint/builtins/gen/literal/fract/eb38ce.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/fract/eb38ce.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void fract_eb38ce() { - float16_t res = frac(float16_t(0.0h)); + float16_t res = frac(float16_t(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/fract/eb38ce.wgsl.expected.glsl b/test/tint/builtins/gen/literal/fract/eb38ce.wgsl.expected.glsl index ba80d87081..dbd83c934a 100644 --- a/test/tint/builtins/gen/literal/fract/eb38ce.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/fract/eb38ce.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void fract_eb38ce() { - float16_t res = fract(0.0hf); + float16_t res = fract(1.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void fract_eb38ce() { - float16_t res = fract(0.0hf); + float16_t res = fract(1.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void fract_eb38ce() { - float16_t res = fract(0.0hf); + float16_t res = fract(1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/fract/eb38ce.wgsl.expected.msl b/test/tint/builtins/gen/literal/fract/eb38ce.wgsl.expected.msl index 7b6600f5bd..e5b9d423d5 100644 --- a/test/tint/builtins/gen/literal/fract/eb38ce.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/fract/eb38ce.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void fract_eb38ce() { - half res = fract(0.0h); + half res = fract(1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/fract/eb38ce.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/fract/eb38ce.wgsl.expected.spvasm index 0cb23c02dc..d4f173632b 100644 --- a/test/tint/builtins/gen/literal/fract/eb38ce.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/fract/eb38ce.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,36 +36,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %16 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %19 = OpTypeFunction %v4float + %19 = OpConstantNull %half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %fract_eb38ce = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_half Function %16 - %13 = OpExtInst %half %15 Fract %16 + %res = OpVariable %_ptr_Function_half Function %19 + %13 = OpExtInst %half %15 Fract %half_0x1p_0 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %fract_eb38ce +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %fract_eb38ce OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %fract_eb38ce + %29 = OpLabel + %30 = OpFunctionCall %void %fract_eb38ce OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %fract_eb38ce + %32 = OpLabel + %33 = OpFunctionCall %void %fract_eb38ce OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/fract/eb38ce.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/fract/eb38ce.wgsl.expected.wgsl index 11a5545e7b..c6aa88c258 100644 --- a/test/tint/builtins/gen/literal/fract/eb38ce.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/fract/eb38ce.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn fract_eb38ce() { - var res : f16 = fract(f16()); + var res : f16 = fract(1.0h); } @vertex diff --git a/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl b/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl index 12ecb47908..17720e643d 100644 --- a/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl +++ b/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl @@ -25,7 +25,7 @@ enable f16; // fn frexp(vec<4, f16>) -> __frexp_result_vec<4, f16> fn frexp_3dd21e() { - var res = frexp(vec4(f16())); + var res = frexp(vec4(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl.expected.dxc.hlsl index a2155f1540..513bf10cb4 100644 --- a/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl.expected.dxc.hlsl @@ -10,7 +10,7 @@ frexp_result_vec4_f16 tint_frexp(vector param_0) { } void frexp_3dd21e() { - frexp_result_vec4_f16 res = tint_frexp((float16_t(0.0h)).xxxx); + frexp_result_vec4_f16 res = tint_frexp((float16_t(1.0h)).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl.expected.glsl index ba7ca1fd8a..16ebca60c7 100644 --- a/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl.expected.glsl @@ -14,7 +14,7 @@ frexp_result_vec4_f16 tint_frexp(f16vec4 param_0) { void frexp_3dd21e() { - frexp_result_vec4_f16 res = tint_frexp(f16vec4(0.0hf)); + frexp_result_vec4_f16 res = tint_frexp(f16vec4(1.0hf)); } vec4 vertex_main() { @@ -47,7 +47,7 @@ frexp_result_vec4_f16 tint_frexp(f16vec4 param_0) { void frexp_3dd21e() { - frexp_result_vec4_f16 res = tint_frexp(f16vec4(0.0hf)); + frexp_result_vec4_f16 res = tint_frexp(f16vec4(1.0hf)); } void fragment_main() { @@ -74,7 +74,7 @@ frexp_result_vec4_f16 tint_frexp(f16vec4 param_0) { void frexp_3dd21e() { - frexp_result_vec4_f16 res = tint_frexp(f16vec4(0.0hf)); + frexp_result_vec4_f16 res = tint_frexp(f16vec4(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl.expected.msl b/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl.expected.msl index 91c87e7a29..e87a0915ad 100644 --- a/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl.expected.msl @@ -13,7 +13,7 @@ frexp_result_vec4_f16 tint_frexp(half4 param_0) { } void frexp_3dd21e() { - frexp_result_vec4_f16 res = tint_frexp(half4(0.0h)); + frexp_result_vec4_f16 res = tint_frexp(half4(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl.expected.spvasm index 6585dc03fd..f798344de4 100644 --- a/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 39 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -45,37 +45,38 @@ %int = OpTypeInt 32 1 %v4int = OpTypeVector %int 4 %__frexp_result_vec4_f16 = OpTypeStruct %v4half %v4int - %20 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %21 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function___frexp_result_vec4_f16 = OpTypePointer Function %__frexp_result_vec4_f16 - %23 = OpConstantNull %__frexp_result_vec4_f16 - %24 = OpTypeFunction %v4float + %24 = OpConstantNull %__frexp_result_vec4_f16 + %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %frexp_3dd21e = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function___frexp_result_vec4_f16 Function %23 - %13 = OpExtInst %__frexp_result_vec4_f16 %19 FrexpStruct %20 + %res = OpVariable %_ptr_Function___frexp_result_vec4_f16 Function %24 + %13 = OpExtInst %__frexp_result_vec4_f16 %19 FrexpStruct %21 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %frexp_3dd21e +%vertex_main_inner = OpFunction %v4float None %25 + %27 = OpLabel + %28 = OpFunctionCall %void %frexp_3dd21e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %30 = OpLabel + %31 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %31 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %frexp_3dd21e + %34 = OpLabel + %35 = OpFunctionCall %void %frexp_3dd21e OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %frexp_3dd21e + %37 = OpLabel + %38 = OpFunctionCall %void %frexp_3dd21e OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl.expected.wgsl index a33fbd09cc..575b3c92c5 100644 --- a/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn frexp_3dd21e() { - var res = frexp(vec4(f16())); + var res = frexp(vec4(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/frexp/5257dd.wgsl b/test/tint/builtins/gen/literal/frexp/5257dd.wgsl index 6f4f993fda..2843ceea82 100644 --- a/test/tint/builtins/gen/literal/frexp/5257dd.wgsl +++ b/test/tint/builtins/gen/literal/frexp/5257dd.wgsl @@ -25,7 +25,7 @@ enable f16; // fn frexp(f16) -> __frexp_result fn frexp_5257dd() { - var res = frexp(f16()); + var res = frexp(1.h); } @vertex diff --git a/test/tint/builtins/gen/literal/frexp/5257dd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/frexp/5257dd.wgsl.expected.dxc.hlsl index 9e34fba082..0ea874f7b4 100644 --- a/test/tint/builtins/gen/literal/frexp/5257dd.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/frexp/5257dd.wgsl.expected.dxc.hlsl @@ -10,7 +10,7 @@ frexp_result_f16 tint_frexp(float16_t param_0) { } void frexp_5257dd() { - frexp_result_f16 res = tint_frexp(float16_t(0.0h)); + frexp_result_f16 res = tint_frexp(float16_t(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/frexp/5257dd.wgsl.expected.glsl b/test/tint/builtins/gen/literal/frexp/5257dd.wgsl.expected.glsl index f08939ec99..191bed3fcd 100644 --- a/test/tint/builtins/gen/literal/frexp/5257dd.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/frexp/5257dd.wgsl.expected.glsl @@ -14,7 +14,7 @@ frexp_result_f16 tint_frexp(float16_t param_0) { void frexp_5257dd() { - frexp_result_f16 res = tint_frexp(0.0hf); + frexp_result_f16 res = tint_frexp(1.0hf); } vec4 vertex_main() { @@ -47,7 +47,7 @@ frexp_result_f16 tint_frexp(float16_t param_0) { void frexp_5257dd() { - frexp_result_f16 res = tint_frexp(0.0hf); + frexp_result_f16 res = tint_frexp(1.0hf); } void fragment_main() { @@ -74,7 +74,7 @@ frexp_result_f16 tint_frexp(float16_t param_0) { void frexp_5257dd() { - frexp_result_f16 res = tint_frexp(0.0hf); + frexp_result_f16 res = tint_frexp(1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/frexp/5257dd.wgsl.expected.msl b/test/tint/builtins/gen/literal/frexp/5257dd.wgsl.expected.msl index 1920b166b2..44ba76b555 100644 --- a/test/tint/builtins/gen/literal/frexp/5257dd.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/frexp/5257dd.wgsl.expected.msl @@ -13,7 +13,7 @@ frexp_result_f16 tint_frexp(half param_0) { } void frexp_5257dd() { - frexp_result_f16 res = tint_frexp(0.0h); + frexp_result_f16 res = tint_frexp(1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/frexp/5257dd.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/frexp/5257dd.wgsl.expected.spvasm index 6c20d394ff..79d1964cdf 100644 --- a/test/tint/builtins/gen/literal/frexp/5257dd.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/frexp/5257dd.wgsl.expected.spvasm @@ -43,7 +43,7 @@ %half = OpTypeFloat 16 %int = OpTypeInt 32 1 %__frexp_result_f16 = OpTypeStruct %half %int - %18 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function___frexp_result_f16 = OpTypePointer Function %__frexp_result_f16 %21 = OpConstantNull %__frexp_result_f16 %22 = OpTypeFunction %v4float @@ -51,7 +51,7 @@ %frexp_5257dd = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function___frexp_result_f16 Function %21 - %13 = OpExtInst %__frexp_result_f16 %17 FrexpStruct %18 + %13 = OpExtInst %__frexp_result_f16 %17 FrexpStruct %half_0x1p_0 OpStore %res %13 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/frexp/5257dd.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/frexp/5257dd.wgsl.expected.wgsl index ca55834307..fbf57be18e 100644 --- a/test/tint/builtins/gen/literal/frexp/5257dd.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/frexp/5257dd.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn frexp_5257dd() { - var res = frexp(f16()); + var res = frexp(1.0h); } @vertex diff --git a/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl b/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl index 7d784db8d6..9483fb29cb 100644 --- a/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl +++ b/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl @@ -25,7 +25,7 @@ enable f16; // fn frexp(vec<2, f16>) -> __frexp_result_vec<2, f16> fn frexp_5f47bf() { - var res = frexp(vec2(f16())); + var res = frexp(vec2(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl.expected.dxc.hlsl index b39e0d6b62..5408e3d663 100644 --- a/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl.expected.dxc.hlsl @@ -10,7 +10,7 @@ frexp_result_vec2_f16 tint_frexp(vector param_0) { } void frexp_5f47bf() { - frexp_result_vec2_f16 res = tint_frexp((float16_t(0.0h)).xx); + frexp_result_vec2_f16 res = tint_frexp((float16_t(1.0h)).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl.expected.glsl b/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl.expected.glsl index 4a75e6c260..30a4538692 100644 --- a/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl.expected.glsl @@ -14,7 +14,7 @@ frexp_result_vec2_f16 tint_frexp(f16vec2 param_0) { void frexp_5f47bf() { - frexp_result_vec2_f16 res = tint_frexp(f16vec2(0.0hf)); + frexp_result_vec2_f16 res = tint_frexp(f16vec2(1.0hf)); } vec4 vertex_main() { @@ -47,7 +47,7 @@ frexp_result_vec2_f16 tint_frexp(f16vec2 param_0) { void frexp_5f47bf() { - frexp_result_vec2_f16 res = tint_frexp(f16vec2(0.0hf)); + frexp_result_vec2_f16 res = tint_frexp(f16vec2(1.0hf)); } void fragment_main() { @@ -74,7 +74,7 @@ frexp_result_vec2_f16 tint_frexp(f16vec2 param_0) { void frexp_5f47bf() { - frexp_result_vec2_f16 res = tint_frexp(f16vec2(0.0hf)); + frexp_result_vec2_f16 res = tint_frexp(f16vec2(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl.expected.msl b/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl.expected.msl index a2290a81fb..2448316837 100644 --- a/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl.expected.msl @@ -13,7 +13,7 @@ frexp_result_vec2_f16 tint_frexp(half2 param_0) { } void frexp_5f47bf() { - frexp_result_vec2_f16 res = tint_frexp(half2(0.0h)); + frexp_result_vec2_f16 res = tint_frexp(half2(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl.expected.spvasm index e1c51b934d..88ffe889d4 100644 --- a/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 39 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -45,37 +45,38 @@ %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 %__frexp_result_vec2_f16 = OpTypeStruct %v2half %v2int - %20 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %21 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function___frexp_result_vec2_f16 = OpTypePointer Function %__frexp_result_vec2_f16 - %23 = OpConstantNull %__frexp_result_vec2_f16 - %24 = OpTypeFunction %v4float + %24 = OpConstantNull %__frexp_result_vec2_f16 + %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %frexp_5f47bf = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function___frexp_result_vec2_f16 Function %23 - %13 = OpExtInst %__frexp_result_vec2_f16 %19 FrexpStruct %20 + %res = OpVariable %_ptr_Function___frexp_result_vec2_f16 Function %24 + %13 = OpExtInst %__frexp_result_vec2_f16 %19 FrexpStruct %21 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %frexp_5f47bf +%vertex_main_inner = OpFunction %v4float None %25 + %27 = OpLabel + %28 = OpFunctionCall %void %frexp_5f47bf OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %30 = OpLabel + %31 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %31 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %frexp_5f47bf + %34 = OpLabel + %35 = OpFunctionCall %void %frexp_5f47bf OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %frexp_5f47bf + %37 = OpLabel + %38 = OpFunctionCall %void %frexp_5f47bf OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl.expected.wgsl index 5dd980e8ed..f933947e7c 100644 --- a/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn frexp_5f47bf() { - var res = frexp(vec2(f16())); + var res = frexp(vec2(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl b/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl index 9b89a6b716..774db54e5a 100644 --- a/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl +++ b/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl @@ -25,7 +25,7 @@ enable f16; // fn frexp(vec<3, f16>) -> __frexp_result_vec<3, f16> fn frexp_ae4a66() { - var res = frexp(vec3(f16())); + var res = frexp(vec3(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl.expected.dxc.hlsl index 35d6455af6..0d0e9502d0 100644 --- a/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl.expected.dxc.hlsl @@ -10,7 +10,7 @@ frexp_result_vec3_f16 tint_frexp(vector param_0) { } void frexp_ae4a66() { - frexp_result_vec3_f16 res = tint_frexp((float16_t(0.0h)).xxx); + frexp_result_vec3_f16 res = tint_frexp((float16_t(1.0h)).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl.expected.glsl b/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl.expected.glsl index e1b82e8579..a3f39d955e 100644 --- a/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl.expected.glsl @@ -14,7 +14,7 @@ frexp_result_vec3_f16 tint_frexp(f16vec3 param_0) { void frexp_ae4a66() { - frexp_result_vec3_f16 res = tint_frexp(f16vec3(0.0hf)); + frexp_result_vec3_f16 res = tint_frexp(f16vec3(1.0hf)); } vec4 vertex_main() { @@ -47,7 +47,7 @@ frexp_result_vec3_f16 tint_frexp(f16vec3 param_0) { void frexp_ae4a66() { - frexp_result_vec3_f16 res = tint_frexp(f16vec3(0.0hf)); + frexp_result_vec3_f16 res = tint_frexp(f16vec3(1.0hf)); } void fragment_main() { @@ -74,7 +74,7 @@ frexp_result_vec3_f16 tint_frexp(f16vec3 param_0) { void frexp_ae4a66() { - frexp_result_vec3_f16 res = tint_frexp(f16vec3(0.0hf)); + frexp_result_vec3_f16 res = tint_frexp(f16vec3(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl.expected.msl b/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl.expected.msl index b58cc1025a..b2398cf0a7 100644 --- a/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl.expected.msl @@ -13,7 +13,7 @@ frexp_result_vec3_f16 tint_frexp(half3 param_0) { } void frexp_ae4a66() { - frexp_result_vec3_f16 res = tint_frexp(half3(0.0h)); + frexp_result_vec3_f16 res = tint_frexp(half3(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl.expected.spvasm index 5bf4a21be8..5f14309852 100644 --- a/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 39 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -45,37 +45,38 @@ %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 %__frexp_result_vec3_f16 = OpTypeStruct %v3half %v3int - %20 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %21 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function___frexp_result_vec3_f16 = OpTypePointer Function %__frexp_result_vec3_f16 - %23 = OpConstantNull %__frexp_result_vec3_f16 - %24 = OpTypeFunction %v4float + %24 = OpConstantNull %__frexp_result_vec3_f16 + %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %frexp_ae4a66 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function___frexp_result_vec3_f16 Function %23 - %13 = OpExtInst %__frexp_result_vec3_f16 %19 FrexpStruct %20 + %res = OpVariable %_ptr_Function___frexp_result_vec3_f16 Function %24 + %13 = OpExtInst %__frexp_result_vec3_f16 %19 FrexpStruct %21 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %frexp_ae4a66 +%vertex_main_inner = OpFunction %v4float None %25 + %27 = OpLabel + %28 = OpFunctionCall %void %frexp_ae4a66 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %30 = OpLabel + %31 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %31 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %frexp_ae4a66 + %34 = OpLabel + %35 = OpFunctionCall %void %frexp_ae4a66 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %frexp_ae4a66 + %37 = OpLabel + %38 = OpFunctionCall %void %frexp_ae4a66 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl.expected.wgsl index fcec0ebcd0..6e1393ad5a 100644 --- a/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn frexp_ae4a66() { - var res = frexp(vec3(f16())); + var res = frexp(vec3(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl b/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl index fba79b258c..afe3a8b524 100644 --- a/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl +++ b/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl @@ -25,7 +25,7 @@ enable f16; // fn inverseSqrt(f16) -> f16 fn inverseSqrt_440300() { - var res: f16 = inverseSqrt(f16()); + var res: f16 = inverseSqrt(1.h); } @vertex diff --git a/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl.expected.dxc.hlsl index 39bea641d6..147b2ec322 100644 --- a/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void inverseSqrt_440300() { - float16_t res = rsqrt(float16_t(0.0h)); + float16_t res = rsqrt(float16_t(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl.expected.glsl b/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl.expected.glsl index 8cc52838ab..9f1eaf6427 100644 --- a/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void inverseSqrt_440300() { - float16_t res = inversesqrt(0.0hf); + float16_t res = inversesqrt(1.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void inverseSqrt_440300() { - float16_t res = inversesqrt(0.0hf); + float16_t res = inversesqrt(1.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void inverseSqrt_440300() { - float16_t res = inversesqrt(0.0hf); + float16_t res = inversesqrt(1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl.expected.msl b/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl.expected.msl index 0cab7aca0c..0b73e38587 100644 --- a/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void inverseSqrt_440300() { - half res = rsqrt(0.0h); + half res = rsqrt(1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl.expected.spvasm index 49ae296817..d2b8dc45c4 100644 --- a/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,36 +36,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %16 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %19 = OpTypeFunction %v4float + %19 = OpConstantNull %half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %inverseSqrt_440300 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_half Function %16 - %13 = OpExtInst %half %15 InverseSqrt %16 + %res = OpVariable %_ptr_Function_half Function %19 + %13 = OpExtInst %half %15 InverseSqrt %half_0x1p_0 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %inverseSqrt_440300 +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %inverseSqrt_440300 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %inverseSqrt_440300 + %29 = OpLabel + %30 = OpFunctionCall %void %inverseSqrt_440300 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %inverseSqrt_440300 + %32 = OpLabel + %33 = OpFunctionCall %void %inverseSqrt_440300 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl.expected.wgsl index c2b635a20d..239d135cb4 100644 --- a/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn inverseSqrt_440300() { - var res : f16 = inverseSqrt(f16()); + var res : f16 = inverseSqrt(1.0h); } @vertex diff --git a/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl b/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl index af9bc17eb1..453596b6e4 100644 --- a/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl +++ b/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl @@ -25,7 +25,7 @@ enable f16; // fn inverseSqrt(vec<2, f16>) -> vec<2, f16> fn inverseSqrt_5f51f8() { - var res: vec2 = inverseSqrt(vec2(f16())); + var res: vec2 = inverseSqrt(vec2(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl.expected.dxc.hlsl index f58be189c6..c84c61de9e 100644 --- a/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void inverseSqrt_5f51f8() { - vector res = rsqrt((float16_t(0.0h)).xx); + vector res = rsqrt((float16_t(1.0h)).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl.expected.glsl b/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl.expected.glsl index 4e73df641b..3b378715fb 100644 --- a/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void inverseSqrt_5f51f8() { - f16vec2 res = inversesqrt(f16vec2(0.0hf)); + f16vec2 res = inversesqrt(f16vec2(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void inverseSqrt_5f51f8() { - f16vec2 res = inversesqrt(f16vec2(0.0hf)); + f16vec2 res = inversesqrt(f16vec2(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void inverseSqrt_5f51f8() { - f16vec2 res = inversesqrt(f16vec2(0.0hf)); + f16vec2 res = inversesqrt(f16vec2(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl.expected.msl b/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl.expected.msl index 2e7d4bd952..d396e650df 100644 --- a/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void inverseSqrt_5f51f8() { - half2 res = rsqrt(half2(0.0h)); + half2 res = rsqrt(half2(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl.expected.spvasm index cd5caca4d4..10e31d2a87 100644 --- a/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %17 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v2half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %inverseSqrt_5f51f8 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2half Function %17 - %13 = OpExtInst %v2half %16 InverseSqrt %17 + %res = OpVariable %_ptr_Function_v2half Function %21 + %13 = OpExtInst %v2half %16 InverseSqrt %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %inverseSqrt_5f51f8 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %inverseSqrt_5f51f8 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %inverseSqrt_5f51f8 + %31 = OpLabel + %32 = OpFunctionCall %void %inverseSqrt_5f51f8 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %inverseSqrt_5f51f8 + %34 = OpLabel + %35 = OpFunctionCall %void %inverseSqrt_5f51f8 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl.expected.wgsl index 672f0e39f2..6db63babcb 100644 --- a/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn inverseSqrt_5f51f8() { - var res : vec2 = inverseSqrt(vec2(f16())); + var res : vec2 = inverseSqrt(vec2(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl b/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl index 2a389e21ac..da9f44f63d 100644 --- a/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl +++ b/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl @@ -25,7 +25,7 @@ enable f16; // fn inverseSqrt(vec<3, f16>) -> vec<3, f16> fn inverseSqrt_b85ebd() { - var res: vec3 = inverseSqrt(vec3(f16())); + var res: vec3 = inverseSqrt(vec3(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl.expected.dxc.hlsl index ef654c9c6d..bf7a098423 100644 --- a/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void inverseSqrt_b85ebd() { - vector res = rsqrt((float16_t(0.0h)).xxx); + vector res = rsqrt((float16_t(1.0h)).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl.expected.glsl b/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl.expected.glsl index 12e5cabfa7..ee6af34eca 100644 --- a/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void inverseSqrt_b85ebd() { - f16vec3 res = inversesqrt(f16vec3(0.0hf)); + f16vec3 res = inversesqrt(f16vec3(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void inverseSqrt_b85ebd() { - f16vec3 res = inversesqrt(f16vec3(0.0hf)); + f16vec3 res = inversesqrt(f16vec3(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void inverseSqrt_b85ebd() { - f16vec3 res = inversesqrt(f16vec3(0.0hf)); + f16vec3 res = inversesqrt(f16vec3(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl.expected.msl b/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl.expected.msl index 351560a86a..d5823b91ae 100644 --- a/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void inverseSqrt_b85ebd() { - half3 res = rsqrt(half3(0.0h)); + half3 res = rsqrt(half3(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl.expected.spvasm index 05243bc21e..76557cefcc 100644 --- a/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %17 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v3half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %inverseSqrt_b85ebd = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3half Function %17 - %13 = OpExtInst %v3half %16 InverseSqrt %17 + %res = OpVariable %_ptr_Function_v3half Function %21 + %13 = OpExtInst %v3half %16 InverseSqrt %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %inverseSqrt_b85ebd +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %inverseSqrt_b85ebd OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %inverseSqrt_b85ebd + %31 = OpLabel + %32 = OpFunctionCall %void %inverseSqrt_b85ebd OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %inverseSqrt_b85ebd + %34 = OpLabel + %35 = OpFunctionCall %void %inverseSqrt_b85ebd OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl.expected.wgsl index e9c1e7e79c..8345b10909 100644 --- a/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn inverseSqrt_b85ebd() { - var res : vec3 = inverseSqrt(vec3(f16())); + var res : vec3 = inverseSqrt(vec3(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl b/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl index 8657926b77..37633268c6 100644 --- a/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl +++ b/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl @@ -25,7 +25,7 @@ enable f16; // fn inverseSqrt(vec<4, f16>) -> vec<4, f16> fn inverseSqrt_cbdc70() { - var res: vec4 = inverseSqrt(vec4(f16())); + var res: vec4 = inverseSqrt(vec4(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl.expected.dxc.hlsl index ed1f192d8e..1f6b95578b 100644 --- a/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void inverseSqrt_cbdc70() { - vector res = rsqrt((float16_t(0.0h)).xxxx); + vector res = rsqrt((float16_t(1.0h)).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl.expected.glsl b/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl.expected.glsl index 43f1edabed..f0261cd9b9 100644 --- a/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void inverseSqrt_cbdc70() { - f16vec4 res = inversesqrt(f16vec4(0.0hf)); + f16vec4 res = inversesqrt(f16vec4(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void inverseSqrt_cbdc70() { - f16vec4 res = inversesqrt(f16vec4(0.0hf)); + f16vec4 res = inversesqrt(f16vec4(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void inverseSqrt_cbdc70() { - f16vec4 res = inversesqrt(f16vec4(0.0hf)); + f16vec4 res = inversesqrt(f16vec4(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl.expected.msl b/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl.expected.msl index f1610f83d0..f1f1cc1bfb 100644 --- a/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void inverseSqrt_cbdc70() { - half4 res = rsqrt(half4(0.0h)); + half4 res = rsqrt(half4(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl.expected.spvasm index 43367c1689..f27f99c461 100644 --- a/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %17 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v4half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %inverseSqrt_cbdc70 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4half Function %17 - %13 = OpExtInst %v4half %16 InverseSqrt %17 + %res = OpVariable %_ptr_Function_v4half Function %21 + %13 = OpExtInst %v4half %16 InverseSqrt %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %inverseSqrt_cbdc70 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %inverseSqrt_cbdc70 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %inverseSqrt_cbdc70 + %31 = OpLabel + %32 = OpFunctionCall %void %inverseSqrt_cbdc70 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %inverseSqrt_cbdc70 + %34 = OpLabel + %35 = OpFunctionCall %void %inverseSqrt_cbdc70 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl.expected.wgsl index 2290320a6f..8ef3f09278 100644 --- a/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn inverseSqrt_cbdc70() { - var res : vec4 = inverseSqrt(vec4(f16())); + var res : vec4 = inverseSqrt(vec4(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl b/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl index 69dc8b4f97..c5c06c3a56 100644 --- a/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl +++ b/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl @@ -25,7 +25,7 @@ enable f16; // fn ldexp(vec<2, f16>, vec<2, i32>) -> vec<2, f16> fn ldexp_3d90b4() { - var res: vec2 = ldexp(vec2(f16()), vec2(1i)); + var res: vec2 = ldexp(vec2(1.h), vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.dxc.hlsl index ae0933efb1..beb62a6674 100644 --- a/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void ldexp_3d90b4() { - vector res = ldexp((float16_t(0.0h)).xx, (1).xx); + vector res = ldexp((float16_t(1.0h)).xx, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.glsl index 74ee06a091..7779006524 100644 --- a/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void ldexp_3d90b4() { - f16vec2 res = ldexp(f16vec2(0.0hf), ivec2(1)); + f16vec2 res = ldexp(f16vec2(1.0hf), ivec2(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void ldexp_3d90b4() { - f16vec2 res = ldexp(f16vec2(0.0hf), ivec2(1)); + f16vec2 res = ldexp(f16vec2(1.0hf), ivec2(1)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void ldexp_3d90b4() { - f16vec2 res = ldexp(f16vec2(0.0hf), ivec2(1)); + f16vec2 res = ldexp(f16vec2(1.0hf), ivec2(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.msl b/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.msl index 9d9e2ac28e..458ac36a17 100644 --- a/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void ldexp_3d90b4() { - half2 res = ldexp(half2(0.0h), int2(1)); + half2 res = ldexp(half2(1.0h), int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.spvasm index 0847908d63..69d848c971 100644 --- a/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,40 +37,42 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %17 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 %int_1 = OpConstant %int 1 - %21 = OpConstantComposite %v2int %int_1 %int_1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2half = OpTypePointer Function %v2half - %24 = OpTypeFunction %v4float + %25 = OpConstantNull %v2half + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %ldexp_3d90b4 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2half Function %17 - %13 = OpExtInst %v2half %16 Ldexp %17 %21 + %res = OpVariable %_ptr_Function_v2half Function %25 + %13 = OpExtInst %v2half %16 Ldexp %18 %22 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %ldexp_3d90b4 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %ldexp_3d90b4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %ldexp_3d90b4 + %35 = OpLabel + %36 = OpFunctionCall %void %ldexp_3d90b4 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %ldexp_3d90b4 + %38 = OpLabel + %39 = OpFunctionCall %void %ldexp_3d90b4 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.wgsl index c41562f2f9..5c6586212c 100644 --- a/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn ldexp_3d90b4() { - var res : vec2 = ldexp(vec2(f16()), vec2(1i)); + var res : vec2 = ldexp(vec2(1.0h), vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl b/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl index 5fde9f3417..555800b111 100644 --- a/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl +++ b/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl @@ -25,7 +25,7 @@ enable f16; // fn ldexp(f16, i32) -> f16 fn ldexp_624e0c() { - var res: f16 = ldexp(f16(), 1i); + var res: f16 = ldexp(1.h, 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.dxc.hlsl index c978bcfbd4..400d56b3b3 100644 --- a/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void ldexp_624e0c() { - float16_t res = ldexp(float16_t(0.0h), 1); + float16_t res = ldexp(float16_t(1.0h), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.glsl index f856c620e3..1ad1643444 100644 --- a/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void ldexp_624e0c() { - float16_t res = ldexp(0.0hf, 1); + float16_t res = ldexp(1.0hf, 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void ldexp_624e0c() { - float16_t res = ldexp(0.0hf, 1); + float16_t res = ldexp(1.0hf, 1); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void ldexp_624e0c() { - float16_t res = ldexp(0.0hf, 1); + float16_t res = ldexp(1.0hf, 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.msl b/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.msl index e63d73662c..87d24f3981 100644 --- a/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void ldexp_624e0c() { - half res = ldexp(0.0h, 1); + half res = ldexp(1.0h, 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.spvasm index 13ce90811b..ca7b0f2e5e 100644 --- a/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,38 +36,39 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %16 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_half = OpTypePointer Function %half - %21 = OpTypeFunction %v4float + %21 = OpConstantNull %half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %ldexp_624e0c = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_half Function %16 - %13 = OpExtInst %half %15 Ldexp %16 %int_1 + %res = OpVariable %_ptr_Function_half Function %21 + %13 = OpExtInst %half %15 Ldexp %half_0x1p_0 %int_1 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %ldexp_624e0c +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %ldexp_624e0c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %ldexp_624e0c + %31 = OpLabel + %32 = OpFunctionCall %void %ldexp_624e0c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %ldexp_624e0c + %34 = OpLabel + %35 = OpFunctionCall %void %ldexp_624e0c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.wgsl index 9eebbaee2a..540d1add1e 100644 --- a/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn ldexp_624e0c() { - var res : f16 = ldexp(f16(), 1i); + var res : f16 = ldexp(1.0h, 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl b/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl index b6e104ba88..2ec9d3c260 100644 --- a/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl +++ b/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl @@ -25,7 +25,7 @@ enable f16; // fn ldexp(vec<3, f16>, vec<3, i32>) -> vec<3, f16> fn ldexp_7485ce() { - var res: vec3 = ldexp(vec3(f16()), vec3(1i)); + var res: vec3 = ldexp(vec3(1.h), vec3(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.dxc.hlsl index 731bb5d30a..030092ccd9 100644 --- a/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void ldexp_7485ce() { - vector res = ldexp((float16_t(0.0h)).xxx, (1).xxx); + vector res = ldexp((float16_t(1.0h)).xxx, (1).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.glsl b/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.glsl index 4a19e3c227..105e249cfa 100644 --- a/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void ldexp_7485ce() { - f16vec3 res = ldexp(f16vec3(0.0hf), ivec3(1)); + f16vec3 res = ldexp(f16vec3(1.0hf), ivec3(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void ldexp_7485ce() { - f16vec3 res = ldexp(f16vec3(0.0hf), ivec3(1)); + f16vec3 res = ldexp(f16vec3(1.0hf), ivec3(1)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void ldexp_7485ce() { - f16vec3 res = ldexp(f16vec3(0.0hf), ivec3(1)); + f16vec3 res = ldexp(f16vec3(1.0hf), ivec3(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.msl b/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.msl index b5d93bfe7e..a29ffa3ec0 100644 --- a/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void ldexp_7485ce() { - half3 res = ldexp(half3(0.0h), int3(1)); + half3 res = ldexp(half3(1.0h), int3(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.spvasm index 985d48996e..44a5e07f38 100644 --- a/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,40 +37,42 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %17 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 %int_1 = OpConstant %int 1 - %21 = OpConstantComposite %v3int %int_1 %int_1 %int_1 + %22 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v3half = OpTypePointer Function %v3half - %24 = OpTypeFunction %v4float + %25 = OpConstantNull %v3half + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %ldexp_7485ce = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3half Function %17 - %13 = OpExtInst %v3half %16 Ldexp %17 %21 + %res = OpVariable %_ptr_Function_v3half Function %25 + %13 = OpExtInst %v3half %16 Ldexp %18 %22 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %ldexp_7485ce +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %ldexp_7485ce OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %ldexp_7485ce + %35 = OpLabel + %36 = OpFunctionCall %void %ldexp_7485ce OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %ldexp_7485ce + %38 = OpLabel + %39 = OpFunctionCall %void %ldexp_7485ce OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.wgsl index 8ddaf04d6a..d55a6aa30e 100644 --- a/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn ldexp_7485ce() { - var res : vec3 = ldexp(vec3(f16()), vec3(1i)); + var res : vec3 = ldexp(vec3(1.0h), vec3(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl b/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl index 2e56210797..03cec0f664 100644 --- a/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl +++ b/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl @@ -25,7 +25,7 @@ enable f16; // fn ldexp(vec<4, f16>, vec<4, i32>) -> vec<4, f16> fn ldexp_7fa13c() { - var res: vec4 = ldexp(vec4(f16()), vec4(1i)); + var res: vec4 = ldexp(vec4(1.h), vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.dxc.hlsl index 774c31e308..36931fcef6 100644 --- a/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void ldexp_7fa13c() { - vector res = ldexp((float16_t(0.0h)).xxxx, (1).xxxx); + vector res = ldexp((float16_t(1.0h)).xxxx, (1).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.glsl index 30b6c1d9fa..2ac9122934 100644 --- a/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void ldexp_7fa13c() { - f16vec4 res = ldexp(f16vec4(0.0hf), ivec4(1)); + f16vec4 res = ldexp(f16vec4(1.0hf), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void ldexp_7fa13c() { - f16vec4 res = ldexp(f16vec4(0.0hf), ivec4(1)); + f16vec4 res = ldexp(f16vec4(1.0hf), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void ldexp_7fa13c() { - f16vec4 res = ldexp(f16vec4(0.0hf), ivec4(1)); + f16vec4 res = ldexp(f16vec4(1.0hf), ivec4(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.msl b/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.msl index b348e4a8e7..536316a094 100644 --- a/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void ldexp_7fa13c() { - half4 res = ldexp(half4(0.0h), int4(1)); + half4 res = ldexp(half4(1.0h), int4(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.spvasm index f389bc34e5..1ddace3169 100644 --- a/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,40 +37,42 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %17 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %int = OpTypeInt 32 1 %v4int = OpTypeVector %int 4 %int_1 = OpConstant %int 1 - %21 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %22 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4half = OpTypePointer Function %v4half - %24 = OpTypeFunction %v4float + %25 = OpConstantNull %v4half + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %ldexp_7fa13c = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4half Function %17 - %13 = OpExtInst %v4half %16 Ldexp %17 %21 + %res = OpVariable %_ptr_Function_v4half Function %25 + %13 = OpExtInst %v4half %16 Ldexp %18 %22 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %ldexp_7fa13c +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %ldexp_7fa13c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %ldexp_7fa13c + %35 = OpLabel + %36 = OpFunctionCall %void %ldexp_7fa13c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %ldexp_7fa13c + %38 = OpLabel + %39 = OpFunctionCall %void %ldexp_7fa13c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.wgsl index 25b5d9d571..9c2998f855 100644 --- a/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn ldexp_7fa13c() { - var res : vec4 = ldexp(vec4(f16()), vec4(1i)); + var res : vec4 = ldexp(vec4(1.0h), vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/length/3f0e13.wgsl b/test/tint/builtins/gen/literal/length/3f0e13.wgsl index 4306efe403..61b3d2bba5 100644 --- a/test/tint/builtins/gen/literal/length/3f0e13.wgsl +++ b/test/tint/builtins/gen/literal/length/3f0e13.wgsl @@ -25,7 +25,7 @@ enable f16; // fn length(vec<2, f16>) -> f16 fn length_3f0e13() { - var res: f16 = length(vec2(f16())); + var res: f16 = length(vec2(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/length/3f0e13.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/length/3f0e13.wgsl.expected.dxc.hlsl index 08660e8d15..aeb2c63024 100644 --- a/test/tint/builtins/gen/literal/length/3f0e13.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/length/3f0e13.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void length_3f0e13() { - float16_t res = length((float16_t(0.0h)).xx); + float16_t res = length((float16_t(1.0h)).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/length/3f0e13.wgsl.expected.glsl b/test/tint/builtins/gen/literal/length/3f0e13.wgsl.expected.glsl index ff3bb99e81..d1738a3114 100644 --- a/test/tint/builtins/gen/literal/length/3f0e13.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/length/3f0e13.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void length_3f0e13() { - float16_t res = length(f16vec2(0.0hf)); + float16_t res = length(f16vec2(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void length_3f0e13() { - float16_t res = length(f16vec2(0.0hf)); + float16_t res = length(f16vec2(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void length_3f0e13() { - float16_t res = length(f16vec2(0.0hf)); + float16_t res = length(f16vec2(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/length/3f0e13.wgsl.expected.msl b/test/tint/builtins/gen/literal/length/3f0e13.wgsl.expected.msl index 2aadef91af..82464e6577 100644 --- a/test/tint/builtins/gen/literal/length/3f0e13.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/length/3f0e13.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void length_3f0e13() { - half res = length(half2(0.0h)); + half res = length(half2(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/length/3f0e13.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/length/3f0e13.wgsl.expected.spvasm index 580976223c..c026dd5cd7 100644 --- a/test/tint/builtins/gen/literal/length/3f0e13.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/length/3f0e13.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,37 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %17 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_half = OpTypePointer Function %half - %20 = OpConstantNull %half - %21 = OpTypeFunction %v4float + %21 = OpConstantNull %half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %length_3f0e13 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_half Function %20 - %13 = OpExtInst %half %15 Length %17 + %res = OpVariable %_ptr_Function_half Function %21 + %13 = OpExtInst %half %15 Length %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %length_3f0e13 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %length_3f0e13 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %length_3f0e13 + %31 = OpLabel + %32 = OpFunctionCall %void %length_3f0e13 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %length_3f0e13 + %34 = OpLabel + %35 = OpFunctionCall %void %length_3f0e13 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/length/3f0e13.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/length/3f0e13.wgsl.expected.wgsl index d97f9c87e2..295b05e772 100644 --- a/test/tint/builtins/gen/literal/length/3f0e13.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/length/3f0e13.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn length_3f0e13() { - var res : f16 = length(vec2(f16())); + var res : f16 = length(vec2(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/length/5b1a9b.wgsl b/test/tint/builtins/gen/literal/length/5b1a9b.wgsl index be2dbf195f..50a2ef16df 100644 --- a/test/tint/builtins/gen/literal/length/5b1a9b.wgsl +++ b/test/tint/builtins/gen/literal/length/5b1a9b.wgsl @@ -25,7 +25,7 @@ enable f16; // fn length(vec<4, f16>) -> f16 fn length_5b1a9b() { - var res: f16 = length(vec4(f16())); + var res: f16 = length(vec4(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/length/5b1a9b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/length/5b1a9b.wgsl.expected.dxc.hlsl index efaee527ed..df138904be 100644 --- a/test/tint/builtins/gen/literal/length/5b1a9b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/length/5b1a9b.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void length_5b1a9b() { - float16_t res = length((float16_t(0.0h)).xxxx); + float16_t res = length((float16_t(1.0h)).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/length/5b1a9b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/length/5b1a9b.wgsl.expected.glsl index 0fc543333b..faca950063 100644 --- a/test/tint/builtins/gen/literal/length/5b1a9b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/length/5b1a9b.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void length_5b1a9b() { - float16_t res = length(f16vec4(0.0hf)); + float16_t res = length(f16vec4(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void length_5b1a9b() { - float16_t res = length(f16vec4(0.0hf)); + float16_t res = length(f16vec4(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void length_5b1a9b() { - float16_t res = length(f16vec4(0.0hf)); + float16_t res = length(f16vec4(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/length/5b1a9b.wgsl.expected.msl b/test/tint/builtins/gen/literal/length/5b1a9b.wgsl.expected.msl index c1013ee8a9..dff63bafbb 100644 --- a/test/tint/builtins/gen/literal/length/5b1a9b.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/length/5b1a9b.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void length_5b1a9b() { - half res = length(half4(0.0h)); + half res = length(half4(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/length/5b1a9b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/length/5b1a9b.wgsl.expected.spvasm index c112767a08..bdc904272b 100644 --- a/test/tint/builtins/gen/literal/length/5b1a9b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/length/5b1a9b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,37 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %17 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_half = OpTypePointer Function %half - %20 = OpConstantNull %half - %21 = OpTypeFunction %v4float + %21 = OpConstantNull %half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %length_5b1a9b = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_half Function %20 - %13 = OpExtInst %half %15 Length %17 + %res = OpVariable %_ptr_Function_half Function %21 + %13 = OpExtInst %half %15 Length %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %length_5b1a9b +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %length_5b1a9b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %length_5b1a9b + %31 = OpLabel + %32 = OpFunctionCall %void %length_5b1a9b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %length_5b1a9b + %34 = OpLabel + %35 = OpFunctionCall %void %length_5b1a9b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/length/5b1a9b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/length/5b1a9b.wgsl.expected.wgsl index 526971a68e..e94fb3f0f0 100644 --- a/test/tint/builtins/gen/literal/length/5b1a9b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/length/5b1a9b.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn length_5b1a9b() { - var res : f16 = length(vec4(f16())); + var res : f16 = length(vec4(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/length/ba16d6.wgsl b/test/tint/builtins/gen/literal/length/ba16d6.wgsl index a51f78a62f..cca9b19fde 100644 --- a/test/tint/builtins/gen/literal/length/ba16d6.wgsl +++ b/test/tint/builtins/gen/literal/length/ba16d6.wgsl @@ -25,7 +25,7 @@ enable f16; // fn length(vec<3, f16>) -> f16 fn length_ba16d6() { - var res: f16 = length(vec3(f16())); + var res: f16 = length(vec3(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/length/ba16d6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/length/ba16d6.wgsl.expected.dxc.hlsl index c0c7954274..9cb7003cf1 100644 --- a/test/tint/builtins/gen/literal/length/ba16d6.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/length/ba16d6.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void length_ba16d6() { - float16_t res = length((float16_t(0.0h)).xxx); + float16_t res = length((float16_t(1.0h)).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/length/ba16d6.wgsl.expected.glsl b/test/tint/builtins/gen/literal/length/ba16d6.wgsl.expected.glsl index 57c51de74c..676602a330 100644 --- a/test/tint/builtins/gen/literal/length/ba16d6.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/length/ba16d6.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void length_ba16d6() { - float16_t res = length(f16vec3(0.0hf)); + float16_t res = length(f16vec3(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void length_ba16d6() { - float16_t res = length(f16vec3(0.0hf)); + float16_t res = length(f16vec3(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void length_ba16d6() { - float16_t res = length(f16vec3(0.0hf)); + float16_t res = length(f16vec3(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/length/ba16d6.wgsl.expected.msl b/test/tint/builtins/gen/literal/length/ba16d6.wgsl.expected.msl index c5e50591a3..02c8d79fb0 100644 --- a/test/tint/builtins/gen/literal/length/ba16d6.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/length/ba16d6.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void length_ba16d6() { - half res = length(half3(0.0h)); + half res = length(half3(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/length/ba16d6.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/length/ba16d6.wgsl.expected.spvasm index 9cb2b45ee8..bb6cac0c4f 100644 --- a/test/tint/builtins/gen/literal/length/ba16d6.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/length/ba16d6.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,37 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %17 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_half = OpTypePointer Function %half - %20 = OpConstantNull %half - %21 = OpTypeFunction %v4float + %21 = OpConstantNull %half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %length_ba16d6 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_half Function %20 - %13 = OpExtInst %half %15 Length %17 + %res = OpVariable %_ptr_Function_half Function %21 + %13 = OpExtInst %half %15 Length %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %length_ba16d6 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %length_ba16d6 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %length_ba16d6 + %31 = OpLabel + %32 = OpFunctionCall %void %length_ba16d6 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %length_ba16d6 + %34 = OpLabel + %35 = OpFunctionCall %void %length_ba16d6 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/length/ba16d6.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/length/ba16d6.wgsl.expected.wgsl index ef23cb8166..7c54ecb5b0 100644 --- a/test/tint/builtins/gen/literal/length/ba16d6.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/length/ba16d6.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn length_ba16d6() { - var res : f16 = length(vec3(f16())); + var res : f16 = length(vec3(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/length/c158da.wgsl b/test/tint/builtins/gen/literal/length/c158da.wgsl index 70b692f5b1..cde0e0c871 100644 --- a/test/tint/builtins/gen/literal/length/c158da.wgsl +++ b/test/tint/builtins/gen/literal/length/c158da.wgsl @@ -25,7 +25,7 @@ enable f16; // fn length(f16) -> f16 fn length_c158da() { - var res: f16 = length(f16()); + var res: f16 = length(1.h); } @vertex diff --git a/test/tint/builtins/gen/literal/length/c158da.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/length/c158da.wgsl.expected.dxc.hlsl index 5b0e775764..05771c25a7 100644 --- a/test/tint/builtins/gen/literal/length/c158da.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/length/c158da.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void length_c158da() { - float16_t res = length(float16_t(0.0h)); + float16_t res = length(float16_t(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/length/c158da.wgsl.expected.glsl b/test/tint/builtins/gen/literal/length/c158da.wgsl.expected.glsl index afc15b3d13..d60a08b721 100644 --- a/test/tint/builtins/gen/literal/length/c158da.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/length/c158da.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void length_c158da() { - float16_t res = length(0.0hf); + float16_t res = length(1.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void length_c158da() { - float16_t res = length(0.0hf); + float16_t res = length(1.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void length_c158da() { - float16_t res = length(0.0hf); + float16_t res = length(1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/length/c158da.wgsl.expected.msl b/test/tint/builtins/gen/literal/length/c158da.wgsl.expected.msl index f9f3a70c57..b1858e1ac3 100644 --- a/test/tint/builtins/gen/literal/length/c158da.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/length/c158da.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void length_c158da() { - half res = fabs(0.0h); + half res = fabs(1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/length/c158da.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/length/c158da.wgsl.expected.spvasm index 8199018c86..ec976a1ac4 100644 --- a/test/tint/builtins/gen/literal/length/c158da.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/length/c158da.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,36 +36,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %16 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %19 = OpTypeFunction %v4float + %19 = OpConstantNull %half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %length_c158da = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_half Function %16 - %13 = OpExtInst %half %15 Length %16 + %res = OpVariable %_ptr_Function_half Function %19 + %13 = OpExtInst %half %15 Length %half_0x1p_0 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %length_c158da +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %length_c158da OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %length_c158da + %29 = OpLabel + %30 = OpFunctionCall %void %length_c158da OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %length_c158da + %32 = OpLabel + %33 = OpFunctionCall %void %length_c158da OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/length/c158da.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/length/c158da.wgsl.expected.wgsl index 3cbfcfe859..66e82b118c 100644 --- a/test/tint/builtins/gen/literal/length/c158da.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/length/c158da.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn length_c158da() { - var res : f16 = length(f16()); + var res : f16 = length(1.0h); } @vertex diff --git a/test/tint/builtins/gen/literal/log/6ff86f.wgsl b/test/tint/builtins/gen/literal/log/6ff86f.wgsl index 761a154d1f..21cfca07e2 100644 --- a/test/tint/builtins/gen/literal/log/6ff86f.wgsl +++ b/test/tint/builtins/gen/literal/log/6ff86f.wgsl @@ -25,7 +25,7 @@ enable f16; // fn log(vec<3, f16>) -> vec<3, f16> fn log_6ff86f() { - var res: vec3 = log(vec3(f16())); + var res: vec3 = log(vec3(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/log/6ff86f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/log/6ff86f.wgsl.expected.dxc.hlsl index b141371603..8d17f97c90 100644 --- a/test/tint/builtins/gen/literal/log/6ff86f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/log/6ff86f.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void log_6ff86f() { - vector res = log((float16_t(0.0h)).xxx); + vector res = log((float16_t(1.0h)).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/log/6ff86f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/log/6ff86f.wgsl.expected.glsl index 2d6e06dd6a..5efd1c36b1 100644 --- a/test/tint/builtins/gen/literal/log/6ff86f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/log/6ff86f.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void log_6ff86f() { - f16vec3 res = log(f16vec3(0.0hf)); + f16vec3 res = log(f16vec3(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void log_6ff86f() { - f16vec3 res = log(f16vec3(0.0hf)); + f16vec3 res = log(f16vec3(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void log_6ff86f() { - f16vec3 res = log(f16vec3(0.0hf)); + f16vec3 res = log(f16vec3(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/log/6ff86f.wgsl.expected.msl b/test/tint/builtins/gen/literal/log/6ff86f.wgsl.expected.msl index ae294140ea..5b4c5318e1 100644 --- a/test/tint/builtins/gen/literal/log/6ff86f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/log/6ff86f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void log_6ff86f() { - half3 res = log(half3(0.0h)); + half3 res = log(half3(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/log/6ff86f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/log/6ff86f.wgsl.expected.spvasm index 51676f2424..2579458c21 100644 --- a/test/tint/builtins/gen/literal/log/6ff86f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/log/6ff86f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %17 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v3half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %log_6ff86f = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3half Function %17 - %13 = OpExtInst %v3half %16 Log %17 + %res = OpVariable %_ptr_Function_v3half Function %21 + %13 = OpExtInst %v3half %16 Log %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %log_6ff86f +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %log_6ff86f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %log_6ff86f + %31 = OpLabel + %32 = OpFunctionCall %void %log_6ff86f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %log_6ff86f + %34 = OpLabel + %35 = OpFunctionCall %void %log_6ff86f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/log/6ff86f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/log/6ff86f.wgsl.expected.wgsl index 9fbbe3ec2d..856ac227d5 100644 --- a/test/tint/builtins/gen/literal/log/6ff86f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/log/6ff86f.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn log_6ff86f() { - var res : vec3 = log(vec3(f16())); + var res : vec3 = log(vec3(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/log/8f0e32.wgsl b/test/tint/builtins/gen/literal/log/8f0e32.wgsl index 0f6db81cd3..82cf0258fa 100644 --- a/test/tint/builtins/gen/literal/log/8f0e32.wgsl +++ b/test/tint/builtins/gen/literal/log/8f0e32.wgsl @@ -25,7 +25,7 @@ enable f16; // fn log(vec<2, f16>) -> vec<2, f16> fn log_8f0e32() { - var res: vec2 = log(vec2(f16())); + var res: vec2 = log(vec2(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/log/8f0e32.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/log/8f0e32.wgsl.expected.dxc.hlsl index c73463a00d..eebe64c5ab 100644 --- a/test/tint/builtins/gen/literal/log/8f0e32.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/log/8f0e32.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void log_8f0e32() { - vector res = log((float16_t(0.0h)).xx); + vector res = log((float16_t(1.0h)).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/log/8f0e32.wgsl.expected.glsl b/test/tint/builtins/gen/literal/log/8f0e32.wgsl.expected.glsl index 923ec6a90e..b75bf0d72b 100644 --- a/test/tint/builtins/gen/literal/log/8f0e32.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/log/8f0e32.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void log_8f0e32() { - f16vec2 res = log(f16vec2(0.0hf)); + f16vec2 res = log(f16vec2(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void log_8f0e32() { - f16vec2 res = log(f16vec2(0.0hf)); + f16vec2 res = log(f16vec2(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void log_8f0e32() { - f16vec2 res = log(f16vec2(0.0hf)); + f16vec2 res = log(f16vec2(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/log/8f0e32.wgsl.expected.msl b/test/tint/builtins/gen/literal/log/8f0e32.wgsl.expected.msl index ecced226fb..2d487405c8 100644 --- a/test/tint/builtins/gen/literal/log/8f0e32.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/log/8f0e32.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void log_8f0e32() { - half2 res = log(half2(0.0h)); + half2 res = log(half2(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/log/8f0e32.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/log/8f0e32.wgsl.expected.spvasm index 7ff10aa72f..2a6e43203b 100644 --- a/test/tint/builtins/gen/literal/log/8f0e32.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/log/8f0e32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %17 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v2half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %log_8f0e32 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2half Function %17 - %13 = OpExtInst %v2half %16 Log %17 + %res = OpVariable %_ptr_Function_v2half Function %21 + %13 = OpExtInst %v2half %16 Log %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %log_8f0e32 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %log_8f0e32 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %log_8f0e32 + %31 = OpLabel + %32 = OpFunctionCall %void %log_8f0e32 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %log_8f0e32 + %34 = OpLabel + %35 = OpFunctionCall %void %log_8f0e32 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/log/8f0e32.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/log/8f0e32.wgsl.expected.wgsl index e2a7276a45..d483486c8d 100644 --- a/test/tint/builtins/gen/literal/log/8f0e32.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/log/8f0e32.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn log_8f0e32() { - var res : vec2 = log(vec2(f16())); + var res : vec2 = log(vec2(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/log/c9f489.wgsl b/test/tint/builtins/gen/literal/log/c9f489.wgsl index 659b08c475..905c9635aa 100644 --- a/test/tint/builtins/gen/literal/log/c9f489.wgsl +++ b/test/tint/builtins/gen/literal/log/c9f489.wgsl @@ -25,7 +25,7 @@ enable f16; // fn log(f16) -> f16 fn log_c9f489() { - var res: f16 = log(f16()); + var res: f16 = log(1.h); } @vertex diff --git a/test/tint/builtins/gen/literal/log/c9f489.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/log/c9f489.wgsl.expected.dxc.hlsl index eb5150b0a4..358ac77db3 100644 --- a/test/tint/builtins/gen/literal/log/c9f489.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/log/c9f489.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void log_c9f489() { - float16_t res = log(float16_t(0.0h)); + float16_t res = log(float16_t(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/log/c9f489.wgsl.expected.glsl b/test/tint/builtins/gen/literal/log/c9f489.wgsl.expected.glsl index 62eeaa9507..2ae51ee837 100644 --- a/test/tint/builtins/gen/literal/log/c9f489.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/log/c9f489.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void log_c9f489() { - float16_t res = log(0.0hf); + float16_t res = log(1.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void log_c9f489() { - float16_t res = log(0.0hf); + float16_t res = log(1.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void log_c9f489() { - float16_t res = log(0.0hf); + float16_t res = log(1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/log/c9f489.wgsl.expected.msl b/test/tint/builtins/gen/literal/log/c9f489.wgsl.expected.msl index 65bd95a721..cae5ee09be 100644 --- a/test/tint/builtins/gen/literal/log/c9f489.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/log/c9f489.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void log_c9f489() { - half res = log(0.0h); + half res = log(1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/log/c9f489.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/log/c9f489.wgsl.expected.spvasm index 304b6ec93d..ddf328ccac 100644 --- a/test/tint/builtins/gen/literal/log/c9f489.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/log/c9f489.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,36 +36,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %16 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %19 = OpTypeFunction %v4float + %19 = OpConstantNull %half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %log_c9f489 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_half Function %16 - %13 = OpExtInst %half %15 Log %16 + %res = OpVariable %_ptr_Function_half Function %19 + %13 = OpExtInst %half %15 Log %half_0x1p_0 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %log_c9f489 +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %log_c9f489 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %log_c9f489 + %29 = OpLabel + %30 = OpFunctionCall %void %log_c9f489 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %log_c9f489 + %32 = OpLabel + %33 = OpFunctionCall %void %log_c9f489 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/log/c9f489.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/log/c9f489.wgsl.expected.wgsl index 6279a42ab8..b3b61f4414 100644 --- a/test/tint/builtins/gen/literal/log/c9f489.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/log/c9f489.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn log_c9f489() { - var res : f16 = log(f16()); + var res : f16 = log(1.0h); } @vertex diff --git a/test/tint/builtins/gen/literal/log/cdbdc1.wgsl b/test/tint/builtins/gen/literal/log/cdbdc1.wgsl index 448267561c..92cf10836b 100644 --- a/test/tint/builtins/gen/literal/log/cdbdc1.wgsl +++ b/test/tint/builtins/gen/literal/log/cdbdc1.wgsl @@ -25,7 +25,7 @@ enable f16; // fn log(vec<4, f16>) -> vec<4, f16> fn log_cdbdc1() { - var res: vec4 = log(vec4(f16())); + var res: vec4 = log(vec4(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/log/cdbdc1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/log/cdbdc1.wgsl.expected.dxc.hlsl index 754e2906d5..0ce91e544b 100644 --- a/test/tint/builtins/gen/literal/log/cdbdc1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/log/cdbdc1.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void log_cdbdc1() { - vector res = log((float16_t(0.0h)).xxxx); + vector res = log((float16_t(1.0h)).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/log/cdbdc1.wgsl.expected.glsl b/test/tint/builtins/gen/literal/log/cdbdc1.wgsl.expected.glsl index 41e6eab215..272fe40188 100644 --- a/test/tint/builtins/gen/literal/log/cdbdc1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/log/cdbdc1.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void log_cdbdc1() { - f16vec4 res = log(f16vec4(0.0hf)); + f16vec4 res = log(f16vec4(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void log_cdbdc1() { - f16vec4 res = log(f16vec4(0.0hf)); + f16vec4 res = log(f16vec4(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void log_cdbdc1() { - f16vec4 res = log(f16vec4(0.0hf)); + f16vec4 res = log(f16vec4(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/log/cdbdc1.wgsl.expected.msl b/test/tint/builtins/gen/literal/log/cdbdc1.wgsl.expected.msl index 77806e8fb7..7463bebd0f 100644 --- a/test/tint/builtins/gen/literal/log/cdbdc1.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/log/cdbdc1.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void log_cdbdc1() { - half4 res = log(half4(0.0h)); + half4 res = log(half4(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/log/cdbdc1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/log/cdbdc1.wgsl.expected.spvasm index 6eea354d8e..a8a48f1168 100644 --- a/test/tint/builtins/gen/literal/log/cdbdc1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/log/cdbdc1.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %17 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v4half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %log_cdbdc1 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4half Function %17 - %13 = OpExtInst %v4half %16 Log %17 + %res = OpVariable %_ptr_Function_v4half Function %21 + %13 = OpExtInst %v4half %16 Log %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %log_cdbdc1 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %log_cdbdc1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %log_cdbdc1 + %31 = OpLabel + %32 = OpFunctionCall %void %log_cdbdc1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %log_cdbdc1 + %34 = OpLabel + %35 = OpFunctionCall %void %log_cdbdc1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/log/cdbdc1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/log/cdbdc1.wgsl.expected.wgsl index 645ccf90b5..dbe96d2207 100644 --- a/test/tint/builtins/gen/literal/log/cdbdc1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/log/cdbdc1.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn log_cdbdc1() { - var res : vec4 = log(vec4(f16())); + var res : vec4 = log(vec4(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/log2/38b478.wgsl b/test/tint/builtins/gen/literal/log2/38b478.wgsl index 493fbb21c6..ae09148c62 100644 --- a/test/tint/builtins/gen/literal/log2/38b478.wgsl +++ b/test/tint/builtins/gen/literal/log2/38b478.wgsl @@ -25,7 +25,7 @@ enable f16; // fn log2(vec<3, f16>) -> vec<3, f16> fn log2_38b478() { - var res: vec3 = log2(vec3(f16())); + var res: vec3 = log2(vec3(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/log2/38b478.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/log2/38b478.wgsl.expected.dxc.hlsl index 029b567536..487dd6f4d0 100644 --- a/test/tint/builtins/gen/literal/log2/38b478.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/log2/38b478.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void log2_38b478() { - vector res = log2((float16_t(0.0h)).xxx); + vector res = log2((float16_t(1.0h)).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/log2/38b478.wgsl.expected.glsl b/test/tint/builtins/gen/literal/log2/38b478.wgsl.expected.glsl index e0f07c61a6..a48af868b8 100644 --- a/test/tint/builtins/gen/literal/log2/38b478.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/log2/38b478.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void log2_38b478() { - f16vec3 res = log2(f16vec3(0.0hf)); + f16vec3 res = log2(f16vec3(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void log2_38b478() { - f16vec3 res = log2(f16vec3(0.0hf)); + f16vec3 res = log2(f16vec3(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void log2_38b478() { - f16vec3 res = log2(f16vec3(0.0hf)); + f16vec3 res = log2(f16vec3(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/log2/38b478.wgsl.expected.msl b/test/tint/builtins/gen/literal/log2/38b478.wgsl.expected.msl index a36b81fd14..8a6fb00b02 100644 --- a/test/tint/builtins/gen/literal/log2/38b478.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/log2/38b478.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void log2_38b478() { - half3 res = log2(half3(0.0h)); + half3 res = log2(half3(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/log2/38b478.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/log2/38b478.wgsl.expected.spvasm index de97fedcd9..e150bb54a0 100644 --- a/test/tint/builtins/gen/literal/log2/38b478.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/log2/38b478.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %17 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v3half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %log2_38b478 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3half Function %17 - %13 = OpExtInst %v3half %16 Log2 %17 + %res = OpVariable %_ptr_Function_v3half Function %21 + %13 = OpExtInst %v3half %16 Log2 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %log2_38b478 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %log2_38b478 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %log2_38b478 + %31 = OpLabel + %32 = OpFunctionCall %void %log2_38b478 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %log2_38b478 + %34 = OpLabel + %35 = OpFunctionCall %void %log2_38b478 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/log2/38b478.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/log2/38b478.wgsl.expected.wgsl index 9dee10e9d8..993448c011 100644 --- a/test/tint/builtins/gen/literal/log2/38b478.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/log2/38b478.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn log2_38b478() { - var res : vec3 = log2(vec3(f16())); + var res : vec3 = log2(vec3(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/log2/776088.wgsl b/test/tint/builtins/gen/literal/log2/776088.wgsl index 3843754756..4ee097b0cf 100644 --- a/test/tint/builtins/gen/literal/log2/776088.wgsl +++ b/test/tint/builtins/gen/literal/log2/776088.wgsl @@ -25,7 +25,7 @@ enable f16; // fn log2(vec<4, f16>) -> vec<4, f16> fn log2_776088() { - var res: vec4 = log2(vec4(f16())); + var res: vec4 = log2(vec4(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/log2/776088.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/log2/776088.wgsl.expected.dxc.hlsl index 2a3af8f868..70fb5d88a4 100644 --- a/test/tint/builtins/gen/literal/log2/776088.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/log2/776088.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void log2_776088() { - vector res = log2((float16_t(0.0h)).xxxx); + vector res = log2((float16_t(1.0h)).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/log2/776088.wgsl.expected.glsl b/test/tint/builtins/gen/literal/log2/776088.wgsl.expected.glsl index ebf4aa1ead..2024e28d69 100644 --- a/test/tint/builtins/gen/literal/log2/776088.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/log2/776088.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void log2_776088() { - f16vec4 res = log2(f16vec4(0.0hf)); + f16vec4 res = log2(f16vec4(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void log2_776088() { - f16vec4 res = log2(f16vec4(0.0hf)); + f16vec4 res = log2(f16vec4(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void log2_776088() { - f16vec4 res = log2(f16vec4(0.0hf)); + f16vec4 res = log2(f16vec4(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/log2/776088.wgsl.expected.msl b/test/tint/builtins/gen/literal/log2/776088.wgsl.expected.msl index eae4b4dd56..62e73b1b4a 100644 --- a/test/tint/builtins/gen/literal/log2/776088.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/log2/776088.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void log2_776088() { - half4 res = log2(half4(0.0h)); + half4 res = log2(half4(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/log2/776088.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/log2/776088.wgsl.expected.spvasm index 47d547b781..aa2534c2b5 100644 --- a/test/tint/builtins/gen/literal/log2/776088.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/log2/776088.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %17 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v4half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %log2_776088 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4half Function %17 - %13 = OpExtInst %v4half %16 Log2 %17 + %res = OpVariable %_ptr_Function_v4half Function %21 + %13 = OpExtInst %v4half %16 Log2 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %log2_776088 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %log2_776088 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %log2_776088 + %31 = OpLabel + %32 = OpFunctionCall %void %log2_776088 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %log2_776088 + %34 = OpLabel + %35 = OpFunctionCall %void %log2_776088 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/log2/776088.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/log2/776088.wgsl.expected.wgsl index 87971b4c10..252f507495 100644 --- a/test/tint/builtins/gen/literal/log2/776088.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/log2/776088.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn log2_776088() { - var res : vec4 = log2(vec4(f16())); + var res : vec4 = log2(vec4(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/log2/8c10b3.wgsl b/test/tint/builtins/gen/literal/log2/8c10b3.wgsl index 669e8ca108..c330372e9c 100644 --- a/test/tint/builtins/gen/literal/log2/8c10b3.wgsl +++ b/test/tint/builtins/gen/literal/log2/8c10b3.wgsl @@ -25,7 +25,7 @@ enable f16; // fn log2(f16) -> f16 fn log2_8c10b3() { - var res: f16 = log2(f16()); + var res: f16 = log2(1.h); } @vertex diff --git a/test/tint/builtins/gen/literal/log2/8c10b3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/log2/8c10b3.wgsl.expected.dxc.hlsl index 9edb6afaca..6049929bfd 100644 --- a/test/tint/builtins/gen/literal/log2/8c10b3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/log2/8c10b3.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void log2_8c10b3() { - float16_t res = log2(float16_t(0.0h)); + float16_t res = log2(float16_t(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/log2/8c10b3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/log2/8c10b3.wgsl.expected.glsl index 7b9deb9413..92d34db0ee 100644 --- a/test/tint/builtins/gen/literal/log2/8c10b3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/log2/8c10b3.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void log2_8c10b3() { - float16_t res = log2(0.0hf); + float16_t res = log2(1.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void log2_8c10b3() { - float16_t res = log2(0.0hf); + float16_t res = log2(1.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void log2_8c10b3() { - float16_t res = log2(0.0hf); + float16_t res = log2(1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/log2/8c10b3.wgsl.expected.msl b/test/tint/builtins/gen/literal/log2/8c10b3.wgsl.expected.msl index 0ea021a45d..55342a84ff 100644 --- a/test/tint/builtins/gen/literal/log2/8c10b3.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/log2/8c10b3.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void log2_8c10b3() { - half res = log2(0.0h); + half res = log2(1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/log2/8c10b3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/log2/8c10b3.wgsl.expected.spvasm index f269f689eb..121842ef80 100644 --- a/test/tint/builtins/gen/literal/log2/8c10b3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/log2/8c10b3.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,36 +36,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %16 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %19 = OpTypeFunction %v4float + %19 = OpConstantNull %half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %log2_8c10b3 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_half Function %16 - %13 = OpExtInst %half %15 Log2 %16 + %res = OpVariable %_ptr_Function_half Function %19 + %13 = OpExtInst %half %15 Log2 %half_0x1p_0 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %log2_8c10b3 +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %log2_8c10b3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %log2_8c10b3 + %29 = OpLabel + %30 = OpFunctionCall %void %log2_8c10b3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %log2_8c10b3 + %32 = OpLabel + %33 = OpFunctionCall %void %log2_8c10b3 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/log2/8c10b3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/log2/8c10b3.wgsl.expected.wgsl index 6de59eced0..f92de712c6 100644 --- a/test/tint/builtins/gen/literal/log2/8c10b3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/log2/8c10b3.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn log2_8c10b3() { - var res : f16 = log2(f16()); + var res : f16 = log2(1.0h); } @vertex diff --git a/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl b/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl index 9f7c93aff1..09b40fd498 100644 --- a/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl +++ b/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl @@ -25,7 +25,7 @@ enable f16; // fn log2(vec<2, f16>) -> vec<2, f16> fn log2_fb9f0b() { - var res: vec2 = log2(vec2(f16())); + var res: vec2 = log2(vec2(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl.expected.dxc.hlsl index 1614719747..86a9e683b4 100644 --- a/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void log2_fb9f0b() { - vector res = log2((float16_t(0.0h)).xx); + vector res = log2((float16_t(1.0h)).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl.expected.glsl index 73abe1d60c..b768f1bb73 100644 --- a/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void log2_fb9f0b() { - f16vec2 res = log2(f16vec2(0.0hf)); + f16vec2 res = log2(f16vec2(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void log2_fb9f0b() { - f16vec2 res = log2(f16vec2(0.0hf)); + f16vec2 res = log2(f16vec2(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void log2_fb9f0b() { - f16vec2 res = log2(f16vec2(0.0hf)); + f16vec2 res = log2(f16vec2(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl.expected.msl b/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl.expected.msl index 0532f4db98..bd5984ffe7 100644 --- a/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void log2_fb9f0b() { - half2 res = log2(half2(0.0h)); + half2 res = log2(half2(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl.expected.spvasm index 2dfd8bd4ef..f68a857202 100644 --- a/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %17 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v2half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %log2_fb9f0b = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2half Function %17 - %13 = OpExtInst %v2half %16 Log2 %17 + %res = OpVariable %_ptr_Function_v2half Function %21 + %13 = OpExtInst %v2half %16 Log2 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %log2_fb9f0b +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %log2_fb9f0b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %log2_fb9f0b + %31 = OpLabel + %32 = OpFunctionCall %void %log2_fb9f0b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %log2_fb9f0b + %34 = OpLabel + %35 = OpFunctionCall %void %log2_fb9f0b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl.expected.wgsl index 4fdced8d39..1967a3f928 100644 --- a/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn log2_fb9f0b() { - var res : vec2 = log2(vec2(f16())); + var res : vec2 = log2(vec2(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/max/111ac0.wgsl b/test/tint/builtins/gen/literal/max/111ac0.wgsl index 1a46cb56e9..6166980870 100644 --- a/test/tint/builtins/gen/literal/max/111ac0.wgsl +++ b/test/tint/builtins/gen/literal/max/111ac0.wgsl @@ -25,7 +25,7 @@ enable f16; // fn max(f16, f16) -> f16 fn max_111ac0() { - var res: f16 = max(f16(), f16()); + var res: f16 = max(1.h, 1.h); } @vertex diff --git a/test/tint/builtins/gen/literal/max/111ac0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/max/111ac0.wgsl.expected.dxc.hlsl index 972d568803..c9db3e2726 100644 --- a/test/tint/builtins/gen/literal/max/111ac0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/max/111ac0.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void max_111ac0() { - float16_t res = max(float16_t(0.0h), float16_t(0.0h)); + float16_t res = max(float16_t(1.0h), float16_t(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/max/111ac0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/max/111ac0.wgsl.expected.glsl index b0864de5d9..943c60f81e 100644 --- a/test/tint/builtins/gen/literal/max/111ac0.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/max/111ac0.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void max_111ac0() { - float16_t res = max(0.0hf, 0.0hf); + float16_t res = max(1.0hf, 1.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void max_111ac0() { - float16_t res = max(0.0hf, 0.0hf); + float16_t res = max(1.0hf, 1.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void max_111ac0() { - float16_t res = max(0.0hf, 0.0hf); + float16_t res = max(1.0hf, 1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/max/111ac0.wgsl.expected.msl b/test/tint/builtins/gen/literal/max/111ac0.wgsl.expected.msl index ccbcac5c21..69dd931f4f 100644 --- a/test/tint/builtins/gen/literal/max/111ac0.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/max/111ac0.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void max_111ac0() { - half res = fmax(0.0h, 0.0h); + half res = fmax(1.0h, 1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/max/111ac0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/max/111ac0.wgsl.expected.spvasm index b3c080526c..e04ad0417e 100644 --- a/test/tint/builtins/gen/literal/max/111ac0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/max/111ac0.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,36 +36,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %16 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %19 = OpTypeFunction %v4float + %19 = OpConstantNull %half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %max_111ac0 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_half Function %16 - %13 = OpExtInst %half %15 NMax %16 %16 + %res = OpVariable %_ptr_Function_half Function %19 + %13 = OpExtInst %half %15 NMax %half_0x1p_0 %half_0x1p_0 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %max_111ac0 +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %max_111ac0 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %max_111ac0 + %29 = OpLabel + %30 = OpFunctionCall %void %max_111ac0 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %max_111ac0 + %32 = OpLabel + %33 = OpFunctionCall %void %max_111ac0 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/max/111ac0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/max/111ac0.wgsl.expected.wgsl index 86e79dd6bd..831d7f5aa8 100644 --- a/test/tint/builtins/gen/literal/max/111ac0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/max/111ac0.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn max_111ac0() { - var res : f16 = max(f16(), f16()); + var res : f16 = max(1.0h, 1.0h); } @vertex diff --git a/test/tint/builtins/gen/literal/max/34956e.wgsl b/test/tint/builtins/gen/literal/max/34956e.wgsl index 2b22a891df..39bbadc4d3 100644 --- a/test/tint/builtins/gen/literal/max/34956e.wgsl +++ b/test/tint/builtins/gen/literal/max/34956e.wgsl @@ -25,7 +25,7 @@ enable f16; // fn max(vec<2, f16>, vec<2, f16>) -> vec<2, f16> fn max_34956e() { - var res: vec2 = max(vec2(f16()), vec2(f16())); + var res: vec2 = max(vec2(1.h), vec2(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/max/34956e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/max/34956e.wgsl.expected.dxc.hlsl index 5ecb9bd768..dd144b06fa 100644 --- a/test/tint/builtins/gen/literal/max/34956e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/max/34956e.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void max_34956e() { - vector res = max((float16_t(0.0h)).xx, (float16_t(0.0h)).xx); + vector res = max((float16_t(1.0h)).xx, (float16_t(1.0h)).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/max/34956e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/max/34956e.wgsl.expected.glsl index c9fb73cc88..0679c18779 100644 --- a/test/tint/builtins/gen/literal/max/34956e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/max/34956e.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void max_34956e() { - f16vec2 res = max(f16vec2(0.0hf), f16vec2(0.0hf)); + f16vec2 res = max(f16vec2(1.0hf), f16vec2(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void max_34956e() { - f16vec2 res = max(f16vec2(0.0hf), f16vec2(0.0hf)); + f16vec2 res = max(f16vec2(1.0hf), f16vec2(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void max_34956e() { - f16vec2 res = max(f16vec2(0.0hf), f16vec2(0.0hf)); + f16vec2 res = max(f16vec2(1.0hf), f16vec2(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/max/34956e.wgsl.expected.msl b/test/tint/builtins/gen/literal/max/34956e.wgsl.expected.msl index 4f655400f5..17fec33801 100644 --- a/test/tint/builtins/gen/literal/max/34956e.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/max/34956e.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void max_34956e() { - half2 res = fmax(half2(0.0h), half2(0.0h)); + half2 res = fmax(half2(1.0h), half2(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/max/34956e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/max/34956e.wgsl.expected.spvasm index e8003c296e..deeb7aea09 100644 --- a/test/tint/builtins/gen/literal/max/34956e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/max/34956e.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %17 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v2half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %max_34956e = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2half Function %17 - %13 = OpExtInst %v2half %16 NMax %17 %17 + %res = OpVariable %_ptr_Function_v2half Function %21 + %13 = OpExtInst %v2half %16 NMax %18 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %max_34956e +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %max_34956e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %max_34956e + %31 = OpLabel + %32 = OpFunctionCall %void %max_34956e OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %max_34956e + %34 = OpLabel + %35 = OpFunctionCall %void %max_34956e OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/max/34956e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/max/34956e.wgsl.expected.wgsl index 45ee0302f3..59c80c23af 100644 --- a/test/tint/builtins/gen/literal/max/34956e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/max/34956e.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn max_34956e() { - var res : vec2 = max(vec2(f16()), vec2(f16())); + var res : vec2 = max(vec2(1.0h), vec2(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/max/445169.wgsl b/test/tint/builtins/gen/literal/max/445169.wgsl index 8752c1ed49..50d4b67633 100644 --- a/test/tint/builtins/gen/literal/max/445169.wgsl +++ b/test/tint/builtins/gen/literal/max/445169.wgsl @@ -25,7 +25,7 @@ enable f16; // fn max(vec<3, f16>, vec<3, f16>) -> vec<3, f16> fn max_445169() { - var res: vec3 = max(vec3(f16()), vec3(f16())); + var res: vec3 = max(vec3(1.h), vec3(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/max/445169.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/max/445169.wgsl.expected.dxc.hlsl index a291c4c2ba..98fa00e42c 100644 --- a/test/tint/builtins/gen/literal/max/445169.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/max/445169.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void max_445169() { - vector res = max((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx); + vector res = max((float16_t(1.0h)).xxx, (float16_t(1.0h)).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/max/445169.wgsl.expected.glsl b/test/tint/builtins/gen/literal/max/445169.wgsl.expected.glsl index dd8ccdf5f0..6afef2afa7 100644 --- a/test/tint/builtins/gen/literal/max/445169.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/max/445169.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void max_445169() { - f16vec3 res = max(f16vec3(0.0hf), f16vec3(0.0hf)); + f16vec3 res = max(f16vec3(1.0hf), f16vec3(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void max_445169() { - f16vec3 res = max(f16vec3(0.0hf), f16vec3(0.0hf)); + f16vec3 res = max(f16vec3(1.0hf), f16vec3(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void max_445169() { - f16vec3 res = max(f16vec3(0.0hf), f16vec3(0.0hf)); + f16vec3 res = max(f16vec3(1.0hf), f16vec3(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/max/445169.wgsl.expected.msl b/test/tint/builtins/gen/literal/max/445169.wgsl.expected.msl index 5bd10e91db..af560e2313 100644 --- a/test/tint/builtins/gen/literal/max/445169.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/max/445169.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void max_445169() { - half3 res = fmax(half3(0.0h), half3(0.0h)); + half3 res = fmax(half3(1.0h), half3(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/max/445169.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/max/445169.wgsl.expected.spvasm index 3e1a6af228..71ed2c5f2b 100644 --- a/test/tint/builtins/gen/literal/max/445169.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/max/445169.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %17 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v3half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %max_445169 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3half Function %17 - %13 = OpExtInst %v3half %16 NMax %17 %17 + %res = OpVariable %_ptr_Function_v3half Function %21 + %13 = OpExtInst %v3half %16 NMax %18 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %max_445169 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %max_445169 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %max_445169 + %31 = OpLabel + %32 = OpFunctionCall %void %max_445169 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %max_445169 + %34 = OpLabel + %35 = OpFunctionCall %void %max_445169 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/max/445169.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/max/445169.wgsl.expected.wgsl index 4e1c567026..738ca7d039 100644 --- a/test/tint/builtins/gen/literal/max/445169.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/max/445169.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn max_445169() { - var res : vec3 = max(vec3(f16()), vec3(f16())); + var res : vec3 = max(vec3(1.0h), vec3(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/max/e14f2b.wgsl b/test/tint/builtins/gen/literal/max/e14f2b.wgsl index fd8638a5b1..f5ef502fd9 100644 --- a/test/tint/builtins/gen/literal/max/e14f2b.wgsl +++ b/test/tint/builtins/gen/literal/max/e14f2b.wgsl @@ -25,7 +25,7 @@ enable f16; // fn max(vec<4, f16>, vec<4, f16>) -> vec<4, f16> fn max_e14f2b() { - var res: vec4 = max(vec4(f16()), vec4(f16())); + var res: vec4 = max(vec4(1.h), vec4(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/max/e14f2b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/max/e14f2b.wgsl.expected.dxc.hlsl index 5f790278b7..fe6838d588 100644 --- a/test/tint/builtins/gen/literal/max/e14f2b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/max/e14f2b.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void max_e14f2b() { - vector res = max((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx); + vector res = max((float16_t(1.0h)).xxxx, (float16_t(1.0h)).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/max/e14f2b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/max/e14f2b.wgsl.expected.glsl index f4f78bb501..6c090896b7 100644 --- a/test/tint/builtins/gen/literal/max/e14f2b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/max/e14f2b.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void max_e14f2b() { - f16vec4 res = max(f16vec4(0.0hf), f16vec4(0.0hf)); + f16vec4 res = max(f16vec4(1.0hf), f16vec4(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void max_e14f2b() { - f16vec4 res = max(f16vec4(0.0hf), f16vec4(0.0hf)); + f16vec4 res = max(f16vec4(1.0hf), f16vec4(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void max_e14f2b() { - f16vec4 res = max(f16vec4(0.0hf), f16vec4(0.0hf)); + f16vec4 res = max(f16vec4(1.0hf), f16vec4(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/max/e14f2b.wgsl.expected.msl b/test/tint/builtins/gen/literal/max/e14f2b.wgsl.expected.msl index 3620c0511d..549bcd9a63 100644 --- a/test/tint/builtins/gen/literal/max/e14f2b.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/max/e14f2b.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void max_e14f2b() { - half4 res = fmax(half4(0.0h), half4(0.0h)); + half4 res = fmax(half4(1.0h), half4(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/max/e14f2b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/max/e14f2b.wgsl.expected.spvasm index 61981040cf..704cc68902 100644 --- a/test/tint/builtins/gen/literal/max/e14f2b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/max/e14f2b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %17 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v4half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %max_e14f2b = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4half Function %17 - %13 = OpExtInst %v4half %16 NMax %17 %17 + %res = OpVariable %_ptr_Function_v4half Function %21 + %13 = OpExtInst %v4half %16 NMax %18 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %max_e14f2b +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %max_e14f2b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %max_e14f2b + %31 = OpLabel + %32 = OpFunctionCall %void %max_e14f2b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %max_e14f2b + %34 = OpLabel + %35 = OpFunctionCall %void %max_e14f2b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/max/e14f2b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/max/e14f2b.wgsl.expected.wgsl index e0d214cfc3..c15e410bd4 100644 --- a/test/tint/builtins/gen/literal/max/e14f2b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/max/e14f2b.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn max_e14f2b() { - var res : vec4 = max(vec4(f16()), vec4(f16())); + var res : vec4 = max(vec4(1.0h), vec4(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/min/7c710a.wgsl b/test/tint/builtins/gen/literal/min/7c710a.wgsl index f8cf0d3bcf..4b6d2991ff 100644 --- a/test/tint/builtins/gen/literal/min/7c710a.wgsl +++ b/test/tint/builtins/gen/literal/min/7c710a.wgsl @@ -25,7 +25,7 @@ enable f16; // fn min(vec<4, f16>, vec<4, f16>) -> vec<4, f16> fn min_7c710a() { - var res: vec4 = min(vec4(f16()), vec4(f16())); + var res: vec4 = min(vec4(1.h), vec4(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/min/7c710a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/min/7c710a.wgsl.expected.dxc.hlsl index b065ca877e..691e8447b1 100644 --- a/test/tint/builtins/gen/literal/min/7c710a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/min/7c710a.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void min_7c710a() { - vector res = min((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx); + vector res = min((float16_t(1.0h)).xxxx, (float16_t(1.0h)).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/min/7c710a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/min/7c710a.wgsl.expected.glsl index f794845684..f6a2b3f28a 100644 --- a/test/tint/builtins/gen/literal/min/7c710a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/min/7c710a.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void min_7c710a() { - f16vec4 res = min(f16vec4(0.0hf), f16vec4(0.0hf)); + f16vec4 res = min(f16vec4(1.0hf), f16vec4(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void min_7c710a() { - f16vec4 res = min(f16vec4(0.0hf), f16vec4(0.0hf)); + f16vec4 res = min(f16vec4(1.0hf), f16vec4(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void min_7c710a() { - f16vec4 res = min(f16vec4(0.0hf), f16vec4(0.0hf)); + f16vec4 res = min(f16vec4(1.0hf), f16vec4(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/min/7c710a.wgsl.expected.msl b/test/tint/builtins/gen/literal/min/7c710a.wgsl.expected.msl index 7805826d56..37a0096960 100644 --- a/test/tint/builtins/gen/literal/min/7c710a.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/min/7c710a.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void min_7c710a() { - half4 res = fmin(half4(0.0h), half4(0.0h)); + half4 res = fmin(half4(1.0h), half4(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/min/7c710a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/min/7c710a.wgsl.expected.spvasm index 60cd2d2bae..d696b241d7 100644 --- a/test/tint/builtins/gen/literal/min/7c710a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/min/7c710a.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %17 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v4half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %min_7c710a = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4half Function %17 - %13 = OpExtInst %v4half %16 NMin %17 %17 + %res = OpVariable %_ptr_Function_v4half Function %21 + %13 = OpExtInst %v4half %16 NMin %18 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %min_7c710a +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %min_7c710a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %min_7c710a + %31 = OpLabel + %32 = OpFunctionCall %void %min_7c710a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %min_7c710a + %34 = OpLabel + %35 = OpFunctionCall %void %min_7c710a OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/min/7c710a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/min/7c710a.wgsl.expected.wgsl index ee18161098..adefdcfa1b 100644 --- a/test/tint/builtins/gen/literal/min/7c710a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/min/7c710a.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn min_7c710a() { - var res : vec4 = min(vec4(f16()), vec4(f16())); + var res : vec4 = min(vec4(1.0h), vec4(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/min/ab0acd.wgsl b/test/tint/builtins/gen/literal/min/ab0acd.wgsl index 568017c8c0..767c17e1d1 100644 --- a/test/tint/builtins/gen/literal/min/ab0acd.wgsl +++ b/test/tint/builtins/gen/literal/min/ab0acd.wgsl @@ -25,7 +25,7 @@ enable f16; // fn min(vec<3, f16>, vec<3, f16>) -> vec<3, f16> fn min_ab0acd() { - var res: vec3 = min(vec3(f16()), vec3(f16())); + var res: vec3 = min(vec3(1.h), vec3(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/min/ab0acd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/min/ab0acd.wgsl.expected.dxc.hlsl index 839e6b794f..dbc2823509 100644 --- a/test/tint/builtins/gen/literal/min/ab0acd.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/min/ab0acd.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void min_ab0acd() { - vector res = min((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx); + vector res = min((float16_t(1.0h)).xxx, (float16_t(1.0h)).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/min/ab0acd.wgsl.expected.glsl b/test/tint/builtins/gen/literal/min/ab0acd.wgsl.expected.glsl index bc985d79d0..7924ccddce 100644 --- a/test/tint/builtins/gen/literal/min/ab0acd.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/min/ab0acd.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void min_ab0acd() { - f16vec3 res = min(f16vec3(0.0hf), f16vec3(0.0hf)); + f16vec3 res = min(f16vec3(1.0hf), f16vec3(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void min_ab0acd() { - f16vec3 res = min(f16vec3(0.0hf), f16vec3(0.0hf)); + f16vec3 res = min(f16vec3(1.0hf), f16vec3(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void min_ab0acd() { - f16vec3 res = min(f16vec3(0.0hf), f16vec3(0.0hf)); + f16vec3 res = min(f16vec3(1.0hf), f16vec3(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/min/ab0acd.wgsl.expected.msl b/test/tint/builtins/gen/literal/min/ab0acd.wgsl.expected.msl index cbac2a3425..5093e84f9f 100644 --- a/test/tint/builtins/gen/literal/min/ab0acd.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/min/ab0acd.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void min_ab0acd() { - half3 res = fmin(half3(0.0h), half3(0.0h)); + half3 res = fmin(half3(1.0h), half3(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/min/ab0acd.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/min/ab0acd.wgsl.expected.spvasm index 42feca5959..59059f129a 100644 --- a/test/tint/builtins/gen/literal/min/ab0acd.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/min/ab0acd.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %17 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v3half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %min_ab0acd = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3half Function %17 - %13 = OpExtInst %v3half %16 NMin %17 %17 + %res = OpVariable %_ptr_Function_v3half Function %21 + %13 = OpExtInst %v3half %16 NMin %18 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %min_ab0acd +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %min_ab0acd OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %min_ab0acd + %31 = OpLabel + %32 = OpFunctionCall %void %min_ab0acd OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %min_ab0acd + %34 = OpLabel + %35 = OpFunctionCall %void %min_ab0acd OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/min/ab0acd.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/min/ab0acd.wgsl.expected.wgsl index 01c09ea37f..2ad7141f8c 100644 --- a/test/tint/builtins/gen/literal/min/ab0acd.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/min/ab0acd.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn min_ab0acd() { - var res : vec3 = min(vec3(f16()), vec3(f16())); + var res : vec3 = min(vec3(1.0h), vec3(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/min/ac84d6.wgsl b/test/tint/builtins/gen/literal/min/ac84d6.wgsl index 4222ad4319..e56adbea84 100644 --- a/test/tint/builtins/gen/literal/min/ac84d6.wgsl +++ b/test/tint/builtins/gen/literal/min/ac84d6.wgsl @@ -25,7 +25,7 @@ enable f16; // fn min(f16, f16) -> f16 fn min_ac84d6() { - var res: f16 = min(f16(), f16()); + var res: f16 = min(1.h, 1.h); } @vertex diff --git a/test/tint/builtins/gen/literal/min/ac84d6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/min/ac84d6.wgsl.expected.dxc.hlsl index 3d05db9a83..e32d65a729 100644 --- a/test/tint/builtins/gen/literal/min/ac84d6.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/min/ac84d6.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void min_ac84d6() { - float16_t res = min(float16_t(0.0h), float16_t(0.0h)); + float16_t res = min(float16_t(1.0h), float16_t(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/min/ac84d6.wgsl.expected.glsl b/test/tint/builtins/gen/literal/min/ac84d6.wgsl.expected.glsl index b79ac60a36..51fea2f200 100644 --- a/test/tint/builtins/gen/literal/min/ac84d6.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/min/ac84d6.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void min_ac84d6() { - float16_t res = min(0.0hf, 0.0hf); + float16_t res = min(1.0hf, 1.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void min_ac84d6() { - float16_t res = min(0.0hf, 0.0hf); + float16_t res = min(1.0hf, 1.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void min_ac84d6() { - float16_t res = min(0.0hf, 0.0hf); + float16_t res = min(1.0hf, 1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/min/ac84d6.wgsl.expected.msl b/test/tint/builtins/gen/literal/min/ac84d6.wgsl.expected.msl index d2674176d7..f14256e81b 100644 --- a/test/tint/builtins/gen/literal/min/ac84d6.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/min/ac84d6.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void min_ac84d6() { - half res = fmin(0.0h, 0.0h); + half res = fmin(1.0h, 1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/min/ac84d6.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/min/ac84d6.wgsl.expected.spvasm index e76e5c3bf4..a951b5985b 100644 --- a/test/tint/builtins/gen/literal/min/ac84d6.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/min/ac84d6.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,36 +36,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %16 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %19 = OpTypeFunction %v4float + %19 = OpConstantNull %half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %min_ac84d6 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_half Function %16 - %13 = OpExtInst %half %15 NMin %16 %16 + %res = OpVariable %_ptr_Function_half Function %19 + %13 = OpExtInst %half %15 NMin %half_0x1p_0 %half_0x1p_0 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %min_ac84d6 +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %min_ac84d6 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %min_ac84d6 + %29 = OpLabel + %30 = OpFunctionCall %void %min_ac84d6 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %min_ac84d6 + %32 = OpLabel + %33 = OpFunctionCall %void %min_ac84d6 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/min/ac84d6.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/min/ac84d6.wgsl.expected.wgsl index 9e33bab3ec..317af3676d 100644 --- a/test/tint/builtins/gen/literal/min/ac84d6.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/min/ac84d6.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn min_ac84d6() { - var res : f16 = min(f16(), f16()); + var res : f16 = min(1.0h, 1.0h); } @vertex diff --git a/test/tint/builtins/gen/literal/min/e780f9.wgsl b/test/tint/builtins/gen/literal/min/e780f9.wgsl index b769097a61..0b6c9278a8 100644 --- a/test/tint/builtins/gen/literal/min/e780f9.wgsl +++ b/test/tint/builtins/gen/literal/min/e780f9.wgsl @@ -25,7 +25,7 @@ enable f16; // fn min(vec<2, f16>, vec<2, f16>) -> vec<2, f16> fn min_e780f9() { - var res: vec2 = min(vec2(f16()), vec2(f16())); + var res: vec2 = min(vec2(1.h), vec2(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/min/e780f9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/min/e780f9.wgsl.expected.dxc.hlsl index f9c75ce654..4698c105df 100644 --- a/test/tint/builtins/gen/literal/min/e780f9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/min/e780f9.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void min_e780f9() { - vector res = min((float16_t(0.0h)).xx, (float16_t(0.0h)).xx); + vector res = min((float16_t(1.0h)).xx, (float16_t(1.0h)).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/min/e780f9.wgsl.expected.glsl b/test/tint/builtins/gen/literal/min/e780f9.wgsl.expected.glsl index 85e7175282..0fadb10d8d 100644 --- a/test/tint/builtins/gen/literal/min/e780f9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/min/e780f9.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void min_e780f9() { - f16vec2 res = min(f16vec2(0.0hf), f16vec2(0.0hf)); + f16vec2 res = min(f16vec2(1.0hf), f16vec2(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void min_e780f9() { - f16vec2 res = min(f16vec2(0.0hf), f16vec2(0.0hf)); + f16vec2 res = min(f16vec2(1.0hf), f16vec2(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void min_e780f9() { - f16vec2 res = min(f16vec2(0.0hf), f16vec2(0.0hf)); + f16vec2 res = min(f16vec2(1.0hf), f16vec2(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/min/e780f9.wgsl.expected.msl b/test/tint/builtins/gen/literal/min/e780f9.wgsl.expected.msl index 675ed30e88..6cfd466020 100644 --- a/test/tint/builtins/gen/literal/min/e780f9.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/min/e780f9.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void min_e780f9() { - half2 res = fmin(half2(0.0h), half2(0.0h)); + half2 res = fmin(half2(1.0h), half2(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/min/e780f9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/min/e780f9.wgsl.expected.spvasm index 45dd579ffd..e004d7d5e2 100644 --- a/test/tint/builtins/gen/literal/min/e780f9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/min/e780f9.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %17 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v2half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %min_e780f9 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2half Function %17 - %13 = OpExtInst %v2half %16 NMin %17 %17 + %res = OpVariable %_ptr_Function_v2half Function %21 + %13 = OpExtInst %v2half %16 NMin %18 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %min_e780f9 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %min_e780f9 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %min_e780f9 + %31 = OpLabel + %32 = OpFunctionCall %void %min_e780f9 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %min_e780f9 + %34 = OpLabel + %35 = OpFunctionCall %void %min_e780f9 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/min/e780f9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/min/e780f9.wgsl.expected.wgsl index 6da42f234a..4b146a5f98 100644 --- a/test/tint/builtins/gen/literal/min/e780f9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/min/e780f9.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn min_e780f9() { - var res : vec2 = min(vec2(f16()), vec2(f16())); + var res : vec2 = min(vec2(1.0h), vec2(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/mix/38cbbb.wgsl b/test/tint/builtins/gen/literal/mix/38cbbb.wgsl index 66ba78691a..336f36df82 100644 --- a/test/tint/builtins/gen/literal/mix/38cbbb.wgsl +++ b/test/tint/builtins/gen/literal/mix/38cbbb.wgsl @@ -25,7 +25,7 @@ enable f16; // fn mix(f16, f16, f16) -> f16 fn mix_38cbbb() { - var res: f16 = mix(f16(), f16(), f16()); + var res: f16 = mix(1.h, 1.h, 1.h); } @vertex diff --git a/test/tint/builtins/gen/literal/mix/38cbbb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/mix/38cbbb.wgsl.expected.dxc.hlsl index f658161ce3..fe8cb23493 100644 --- a/test/tint/builtins/gen/literal/mix/38cbbb.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/mix/38cbbb.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void mix_38cbbb() { - float16_t res = lerp(float16_t(0.0h), float16_t(0.0h), float16_t(0.0h)); + float16_t res = lerp(float16_t(1.0h), float16_t(1.0h), float16_t(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/mix/38cbbb.wgsl.expected.glsl b/test/tint/builtins/gen/literal/mix/38cbbb.wgsl.expected.glsl index 51e98af0cb..b2c39b080d 100644 --- a/test/tint/builtins/gen/literal/mix/38cbbb.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/mix/38cbbb.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void mix_38cbbb() { - float16_t res = mix(0.0hf, 0.0hf, 0.0hf); + float16_t res = mix(1.0hf, 1.0hf, 1.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void mix_38cbbb() { - float16_t res = mix(0.0hf, 0.0hf, 0.0hf); + float16_t res = mix(1.0hf, 1.0hf, 1.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void mix_38cbbb() { - float16_t res = mix(0.0hf, 0.0hf, 0.0hf); + float16_t res = mix(1.0hf, 1.0hf, 1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/mix/38cbbb.wgsl.expected.msl b/test/tint/builtins/gen/literal/mix/38cbbb.wgsl.expected.msl index 57e66f3c8e..877a6d1ec8 100644 --- a/test/tint/builtins/gen/literal/mix/38cbbb.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/mix/38cbbb.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void mix_38cbbb() { - half res = mix(0.0h, 0.0h, 0.0h); + half res = mix(1.0h, 1.0h, 1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/mix/38cbbb.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/mix/38cbbb.wgsl.expected.spvasm index cbd032d6dd..e54008ed16 100644 --- a/test/tint/builtins/gen/literal/mix/38cbbb.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/mix/38cbbb.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,36 +36,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %16 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %19 = OpTypeFunction %v4float + %19 = OpConstantNull %half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %mix_38cbbb = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_half Function %16 - %13 = OpExtInst %half %15 FMix %16 %16 %16 + %res = OpVariable %_ptr_Function_half Function %19 + %13 = OpExtInst %half %15 FMix %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %mix_38cbbb +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %mix_38cbbb OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %mix_38cbbb + %29 = OpLabel + %30 = OpFunctionCall %void %mix_38cbbb OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %mix_38cbbb + %32 = OpLabel + %33 = OpFunctionCall %void %mix_38cbbb OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/mix/38cbbb.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/mix/38cbbb.wgsl.expected.wgsl index 383a567c5b..b4d4b1986a 100644 --- a/test/tint/builtins/gen/literal/mix/38cbbb.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/mix/38cbbb.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn mix_38cbbb() { - var res : f16 = mix(f16(), f16(), f16()); + var res : f16 = mix(1.0h, 1.0h, 1.0h); } @vertex diff --git a/test/tint/builtins/gen/literal/mix/63f2fd.wgsl b/test/tint/builtins/gen/literal/mix/63f2fd.wgsl index 73b7505822..3e9338d3af 100644 --- a/test/tint/builtins/gen/literal/mix/63f2fd.wgsl +++ b/test/tint/builtins/gen/literal/mix/63f2fd.wgsl @@ -25,7 +25,7 @@ enable f16; // fn mix(vec<3, f16>, vec<3, f16>, vec<3, f16>) -> vec<3, f16> fn mix_63f2fd() { - var res: vec3 = mix(vec3(f16()), vec3(f16()), vec3(f16())); + var res: vec3 = mix(vec3(1.h), vec3(1.h), vec3(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/mix/63f2fd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/mix/63f2fd.wgsl.expected.dxc.hlsl index 3729fefdbe..038d87a0e9 100644 --- a/test/tint/builtins/gen/literal/mix/63f2fd.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/mix/63f2fd.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void mix_63f2fd() { - vector res = lerp((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx); + vector res = lerp((float16_t(1.0h)).xxx, (float16_t(1.0h)).xxx, (float16_t(1.0h)).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/mix/63f2fd.wgsl.expected.glsl b/test/tint/builtins/gen/literal/mix/63f2fd.wgsl.expected.glsl index e51235ba70..0888f6318e 100644 --- a/test/tint/builtins/gen/literal/mix/63f2fd.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/mix/63f2fd.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void mix_63f2fd() { - f16vec3 res = mix(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)); + f16vec3 res = mix(f16vec3(1.0hf), f16vec3(1.0hf), f16vec3(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void mix_63f2fd() { - f16vec3 res = mix(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)); + f16vec3 res = mix(f16vec3(1.0hf), f16vec3(1.0hf), f16vec3(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void mix_63f2fd() { - f16vec3 res = mix(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)); + f16vec3 res = mix(f16vec3(1.0hf), f16vec3(1.0hf), f16vec3(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/mix/63f2fd.wgsl.expected.msl b/test/tint/builtins/gen/literal/mix/63f2fd.wgsl.expected.msl index 8a9ca6f273..4f982d4c6a 100644 --- a/test/tint/builtins/gen/literal/mix/63f2fd.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/mix/63f2fd.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void mix_63f2fd() { - half3 res = mix(half3(0.0h), half3(0.0h), half3(0.0h)); + half3 res = mix(half3(1.0h), half3(1.0h), half3(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/mix/63f2fd.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/mix/63f2fd.wgsl.expected.spvasm index 85d9a38d46..ea02f00864 100644 --- a/test/tint/builtins/gen/literal/mix/63f2fd.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/mix/63f2fd.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %17 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v3half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %mix_63f2fd = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3half Function %17 - %13 = OpExtInst %v3half %16 FMix %17 %17 %17 + %res = OpVariable %_ptr_Function_v3half Function %21 + %13 = OpExtInst %v3half %16 FMix %18 %18 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %mix_63f2fd +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %mix_63f2fd OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %mix_63f2fd + %31 = OpLabel + %32 = OpFunctionCall %void %mix_63f2fd OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %mix_63f2fd + %34 = OpLabel + %35 = OpFunctionCall %void %mix_63f2fd OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/mix/63f2fd.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/mix/63f2fd.wgsl.expected.wgsl index 8aa39e8347..bbf29ed078 100644 --- a/test/tint/builtins/gen/literal/mix/63f2fd.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/mix/63f2fd.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn mix_63f2fd() { - var res : vec3 = mix(vec3(f16()), vec3(f16()), vec3(f16())); + var res : vec3 = mix(vec3(1.0h), vec3(1.0h), vec3(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/mix/98ee3e.wgsl b/test/tint/builtins/gen/literal/mix/98ee3e.wgsl index 3c89b0386b..e8a42749a1 100644 --- a/test/tint/builtins/gen/literal/mix/98ee3e.wgsl +++ b/test/tint/builtins/gen/literal/mix/98ee3e.wgsl @@ -25,7 +25,7 @@ enable f16; // fn mix(vec<2, f16>, vec<2, f16>, vec<2, f16>) -> vec<2, f16> fn mix_98ee3e() { - var res: vec2 = mix(vec2(f16()), vec2(f16()), vec2(f16())); + var res: vec2 = mix(vec2(1.h), vec2(1.h), vec2(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/mix/98ee3e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/mix/98ee3e.wgsl.expected.dxc.hlsl index 2cc67bace9..b0698432a8 100644 --- a/test/tint/builtins/gen/literal/mix/98ee3e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/mix/98ee3e.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void mix_98ee3e() { - vector res = lerp((float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx); + vector res = lerp((float16_t(1.0h)).xx, (float16_t(1.0h)).xx, (float16_t(1.0h)).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/mix/98ee3e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/mix/98ee3e.wgsl.expected.glsl index 977312c5e0..afc4ed86e4 100644 --- a/test/tint/builtins/gen/literal/mix/98ee3e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/mix/98ee3e.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void mix_98ee3e() { - f16vec2 res = mix(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf)); + f16vec2 res = mix(f16vec2(1.0hf), f16vec2(1.0hf), f16vec2(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void mix_98ee3e() { - f16vec2 res = mix(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf)); + f16vec2 res = mix(f16vec2(1.0hf), f16vec2(1.0hf), f16vec2(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void mix_98ee3e() { - f16vec2 res = mix(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf)); + f16vec2 res = mix(f16vec2(1.0hf), f16vec2(1.0hf), f16vec2(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/mix/98ee3e.wgsl.expected.msl b/test/tint/builtins/gen/literal/mix/98ee3e.wgsl.expected.msl index 4f98b7ad1e..f7c0dabf7c 100644 --- a/test/tint/builtins/gen/literal/mix/98ee3e.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/mix/98ee3e.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void mix_98ee3e() { - half2 res = mix(half2(0.0h), half2(0.0h), half2(0.0h)); + half2 res = mix(half2(1.0h), half2(1.0h), half2(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/mix/98ee3e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/mix/98ee3e.wgsl.expected.spvasm index 47c734a523..6e07580eca 100644 --- a/test/tint/builtins/gen/literal/mix/98ee3e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/mix/98ee3e.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %17 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v2half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %mix_98ee3e = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2half Function %17 - %13 = OpExtInst %v2half %16 FMix %17 %17 %17 + %res = OpVariable %_ptr_Function_v2half Function %21 + %13 = OpExtInst %v2half %16 FMix %18 %18 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %mix_98ee3e +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %mix_98ee3e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %mix_98ee3e + %31 = OpLabel + %32 = OpFunctionCall %void %mix_98ee3e OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %mix_98ee3e + %34 = OpLabel + %35 = OpFunctionCall %void %mix_98ee3e OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/mix/98ee3e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/mix/98ee3e.wgsl.expected.wgsl index bb4929d442..c159cdb113 100644 --- a/test/tint/builtins/gen/literal/mix/98ee3e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/mix/98ee3e.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn mix_98ee3e() { - var res : vec2 = mix(vec2(f16()), vec2(f16()), vec2(f16())); + var res : vec2 = mix(vec2(1.0h), vec2(1.0h), vec2(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/mix/c1aec6.wgsl b/test/tint/builtins/gen/literal/mix/c1aec6.wgsl index 21231efd79..5b83bcd487 100644 --- a/test/tint/builtins/gen/literal/mix/c1aec6.wgsl +++ b/test/tint/builtins/gen/literal/mix/c1aec6.wgsl @@ -25,7 +25,7 @@ enable f16; // fn mix(vec<3, f16>, vec<3, f16>, f16) -> vec<3, f16> fn mix_c1aec6() { - var res: vec3 = mix(vec3(f16()), vec3(f16()), f16()); + var res: vec3 = mix(vec3(1.h), vec3(1.h), 1.h); } @vertex diff --git a/test/tint/builtins/gen/literal/mix/c1aec6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/mix/c1aec6.wgsl.expected.dxc.hlsl index 3463407e3e..70e51cdbdd 100644 --- a/test/tint/builtins/gen/literal/mix/c1aec6.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/mix/c1aec6.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void mix_c1aec6() { - vector res = lerp((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, float16_t(0.0h)); + vector res = lerp((float16_t(1.0h)).xxx, (float16_t(1.0h)).xxx, float16_t(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/mix/c1aec6.wgsl.expected.glsl b/test/tint/builtins/gen/literal/mix/c1aec6.wgsl.expected.glsl index 8411e258e5..62f28cb8d6 100644 --- a/test/tint/builtins/gen/literal/mix/c1aec6.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/mix/c1aec6.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void mix_c1aec6() { - f16vec3 res = mix(f16vec3(0.0hf), f16vec3(0.0hf), 0.0hf); + f16vec3 res = mix(f16vec3(1.0hf), f16vec3(1.0hf), 1.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void mix_c1aec6() { - f16vec3 res = mix(f16vec3(0.0hf), f16vec3(0.0hf), 0.0hf); + f16vec3 res = mix(f16vec3(1.0hf), f16vec3(1.0hf), 1.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void mix_c1aec6() { - f16vec3 res = mix(f16vec3(0.0hf), f16vec3(0.0hf), 0.0hf); + f16vec3 res = mix(f16vec3(1.0hf), f16vec3(1.0hf), 1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/mix/c1aec6.wgsl.expected.msl b/test/tint/builtins/gen/literal/mix/c1aec6.wgsl.expected.msl index a8285baea8..96b23d10c4 100644 --- a/test/tint/builtins/gen/literal/mix/c1aec6.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/mix/c1aec6.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void mix_c1aec6() { - half3 res = mix(half3(0.0h), half3(0.0h), 0.0h); + half3 res = mix(half3(1.0h), half3(1.0h), 1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/mix/c1aec6.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/mix/c1aec6.wgsl.expected.spvasm index 7b6a048a10..a69dc54ca5 100644 --- a/test/tint/builtins/gen/literal/mix/c1aec6.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/mix/c1aec6.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,39 +37,40 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %17 = OpConstantNull %v3half - %18 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %23 = OpTypeFunction %v4float + %21 = OpConstantNull %v3half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %mix_c1aec6 = OpFunction %void None %9 %12 = OpLabel - %19 = OpVariable %_ptr_Function_v3half Function %17 - %res = OpVariable %_ptr_Function_v3half Function %17 - %21 = OpCompositeConstruct %v3half %18 %18 %18 - %13 = OpExtInst %v3half %16 FMix %17 %17 %21 + %19 = OpVariable %_ptr_Function_v3half Function %21 + %res = OpVariable %_ptr_Function_v3half Function %21 + %22 = OpCompositeConstruct %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 + %13 = OpExtInst %v3half %16 FMix %18 %18 %22 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %mix_c1aec6 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %mix_c1aec6 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %mix_c1aec6 + %33 = OpLabel + %34 = OpFunctionCall %void %mix_c1aec6 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %mix_c1aec6 + %36 = OpLabel + %37 = OpFunctionCall %void %mix_c1aec6 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/mix/c1aec6.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/mix/c1aec6.wgsl.expected.wgsl index 6665965b40..a3e11f3f6b 100644 --- a/test/tint/builtins/gen/literal/mix/c1aec6.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/mix/c1aec6.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn mix_c1aec6() { - var res : vec3 = mix(vec3(f16()), vec3(f16()), f16()); + var res : vec3 = mix(vec3(1.0h), vec3(1.0h), 1.0h); } @vertex diff --git a/test/tint/builtins/gen/literal/mix/e46a83.wgsl b/test/tint/builtins/gen/literal/mix/e46a83.wgsl index 6adeecb725..454dc073a3 100644 --- a/test/tint/builtins/gen/literal/mix/e46a83.wgsl +++ b/test/tint/builtins/gen/literal/mix/e46a83.wgsl @@ -25,7 +25,7 @@ enable f16; // fn mix(vec<2, f16>, vec<2, f16>, f16) -> vec<2, f16> fn mix_e46a83() { - var res: vec2 = mix(vec2(f16()), vec2(f16()), f16()); + var res: vec2 = mix(vec2(1.h), vec2(1.h), 1.h); } @vertex diff --git a/test/tint/builtins/gen/literal/mix/e46a83.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/mix/e46a83.wgsl.expected.dxc.hlsl index fa0f9c2e1d..9869a2213d 100644 --- a/test/tint/builtins/gen/literal/mix/e46a83.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/mix/e46a83.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void mix_e46a83() { - vector res = lerp((float16_t(0.0h)).xx, (float16_t(0.0h)).xx, float16_t(0.0h)); + vector res = lerp((float16_t(1.0h)).xx, (float16_t(1.0h)).xx, float16_t(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/mix/e46a83.wgsl.expected.glsl b/test/tint/builtins/gen/literal/mix/e46a83.wgsl.expected.glsl index bae9e6d35a..077db7ebf8 100644 --- a/test/tint/builtins/gen/literal/mix/e46a83.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/mix/e46a83.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void mix_e46a83() { - f16vec2 res = mix(f16vec2(0.0hf), f16vec2(0.0hf), 0.0hf); + f16vec2 res = mix(f16vec2(1.0hf), f16vec2(1.0hf), 1.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void mix_e46a83() { - f16vec2 res = mix(f16vec2(0.0hf), f16vec2(0.0hf), 0.0hf); + f16vec2 res = mix(f16vec2(1.0hf), f16vec2(1.0hf), 1.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void mix_e46a83() { - f16vec2 res = mix(f16vec2(0.0hf), f16vec2(0.0hf), 0.0hf); + f16vec2 res = mix(f16vec2(1.0hf), f16vec2(1.0hf), 1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/mix/e46a83.wgsl.expected.msl b/test/tint/builtins/gen/literal/mix/e46a83.wgsl.expected.msl index 15babbee22..5cd4eeab8c 100644 --- a/test/tint/builtins/gen/literal/mix/e46a83.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/mix/e46a83.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void mix_e46a83() { - half2 res = mix(half2(0.0h), half2(0.0h), 0.0h); + half2 res = mix(half2(1.0h), half2(1.0h), 1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/mix/e46a83.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/mix/e46a83.wgsl.expected.spvasm index 8dfbb2c974..48c4d38ff8 100644 --- a/test/tint/builtins/gen/literal/mix/e46a83.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/mix/e46a83.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,39 +37,40 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %17 = OpConstantNull %v2half - %18 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %23 = OpTypeFunction %v4float + %21 = OpConstantNull %v2half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %mix_e46a83 = OpFunction %void None %9 %12 = OpLabel - %19 = OpVariable %_ptr_Function_v2half Function %17 - %res = OpVariable %_ptr_Function_v2half Function %17 - %21 = OpCompositeConstruct %v2half %18 %18 - %13 = OpExtInst %v2half %16 FMix %17 %17 %21 + %19 = OpVariable %_ptr_Function_v2half Function %21 + %res = OpVariable %_ptr_Function_v2half Function %21 + %22 = OpCompositeConstruct %v2half %half_0x1p_0 %half_0x1p_0 + %13 = OpExtInst %v2half %16 FMix %18 %18 %22 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %mix_e46a83 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %mix_e46a83 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %mix_e46a83 + %33 = OpLabel + %34 = OpFunctionCall %void %mix_e46a83 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %mix_e46a83 + %36 = OpLabel + %37 = OpFunctionCall %void %mix_e46a83 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/mix/e46a83.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/mix/e46a83.wgsl.expected.wgsl index 44b19f2a56..bc20255299 100644 --- a/test/tint/builtins/gen/literal/mix/e46a83.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/mix/e46a83.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn mix_e46a83() { - var res : vec2 = mix(vec2(f16()), vec2(f16()), f16()); + var res : vec2 = mix(vec2(1.0h), vec2(1.0h), 1.0h); } @vertex diff --git a/test/tint/builtins/gen/literal/mix/ee2468.wgsl b/test/tint/builtins/gen/literal/mix/ee2468.wgsl index 7bf17b5730..1f93f6636e 100644 --- a/test/tint/builtins/gen/literal/mix/ee2468.wgsl +++ b/test/tint/builtins/gen/literal/mix/ee2468.wgsl @@ -25,7 +25,7 @@ enable f16; // fn mix(vec<4, f16>, vec<4, f16>, vec<4, f16>) -> vec<4, f16> fn mix_ee2468() { - var res: vec4 = mix(vec4(f16()), vec4(f16()), vec4(f16())); + var res: vec4 = mix(vec4(1.h), vec4(1.h), vec4(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/mix/ee2468.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/mix/ee2468.wgsl.expected.dxc.hlsl index daaa4163eb..d3b7179642 100644 --- a/test/tint/builtins/gen/literal/mix/ee2468.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/mix/ee2468.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void mix_ee2468() { - vector res = lerp((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx); + vector res = lerp((float16_t(1.0h)).xxxx, (float16_t(1.0h)).xxxx, (float16_t(1.0h)).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/mix/ee2468.wgsl.expected.glsl b/test/tint/builtins/gen/literal/mix/ee2468.wgsl.expected.glsl index 16c94d2738..89f0516aa6 100644 --- a/test/tint/builtins/gen/literal/mix/ee2468.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/mix/ee2468.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void mix_ee2468() { - f16vec4 res = mix(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf)); + f16vec4 res = mix(f16vec4(1.0hf), f16vec4(1.0hf), f16vec4(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void mix_ee2468() { - f16vec4 res = mix(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf)); + f16vec4 res = mix(f16vec4(1.0hf), f16vec4(1.0hf), f16vec4(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void mix_ee2468() { - f16vec4 res = mix(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf)); + f16vec4 res = mix(f16vec4(1.0hf), f16vec4(1.0hf), f16vec4(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/mix/ee2468.wgsl.expected.msl b/test/tint/builtins/gen/literal/mix/ee2468.wgsl.expected.msl index 2eabc8960b..6edc032456 100644 --- a/test/tint/builtins/gen/literal/mix/ee2468.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/mix/ee2468.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void mix_ee2468() { - half4 res = mix(half4(0.0h), half4(0.0h), half4(0.0h)); + half4 res = mix(half4(1.0h), half4(1.0h), half4(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/mix/ee2468.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/mix/ee2468.wgsl.expected.spvasm index 8ff66bb838..86ff608e58 100644 --- a/test/tint/builtins/gen/literal/mix/ee2468.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/mix/ee2468.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %17 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v4half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %mix_ee2468 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4half Function %17 - %13 = OpExtInst %v4half %16 FMix %17 %17 %17 + %res = OpVariable %_ptr_Function_v4half Function %21 + %13 = OpExtInst %v4half %16 FMix %18 %18 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %mix_ee2468 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %mix_ee2468 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %mix_ee2468 + %31 = OpLabel + %32 = OpFunctionCall %void %mix_ee2468 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %mix_ee2468 + %34 = OpLabel + %35 = OpFunctionCall %void %mix_ee2468 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/mix/ee2468.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/mix/ee2468.wgsl.expected.wgsl index 15e853163a..2e3a3b8bf7 100644 --- a/test/tint/builtins/gen/literal/mix/ee2468.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/mix/ee2468.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn mix_ee2468() { - var res : vec4 = mix(vec4(f16()), vec4(f16()), vec4(f16())); + var res : vec4 = mix(vec4(1.0h), vec4(1.0h), vec4(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/mix/f1a543.wgsl b/test/tint/builtins/gen/literal/mix/f1a543.wgsl index 5ff2c85e7d..99c4e02e29 100644 --- a/test/tint/builtins/gen/literal/mix/f1a543.wgsl +++ b/test/tint/builtins/gen/literal/mix/f1a543.wgsl @@ -25,7 +25,7 @@ enable f16; // fn mix(vec<4, f16>, vec<4, f16>, f16) -> vec<4, f16> fn mix_f1a543() { - var res: vec4 = mix(vec4(f16()), vec4(f16()), f16()); + var res: vec4 = mix(vec4(1.h), vec4(1.h), 1.h); } @vertex diff --git a/test/tint/builtins/gen/literal/mix/f1a543.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/mix/f1a543.wgsl.expected.dxc.hlsl index 0701d56694..706583db94 100644 --- a/test/tint/builtins/gen/literal/mix/f1a543.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/mix/f1a543.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void mix_f1a543() { - vector res = lerp((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, float16_t(0.0h)); + vector res = lerp((float16_t(1.0h)).xxxx, (float16_t(1.0h)).xxxx, float16_t(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/mix/f1a543.wgsl.expected.glsl b/test/tint/builtins/gen/literal/mix/f1a543.wgsl.expected.glsl index 730990d4cc..d3bfff0139 100644 --- a/test/tint/builtins/gen/literal/mix/f1a543.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/mix/f1a543.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void mix_f1a543() { - f16vec4 res = mix(f16vec4(0.0hf), f16vec4(0.0hf), 0.0hf); + f16vec4 res = mix(f16vec4(1.0hf), f16vec4(1.0hf), 1.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void mix_f1a543() { - f16vec4 res = mix(f16vec4(0.0hf), f16vec4(0.0hf), 0.0hf); + f16vec4 res = mix(f16vec4(1.0hf), f16vec4(1.0hf), 1.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void mix_f1a543() { - f16vec4 res = mix(f16vec4(0.0hf), f16vec4(0.0hf), 0.0hf); + f16vec4 res = mix(f16vec4(1.0hf), f16vec4(1.0hf), 1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/mix/f1a543.wgsl.expected.msl b/test/tint/builtins/gen/literal/mix/f1a543.wgsl.expected.msl index 823de59c88..6ef592fd30 100644 --- a/test/tint/builtins/gen/literal/mix/f1a543.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/mix/f1a543.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void mix_f1a543() { - half4 res = mix(half4(0.0h), half4(0.0h), 0.0h); + half4 res = mix(half4(1.0h), half4(1.0h), 1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/mix/f1a543.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/mix/f1a543.wgsl.expected.spvasm index 7f1efc566e..7bbe3690f3 100644 --- a/test/tint/builtins/gen/literal/mix/f1a543.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/mix/f1a543.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,39 +37,40 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %17 = OpConstantNull %v4half - %18 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %23 = OpTypeFunction %v4float + %21 = OpConstantNull %v4half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %mix_f1a543 = OpFunction %void None %9 %12 = OpLabel - %19 = OpVariable %_ptr_Function_v4half Function %17 - %res = OpVariable %_ptr_Function_v4half Function %17 - %21 = OpCompositeConstruct %v4half %18 %18 %18 %18 - %13 = OpExtInst %v4half %16 FMix %17 %17 %21 + %19 = OpVariable %_ptr_Function_v4half Function %21 + %res = OpVariable %_ptr_Function_v4half Function %21 + %22 = OpCompositeConstruct %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 + %13 = OpExtInst %v4half %16 FMix %18 %18 %22 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %mix_f1a543 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %mix_f1a543 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %mix_f1a543 + %33 = OpLabel + %34 = OpFunctionCall %void %mix_f1a543 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %mix_f1a543 + %36 = OpLabel + %37 = OpFunctionCall %void %mix_f1a543 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/mix/f1a543.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/mix/f1a543.wgsl.expected.wgsl index c42b7dae8d..90cd4599ea 100644 --- a/test/tint/builtins/gen/literal/mix/f1a543.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/mix/f1a543.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn mix_f1a543() { - var res : vec4 = mix(vec4(f16()), vec4(f16()), f16()); + var res : vec4 = mix(vec4(1.0h), vec4(1.0h), 1.0h); } @vertex diff --git a/test/tint/builtins/gen/literal/modf/45005f.wgsl b/test/tint/builtins/gen/literal/modf/45005f.wgsl index 236e165b2a..fe0b65699a 100644 --- a/test/tint/builtins/gen/literal/modf/45005f.wgsl +++ b/test/tint/builtins/gen/literal/modf/45005f.wgsl @@ -25,7 +25,7 @@ enable f16; // fn modf(vec<3, f16>) -> __modf_result_vec<3, f16> fn modf_45005f() { - var res = modf(vec3(f16())); + var res = modf(vec3(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/modf/45005f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/modf/45005f.wgsl.expected.dxc.hlsl index 30ed6b2046..e4a00330ea 100644 --- a/test/tint/builtins/gen/literal/modf/45005f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/modf/45005f.wgsl.expected.dxc.hlsl @@ -9,7 +9,7 @@ modf_result_vec3_f16 tint_modf(vector param_0) { } void modf_45005f() { - modf_result_vec3_f16 res = tint_modf((float16_t(0.0h)).xxx); + modf_result_vec3_f16 res = tint_modf((float16_t(1.0h)).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/modf/45005f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/modf/45005f.wgsl.expected.glsl index c2ef9d1bd9..d402eda656 100644 --- a/test/tint/builtins/gen/literal/modf/45005f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/modf/45005f.wgsl.expected.glsl @@ -14,7 +14,7 @@ modf_result_vec3_f16 tint_modf(f16vec3 param_0) { void modf_45005f() { - modf_result_vec3_f16 res = tint_modf(f16vec3(0.0hf)); + modf_result_vec3_f16 res = tint_modf(f16vec3(1.0hf)); } vec4 vertex_main() { @@ -47,7 +47,7 @@ modf_result_vec3_f16 tint_modf(f16vec3 param_0) { void modf_45005f() { - modf_result_vec3_f16 res = tint_modf(f16vec3(0.0hf)); + modf_result_vec3_f16 res = tint_modf(f16vec3(1.0hf)); } void fragment_main() { @@ -74,7 +74,7 @@ modf_result_vec3_f16 tint_modf(f16vec3 param_0) { void modf_45005f() { - modf_result_vec3_f16 res = tint_modf(f16vec3(0.0hf)); + modf_result_vec3_f16 res = tint_modf(f16vec3(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/modf/45005f.wgsl.expected.msl b/test/tint/builtins/gen/literal/modf/45005f.wgsl.expected.msl index b07ab06c66..a3071d4f5a 100644 --- a/test/tint/builtins/gen/literal/modf/45005f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/modf/45005f.wgsl.expected.msl @@ -13,7 +13,7 @@ modf_result_vec3_f16 tint_modf(half3 param_0) { } void modf_45005f() { - modf_result_vec3_f16 res = tint_modf(half3(0.0h)); + modf_result_vec3_f16 res = tint_modf(half3(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/modf/45005f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/modf/45005f.wgsl.expected.spvasm index 1e06f7ac0c..63c4bd4558 100644 --- a/test/tint/builtins/gen/literal/modf/45005f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/modf/45005f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 37 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -43,37 +43,38 @@ %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 %__modf_result_vec3_f16 = OpTypeStruct %v3half %v3half - %18 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %19 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function___modf_result_vec3_f16 = OpTypePointer Function %__modf_result_vec3_f16 - %21 = OpConstantNull %__modf_result_vec3_f16 - %22 = OpTypeFunction %v4float + %22 = OpConstantNull %__modf_result_vec3_f16 + %23 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %modf_45005f = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function___modf_result_vec3_f16 Function %21 - %13 = OpExtInst %__modf_result_vec3_f16 %17 ModfStruct %18 + %res = OpVariable %_ptr_Function___modf_result_vec3_f16 Function %22 + %13 = OpExtInst %__modf_result_vec3_f16 %17 ModfStruct %19 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %modf_45005f +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %modf_45005f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %modf_45005f + %32 = OpLabel + %33 = OpFunctionCall %void %modf_45005f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %modf_45005f + %35 = OpLabel + %36 = OpFunctionCall %void %modf_45005f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/modf/45005f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/modf/45005f.wgsl.expected.wgsl index 57f4b3b0a9..43f497ee30 100644 --- a/test/tint/builtins/gen/literal/modf/45005f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/modf/45005f.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn modf_45005f() { - var res = modf(vec3(f16())); + var res = modf(vec3(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl b/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl index 71e26385e4..591a299b75 100644 --- a/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl +++ b/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl @@ -25,7 +25,7 @@ enable f16; // fn modf(f16) -> __modf_result fn modf_8dbbbf() { - var res = modf(f16()); + var res = modf(1.h); } @vertex diff --git a/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl.expected.dxc.hlsl index 802fe2a87d..c84d408785 100644 --- a/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl.expected.dxc.hlsl @@ -9,7 +9,7 @@ modf_result_f16 tint_modf(float16_t param_0) { } void modf_8dbbbf() { - modf_result_f16 res = tint_modf(float16_t(0.0h)); + modf_result_f16 res = tint_modf(float16_t(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl.expected.glsl b/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl.expected.glsl index f949198626..f9757b9291 100644 --- a/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl.expected.glsl @@ -14,7 +14,7 @@ modf_result_f16 tint_modf(float16_t param_0) { void modf_8dbbbf() { - modf_result_f16 res = tint_modf(0.0hf); + modf_result_f16 res = tint_modf(1.0hf); } vec4 vertex_main() { @@ -47,7 +47,7 @@ modf_result_f16 tint_modf(float16_t param_0) { void modf_8dbbbf() { - modf_result_f16 res = tint_modf(0.0hf); + modf_result_f16 res = tint_modf(1.0hf); } void fragment_main() { @@ -74,7 +74,7 @@ modf_result_f16 tint_modf(float16_t param_0) { void modf_8dbbbf() { - modf_result_f16 res = tint_modf(0.0hf); + modf_result_f16 res = tint_modf(1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl.expected.msl b/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl.expected.msl index f0a8d58991..e9472e7514 100644 --- a/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl.expected.msl @@ -13,7 +13,7 @@ modf_result_f16 tint_modf(half param_0) { } void modf_8dbbbf() { - modf_result_f16 res = tint_modf(0.0h); + modf_result_f16 res = tint_modf(1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl.expected.spvasm index 53162e3865..ebb1132497 100644 --- a/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl.expected.spvasm @@ -42,7 +42,7 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %__modf_result_f16 = OpTypeStruct %half %half - %17 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function___modf_result_f16 = OpTypePointer Function %__modf_result_f16 %20 = OpConstantNull %__modf_result_f16 %21 = OpTypeFunction %v4float @@ -50,7 +50,7 @@ %modf_8dbbbf = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function___modf_result_f16 Function %20 - %13 = OpExtInst %__modf_result_f16 %16 ModfStruct %17 + %13 = OpExtInst %__modf_result_f16 %16 ModfStruct %half_0x1p_0 OpStore %res %13 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl.expected.wgsl index 2ab39a6f3c..c3619a7613 100644 --- a/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn modf_8dbbbf() { - var res = modf(f16()); + var res = modf(1.0h); } @vertex diff --git a/test/tint/builtins/gen/literal/modf/995934.wgsl b/test/tint/builtins/gen/literal/modf/995934.wgsl index ef2c6aec4f..bcb60068c9 100644 --- a/test/tint/builtins/gen/literal/modf/995934.wgsl +++ b/test/tint/builtins/gen/literal/modf/995934.wgsl @@ -25,7 +25,7 @@ enable f16; // fn modf(vec<4, f16>) -> __modf_result_vec<4, f16> fn modf_995934() { - var res = modf(vec4(f16())); + var res = modf(vec4(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/modf/995934.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/modf/995934.wgsl.expected.dxc.hlsl index d1b1051608..24c71de828 100644 --- a/test/tint/builtins/gen/literal/modf/995934.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/modf/995934.wgsl.expected.dxc.hlsl @@ -9,7 +9,7 @@ modf_result_vec4_f16 tint_modf(vector param_0) { } void modf_995934() { - modf_result_vec4_f16 res = tint_modf((float16_t(0.0h)).xxxx); + modf_result_vec4_f16 res = tint_modf((float16_t(1.0h)).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/modf/995934.wgsl.expected.glsl b/test/tint/builtins/gen/literal/modf/995934.wgsl.expected.glsl index f3e71cb8be..065a9e74ef 100644 --- a/test/tint/builtins/gen/literal/modf/995934.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/modf/995934.wgsl.expected.glsl @@ -14,7 +14,7 @@ modf_result_vec4_f16 tint_modf(f16vec4 param_0) { void modf_995934() { - modf_result_vec4_f16 res = tint_modf(f16vec4(0.0hf)); + modf_result_vec4_f16 res = tint_modf(f16vec4(1.0hf)); } vec4 vertex_main() { @@ -47,7 +47,7 @@ modf_result_vec4_f16 tint_modf(f16vec4 param_0) { void modf_995934() { - modf_result_vec4_f16 res = tint_modf(f16vec4(0.0hf)); + modf_result_vec4_f16 res = tint_modf(f16vec4(1.0hf)); } void fragment_main() { @@ -74,7 +74,7 @@ modf_result_vec4_f16 tint_modf(f16vec4 param_0) { void modf_995934() { - modf_result_vec4_f16 res = tint_modf(f16vec4(0.0hf)); + modf_result_vec4_f16 res = tint_modf(f16vec4(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/modf/995934.wgsl.expected.msl b/test/tint/builtins/gen/literal/modf/995934.wgsl.expected.msl index 93df00a5b7..76d3c047e6 100644 --- a/test/tint/builtins/gen/literal/modf/995934.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/modf/995934.wgsl.expected.msl @@ -13,7 +13,7 @@ modf_result_vec4_f16 tint_modf(half4 param_0) { } void modf_995934() { - modf_result_vec4_f16 res = tint_modf(half4(0.0h)); + modf_result_vec4_f16 res = tint_modf(half4(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/modf/995934.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/modf/995934.wgsl.expected.spvasm index 6fa7c2f351..b19f599e2e 100644 --- a/test/tint/builtins/gen/literal/modf/995934.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/modf/995934.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 37 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -43,37 +43,38 @@ %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 %__modf_result_vec4_f16 = OpTypeStruct %v4half %v4half - %18 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %19 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function___modf_result_vec4_f16 = OpTypePointer Function %__modf_result_vec4_f16 - %21 = OpConstantNull %__modf_result_vec4_f16 - %22 = OpTypeFunction %v4float + %22 = OpConstantNull %__modf_result_vec4_f16 + %23 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %modf_995934 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function___modf_result_vec4_f16 Function %21 - %13 = OpExtInst %__modf_result_vec4_f16 %17 ModfStruct %18 + %res = OpVariable %_ptr_Function___modf_result_vec4_f16 Function %22 + %13 = OpExtInst %__modf_result_vec4_f16 %17 ModfStruct %19 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %modf_995934 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %modf_995934 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %modf_995934 + %32 = OpLabel + %33 = OpFunctionCall %void %modf_995934 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %modf_995934 + %35 = OpLabel + %36 = OpFunctionCall %void %modf_995934 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/modf/995934.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/modf/995934.wgsl.expected.wgsl index 1568993174..a73275d387 100644 --- a/test/tint/builtins/gen/literal/modf/995934.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/modf/995934.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn modf_995934() { - var res = modf(vec4(f16())); + var res = modf(vec4(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/modf/a545b9.wgsl b/test/tint/builtins/gen/literal/modf/a545b9.wgsl index 5b3d8b5137..1a66aad4b9 100644 --- a/test/tint/builtins/gen/literal/modf/a545b9.wgsl +++ b/test/tint/builtins/gen/literal/modf/a545b9.wgsl @@ -25,7 +25,7 @@ enable f16; // fn modf(vec<2, f16>) -> __modf_result_vec<2, f16> fn modf_a545b9() { - var res = modf(vec2(f16())); + var res = modf(vec2(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/modf/a545b9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/modf/a545b9.wgsl.expected.dxc.hlsl index d14629192a..1805568cef 100644 --- a/test/tint/builtins/gen/literal/modf/a545b9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/modf/a545b9.wgsl.expected.dxc.hlsl @@ -9,7 +9,7 @@ modf_result_vec2_f16 tint_modf(vector param_0) { } void modf_a545b9() { - modf_result_vec2_f16 res = tint_modf((float16_t(0.0h)).xx); + modf_result_vec2_f16 res = tint_modf((float16_t(1.0h)).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/modf/a545b9.wgsl.expected.glsl b/test/tint/builtins/gen/literal/modf/a545b9.wgsl.expected.glsl index 9a4b37ae4b..7c2f892c9e 100644 --- a/test/tint/builtins/gen/literal/modf/a545b9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/modf/a545b9.wgsl.expected.glsl @@ -14,7 +14,7 @@ modf_result_vec2_f16 tint_modf(f16vec2 param_0) { void modf_a545b9() { - modf_result_vec2_f16 res = tint_modf(f16vec2(0.0hf)); + modf_result_vec2_f16 res = tint_modf(f16vec2(1.0hf)); } vec4 vertex_main() { @@ -47,7 +47,7 @@ modf_result_vec2_f16 tint_modf(f16vec2 param_0) { void modf_a545b9() { - modf_result_vec2_f16 res = tint_modf(f16vec2(0.0hf)); + modf_result_vec2_f16 res = tint_modf(f16vec2(1.0hf)); } void fragment_main() { @@ -74,7 +74,7 @@ modf_result_vec2_f16 tint_modf(f16vec2 param_0) { void modf_a545b9() { - modf_result_vec2_f16 res = tint_modf(f16vec2(0.0hf)); + modf_result_vec2_f16 res = tint_modf(f16vec2(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/modf/a545b9.wgsl.expected.msl b/test/tint/builtins/gen/literal/modf/a545b9.wgsl.expected.msl index a9f218aeee..d7ce71e2ba 100644 --- a/test/tint/builtins/gen/literal/modf/a545b9.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/modf/a545b9.wgsl.expected.msl @@ -13,7 +13,7 @@ modf_result_vec2_f16 tint_modf(half2 param_0) { } void modf_a545b9() { - modf_result_vec2_f16 res = tint_modf(half2(0.0h)); + modf_result_vec2_f16 res = tint_modf(half2(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/modf/a545b9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/modf/a545b9.wgsl.expected.spvasm index a47a13827b..63d3be1e4e 100644 --- a/test/tint/builtins/gen/literal/modf/a545b9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/modf/a545b9.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 37 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -43,37 +43,38 @@ %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 %__modf_result_vec2_f16 = OpTypeStruct %v2half %v2half - %18 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %19 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function___modf_result_vec2_f16 = OpTypePointer Function %__modf_result_vec2_f16 - %21 = OpConstantNull %__modf_result_vec2_f16 - %22 = OpTypeFunction %v4float + %22 = OpConstantNull %__modf_result_vec2_f16 + %23 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %modf_a545b9 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function___modf_result_vec2_f16 Function %21 - %13 = OpExtInst %__modf_result_vec2_f16 %17 ModfStruct %18 + %res = OpVariable %_ptr_Function___modf_result_vec2_f16 Function %22 + %13 = OpExtInst %__modf_result_vec2_f16 %17 ModfStruct %19 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %modf_a545b9 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %modf_a545b9 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %modf_a545b9 + %32 = OpLabel + %33 = OpFunctionCall %void %modf_a545b9 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %modf_a545b9 + %35 = OpLabel + %36 = OpFunctionCall %void %modf_a545b9 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/modf/a545b9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/modf/a545b9.wgsl.expected.wgsl index 177b0e97da..9d2b453af8 100644 --- a/test/tint/builtins/gen/literal/modf/a545b9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/modf/a545b9.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn modf_a545b9() { - var res = modf(vec2(f16())); + var res = modf(vec2(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl b/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl index 3c612c65b6..7e2eb67d3e 100644 --- a/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl +++ b/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl @@ -25,7 +25,7 @@ enable f16; // fn normalize(vec<3, f16>) -> vec<3, f16> fn normalize_39d5ec() { - var res: vec3 = normalize(vec3(f16())); + var res: vec3 = normalize(vec3(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl.expected.dxc.hlsl index 4ad650fbbc..517a86a0e0 100644 --- a/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void normalize_39d5ec() { - vector res = normalize((float16_t(0.0h)).xxx); + vector res = normalize((float16_t(1.0h)).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl.expected.glsl b/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl.expected.glsl index e129ddcbd8..70d93b70fc 100644 --- a/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void normalize_39d5ec() { - f16vec3 res = normalize(f16vec3(0.0hf)); + f16vec3 res = normalize(f16vec3(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void normalize_39d5ec() { - f16vec3 res = normalize(f16vec3(0.0hf)); + f16vec3 res = normalize(f16vec3(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void normalize_39d5ec() { - f16vec3 res = normalize(f16vec3(0.0hf)); + f16vec3 res = normalize(f16vec3(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl.expected.msl b/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl.expected.msl index 683a2ad492..42dca1dfd2 100644 --- a/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void normalize_39d5ec() { - half3 res = normalize(half3(0.0h)); + half3 res = normalize(half3(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl.expected.spvasm index 7f5230775e..0c7ec62b85 100644 --- a/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %17 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v3half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %normalize_39d5ec = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3half Function %17 - %13 = OpExtInst %v3half %16 Normalize %17 + %res = OpVariable %_ptr_Function_v3half Function %21 + %13 = OpExtInst %v3half %16 Normalize %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %normalize_39d5ec +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %normalize_39d5ec OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %normalize_39d5ec + %31 = OpLabel + %32 = OpFunctionCall %void %normalize_39d5ec OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %normalize_39d5ec + %34 = OpLabel + %35 = OpFunctionCall %void %normalize_39d5ec OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl.expected.wgsl index f8f2e8fa2b..27eaacd501 100644 --- a/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn normalize_39d5ec() { - var res : vec3 = normalize(vec3(f16())); + var res : vec3 = normalize(vec3(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/normalize/7990f3.wgsl b/test/tint/builtins/gen/literal/normalize/7990f3.wgsl index 8b3c478526..5dcb17c404 100644 --- a/test/tint/builtins/gen/literal/normalize/7990f3.wgsl +++ b/test/tint/builtins/gen/literal/normalize/7990f3.wgsl @@ -25,7 +25,7 @@ enable f16; // fn normalize(vec<2, f16>) -> vec<2, f16> fn normalize_7990f3() { - var res: vec2 = normalize(vec2(f16())); + var res: vec2 = normalize(vec2(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/normalize/7990f3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/normalize/7990f3.wgsl.expected.dxc.hlsl index b0e04e189a..ee11b6fa3c 100644 --- a/test/tint/builtins/gen/literal/normalize/7990f3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/normalize/7990f3.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void normalize_7990f3() { - vector res = normalize((float16_t(0.0h)).xx); + vector res = normalize((float16_t(1.0h)).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/normalize/7990f3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/normalize/7990f3.wgsl.expected.glsl index f59eb6dbb2..454624515c 100644 --- a/test/tint/builtins/gen/literal/normalize/7990f3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/normalize/7990f3.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void normalize_7990f3() { - f16vec2 res = normalize(f16vec2(0.0hf)); + f16vec2 res = normalize(f16vec2(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void normalize_7990f3() { - f16vec2 res = normalize(f16vec2(0.0hf)); + f16vec2 res = normalize(f16vec2(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void normalize_7990f3() { - f16vec2 res = normalize(f16vec2(0.0hf)); + f16vec2 res = normalize(f16vec2(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/normalize/7990f3.wgsl.expected.msl b/test/tint/builtins/gen/literal/normalize/7990f3.wgsl.expected.msl index bea065fc45..1a691aa835 100644 --- a/test/tint/builtins/gen/literal/normalize/7990f3.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/normalize/7990f3.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void normalize_7990f3() { - half2 res = normalize(half2(0.0h)); + half2 res = normalize(half2(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/normalize/7990f3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/normalize/7990f3.wgsl.expected.spvasm index d00d9f3f26..d38b1e8641 100644 --- a/test/tint/builtins/gen/literal/normalize/7990f3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/normalize/7990f3.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %17 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v2half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %normalize_7990f3 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2half Function %17 - %13 = OpExtInst %v2half %16 Normalize %17 + %res = OpVariable %_ptr_Function_v2half Function %21 + %13 = OpExtInst %v2half %16 Normalize %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %normalize_7990f3 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %normalize_7990f3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %normalize_7990f3 + %31 = OpLabel + %32 = OpFunctionCall %void %normalize_7990f3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %normalize_7990f3 + %34 = OpLabel + %35 = OpFunctionCall %void %normalize_7990f3 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/normalize/7990f3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/normalize/7990f3.wgsl.expected.wgsl index ce0b29f2ef..996f7d3014 100644 --- a/test/tint/builtins/gen/literal/normalize/7990f3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/normalize/7990f3.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn normalize_7990f3() { - var res : vec2 = normalize(vec2(f16())); + var res : vec2 = normalize(vec2(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl b/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl index 81f49c1d66..6b73d2f9b8 100644 --- a/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl +++ b/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl @@ -25,7 +25,7 @@ enable f16; // fn normalize(vec<4, f16>) -> vec<4, f16> fn normalize_b8cb8d() { - var res: vec4 = normalize(vec4(f16())); + var res: vec4 = normalize(vec4(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl.expected.dxc.hlsl index 24ac211c15..df8561eabe 100644 --- a/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void normalize_b8cb8d() { - vector res = normalize((float16_t(0.0h)).xxxx); + vector res = normalize((float16_t(1.0h)).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl.expected.glsl index 897b4f936c..727d29a644 100644 --- a/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void normalize_b8cb8d() { - f16vec4 res = normalize(f16vec4(0.0hf)); + f16vec4 res = normalize(f16vec4(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void normalize_b8cb8d() { - f16vec4 res = normalize(f16vec4(0.0hf)); + f16vec4 res = normalize(f16vec4(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void normalize_b8cb8d() { - f16vec4 res = normalize(f16vec4(0.0hf)); + f16vec4 res = normalize(f16vec4(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl.expected.msl b/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl.expected.msl index 4481b97c17..ddeaa454e0 100644 --- a/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void normalize_b8cb8d() { - half4 res = normalize(half4(0.0h)); + half4 res = normalize(half4(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl.expected.spvasm index ce722dba27..7b84f9bbce 100644 --- a/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %17 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v4half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %normalize_b8cb8d = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4half Function %17 - %13 = OpExtInst %v4half %16 Normalize %17 + %res = OpVariable %_ptr_Function_v4half Function %21 + %13 = OpExtInst %v4half %16 Normalize %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %normalize_b8cb8d +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %normalize_b8cb8d OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %normalize_b8cb8d + %31 = OpLabel + %32 = OpFunctionCall %void %normalize_b8cb8d OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %normalize_b8cb8d + %34 = OpLabel + %35 = OpFunctionCall %void %normalize_b8cb8d OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl.expected.wgsl index 07214277df..2549e2bb7f 100644 --- a/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn normalize_b8cb8d() { - var res : vec4 = normalize(vec4(f16())); + var res : vec4 = normalize(vec4(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/pow/4f33b2.wgsl b/test/tint/builtins/gen/literal/pow/4f33b2.wgsl index 58ab00c606..b6306ef817 100644 --- a/test/tint/builtins/gen/literal/pow/4f33b2.wgsl +++ b/test/tint/builtins/gen/literal/pow/4f33b2.wgsl @@ -25,7 +25,7 @@ enable f16; // fn pow(vec<4, f16>, vec<4, f16>) -> vec<4, f16> fn pow_4f33b2() { - var res: vec4 = pow(vec4(f16()), vec4(f16())); + var res: vec4 = pow(vec4(1.h), vec4(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/pow/4f33b2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/pow/4f33b2.wgsl.expected.dxc.hlsl index 28040580a3..279bbacf6e 100644 --- a/test/tint/builtins/gen/literal/pow/4f33b2.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/pow/4f33b2.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void pow_4f33b2() { - vector res = pow((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx); + vector res = pow((float16_t(1.0h)).xxxx, (float16_t(1.0h)).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/pow/4f33b2.wgsl.expected.glsl b/test/tint/builtins/gen/literal/pow/4f33b2.wgsl.expected.glsl index cec05e4dc2..2a31c9138c 100644 --- a/test/tint/builtins/gen/literal/pow/4f33b2.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/pow/4f33b2.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void pow_4f33b2() { - f16vec4 res = pow(f16vec4(0.0hf), f16vec4(0.0hf)); + f16vec4 res = pow(f16vec4(1.0hf), f16vec4(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void pow_4f33b2() { - f16vec4 res = pow(f16vec4(0.0hf), f16vec4(0.0hf)); + f16vec4 res = pow(f16vec4(1.0hf), f16vec4(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void pow_4f33b2() { - f16vec4 res = pow(f16vec4(0.0hf), f16vec4(0.0hf)); + f16vec4 res = pow(f16vec4(1.0hf), f16vec4(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/pow/4f33b2.wgsl.expected.msl b/test/tint/builtins/gen/literal/pow/4f33b2.wgsl.expected.msl index abc7e9e73c..8f249be15b 100644 --- a/test/tint/builtins/gen/literal/pow/4f33b2.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/pow/4f33b2.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void pow_4f33b2() { - half4 res = pow(half4(0.0h), half4(0.0h)); + half4 res = pow(half4(1.0h), half4(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/pow/4f33b2.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/pow/4f33b2.wgsl.expected.spvasm index 669759df1f..be0a42abd5 100644 --- a/test/tint/builtins/gen/literal/pow/4f33b2.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/pow/4f33b2.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %17 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v4half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %pow_4f33b2 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4half Function %17 - %13 = OpExtInst %v4half %16 Pow %17 %17 + %res = OpVariable %_ptr_Function_v4half Function %21 + %13 = OpExtInst %v4half %16 Pow %18 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %pow_4f33b2 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %pow_4f33b2 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %pow_4f33b2 + %31 = OpLabel + %32 = OpFunctionCall %void %pow_4f33b2 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %pow_4f33b2 + %34 = OpLabel + %35 = OpFunctionCall %void %pow_4f33b2 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/pow/4f33b2.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/pow/4f33b2.wgsl.expected.wgsl index bb9db59bfc..241f5546fd 100644 --- a/test/tint/builtins/gen/literal/pow/4f33b2.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/pow/4f33b2.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn pow_4f33b2() { - var res : vec4 = pow(vec4(f16()), vec4(f16())); + var res : vec4 = pow(vec4(1.0h), vec4(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl b/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl index c9a6522cdf..b2c268d8b8 100644 --- a/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl +++ b/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl @@ -25,7 +25,7 @@ enable f16; // fn pow(f16, f16) -> f16 fn pow_ce9ef5() { - var res: f16 = pow(f16(), f16()); + var res: f16 = pow(1.h, 1.h); } @vertex diff --git a/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl.expected.dxc.hlsl index 1f9e7123a3..b2a002c2cf 100644 --- a/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void pow_ce9ef5() { - float16_t res = pow(float16_t(0.0h), float16_t(0.0h)); + float16_t res = pow(float16_t(1.0h), float16_t(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl.expected.glsl index 23f08dbe3d..3363c82110 100644 --- a/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void pow_ce9ef5() { - float16_t res = pow(0.0hf, 0.0hf); + float16_t res = pow(1.0hf, 1.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void pow_ce9ef5() { - float16_t res = pow(0.0hf, 0.0hf); + float16_t res = pow(1.0hf, 1.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void pow_ce9ef5() { - float16_t res = pow(0.0hf, 0.0hf); + float16_t res = pow(1.0hf, 1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl.expected.msl b/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl.expected.msl index 9346414b9a..45bbe91a31 100644 --- a/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void pow_ce9ef5() { - half res = pow(0.0h, 0.0h); + half res = pow(1.0h, 1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl.expected.spvasm index 219cfcfeed..67c724021a 100644 --- a/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,36 +36,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %16 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %19 = OpTypeFunction %v4float + %19 = OpConstantNull %half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %pow_ce9ef5 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_half Function %16 - %13 = OpExtInst %half %15 Pow %16 %16 + %res = OpVariable %_ptr_Function_half Function %19 + %13 = OpExtInst %half %15 Pow %half_0x1p_0 %half_0x1p_0 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %pow_ce9ef5 +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %pow_ce9ef5 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %pow_ce9ef5 + %29 = OpLabel + %30 = OpFunctionCall %void %pow_ce9ef5 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %pow_ce9ef5 + %32 = OpLabel + %33 = OpFunctionCall %void %pow_ce9ef5 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl.expected.wgsl index dc2c9c4e13..ba7dac9ace 100644 --- a/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn pow_ce9ef5() { - var res : f16 = pow(f16(), f16()); + var res : f16 = pow(1.0h, 1.0h); } @vertex diff --git a/test/tint/builtins/gen/literal/pow/f37b25.wgsl b/test/tint/builtins/gen/literal/pow/f37b25.wgsl index b63e93e75e..9a1983418e 100644 --- a/test/tint/builtins/gen/literal/pow/f37b25.wgsl +++ b/test/tint/builtins/gen/literal/pow/f37b25.wgsl @@ -25,7 +25,7 @@ enable f16; // fn pow(vec<2, f16>, vec<2, f16>) -> vec<2, f16> fn pow_f37b25() { - var res: vec2 = pow(vec2(f16()), vec2(f16())); + var res: vec2 = pow(vec2(1.h), vec2(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/pow/f37b25.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/pow/f37b25.wgsl.expected.dxc.hlsl index 8efda2bd3a..6a13f47ebe 100644 --- a/test/tint/builtins/gen/literal/pow/f37b25.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/pow/f37b25.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void pow_f37b25() { - vector res = pow((float16_t(0.0h)).xx, (float16_t(0.0h)).xx); + vector res = pow((float16_t(1.0h)).xx, (float16_t(1.0h)).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/pow/f37b25.wgsl.expected.glsl b/test/tint/builtins/gen/literal/pow/f37b25.wgsl.expected.glsl index ac933cbbcc..c49c6cc944 100644 --- a/test/tint/builtins/gen/literal/pow/f37b25.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/pow/f37b25.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void pow_f37b25() { - f16vec2 res = pow(f16vec2(0.0hf), f16vec2(0.0hf)); + f16vec2 res = pow(f16vec2(1.0hf), f16vec2(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void pow_f37b25() { - f16vec2 res = pow(f16vec2(0.0hf), f16vec2(0.0hf)); + f16vec2 res = pow(f16vec2(1.0hf), f16vec2(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void pow_f37b25() { - f16vec2 res = pow(f16vec2(0.0hf), f16vec2(0.0hf)); + f16vec2 res = pow(f16vec2(1.0hf), f16vec2(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/pow/f37b25.wgsl.expected.msl b/test/tint/builtins/gen/literal/pow/f37b25.wgsl.expected.msl index 3962dd1e78..f2862ed49a 100644 --- a/test/tint/builtins/gen/literal/pow/f37b25.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/pow/f37b25.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void pow_f37b25() { - half2 res = pow(half2(0.0h), half2(0.0h)); + half2 res = pow(half2(1.0h), half2(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/pow/f37b25.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/pow/f37b25.wgsl.expected.spvasm index 53e3689a54..88e21b6b1f 100644 --- a/test/tint/builtins/gen/literal/pow/f37b25.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/pow/f37b25.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %17 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v2half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %pow_f37b25 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2half Function %17 - %13 = OpExtInst %v2half %16 Pow %17 %17 + %res = OpVariable %_ptr_Function_v2half Function %21 + %13 = OpExtInst %v2half %16 Pow %18 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %pow_f37b25 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %pow_f37b25 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %pow_f37b25 + %31 = OpLabel + %32 = OpFunctionCall %void %pow_f37b25 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %pow_f37b25 + %34 = OpLabel + %35 = OpFunctionCall %void %pow_f37b25 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/pow/f37b25.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/pow/f37b25.wgsl.expected.wgsl index 96ff2a23ff..4ab482e68a 100644 --- a/test/tint/builtins/gen/literal/pow/f37b25.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/pow/f37b25.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn pow_f37b25() { - var res : vec2 = pow(vec2(f16()), vec2(f16())); + var res : vec2 = pow(vec2(1.0h), vec2(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/pow/fa5429.wgsl b/test/tint/builtins/gen/literal/pow/fa5429.wgsl index 51ecff311c..8e718c80f8 100644 --- a/test/tint/builtins/gen/literal/pow/fa5429.wgsl +++ b/test/tint/builtins/gen/literal/pow/fa5429.wgsl @@ -25,7 +25,7 @@ enable f16; // fn pow(vec<3, f16>, vec<3, f16>) -> vec<3, f16> fn pow_fa5429() { - var res: vec3 = pow(vec3(f16()), vec3(f16())); + var res: vec3 = pow(vec3(1.h), vec3(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/pow/fa5429.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/pow/fa5429.wgsl.expected.dxc.hlsl index fc999c6261..a7106e4b23 100644 --- a/test/tint/builtins/gen/literal/pow/fa5429.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/pow/fa5429.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void pow_fa5429() { - vector res = pow((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx); + vector res = pow((float16_t(1.0h)).xxx, (float16_t(1.0h)).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/pow/fa5429.wgsl.expected.glsl b/test/tint/builtins/gen/literal/pow/fa5429.wgsl.expected.glsl index 113b3ab6c3..289c6e67e5 100644 --- a/test/tint/builtins/gen/literal/pow/fa5429.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/pow/fa5429.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void pow_fa5429() { - f16vec3 res = pow(f16vec3(0.0hf), f16vec3(0.0hf)); + f16vec3 res = pow(f16vec3(1.0hf), f16vec3(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void pow_fa5429() { - f16vec3 res = pow(f16vec3(0.0hf), f16vec3(0.0hf)); + f16vec3 res = pow(f16vec3(1.0hf), f16vec3(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void pow_fa5429() { - f16vec3 res = pow(f16vec3(0.0hf), f16vec3(0.0hf)); + f16vec3 res = pow(f16vec3(1.0hf), f16vec3(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/pow/fa5429.wgsl.expected.msl b/test/tint/builtins/gen/literal/pow/fa5429.wgsl.expected.msl index 249c3f3f42..220abc46a0 100644 --- a/test/tint/builtins/gen/literal/pow/fa5429.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/pow/fa5429.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void pow_fa5429() { - half3 res = pow(half3(0.0h), half3(0.0h)); + half3 res = pow(half3(1.0h), half3(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/pow/fa5429.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/pow/fa5429.wgsl.expected.spvasm index bc20475f25..68917f87df 100644 --- a/test/tint/builtins/gen/literal/pow/fa5429.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/pow/fa5429.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %17 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v3half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %pow_fa5429 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3half Function %17 - %13 = OpExtInst %v3half %16 Pow %17 %17 + %res = OpVariable %_ptr_Function_v3half Function %21 + %13 = OpExtInst %v3half %16 Pow %18 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %pow_fa5429 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %pow_fa5429 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %pow_fa5429 + %31 = OpLabel + %32 = OpFunctionCall %void %pow_fa5429 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %pow_fa5429 + %34 = OpLabel + %35 = OpFunctionCall %void %pow_fa5429 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/pow/fa5429.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/pow/fa5429.wgsl.expected.wgsl index 46002ea14b..703d869f38 100644 --- a/test/tint/builtins/gen/literal/pow/fa5429.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/pow/fa5429.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn pow_fa5429() { - var res : vec3 = pow(vec3(f16()), vec3(f16())); + var res : vec3 = pow(vec3(1.0h), vec3(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/radians/208fd9.wgsl b/test/tint/builtins/gen/literal/radians/208fd9.wgsl index c60793b14d..a9c61e5752 100644 --- a/test/tint/builtins/gen/literal/radians/208fd9.wgsl +++ b/test/tint/builtins/gen/literal/radians/208fd9.wgsl @@ -25,7 +25,7 @@ enable f16; // fn radians(f16) -> f16 fn radians_208fd9() { - var res: f16 = radians(f16()); + var res: f16 = radians(1.h); } @vertex diff --git a/test/tint/builtins/gen/literal/radians/208fd9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/radians/208fd9.wgsl.expected.dxc.hlsl index b7b76cd22a..fb9a879f26 100644 --- a/test/tint/builtins/gen/literal/radians/208fd9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/radians/208fd9.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ float16_t tint_radians(float16_t param_0) { } void radians_208fd9() { - float16_t res = tint_radians(float16_t(0.0h)); + float16_t res = tint_radians(float16_t(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/radians/208fd9.wgsl.expected.glsl b/test/tint/builtins/gen/literal/radians/208fd9.wgsl.expected.glsl index cf4c962810..a48668cb3f 100644 --- a/test/tint/builtins/gen/literal/radians/208fd9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/radians/208fd9.wgsl.expected.glsl @@ -7,7 +7,7 @@ float16_t tint_radians(float16_t param_0) { void radians_208fd9() { - float16_t res = tint_radians(0.0hf); + float16_t res = tint_radians(1.0hf); } vec4 vertex_main() { @@ -33,7 +33,7 @@ float16_t tint_radians(float16_t param_0) { void radians_208fd9() { - float16_t res = tint_radians(0.0hf); + float16_t res = tint_radians(1.0hf); } void fragment_main() { @@ -53,7 +53,7 @@ float16_t tint_radians(float16_t param_0) { void radians_208fd9() { - float16_t res = tint_radians(0.0hf); + float16_t res = tint_radians(1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/radians/208fd9.wgsl.expected.msl b/test/tint/builtins/gen/literal/radians/208fd9.wgsl.expected.msl index d12b406a14..72d93d68d1 100644 --- a/test/tint/builtins/gen/literal/radians/208fd9.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/radians/208fd9.wgsl.expected.msl @@ -7,7 +7,7 @@ half tint_radians(half param_0) { } void radians_208fd9() { - half res = tint_radians(0.0h); + half res = tint_radians(1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/radians/208fd9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/radians/208fd9.wgsl.expected.spvasm index 8fc9e39929..e218859224 100644 --- a/test/tint/builtins/gen/literal/radians/208fd9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/radians/208fd9.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,36 +36,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %16 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %19 = OpTypeFunction %v4float + %19 = OpConstantNull %half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %radians_208fd9 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_half Function %16 - %13 = OpExtInst %half %15 Radians %16 + %res = OpVariable %_ptr_Function_half Function %19 + %13 = OpExtInst %half %15 Radians %half_0x1p_0 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %radians_208fd9 +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %radians_208fd9 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %radians_208fd9 + %29 = OpLabel + %30 = OpFunctionCall %void %radians_208fd9 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %radians_208fd9 + %32 = OpLabel + %33 = OpFunctionCall %void %radians_208fd9 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/radians/208fd9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/radians/208fd9.wgsl.expected.wgsl index 1febb6ea6f..24a3c0d9d0 100644 --- a/test/tint/builtins/gen/literal/radians/208fd9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/radians/208fd9.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn radians_208fd9() { - var res : f16 = radians(f16()); + var res : f16 = radians(1.0h); } @vertex diff --git a/test/tint/builtins/gen/literal/radians/44f20b.wgsl b/test/tint/builtins/gen/literal/radians/44f20b.wgsl index a7887fb257..b72488cec3 100644 --- a/test/tint/builtins/gen/literal/radians/44f20b.wgsl +++ b/test/tint/builtins/gen/literal/radians/44f20b.wgsl @@ -25,7 +25,7 @@ enable f16; // fn radians(vec<4, f16>) -> vec<4, f16> fn radians_44f20b() { - var res: vec4 = radians(vec4(f16())); + var res: vec4 = radians(vec4(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/radians/44f20b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/radians/44f20b.wgsl.expected.dxc.hlsl index 6c3cce992b..3c88857501 100644 --- a/test/tint/builtins/gen/literal/radians/44f20b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/radians/44f20b.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ vector tint_radians(vector param_0) { } void radians_44f20b() { - vector res = tint_radians((float16_t(0.0h)).xxxx); + vector res = tint_radians((float16_t(1.0h)).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/radians/44f20b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/radians/44f20b.wgsl.expected.glsl index 2b3d4c7660..caa4ab8cd2 100644 --- a/test/tint/builtins/gen/literal/radians/44f20b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/radians/44f20b.wgsl.expected.glsl @@ -7,7 +7,7 @@ f16vec4 tint_radians(f16vec4 param_0) { void radians_44f20b() { - f16vec4 res = tint_radians(f16vec4(0.0hf)); + f16vec4 res = tint_radians(f16vec4(1.0hf)); } vec4 vertex_main() { @@ -33,7 +33,7 @@ f16vec4 tint_radians(f16vec4 param_0) { void radians_44f20b() { - f16vec4 res = tint_radians(f16vec4(0.0hf)); + f16vec4 res = tint_radians(f16vec4(1.0hf)); } void fragment_main() { @@ -53,7 +53,7 @@ f16vec4 tint_radians(f16vec4 param_0) { void radians_44f20b() { - f16vec4 res = tint_radians(f16vec4(0.0hf)); + f16vec4 res = tint_radians(f16vec4(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/radians/44f20b.wgsl.expected.msl b/test/tint/builtins/gen/literal/radians/44f20b.wgsl.expected.msl index 1e20066dfe..0f7b12fe36 100644 --- a/test/tint/builtins/gen/literal/radians/44f20b.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/radians/44f20b.wgsl.expected.msl @@ -7,7 +7,7 @@ half4 tint_radians(half4 param_0) { } void radians_44f20b() { - half4 res = tint_radians(half4(0.0h)); + half4 res = tint_radians(half4(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/radians/44f20b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/radians/44f20b.wgsl.expected.spvasm index 6321aaa71e..993e544f7c 100644 --- a/test/tint/builtins/gen/literal/radians/44f20b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/radians/44f20b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %17 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v4half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %radians_44f20b = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4half Function %17 - %13 = OpExtInst %v4half %16 Radians %17 + %res = OpVariable %_ptr_Function_v4half Function %21 + %13 = OpExtInst %v4half %16 Radians %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %radians_44f20b +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %radians_44f20b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %radians_44f20b + %31 = OpLabel + %32 = OpFunctionCall %void %radians_44f20b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %radians_44f20b + %34 = OpLabel + %35 = OpFunctionCall %void %radians_44f20b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/radians/44f20b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/radians/44f20b.wgsl.expected.wgsl index 35170cc4fc..1f1f177c30 100644 --- a/test/tint/builtins/gen/literal/radians/44f20b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/radians/44f20b.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn radians_44f20b() { - var res : vec4 = radians(vec4(f16())); + var res : vec4 = radians(vec4(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl b/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl index 4e2a23c574..dfe048698e 100644 --- a/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl +++ b/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl @@ -25,7 +25,7 @@ enable f16; // fn radians(vec<3, f16>) -> vec<3, f16> fn radians_7ea4c7() { - var res: vec3 = radians(vec3(f16())); + var res: vec3 = radians(vec3(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl.expected.dxc.hlsl index a9f6f96235..72427f3cde 100644 --- a/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ vector tint_radians(vector param_0) { } void radians_7ea4c7() { - vector res = tint_radians((float16_t(0.0h)).xxx); + vector res = tint_radians((float16_t(1.0h)).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl.expected.glsl index a8cc9ab526..75c124cbdd 100644 --- a/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl.expected.glsl @@ -7,7 +7,7 @@ f16vec3 tint_radians(f16vec3 param_0) { void radians_7ea4c7() { - f16vec3 res = tint_radians(f16vec3(0.0hf)); + f16vec3 res = tint_radians(f16vec3(1.0hf)); } vec4 vertex_main() { @@ -33,7 +33,7 @@ f16vec3 tint_radians(f16vec3 param_0) { void radians_7ea4c7() { - f16vec3 res = tint_radians(f16vec3(0.0hf)); + f16vec3 res = tint_radians(f16vec3(1.0hf)); } void fragment_main() { @@ -53,7 +53,7 @@ f16vec3 tint_radians(f16vec3 param_0) { void radians_7ea4c7() { - f16vec3 res = tint_radians(f16vec3(0.0hf)); + f16vec3 res = tint_radians(f16vec3(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl.expected.msl b/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl.expected.msl index 34ca856153..a8f0e1f5de 100644 --- a/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl.expected.msl @@ -7,7 +7,7 @@ half3 tint_radians(half3 param_0) { } void radians_7ea4c7() { - half3 res = tint_radians(half3(0.0h)); + half3 res = tint_radians(half3(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl.expected.spvasm index 9ef7401389..3253f44e9e 100644 --- a/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %17 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v3half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %radians_7ea4c7 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3half Function %17 - %13 = OpExtInst %v3half %16 Radians %17 + %res = OpVariable %_ptr_Function_v3half Function %21 + %13 = OpExtInst %v3half %16 Radians %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %radians_7ea4c7 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %radians_7ea4c7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %radians_7ea4c7 + %31 = OpLabel + %32 = OpFunctionCall %void %radians_7ea4c7 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %radians_7ea4c7 + %34 = OpLabel + %35 = OpFunctionCall %void %radians_7ea4c7 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl.expected.wgsl index 56b01aa764..094dfb7978 100644 --- a/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn radians_7ea4c7() { - var res : vec3 = radians(vec3(f16())); + var res : vec3 = radians(vec3(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/radians/fbacf0.wgsl b/test/tint/builtins/gen/literal/radians/fbacf0.wgsl index f3d4acbdfe..6b45a23ddb 100644 --- a/test/tint/builtins/gen/literal/radians/fbacf0.wgsl +++ b/test/tint/builtins/gen/literal/radians/fbacf0.wgsl @@ -25,7 +25,7 @@ enable f16; // fn radians(vec<2, f16>) -> vec<2, f16> fn radians_fbacf0() { - var res: vec2 = radians(vec2(f16())); + var res: vec2 = radians(vec2(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/radians/fbacf0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/radians/fbacf0.wgsl.expected.dxc.hlsl index 8d3e076240..77ad4e46bd 100644 --- a/test/tint/builtins/gen/literal/radians/fbacf0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/radians/fbacf0.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ vector tint_radians(vector param_0) { } void radians_fbacf0() { - vector res = tint_radians((float16_t(0.0h)).xx); + vector res = tint_radians((float16_t(1.0h)).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/radians/fbacf0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/radians/fbacf0.wgsl.expected.glsl index ce24c39b8e..2d748f96fe 100644 --- a/test/tint/builtins/gen/literal/radians/fbacf0.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/radians/fbacf0.wgsl.expected.glsl @@ -7,7 +7,7 @@ f16vec2 tint_radians(f16vec2 param_0) { void radians_fbacf0() { - f16vec2 res = tint_radians(f16vec2(0.0hf)); + f16vec2 res = tint_radians(f16vec2(1.0hf)); } vec4 vertex_main() { @@ -33,7 +33,7 @@ f16vec2 tint_radians(f16vec2 param_0) { void radians_fbacf0() { - f16vec2 res = tint_radians(f16vec2(0.0hf)); + f16vec2 res = tint_radians(f16vec2(1.0hf)); } void fragment_main() { @@ -53,7 +53,7 @@ f16vec2 tint_radians(f16vec2 param_0) { void radians_fbacf0() { - f16vec2 res = tint_radians(f16vec2(0.0hf)); + f16vec2 res = tint_radians(f16vec2(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/radians/fbacf0.wgsl.expected.msl b/test/tint/builtins/gen/literal/radians/fbacf0.wgsl.expected.msl index 9359855280..ca066a6c70 100644 --- a/test/tint/builtins/gen/literal/radians/fbacf0.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/radians/fbacf0.wgsl.expected.msl @@ -7,7 +7,7 @@ half2 tint_radians(half2 param_0) { } void radians_fbacf0() { - half2 res = tint_radians(half2(0.0h)); + half2 res = tint_radians(half2(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/radians/fbacf0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/radians/fbacf0.wgsl.expected.spvasm index f798f519b7..3fe420d0f9 100644 --- a/test/tint/builtins/gen/literal/radians/fbacf0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/radians/fbacf0.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %17 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v2half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %radians_fbacf0 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2half Function %17 - %13 = OpExtInst %v2half %16 Radians %17 + %res = OpVariable %_ptr_Function_v2half Function %21 + %13 = OpExtInst %v2half %16 Radians %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %radians_fbacf0 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %radians_fbacf0 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %radians_fbacf0 + %31 = OpLabel + %32 = OpFunctionCall %void %radians_fbacf0 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %radians_fbacf0 + %34 = OpLabel + %35 = OpFunctionCall %void %radians_fbacf0 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/radians/fbacf0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/radians/fbacf0.wgsl.expected.wgsl index 0aba9cc1af..061f0a0a06 100644 --- a/test/tint/builtins/gen/literal/radians/fbacf0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/radians/fbacf0.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn radians_fbacf0() { - var res : vec2 = radians(vec2(f16())); + var res : vec2 = radians(vec2(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/reflect/310de5.wgsl b/test/tint/builtins/gen/literal/reflect/310de5.wgsl index 9d8a01b5b4..03673f7e11 100644 --- a/test/tint/builtins/gen/literal/reflect/310de5.wgsl +++ b/test/tint/builtins/gen/literal/reflect/310de5.wgsl @@ -25,7 +25,7 @@ enable f16; // fn reflect(vec<4, f16>, vec<4, f16>) -> vec<4, f16> fn reflect_310de5() { - var res: vec4 = reflect(vec4(f16()), vec4(f16())); + var res: vec4 = reflect(vec4(1.h), vec4(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/reflect/310de5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/reflect/310de5.wgsl.expected.dxc.hlsl index 4a7f8f4139..df49cea0d3 100644 --- a/test/tint/builtins/gen/literal/reflect/310de5.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/reflect/310de5.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void reflect_310de5() { - vector res = reflect((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx); + vector res = reflect((float16_t(1.0h)).xxxx, (float16_t(1.0h)).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/reflect/310de5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/reflect/310de5.wgsl.expected.glsl index 92a222f6e0..278aae3f47 100644 --- a/test/tint/builtins/gen/literal/reflect/310de5.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/reflect/310de5.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void reflect_310de5() { - f16vec4 res = reflect(f16vec4(0.0hf), f16vec4(0.0hf)); + f16vec4 res = reflect(f16vec4(1.0hf), f16vec4(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void reflect_310de5() { - f16vec4 res = reflect(f16vec4(0.0hf), f16vec4(0.0hf)); + f16vec4 res = reflect(f16vec4(1.0hf), f16vec4(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void reflect_310de5() { - f16vec4 res = reflect(f16vec4(0.0hf), f16vec4(0.0hf)); + f16vec4 res = reflect(f16vec4(1.0hf), f16vec4(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/reflect/310de5.wgsl.expected.msl b/test/tint/builtins/gen/literal/reflect/310de5.wgsl.expected.msl index 774dfb7f58..cea7ea6fc2 100644 --- a/test/tint/builtins/gen/literal/reflect/310de5.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/reflect/310de5.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void reflect_310de5() { - half4 res = reflect(half4(0.0h), half4(0.0h)); + half4 res = reflect(half4(1.0h), half4(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/reflect/310de5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/reflect/310de5.wgsl.expected.spvasm index e77a355b51..bc8cf64e8f 100644 --- a/test/tint/builtins/gen/literal/reflect/310de5.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/reflect/310de5.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %17 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v4half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %reflect_310de5 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4half Function %17 - %13 = OpExtInst %v4half %16 Reflect %17 %17 + %res = OpVariable %_ptr_Function_v4half Function %21 + %13 = OpExtInst %v4half %16 Reflect %18 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %reflect_310de5 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %reflect_310de5 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %reflect_310de5 + %31 = OpLabel + %32 = OpFunctionCall %void %reflect_310de5 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %reflect_310de5 + %34 = OpLabel + %35 = OpFunctionCall %void %reflect_310de5 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/reflect/310de5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/reflect/310de5.wgsl.expected.wgsl index 61a2100238..a726a4952c 100644 --- a/test/tint/builtins/gen/literal/reflect/310de5.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/reflect/310de5.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn reflect_310de5() { - var res : vec4 = reflect(vec4(f16()), vec4(f16())); + var res : vec4 = reflect(vec4(1.0h), vec4(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/reflect/61ca21.wgsl b/test/tint/builtins/gen/literal/reflect/61ca21.wgsl index 85df287a0e..097b2148de 100644 --- a/test/tint/builtins/gen/literal/reflect/61ca21.wgsl +++ b/test/tint/builtins/gen/literal/reflect/61ca21.wgsl @@ -25,7 +25,7 @@ enable f16; // fn reflect(vec<3, f16>, vec<3, f16>) -> vec<3, f16> fn reflect_61ca21() { - var res: vec3 = reflect(vec3(f16()), vec3(f16())); + var res: vec3 = reflect(vec3(1.h), vec3(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/reflect/61ca21.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/reflect/61ca21.wgsl.expected.dxc.hlsl index 5a2f305300..f5e64c6190 100644 --- a/test/tint/builtins/gen/literal/reflect/61ca21.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/reflect/61ca21.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void reflect_61ca21() { - vector res = reflect((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx); + vector res = reflect((float16_t(1.0h)).xxx, (float16_t(1.0h)).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/reflect/61ca21.wgsl.expected.glsl b/test/tint/builtins/gen/literal/reflect/61ca21.wgsl.expected.glsl index c3b3b78b6a..c797b566e1 100644 --- a/test/tint/builtins/gen/literal/reflect/61ca21.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/reflect/61ca21.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void reflect_61ca21() { - f16vec3 res = reflect(f16vec3(0.0hf), f16vec3(0.0hf)); + f16vec3 res = reflect(f16vec3(1.0hf), f16vec3(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void reflect_61ca21() { - f16vec3 res = reflect(f16vec3(0.0hf), f16vec3(0.0hf)); + f16vec3 res = reflect(f16vec3(1.0hf), f16vec3(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void reflect_61ca21() { - f16vec3 res = reflect(f16vec3(0.0hf), f16vec3(0.0hf)); + f16vec3 res = reflect(f16vec3(1.0hf), f16vec3(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/reflect/61ca21.wgsl.expected.msl b/test/tint/builtins/gen/literal/reflect/61ca21.wgsl.expected.msl index 2bd9b84054..cf8a1a60b5 100644 --- a/test/tint/builtins/gen/literal/reflect/61ca21.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/reflect/61ca21.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void reflect_61ca21() { - half3 res = reflect(half3(0.0h), half3(0.0h)); + half3 res = reflect(half3(1.0h), half3(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/reflect/61ca21.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/reflect/61ca21.wgsl.expected.spvasm index 10d9a3559e..289c8ce60a 100644 --- a/test/tint/builtins/gen/literal/reflect/61ca21.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/reflect/61ca21.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %17 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v3half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %reflect_61ca21 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3half Function %17 - %13 = OpExtInst %v3half %16 Reflect %17 %17 + %res = OpVariable %_ptr_Function_v3half Function %21 + %13 = OpExtInst %v3half %16 Reflect %18 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %reflect_61ca21 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %reflect_61ca21 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %reflect_61ca21 + %31 = OpLabel + %32 = OpFunctionCall %void %reflect_61ca21 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %reflect_61ca21 + %34 = OpLabel + %35 = OpFunctionCall %void %reflect_61ca21 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/reflect/61ca21.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/reflect/61ca21.wgsl.expected.wgsl index a30006a585..194bb6bfae 100644 --- a/test/tint/builtins/gen/literal/reflect/61ca21.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/reflect/61ca21.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn reflect_61ca21() { - var res : vec3 = reflect(vec3(f16()), vec3(f16())); + var res : vec3 = reflect(vec3(1.0h), vec3(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl b/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl index 854ac7e391..a559dc98e0 100644 --- a/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl +++ b/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl @@ -25,7 +25,7 @@ enable f16; // fn reflect(vec<2, f16>, vec<2, f16>) -> vec<2, f16> fn reflect_bb15ac() { - var res: vec2 = reflect(vec2(f16()), vec2(f16())); + var res: vec2 = reflect(vec2(1.h), vec2(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl.expected.dxc.hlsl index ec357faabd..573d3ee4b3 100644 --- a/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void reflect_bb15ac() { - vector res = reflect((float16_t(0.0h)).xx, (float16_t(0.0h)).xx); + vector res = reflect((float16_t(1.0h)).xx, (float16_t(1.0h)).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl.expected.glsl b/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl.expected.glsl index 6ea875d9b8..5e9063de32 100644 --- a/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void reflect_bb15ac() { - f16vec2 res = reflect(f16vec2(0.0hf), f16vec2(0.0hf)); + f16vec2 res = reflect(f16vec2(1.0hf), f16vec2(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void reflect_bb15ac() { - f16vec2 res = reflect(f16vec2(0.0hf), f16vec2(0.0hf)); + f16vec2 res = reflect(f16vec2(1.0hf), f16vec2(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void reflect_bb15ac() { - f16vec2 res = reflect(f16vec2(0.0hf), f16vec2(0.0hf)); + f16vec2 res = reflect(f16vec2(1.0hf), f16vec2(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl.expected.msl b/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl.expected.msl index 5ade63c4ab..a3e72b809c 100644 --- a/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void reflect_bb15ac() { - half2 res = reflect(half2(0.0h), half2(0.0h)); + half2 res = reflect(half2(1.0h), half2(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl.expected.spvasm index c9e584e56f..275c45f39b 100644 --- a/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %17 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v2half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %reflect_bb15ac = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2half Function %17 - %13 = OpExtInst %v2half %16 Reflect %17 %17 + %res = OpVariable %_ptr_Function_v2half Function %21 + %13 = OpExtInst %v2half %16 Reflect %18 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %reflect_bb15ac +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %reflect_bb15ac OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %reflect_bb15ac + %31 = OpLabel + %32 = OpFunctionCall %void %reflect_bb15ac OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %reflect_bb15ac + %34 = OpLabel + %35 = OpFunctionCall %void %reflect_bb15ac OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl.expected.wgsl index 8e50cf379e..bb64ffa221 100644 --- a/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn reflect_bb15ac() { - var res : vec2 = reflect(vec2(f16()), vec2(f16())); + var res : vec2 = reflect(vec2(1.0h), vec2(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/refract/0594ba.wgsl b/test/tint/builtins/gen/literal/refract/0594ba.wgsl index 5614a4ec2b..c37f22f377 100644 --- a/test/tint/builtins/gen/literal/refract/0594ba.wgsl +++ b/test/tint/builtins/gen/literal/refract/0594ba.wgsl @@ -25,7 +25,7 @@ enable f16; // fn refract(vec<4, f16>, vec<4, f16>, f16) -> vec<4, f16> fn refract_0594ba() { - var res: vec4 = refract(vec4(f16()), vec4(f16()), f16()); + var res: vec4 = refract(vec4(1.h), vec4(1.h), 1.h); } @vertex diff --git a/test/tint/builtins/gen/literal/refract/0594ba.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/refract/0594ba.wgsl.expected.dxc.hlsl index cdb4a1c5d7..7e127946e2 100644 --- a/test/tint/builtins/gen/literal/refract/0594ba.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/refract/0594ba.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void refract_0594ba() { - vector res = refract((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, float16_t(0.0h)); + vector res = refract((float16_t(1.0h)).xxxx, (float16_t(1.0h)).xxxx, float16_t(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/refract/0594ba.wgsl.expected.glsl b/test/tint/builtins/gen/literal/refract/0594ba.wgsl.expected.glsl index dd0c411e87..c5293b5806 100644 --- a/test/tint/builtins/gen/literal/refract/0594ba.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/refract/0594ba.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void refract_0594ba() { - f16vec4 res = refract(f16vec4(0.0hf), f16vec4(0.0hf), 0.0hf); + f16vec4 res = refract(f16vec4(1.0hf), f16vec4(1.0hf), 1.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void refract_0594ba() { - f16vec4 res = refract(f16vec4(0.0hf), f16vec4(0.0hf), 0.0hf); + f16vec4 res = refract(f16vec4(1.0hf), f16vec4(1.0hf), 1.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void refract_0594ba() { - f16vec4 res = refract(f16vec4(0.0hf), f16vec4(0.0hf), 0.0hf); + f16vec4 res = refract(f16vec4(1.0hf), f16vec4(1.0hf), 1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/refract/0594ba.wgsl.expected.msl b/test/tint/builtins/gen/literal/refract/0594ba.wgsl.expected.msl index 5bb163e2ba..e5623fafa0 100644 --- a/test/tint/builtins/gen/literal/refract/0594ba.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/refract/0594ba.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void refract_0594ba() { - half4 res = refract(half4(0.0h), half4(0.0h), 0.0h); + half4 res = refract(half4(1.0h), half4(1.0h), 1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/refract/0594ba.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/refract/0594ba.wgsl.expected.spvasm index 5d0cc45742..9c59d3b03e 100644 --- a/test/tint/builtins/gen/literal/refract/0594ba.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/refract/0594ba.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,37 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %17 = OpConstantNull %v4half - %18 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %21 = OpTypeFunction %v4float + %21 = OpConstantNull %v4half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %refract_0594ba = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4half Function %17 - %13 = OpExtInst %v4half %16 Refract %17 %17 %18 + %res = OpVariable %_ptr_Function_v4half Function %21 + %13 = OpExtInst %v4half %16 Refract %18 %18 %half_0x1p_0 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %refract_0594ba +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %refract_0594ba OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %refract_0594ba + %31 = OpLabel + %32 = OpFunctionCall %void %refract_0594ba OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %refract_0594ba + %34 = OpLabel + %35 = OpFunctionCall %void %refract_0594ba OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/refract/0594ba.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/refract/0594ba.wgsl.expected.wgsl index ab78c7e94d..5d932c0dcc 100644 --- a/test/tint/builtins/gen/literal/refract/0594ba.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/refract/0594ba.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn refract_0594ba() { - var res : vec4 = refract(vec4(f16()), vec4(f16()), f16()); + var res : vec4 = refract(vec4(1.0h), vec4(1.0h), 1.0h); } @vertex diff --git a/test/tint/builtins/gen/literal/refract/570cb3.wgsl b/test/tint/builtins/gen/literal/refract/570cb3.wgsl index 130e4492ad..f8f50f2d6e 100644 --- a/test/tint/builtins/gen/literal/refract/570cb3.wgsl +++ b/test/tint/builtins/gen/literal/refract/570cb3.wgsl @@ -25,7 +25,7 @@ enable f16; // fn refract(vec<2, f16>, vec<2, f16>, f16) -> vec<2, f16> fn refract_570cb3() { - var res: vec2 = refract(vec2(f16()), vec2(f16()), f16()); + var res: vec2 = refract(vec2(1.h), vec2(1.h), 1.h); } @vertex diff --git a/test/tint/builtins/gen/literal/refract/570cb3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/refract/570cb3.wgsl.expected.dxc.hlsl index 1f7f29d341..4a35894df3 100644 --- a/test/tint/builtins/gen/literal/refract/570cb3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/refract/570cb3.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void refract_570cb3() { - vector res = refract((float16_t(0.0h)).xx, (float16_t(0.0h)).xx, float16_t(0.0h)); + vector res = refract((float16_t(1.0h)).xx, (float16_t(1.0h)).xx, float16_t(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/refract/570cb3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/refract/570cb3.wgsl.expected.glsl index 14fad7d88d..b0f0ad1051 100644 --- a/test/tint/builtins/gen/literal/refract/570cb3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/refract/570cb3.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void refract_570cb3() { - f16vec2 res = refract(f16vec2(0.0hf), f16vec2(0.0hf), 0.0hf); + f16vec2 res = refract(f16vec2(1.0hf), f16vec2(1.0hf), 1.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void refract_570cb3() { - f16vec2 res = refract(f16vec2(0.0hf), f16vec2(0.0hf), 0.0hf); + f16vec2 res = refract(f16vec2(1.0hf), f16vec2(1.0hf), 1.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void refract_570cb3() { - f16vec2 res = refract(f16vec2(0.0hf), f16vec2(0.0hf), 0.0hf); + f16vec2 res = refract(f16vec2(1.0hf), f16vec2(1.0hf), 1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/refract/570cb3.wgsl.expected.msl b/test/tint/builtins/gen/literal/refract/570cb3.wgsl.expected.msl index da86c8c659..1414d82d55 100644 --- a/test/tint/builtins/gen/literal/refract/570cb3.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/refract/570cb3.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void refract_570cb3() { - half2 res = refract(half2(0.0h), half2(0.0h), 0.0h); + half2 res = refract(half2(1.0h), half2(1.0h), 1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/refract/570cb3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/refract/570cb3.wgsl.expected.spvasm index 238e6f1e3a..63fcc1581c 100644 --- a/test/tint/builtins/gen/literal/refract/570cb3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/refract/570cb3.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,37 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %17 = OpConstantNull %v2half - %18 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %21 = OpTypeFunction %v4float + %21 = OpConstantNull %v2half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %refract_570cb3 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2half Function %17 - %13 = OpExtInst %v2half %16 Refract %17 %17 %18 + %res = OpVariable %_ptr_Function_v2half Function %21 + %13 = OpExtInst %v2half %16 Refract %18 %18 %half_0x1p_0 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %refract_570cb3 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %refract_570cb3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %refract_570cb3 + %31 = OpLabel + %32 = OpFunctionCall %void %refract_570cb3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %refract_570cb3 + %34 = OpLabel + %35 = OpFunctionCall %void %refract_570cb3 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/refract/570cb3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/refract/570cb3.wgsl.expected.wgsl index 45a3472273..1c1d33c7cd 100644 --- a/test/tint/builtins/gen/literal/refract/570cb3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/refract/570cb3.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn refract_570cb3() { - var res : vec2 = refract(vec2(f16()), vec2(f16()), f16()); + var res : vec2 = refract(vec2(1.0h), vec2(1.0h), 1.0h); } @vertex diff --git a/test/tint/builtins/gen/literal/refract/8984af.wgsl b/test/tint/builtins/gen/literal/refract/8984af.wgsl index ccc6f61488..6e38525f49 100644 --- a/test/tint/builtins/gen/literal/refract/8984af.wgsl +++ b/test/tint/builtins/gen/literal/refract/8984af.wgsl @@ -25,7 +25,7 @@ enable f16; // fn refract(vec<3, f16>, vec<3, f16>, f16) -> vec<3, f16> fn refract_8984af() { - var res: vec3 = refract(vec3(f16()), vec3(f16()), f16()); + var res: vec3 = refract(vec3(1.h), vec3(1.h), 1.h); } @vertex diff --git a/test/tint/builtins/gen/literal/refract/8984af.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/refract/8984af.wgsl.expected.dxc.hlsl index 82aa4adaab..5e25ebc612 100644 --- a/test/tint/builtins/gen/literal/refract/8984af.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/refract/8984af.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void refract_8984af() { - vector res = refract((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, float16_t(0.0h)); + vector res = refract((float16_t(1.0h)).xxx, (float16_t(1.0h)).xxx, float16_t(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/refract/8984af.wgsl.expected.glsl b/test/tint/builtins/gen/literal/refract/8984af.wgsl.expected.glsl index cd538f62d4..5bfbd9404d 100644 --- a/test/tint/builtins/gen/literal/refract/8984af.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/refract/8984af.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void refract_8984af() { - f16vec3 res = refract(f16vec3(0.0hf), f16vec3(0.0hf), 0.0hf); + f16vec3 res = refract(f16vec3(1.0hf), f16vec3(1.0hf), 1.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void refract_8984af() { - f16vec3 res = refract(f16vec3(0.0hf), f16vec3(0.0hf), 0.0hf); + f16vec3 res = refract(f16vec3(1.0hf), f16vec3(1.0hf), 1.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void refract_8984af() { - f16vec3 res = refract(f16vec3(0.0hf), f16vec3(0.0hf), 0.0hf); + f16vec3 res = refract(f16vec3(1.0hf), f16vec3(1.0hf), 1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/refract/8984af.wgsl.expected.msl b/test/tint/builtins/gen/literal/refract/8984af.wgsl.expected.msl index 54ca61d49b..977ac05319 100644 --- a/test/tint/builtins/gen/literal/refract/8984af.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/refract/8984af.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void refract_8984af() { - half3 res = refract(half3(0.0h), half3(0.0h), 0.0h); + half3 res = refract(half3(1.0h), half3(1.0h), 1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/refract/8984af.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/refract/8984af.wgsl.expected.spvasm index 28804a8632..7192390a09 100644 --- a/test/tint/builtins/gen/literal/refract/8984af.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/refract/8984af.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,37 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %17 = OpConstantNull %v3half - %18 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %21 = OpTypeFunction %v4float + %21 = OpConstantNull %v3half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %refract_8984af = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3half Function %17 - %13 = OpExtInst %v3half %16 Refract %17 %17 %18 + %res = OpVariable %_ptr_Function_v3half Function %21 + %13 = OpExtInst %v3half %16 Refract %18 %18 %half_0x1p_0 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %refract_8984af +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %refract_8984af OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %refract_8984af + %31 = OpLabel + %32 = OpFunctionCall %void %refract_8984af OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %refract_8984af + %34 = OpLabel + %35 = OpFunctionCall %void %refract_8984af OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/refract/8984af.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/refract/8984af.wgsl.expected.wgsl index 8ce7e19cbc..7dd091629d 100644 --- a/test/tint/builtins/gen/literal/refract/8984af.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/refract/8984af.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn refract_8984af() { - var res : vec3 = refract(vec3(f16()), vec3(f16()), f16()); + var res : vec3 = refract(vec3(1.0h), vec3(1.0h), 1.0h); } @vertex diff --git a/test/tint/builtins/gen/literal/round/9078ef.wgsl b/test/tint/builtins/gen/literal/round/9078ef.wgsl index d5223dcf61..f9753e1973 100644 --- a/test/tint/builtins/gen/literal/round/9078ef.wgsl +++ b/test/tint/builtins/gen/literal/round/9078ef.wgsl @@ -25,7 +25,7 @@ enable f16; // fn round(f16) -> f16 fn round_9078ef() { - var res: f16 = round(f16()); + var res: f16 = round(1.h); } @vertex diff --git a/test/tint/builtins/gen/literal/round/9078ef.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/round/9078ef.wgsl.expected.dxc.hlsl index e695f9b52f..54293a23dd 100644 --- a/test/tint/builtins/gen/literal/round/9078ef.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/round/9078ef.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void round_9078ef() { - float16_t res = round(float16_t(0.0h)); + float16_t res = round(float16_t(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/round/9078ef.wgsl.expected.glsl b/test/tint/builtins/gen/literal/round/9078ef.wgsl.expected.glsl index 34f4fd1fdf..f29b5bd402 100644 --- a/test/tint/builtins/gen/literal/round/9078ef.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/round/9078ef.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void round_9078ef() { - float16_t res = round(0.0hf); + float16_t res = round(1.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void round_9078ef() { - float16_t res = round(0.0hf); + float16_t res = round(1.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void round_9078ef() { - float16_t res = round(0.0hf); + float16_t res = round(1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/round/9078ef.wgsl.expected.msl b/test/tint/builtins/gen/literal/round/9078ef.wgsl.expected.msl index c400dc4cbb..dc3bbdb187 100644 --- a/test/tint/builtins/gen/literal/round/9078ef.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/round/9078ef.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void round_9078ef() { - half res = rint(0.0h); + half res = rint(1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/round/9078ef.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/round/9078ef.wgsl.expected.spvasm index 80c9f07b49..44eed145d5 100644 --- a/test/tint/builtins/gen/literal/round/9078ef.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/round/9078ef.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,36 +36,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %16 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %19 = OpTypeFunction %v4float + %19 = OpConstantNull %half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %round_9078ef = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_half Function %16 - %13 = OpExtInst %half %15 RoundEven %16 + %res = OpVariable %_ptr_Function_half Function %19 + %13 = OpExtInst %half %15 RoundEven %half_0x1p_0 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %round_9078ef +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %round_9078ef OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %round_9078ef + %29 = OpLabel + %30 = OpFunctionCall %void %round_9078ef OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %round_9078ef + %32 = OpLabel + %33 = OpFunctionCall %void %round_9078ef OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/round/9078ef.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/round/9078ef.wgsl.expected.wgsl index f918a9048d..d0750a876d 100644 --- a/test/tint/builtins/gen/literal/round/9078ef.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/round/9078ef.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn round_9078ef() { - var res : f16 = round(f16()); + var res : f16 = round(1.0h); } @vertex diff --git a/test/tint/builtins/gen/literal/round/d87e84.wgsl b/test/tint/builtins/gen/literal/round/d87e84.wgsl index 3ca7f698eb..a2bd758da3 100644 --- a/test/tint/builtins/gen/literal/round/d87e84.wgsl +++ b/test/tint/builtins/gen/literal/round/d87e84.wgsl @@ -25,7 +25,7 @@ enable f16; // fn round(vec<2, f16>) -> vec<2, f16> fn round_d87e84() { - var res: vec2 = round(vec2(f16())); + var res: vec2 = round(vec2(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/round/d87e84.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/round/d87e84.wgsl.expected.dxc.hlsl index dc48afa9c7..154f8889a9 100644 --- a/test/tint/builtins/gen/literal/round/d87e84.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/round/d87e84.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void round_d87e84() { - vector res = round((float16_t(0.0h)).xx); + vector res = round((float16_t(1.0h)).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/round/d87e84.wgsl.expected.glsl b/test/tint/builtins/gen/literal/round/d87e84.wgsl.expected.glsl index e2e82c9dd1..00afdb0ad6 100644 --- a/test/tint/builtins/gen/literal/round/d87e84.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/round/d87e84.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void round_d87e84() { - f16vec2 res = round(f16vec2(0.0hf)); + f16vec2 res = round(f16vec2(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void round_d87e84() { - f16vec2 res = round(f16vec2(0.0hf)); + f16vec2 res = round(f16vec2(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void round_d87e84() { - f16vec2 res = round(f16vec2(0.0hf)); + f16vec2 res = round(f16vec2(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/round/d87e84.wgsl.expected.msl b/test/tint/builtins/gen/literal/round/d87e84.wgsl.expected.msl index af2b9b241e..31cb08a63a 100644 --- a/test/tint/builtins/gen/literal/round/d87e84.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/round/d87e84.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void round_d87e84() { - half2 res = rint(half2(0.0h)); + half2 res = rint(half2(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/round/d87e84.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/round/d87e84.wgsl.expected.spvasm index e6698b4cae..d94035e2fb 100644 --- a/test/tint/builtins/gen/literal/round/d87e84.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/round/d87e84.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %17 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v2half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %round_d87e84 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2half Function %17 - %13 = OpExtInst %v2half %16 RoundEven %17 + %res = OpVariable %_ptr_Function_v2half Function %21 + %13 = OpExtInst %v2half %16 RoundEven %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %round_d87e84 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %round_d87e84 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %round_d87e84 + %31 = OpLabel + %32 = OpFunctionCall %void %round_d87e84 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %round_d87e84 + %34 = OpLabel + %35 = OpFunctionCall %void %round_d87e84 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/round/d87e84.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/round/d87e84.wgsl.expected.wgsl index d3a6cc463c..a771f352bd 100644 --- a/test/tint/builtins/gen/literal/round/d87e84.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/round/d87e84.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn round_d87e84() { - var res : vec2 = round(vec2(f16())); + var res : vec2 = round(vec2(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/round/e1bba2.wgsl b/test/tint/builtins/gen/literal/round/e1bba2.wgsl index dfa126475a..a942899bc8 100644 --- a/test/tint/builtins/gen/literal/round/e1bba2.wgsl +++ b/test/tint/builtins/gen/literal/round/e1bba2.wgsl @@ -25,7 +25,7 @@ enable f16; // fn round(vec<3, f16>) -> vec<3, f16> fn round_e1bba2() { - var res: vec3 = round(vec3(f16())); + var res: vec3 = round(vec3(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/round/e1bba2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/round/e1bba2.wgsl.expected.dxc.hlsl index 4941302523..061b32cef7 100644 --- a/test/tint/builtins/gen/literal/round/e1bba2.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/round/e1bba2.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void round_e1bba2() { - vector res = round((float16_t(0.0h)).xxx); + vector res = round((float16_t(1.0h)).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/round/e1bba2.wgsl.expected.glsl b/test/tint/builtins/gen/literal/round/e1bba2.wgsl.expected.glsl index 873d32a4aa..0717d6b6ec 100644 --- a/test/tint/builtins/gen/literal/round/e1bba2.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/round/e1bba2.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void round_e1bba2() { - f16vec3 res = round(f16vec3(0.0hf)); + f16vec3 res = round(f16vec3(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void round_e1bba2() { - f16vec3 res = round(f16vec3(0.0hf)); + f16vec3 res = round(f16vec3(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void round_e1bba2() { - f16vec3 res = round(f16vec3(0.0hf)); + f16vec3 res = round(f16vec3(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/round/e1bba2.wgsl.expected.msl b/test/tint/builtins/gen/literal/round/e1bba2.wgsl.expected.msl index c4670c64cf..5f47a88079 100644 --- a/test/tint/builtins/gen/literal/round/e1bba2.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/round/e1bba2.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void round_e1bba2() { - half3 res = rint(half3(0.0h)); + half3 res = rint(half3(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/round/e1bba2.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/round/e1bba2.wgsl.expected.spvasm index 122df56e4b..8e82f20dc5 100644 --- a/test/tint/builtins/gen/literal/round/e1bba2.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/round/e1bba2.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %17 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v3half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %round_e1bba2 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3half Function %17 - %13 = OpExtInst %v3half %16 RoundEven %17 + %res = OpVariable %_ptr_Function_v3half Function %21 + %13 = OpExtInst %v3half %16 RoundEven %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %round_e1bba2 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %round_e1bba2 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %round_e1bba2 + %31 = OpLabel + %32 = OpFunctionCall %void %round_e1bba2 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %round_e1bba2 + %34 = OpLabel + %35 = OpFunctionCall %void %round_e1bba2 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/round/e1bba2.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/round/e1bba2.wgsl.expected.wgsl index 6da51860cc..2c270f9204 100644 --- a/test/tint/builtins/gen/literal/round/e1bba2.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/round/e1bba2.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn round_e1bba2() { - var res : vec3 = round(vec3(f16())); + var res : vec3 = round(vec3(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/round/f665b5.wgsl b/test/tint/builtins/gen/literal/round/f665b5.wgsl index 62932390ff..a3889e4316 100644 --- a/test/tint/builtins/gen/literal/round/f665b5.wgsl +++ b/test/tint/builtins/gen/literal/round/f665b5.wgsl @@ -25,7 +25,7 @@ enable f16; // fn round(vec<4, f16>) -> vec<4, f16> fn round_f665b5() { - var res: vec4 = round(vec4(f16())); + var res: vec4 = round(vec4(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/round/f665b5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/round/f665b5.wgsl.expected.dxc.hlsl index 287b5e1d4b..c0820c5322 100644 --- a/test/tint/builtins/gen/literal/round/f665b5.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/round/f665b5.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void round_f665b5() { - vector res = round((float16_t(0.0h)).xxxx); + vector res = round((float16_t(1.0h)).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/round/f665b5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/round/f665b5.wgsl.expected.glsl index bc044ed5b4..4293476781 100644 --- a/test/tint/builtins/gen/literal/round/f665b5.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/round/f665b5.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void round_f665b5() { - f16vec4 res = round(f16vec4(0.0hf)); + f16vec4 res = round(f16vec4(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void round_f665b5() { - f16vec4 res = round(f16vec4(0.0hf)); + f16vec4 res = round(f16vec4(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void round_f665b5() { - f16vec4 res = round(f16vec4(0.0hf)); + f16vec4 res = round(f16vec4(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/round/f665b5.wgsl.expected.msl b/test/tint/builtins/gen/literal/round/f665b5.wgsl.expected.msl index db3fa98c66..92a75eca2e 100644 --- a/test/tint/builtins/gen/literal/round/f665b5.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/round/f665b5.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void round_f665b5() { - half4 res = rint(half4(0.0h)); + half4 res = rint(half4(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/round/f665b5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/round/f665b5.wgsl.expected.spvasm index 9600ad74d0..a0a5f905bc 100644 --- a/test/tint/builtins/gen/literal/round/f665b5.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/round/f665b5.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %17 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v4half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %round_f665b5 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4half Function %17 - %13 = OpExtInst %v4half %16 RoundEven %17 + %res = OpVariable %_ptr_Function_v4half Function %21 + %13 = OpExtInst %v4half %16 RoundEven %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %round_f665b5 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %round_f665b5 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %round_f665b5 + %31 = OpLabel + %32 = OpFunctionCall %void %round_f665b5 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %round_f665b5 + %34 = OpLabel + %35 = OpFunctionCall %void %round_f665b5 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/round/f665b5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/round/f665b5.wgsl.expected.wgsl index 9338453976..dbecbecc2c 100644 --- a/test/tint/builtins/gen/literal/round/f665b5.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/round/f665b5.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn round_f665b5() { - var res : vec4 = round(vec4(f16())); + var res : vec4 = round(vec4(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/saturate/462535.wgsl b/test/tint/builtins/gen/literal/saturate/462535.wgsl index 3fe90cfc94..14b69bad99 100644 --- a/test/tint/builtins/gen/literal/saturate/462535.wgsl +++ b/test/tint/builtins/gen/literal/saturate/462535.wgsl @@ -25,7 +25,7 @@ enable f16; // fn saturate(vec<3, f16>) -> vec<3, f16> fn saturate_462535() { - var res: vec3 = saturate(vec3(f16())); + var res: vec3 = saturate(vec3(2.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/saturate/462535.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/saturate/462535.wgsl.expected.dxc.hlsl index 23800c3e64..ce230c9381 100644 --- a/test/tint/builtins/gen/literal/saturate/462535.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/saturate/462535.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void saturate_462535() { - vector res = (float16_t(0.0h)).xxx; + vector res = (float16_t(1.0h)).xxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/saturate/462535.wgsl.expected.glsl b/test/tint/builtins/gen/literal/saturate/462535.wgsl.expected.glsl index 683f6d0d55..d525902c9d 100644 --- a/test/tint/builtins/gen/literal/saturate/462535.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/saturate/462535.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void saturate_462535() { - f16vec3 res = f16vec3(0.0hf); + f16vec3 res = f16vec3(1.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void saturate_462535() { - f16vec3 res = f16vec3(0.0hf); + f16vec3 res = f16vec3(1.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void saturate_462535() { - f16vec3 res = f16vec3(0.0hf); + f16vec3 res = f16vec3(1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/saturate/462535.wgsl.expected.msl b/test/tint/builtins/gen/literal/saturate/462535.wgsl.expected.msl index 35014be5fd..4fab232fb3 100644 --- a/test/tint/builtins/gen/literal/saturate/462535.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/saturate/462535.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void saturate_462535() { - half3 res = half3(0.0h); + half3 res = half3(1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/saturate/462535.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/saturate/462535.wgsl.expected.spvasm index dfa8ca22e7..0c3162dbd6 100644 --- a/test/tint/builtins/gen/literal/saturate/462535.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/saturate/462535.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,35 +36,37 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %18 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %saturate_462535 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %res %15 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %18 - %20 = OpLabel - %21 = OpFunctionCall %void %saturate_462535 +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %saturate_462535 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %23 = OpLabel - %24 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %24 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %void %saturate_462535 + %29 = OpLabel + %30 = OpFunctionCall %void %saturate_462535 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %saturate_462535 + %32 = OpLabel + %33 = OpFunctionCall %void %saturate_462535 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/saturate/462535.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/saturate/462535.wgsl.expected.wgsl index 25d456293b..f4f845c9e0 100644 --- a/test/tint/builtins/gen/literal/saturate/462535.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/saturate/462535.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn saturate_462535() { - var res : vec3 = saturate(vec3(f16())); + var res : vec3 = saturate(vec3(2.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/saturate/cd2028.wgsl b/test/tint/builtins/gen/literal/saturate/cd2028.wgsl index c5dc478376..ec40321ae1 100644 --- a/test/tint/builtins/gen/literal/saturate/cd2028.wgsl +++ b/test/tint/builtins/gen/literal/saturate/cd2028.wgsl @@ -25,7 +25,7 @@ enable f16; // fn saturate(vec<2, f16>) -> vec<2, f16> fn saturate_cd2028() { - var res: vec2 = saturate(vec2(f16())); + var res: vec2 = saturate(vec2(2.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/saturate/cd2028.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/saturate/cd2028.wgsl.expected.dxc.hlsl index 97f10e9ed7..9d77a0ff72 100644 --- a/test/tint/builtins/gen/literal/saturate/cd2028.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/saturate/cd2028.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void saturate_cd2028() { - vector res = (float16_t(0.0h)).xx; + vector res = (float16_t(1.0h)).xx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/saturate/cd2028.wgsl.expected.glsl b/test/tint/builtins/gen/literal/saturate/cd2028.wgsl.expected.glsl index 821559fc63..d63e3e7048 100644 --- a/test/tint/builtins/gen/literal/saturate/cd2028.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/saturate/cd2028.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void saturate_cd2028() { - f16vec2 res = f16vec2(0.0hf); + f16vec2 res = f16vec2(1.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void saturate_cd2028() { - f16vec2 res = f16vec2(0.0hf); + f16vec2 res = f16vec2(1.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void saturate_cd2028() { - f16vec2 res = f16vec2(0.0hf); + f16vec2 res = f16vec2(1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/saturate/cd2028.wgsl.expected.msl b/test/tint/builtins/gen/literal/saturate/cd2028.wgsl.expected.msl index 0f23c028b6..c941ffe287 100644 --- a/test/tint/builtins/gen/literal/saturate/cd2028.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/saturate/cd2028.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void saturate_cd2028() { - half2 res = half2(0.0h); + half2 res = half2(1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/saturate/cd2028.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/saturate/cd2028.wgsl.expected.spvasm index d1d24df056..2312102071 100644 --- a/test/tint/builtins/gen/literal/saturate/cd2028.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/saturate/cd2028.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,35 +36,37 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %18 = OpTypeFunction %v4float + %19 = OpConstantNull %v2half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %saturate_cd2028 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %res %15 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %18 - %20 = OpLabel - %21 = OpFunctionCall %void %saturate_cd2028 +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %saturate_cd2028 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %23 = OpLabel - %24 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %24 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %void %saturate_cd2028 + %29 = OpLabel + %30 = OpFunctionCall %void %saturate_cd2028 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %saturate_cd2028 + %32 = OpLabel + %33 = OpFunctionCall %void %saturate_cd2028 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/saturate/cd2028.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/saturate/cd2028.wgsl.expected.wgsl index f2a06c95d0..47ce6c7ede 100644 --- a/test/tint/builtins/gen/literal/saturate/cd2028.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/saturate/cd2028.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn saturate_cd2028() { - var res : vec2 = saturate(vec2(f16())); + var res : vec2 = saturate(vec2(2.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/saturate/dcde71.wgsl b/test/tint/builtins/gen/literal/saturate/dcde71.wgsl index 861fc1243d..22dd45f94f 100644 --- a/test/tint/builtins/gen/literal/saturate/dcde71.wgsl +++ b/test/tint/builtins/gen/literal/saturate/dcde71.wgsl @@ -25,7 +25,7 @@ enable f16; // fn saturate(vec<4, f16>) -> vec<4, f16> fn saturate_dcde71() { - var res: vec4 = saturate(vec4(f16())); + var res: vec4 = saturate(vec4(2.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/saturate/dcde71.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/saturate/dcde71.wgsl.expected.dxc.hlsl index 23cb2324cd..250ea3a4c1 100644 --- a/test/tint/builtins/gen/literal/saturate/dcde71.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/saturate/dcde71.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void saturate_dcde71() { - vector res = (float16_t(0.0h)).xxxx; + vector res = (float16_t(1.0h)).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/saturate/dcde71.wgsl.expected.glsl b/test/tint/builtins/gen/literal/saturate/dcde71.wgsl.expected.glsl index 96296a0f39..0b80f1d4aa 100644 --- a/test/tint/builtins/gen/literal/saturate/dcde71.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/saturate/dcde71.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void saturate_dcde71() { - f16vec4 res = f16vec4(0.0hf); + f16vec4 res = f16vec4(1.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void saturate_dcde71() { - f16vec4 res = f16vec4(0.0hf); + f16vec4 res = f16vec4(1.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void saturate_dcde71() { - f16vec4 res = f16vec4(0.0hf); + f16vec4 res = f16vec4(1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/saturate/dcde71.wgsl.expected.msl b/test/tint/builtins/gen/literal/saturate/dcde71.wgsl.expected.msl index 3dc22678f7..403440df3f 100644 --- a/test/tint/builtins/gen/literal/saturate/dcde71.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/saturate/dcde71.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void saturate_dcde71() { - half4 res = half4(0.0h); + half4 res = half4(1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/saturate/dcde71.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/saturate/dcde71.wgsl.expected.spvasm index c2fbd4a8c1..1ae845526b 100644 --- a/test/tint/builtins/gen/literal/saturate/dcde71.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/saturate/dcde71.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,35 +36,37 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %18 = OpTypeFunction %v4float + %19 = OpConstantNull %v4half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %saturate_dcde71 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %res %15 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %18 - %20 = OpLabel - %21 = OpFunctionCall %void %saturate_dcde71 +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %saturate_dcde71 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %23 = OpLabel - %24 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %24 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %void %saturate_dcde71 + %29 = OpLabel + %30 = OpFunctionCall %void %saturate_dcde71 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %saturate_dcde71 + %32 = OpLabel + %33 = OpFunctionCall %void %saturate_dcde71 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/saturate/dcde71.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/saturate/dcde71.wgsl.expected.wgsl index 8d23bd2012..2c8aba9ad6 100644 --- a/test/tint/builtins/gen/literal/saturate/dcde71.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/saturate/dcde71.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn saturate_dcde71() { - var res : vec4 = saturate(vec4(f16())); + var res : vec4 = saturate(vec4(2.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/saturate/e8df56.wgsl b/test/tint/builtins/gen/literal/saturate/e8df56.wgsl index edd402ff9e..14ba3d62c1 100644 --- a/test/tint/builtins/gen/literal/saturate/e8df56.wgsl +++ b/test/tint/builtins/gen/literal/saturate/e8df56.wgsl @@ -25,7 +25,7 @@ enable f16; // fn saturate(f16) -> f16 fn saturate_e8df56() { - var res: f16 = saturate(f16()); + var res: f16 = saturate(2.h); } @vertex diff --git a/test/tint/builtins/gen/literal/saturate/e8df56.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/saturate/e8df56.wgsl.expected.dxc.hlsl index 61c28d8329..2774be4de0 100644 --- a/test/tint/builtins/gen/literal/saturate/e8df56.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/saturate/e8df56.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void saturate_e8df56() { - float16_t res = float16_t(0.0h); + float16_t res = float16_t(1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/saturate/e8df56.wgsl.expected.glsl b/test/tint/builtins/gen/literal/saturate/e8df56.wgsl.expected.glsl index 4aab0f3ee1..7e416e154f 100644 --- a/test/tint/builtins/gen/literal/saturate/e8df56.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/saturate/e8df56.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void saturate_e8df56() { - float16_t res = 0.0hf; + float16_t res = 1.0hf; } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void saturate_e8df56() { - float16_t res = 0.0hf; + float16_t res = 1.0hf; } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void saturate_e8df56() { - float16_t res = 0.0hf; + float16_t res = 1.0hf; } void compute_main() { diff --git a/test/tint/builtins/gen/literal/saturate/e8df56.wgsl.expected.msl b/test/tint/builtins/gen/literal/saturate/e8df56.wgsl.expected.msl index 0219c63434..6af9d37bd5 100644 --- a/test/tint/builtins/gen/literal/saturate/e8df56.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/saturate/e8df56.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void saturate_e8df56() { - half res = 0.0h; + half res = 1.0h; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/saturate/e8df56.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/saturate/e8df56.wgsl.expected.spvasm index 846ff53d53..3f552d832b 100644 --- a/test/tint/builtins/gen/literal/saturate/e8df56.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/saturate/e8df56.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -35,35 +35,36 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %17 = OpTypeFunction %v4float + %17 = OpConstantNull %half + %18 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %saturate_e8df56 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_half Function %14 - OpStore %res %14 + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %res %half_0x1p_0 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %17 - %19 = OpLabel - %20 = OpFunctionCall %void %saturate_e8df56 +%vertex_main_inner = OpFunction %v4float None %18 + %20 = OpLabel + %21 = OpFunctionCall %void %saturate_e8df56 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %22 = OpLabel - %23 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %23 + %23 = OpLabel + %24 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %24 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %saturate_e8df56 + %27 = OpLabel + %28 = OpFunctionCall %void %saturate_e8df56 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %saturate_e8df56 + %30 = OpLabel + %31 = OpFunctionCall %void %saturate_e8df56 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/saturate/e8df56.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/saturate/e8df56.wgsl.expected.wgsl index 4662bb56e8..e983300ed8 100644 --- a/test/tint/builtins/gen/literal/saturate/e8df56.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/saturate/e8df56.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn saturate_e8df56() { - var res : f16 = saturate(f16()); + var res : f16 = saturate(2.0h); } @vertex diff --git a/test/tint/builtins/gen/literal/select/10e73b.wgsl b/test/tint/builtins/gen/literal/select/10e73b.wgsl index 96320641af..6f12933107 100644 --- a/test/tint/builtins/gen/literal/select/10e73b.wgsl +++ b/test/tint/builtins/gen/literal/select/10e73b.wgsl @@ -25,7 +25,7 @@ enable f16; // fn select(f16, f16, bool) -> f16 fn select_10e73b() { - var res: f16 = select(f16(), f16(), true); + var res: f16 = select(1.h, 1.h, true); } @vertex diff --git a/test/tint/builtins/gen/literal/select/10e73b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/select/10e73b.wgsl.expected.dxc.hlsl index c52b572f04..3988b983b0 100644 --- a/test/tint/builtins/gen/literal/select/10e73b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/select/10e73b.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void select_10e73b() { - float16_t res = float16_t(0.0h); + float16_t res = float16_t(1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/10e73b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/select/10e73b.wgsl.expected.glsl index 65d3a9810d..943a733264 100644 --- a/test/tint/builtins/gen/literal/select/10e73b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/select/10e73b.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void select_10e73b() { - float16_t res = 0.0hf; + float16_t res = 1.0hf; } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void select_10e73b() { - float16_t res = 0.0hf; + float16_t res = 1.0hf; } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void select_10e73b() { - float16_t res = 0.0hf; + float16_t res = 1.0hf; } void compute_main() { diff --git a/test/tint/builtins/gen/literal/select/10e73b.wgsl.expected.msl b/test/tint/builtins/gen/literal/select/10e73b.wgsl.expected.msl index 41bda4fda0..009867deea 100644 --- a/test/tint/builtins/gen/literal/select/10e73b.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/select/10e73b.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void select_10e73b() { - half res = 0.0h; + half res = 1.0h; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/10e73b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/select/10e73b.wgsl.expected.spvasm index 8c2401f1e6..1dd283eb6e 100644 --- a/test/tint/builtins/gen/literal/select/10e73b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/select/10e73b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -35,35 +35,36 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %17 = OpTypeFunction %v4float + %17 = OpConstantNull %half + %18 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_10e73b = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_half Function %14 - OpStore %res %14 + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %res %half_0x1p_0 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %17 - %19 = OpLabel - %20 = OpFunctionCall %void %select_10e73b +%vertex_main_inner = OpFunction %v4float None %18 + %20 = OpLabel + %21 = OpFunctionCall %void %select_10e73b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %22 = OpLabel - %23 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %23 + %23 = OpLabel + %24 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %24 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %select_10e73b + %27 = OpLabel + %28 = OpFunctionCall %void %select_10e73b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %select_10e73b + %30 = OpLabel + %31 = OpFunctionCall %void %select_10e73b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/select/10e73b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/select/10e73b.wgsl.expected.wgsl index 4aa334d0a2..426915f383 100644 --- a/test/tint/builtins/gen/literal/select/10e73b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/select/10e73b.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn select_10e73b() { - var res : f16 = select(f16(), f16(), true); + var res : f16 = select(1.0h, 1.0h, true); } @vertex diff --git a/test/tint/builtins/gen/literal/select/1ada2a.wgsl b/test/tint/builtins/gen/literal/select/1ada2a.wgsl index 2278b71f56..d7a24dbb2a 100644 --- a/test/tint/builtins/gen/literal/select/1ada2a.wgsl +++ b/test/tint/builtins/gen/literal/select/1ada2a.wgsl @@ -25,7 +25,7 @@ enable f16; // fn select(vec<3, f16>, vec<3, f16>, bool) -> vec<3, f16> fn select_1ada2a() { - var res: vec3 = select(vec3(f16()), vec3(f16()), true); + var res: vec3 = select(vec3(1.h), vec3(1.h), true); } @vertex diff --git a/test/tint/builtins/gen/literal/select/1ada2a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/select/1ada2a.wgsl.expected.dxc.hlsl index c719f6c792..7d0108310f 100644 --- a/test/tint/builtins/gen/literal/select/1ada2a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/select/1ada2a.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void select_1ada2a() { - vector res = (float16_t(0.0h)).xxx; + vector res = (float16_t(1.0h)).xxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/1ada2a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/select/1ada2a.wgsl.expected.glsl index 9150c64460..cd6989bcc9 100644 --- a/test/tint/builtins/gen/literal/select/1ada2a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/select/1ada2a.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void select_1ada2a() { - f16vec3 res = f16vec3(0.0hf); + f16vec3 res = f16vec3(1.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void select_1ada2a() { - f16vec3 res = f16vec3(0.0hf); + f16vec3 res = f16vec3(1.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void select_1ada2a() { - f16vec3 res = f16vec3(0.0hf); + f16vec3 res = f16vec3(1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/select/1ada2a.wgsl.expected.msl b/test/tint/builtins/gen/literal/select/1ada2a.wgsl.expected.msl index f310524c5a..5d1e6c6377 100644 --- a/test/tint/builtins/gen/literal/select/1ada2a.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/select/1ada2a.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void select_1ada2a() { - half3 res = half3(0.0h); + half3 res = half3(1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/1ada2a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/select/1ada2a.wgsl.expected.spvasm index e2e371bd27..9f67b7ca24 100644 --- a/test/tint/builtins/gen/literal/select/1ada2a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/select/1ada2a.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,35 +36,37 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %18 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_1ada2a = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %res %15 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %18 - %20 = OpLabel - %21 = OpFunctionCall %void %select_1ada2a +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %select_1ada2a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %23 = OpLabel - %24 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %24 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %void %select_1ada2a + %29 = OpLabel + %30 = OpFunctionCall %void %select_1ada2a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %select_1ada2a + %32 = OpLabel + %33 = OpFunctionCall %void %select_1ada2a OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/select/1ada2a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/select/1ada2a.wgsl.expected.wgsl index 64fb37129f..9d300447f2 100644 --- a/test/tint/builtins/gen/literal/select/1ada2a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/select/1ada2a.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn select_1ada2a() { - var res : vec3 = select(vec3(f16()), vec3(f16()), true); + var res : vec3 = select(vec3(1.0h), vec3(1.0h), true); } @vertex diff --git a/test/tint/builtins/gen/literal/select/53d518.wgsl b/test/tint/builtins/gen/literal/select/53d518.wgsl index a511c17c43..037dcf9990 100644 --- a/test/tint/builtins/gen/literal/select/53d518.wgsl +++ b/test/tint/builtins/gen/literal/select/53d518.wgsl @@ -25,7 +25,7 @@ enable f16; // fn select(vec<3, f16>, vec<3, f16>, vec<3, bool>) -> vec<3, f16> fn select_53d518() { - var res: vec3 = select(vec3(f16()), vec3(f16()), vec3(true)); + var res: vec3 = select(vec3(1.h), vec3(1.h), vec3(true)); } @vertex diff --git a/test/tint/builtins/gen/literal/select/53d518.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/select/53d518.wgsl.expected.dxc.hlsl index 861ff192ae..6f16f8dba2 100644 --- a/test/tint/builtins/gen/literal/select/53d518.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/select/53d518.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void select_53d518() { - vector res = (float16_t(0.0h)).xxx; + vector res = (float16_t(1.0h)).xxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/53d518.wgsl.expected.glsl b/test/tint/builtins/gen/literal/select/53d518.wgsl.expected.glsl index b4d88fd6f7..20484232b0 100644 --- a/test/tint/builtins/gen/literal/select/53d518.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/select/53d518.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void select_53d518() { - f16vec3 res = f16vec3(0.0hf); + f16vec3 res = f16vec3(1.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void select_53d518() { - f16vec3 res = f16vec3(0.0hf); + f16vec3 res = f16vec3(1.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void select_53d518() { - f16vec3 res = f16vec3(0.0hf); + f16vec3 res = f16vec3(1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/select/53d518.wgsl.expected.msl b/test/tint/builtins/gen/literal/select/53d518.wgsl.expected.msl index 071a65a146..885f80c58e 100644 --- a/test/tint/builtins/gen/literal/select/53d518.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/select/53d518.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void select_53d518() { - half3 res = half3(0.0h); + half3 res = half3(1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/53d518.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/select/53d518.wgsl.expected.spvasm index 3697f80790..6b0b0ef31d 100644 --- a/test/tint/builtins/gen/literal/select/53d518.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/select/53d518.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,35 +36,37 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %18 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_53d518 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %res %15 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %18 - %20 = OpLabel - %21 = OpFunctionCall %void %select_53d518 +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %select_53d518 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %23 = OpLabel - %24 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %24 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %void %select_53d518 + %29 = OpLabel + %30 = OpFunctionCall %void %select_53d518 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %select_53d518 + %32 = OpLabel + %33 = OpFunctionCall %void %select_53d518 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/select/53d518.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/select/53d518.wgsl.expected.wgsl index 425a44b087..e443ffdc8b 100644 --- a/test/tint/builtins/gen/literal/select/53d518.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/select/53d518.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn select_53d518() { - var res : vec3 = select(vec3(f16()), vec3(f16()), vec3(true)); + var res : vec3 = select(vec3(1.0h), vec3(1.0h), vec3(true)); } @vertex diff --git a/test/tint/builtins/gen/literal/select/830dd9.wgsl b/test/tint/builtins/gen/literal/select/830dd9.wgsl index f1fda9e5a9..9ed0584e70 100644 --- a/test/tint/builtins/gen/literal/select/830dd9.wgsl +++ b/test/tint/builtins/gen/literal/select/830dd9.wgsl @@ -25,7 +25,7 @@ enable f16; // fn select(vec<4, f16>, vec<4, f16>, bool) -> vec<4, f16> fn select_830dd9() { - var res: vec4 = select(vec4(f16()), vec4(f16()), true); + var res: vec4 = select(vec4(1.h), vec4(1.h), true); } @vertex diff --git a/test/tint/builtins/gen/literal/select/830dd9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/select/830dd9.wgsl.expected.dxc.hlsl index 9ccab1be17..49e6f4a230 100644 --- a/test/tint/builtins/gen/literal/select/830dd9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/select/830dd9.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void select_830dd9() { - vector res = (float16_t(0.0h)).xxxx; + vector res = (float16_t(1.0h)).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/830dd9.wgsl.expected.glsl b/test/tint/builtins/gen/literal/select/830dd9.wgsl.expected.glsl index 665c49e1af..9d787eb054 100644 --- a/test/tint/builtins/gen/literal/select/830dd9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/select/830dd9.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void select_830dd9() { - f16vec4 res = f16vec4(0.0hf); + f16vec4 res = f16vec4(1.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void select_830dd9() { - f16vec4 res = f16vec4(0.0hf); + f16vec4 res = f16vec4(1.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void select_830dd9() { - f16vec4 res = f16vec4(0.0hf); + f16vec4 res = f16vec4(1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/select/830dd9.wgsl.expected.msl b/test/tint/builtins/gen/literal/select/830dd9.wgsl.expected.msl index 6763d90177..2663656ae1 100644 --- a/test/tint/builtins/gen/literal/select/830dd9.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/select/830dd9.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void select_830dd9() { - half4 res = half4(0.0h); + half4 res = half4(1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/830dd9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/select/830dd9.wgsl.expected.spvasm index debde2abf4..889da66f5e 100644 --- a/test/tint/builtins/gen/literal/select/830dd9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/select/830dd9.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,35 +36,37 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %18 = OpTypeFunction %v4float + %19 = OpConstantNull %v4half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_830dd9 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %res %15 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %18 - %20 = OpLabel - %21 = OpFunctionCall %void %select_830dd9 +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %select_830dd9 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %23 = OpLabel - %24 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %24 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %void %select_830dd9 + %29 = OpLabel + %30 = OpFunctionCall %void %select_830dd9 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %select_830dd9 + %32 = OpLabel + %33 = OpFunctionCall %void %select_830dd9 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/select/830dd9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/select/830dd9.wgsl.expected.wgsl index cb99917b9a..ddcd2643a3 100644 --- a/test/tint/builtins/gen/literal/select/830dd9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/select/830dd9.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn select_830dd9() { - var res : vec4 = select(vec4(f16()), vec4(f16()), true); + var res : vec4 = select(vec4(1.0h), vec4(1.0h), true); } @vertex diff --git a/test/tint/builtins/gen/literal/select/86f9bd.wgsl b/test/tint/builtins/gen/literal/select/86f9bd.wgsl index 0cb4dc050b..0b75a151e9 100644 --- a/test/tint/builtins/gen/literal/select/86f9bd.wgsl +++ b/test/tint/builtins/gen/literal/select/86f9bd.wgsl @@ -25,7 +25,7 @@ enable f16; // fn select(vec<2, f16>, vec<2, f16>, bool) -> vec<2, f16> fn select_86f9bd() { - var res: vec2 = select(vec2(f16()), vec2(f16()), true); + var res: vec2 = select(vec2(1.h), vec2(1.h), true); } @vertex diff --git a/test/tint/builtins/gen/literal/select/86f9bd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/select/86f9bd.wgsl.expected.dxc.hlsl index 8b55bbb1af..02858f1753 100644 --- a/test/tint/builtins/gen/literal/select/86f9bd.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/select/86f9bd.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void select_86f9bd() { - vector res = (float16_t(0.0h)).xx; + vector res = (float16_t(1.0h)).xx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/86f9bd.wgsl.expected.glsl b/test/tint/builtins/gen/literal/select/86f9bd.wgsl.expected.glsl index 002de10931..1cec4b7607 100644 --- a/test/tint/builtins/gen/literal/select/86f9bd.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/select/86f9bd.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void select_86f9bd() { - f16vec2 res = f16vec2(0.0hf); + f16vec2 res = f16vec2(1.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void select_86f9bd() { - f16vec2 res = f16vec2(0.0hf); + f16vec2 res = f16vec2(1.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void select_86f9bd() { - f16vec2 res = f16vec2(0.0hf); + f16vec2 res = f16vec2(1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/select/86f9bd.wgsl.expected.msl b/test/tint/builtins/gen/literal/select/86f9bd.wgsl.expected.msl index fd67e7b1e7..9503bb5602 100644 --- a/test/tint/builtins/gen/literal/select/86f9bd.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/select/86f9bd.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void select_86f9bd() { - half2 res = half2(0.0h); + half2 res = half2(1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/86f9bd.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/select/86f9bd.wgsl.expected.spvasm index 8711cd2782..68c891c2fa 100644 --- a/test/tint/builtins/gen/literal/select/86f9bd.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/select/86f9bd.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,35 +36,37 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %18 = OpTypeFunction %v4float + %19 = OpConstantNull %v2half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_86f9bd = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %res %15 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %18 - %20 = OpLabel - %21 = OpFunctionCall %void %select_86f9bd +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %select_86f9bd OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %23 = OpLabel - %24 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %24 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %void %select_86f9bd + %29 = OpLabel + %30 = OpFunctionCall %void %select_86f9bd OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %select_86f9bd + %32 = OpLabel + %33 = OpFunctionCall %void %select_86f9bd OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/select/86f9bd.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/select/86f9bd.wgsl.expected.wgsl index 0454417a50..5f3fa5c315 100644 --- a/test/tint/builtins/gen/literal/select/86f9bd.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/select/86f9bd.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn select_86f9bd() { - var res : vec2 = select(vec2(f16()), vec2(f16()), true); + var res : vec2 = select(vec2(1.0h), vec2(1.0h), true); } @vertex diff --git a/test/tint/builtins/gen/literal/select/a081f1.wgsl b/test/tint/builtins/gen/literal/select/a081f1.wgsl index 9f4e789a0a..2a16d51974 100644 --- a/test/tint/builtins/gen/literal/select/a081f1.wgsl +++ b/test/tint/builtins/gen/literal/select/a081f1.wgsl @@ -25,7 +25,7 @@ enable f16; // fn select(vec<4, f16>, vec<4, f16>, vec<4, bool>) -> vec<4, f16> fn select_a081f1() { - var res: vec4 = select(vec4(f16()), vec4(f16()), vec4(true)); + var res: vec4 = select(vec4(1.h), vec4(1.h), vec4(true)); } @vertex diff --git a/test/tint/builtins/gen/literal/select/a081f1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/select/a081f1.wgsl.expected.dxc.hlsl index 4d8b7a1d2a..5cc9a61663 100644 --- a/test/tint/builtins/gen/literal/select/a081f1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/select/a081f1.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void select_a081f1() { - vector res = (float16_t(0.0h)).xxxx; + vector res = (float16_t(1.0h)).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/a081f1.wgsl.expected.glsl b/test/tint/builtins/gen/literal/select/a081f1.wgsl.expected.glsl index 8b2a610ec8..73c1209c98 100644 --- a/test/tint/builtins/gen/literal/select/a081f1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/select/a081f1.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void select_a081f1() { - f16vec4 res = f16vec4(0.0hf); + f16vec4 res = f16vec4(1.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void select_a081f1() { - f16vec4 res = f16vec4(0.0hf); + f16vec4 res = f16vec4(1.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void select_a081f1() { - f16vec4 res = f16vec4(0.0hf); + f16vec4 res = f16vec4(1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/select/a081f1.wgsl.expected.msl b/test/tint/builtins/gen/literal/select/a081f1.wgsl.expected.msl index 75ed4b4841..6b4ae38bea 100644 --- a/test/tint/builtins/gen/literal/select/a081f1.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/select/a081f1.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void select_a081f1() { - half4 res = half4(0.0h); + half4 res = half4(1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/a081f1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/select/a081f1.wgsl.expected.spvasm index c775c95c01..0f5187e779 100644 --- a/test/tint/builtins/gen/literal/select/a081f1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/select/a081f1.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,35 +36,37 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %18 = OpTypeFunction %v4float + %19 = OpConstantNull %v4half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_a081f1 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %res %15 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %18 - %20 = OpLabel - %21 = OpFunctionCall %void %select_a081f1 +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %select_a081f1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %23 = OpLabel - %24 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %24 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %void %select_a081f1 + %29 = OpLabel + %30 = OpFunctionCall %void %select_a081f1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %select_a081f1 + %32 = OpLabel + %33 = OpFunctionCall %void %select_a081f1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/select/a081f1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/select/a081f1.wgsl.expected.wgsl index feefad7fcf..2dcaddf768 100644 --- a/test/tint/builtins/gen/literal/select/a081f1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/select/a081f1.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn select_a081f1() { - var res : vec4 = select(vec4(f16()), vec4(f16()), vec4(true)); + var res : vec4 = select(vec4(1.0h), vec4(1.0h), vec4(true)); } @vertex diff --git a/test/tint/builtins/gen/literal/select/ed7c13.wgsl b/test/tint/builtins/gen/literal/select/ed7c13.wgsl index 1d862f657b..7f703db595 100644 --- a/test/tint/builtins/gen/literal/select/ed7c13.wgsl +++ b/test/tint/builtins/gen/literal/select/ed7c13.wgsl @@ -25,7 +25,7 @@ enable f16; // fn select(vec<2, f16>, vec<2, f16>, vec<2, bool>) -> vec<2, f16> fn select_ed7c13() { - var res: vec2 = select(vec2(f16()), vec2(f16()), vec2(true)); + var res: vec2 = select(vec2(1.h), vec2(1.h), vec2(true)); } @vertex diff --git a/test/tint/builtins/gen/literal/select/ed7c13.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/select/ed7c13.wgsl.expected.dxc.hlsl index a15279afeb..5ba22f5bb8 100644 --- a/test/tint/builtins/gen/literal/select/ed7c13.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/select/ed7c13.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void select_ed7c13() { - vector res = (float16_t(0.0h)).xx; + vector res = (float16_t(1.0h)).xx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/ed7c13.wgsl.expected.glsl b/test/tint/builtins/gen/literal/select/ed7c13.wgsl.expected.glsl index a5fad2c745..1ac6e9afd7 100644 --- a/test/tint/builtins/gen/literal/select/ed7c13.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/select/ed7c13.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void select_ed7c13() { - f16vec2 res = f16vec2(0.0hf); + f16vec2 res = f16vec2(1.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void select_ed7c13() { - f16vec2 res = f16vec2(0.0hf); + f16vec2 res = f16vec2(1.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void select_ed7c13() { - f16vec2 res = f16vec2(0.0hf); + f16vec2 res = f16vec2(1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/select/ed7c13.wgsl.expected.msl b/test/tint/builtins/gen/literal/select/ed7c13.wgsl.expected.msl index f02a9f6176..a73404c185 100644 --- a/test/tint/builtins/gen/literal/select/ed7c13.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/select/ed7c13.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void select_ed7c13() { - half2 res = half2(0.0h); + half2 res = half2(1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/ed7c13.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/select/ed7c13.wgsl.expected.spvasm index 7a647b8710..3f969ce893 100644 --- a/test/tint/builtins/gen/literal/select/ed7c13.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/select/ed7c13.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,35 +36,37 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %18 = OpTypeFunction %v4float + %19 = OpConstantNull %v2half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_ed7c13 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %res %15 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %18 - %20 = OpLabel - %21 = OpFunctionCall %void %select_ed7c13 +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %select_ed7c13 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %23 = OpLabel - %24 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %24 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %void %select_ed7c13 + %29 = OpLabel + %30 = OpFunctionCall %void %select_ed7c13 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %select_ed7c13 + %32 = OpLabel + %33 = OpFunctionCall %void %select_ed7c13 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/select/ed7c13.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/select/ed7c13.wgsl.expected.wgsl index 427fba2d5e..7df76f43f2 100644 --- a/test/tint/builtins/gen/literal/select/ed7c13.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/select/ed7c13.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn select_ed7c13() { - var res : vec2 = select(vec2(f16()), vec2(f16()), vec2(true)); + var res : vec2 = select(vec2(1.0h), vec2(1.0h), vec2(true)); } @vertex diff --git a/test/tint/builtins/gen/literal/sign/160933.wgsl b/test/tint/builtins/gen/literal/sign/160933.wgsl index 13a6c3b97c..95c8575e14 100644 --- a/test/tint/builtins/gen/literal/sign/160933.wgsl +++ b/test/tint/builtins/gen/literal/sign/160933.wgsl @@ -25,7 +25,7 @@ enable f16; // fn sign(vec<4, f16>) -> vec<4, f16> fn sign_160933() { - var res: vec4 = sign(vec4(f16())); + var res: vec4 = sign(vec4(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/sign/160933.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sign/160933.wgsl.expected.dxc.hlsl index 9152c399d2..dca4974732 100644 --- a/test/tint/builtins/gen/literal/sign/160933.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/sign/160933.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sign_160933() { - vector res = (float16_t(0.0h)).xxxx; + vector res = (float16_t(1.0h)).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sign/160933.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sign/160933.wgsl.expected.glsl index 0c3ed6950a..765c87b7ac 100644 --- a/test/tint/builtins/gen/literal/sign/160933.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/sign/160933.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void sign_160933() { - f16vec4 res = f16vec4(0.0hf); + f16vec4 res = f16vec4(1.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void sign_160933() { - f16vec4 res = f16vec4(0.0hf); + f16vec4 res = f16vec4(1.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void sign_160933() { - f16vec4 res = f16vec4(0.0hf); + f16vec4 res = f16vec4(1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/sign/160933.wgsl.expected.msl b/test/tint/builtins/gen/literal/sign/160933.wgsl.expected.msl index 2f05c90fab..351bd94a8a 100644 --- a/test/tint/builtins/gen/literal/sign/160933.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/sign/160933.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sign_160933() { - half4 res = half4(0.0h); + half4 res = half4(1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sign/160933.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sign/160933.wgsl.expected.spvasm index 40f0e92750..aa897b02f8 100644 --- a/test/tint/builtins/gen/literal/sign/160933.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/sign/160933.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,35 +36,37 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %18 = OpTypeFunction %v4float + %19 = OpConstantNull %v4half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %sign_160933 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %res %15 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %18 - %20 = OpLabel - %21 = OpFunctionCall %void %sign_160933 +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %sign_160933 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %23 = OpLabel - %24 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %24 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %void %sign_160933 + %29 = OpLabel + %30 = OpFunctionCall %void %sign_160933 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %sign_160933 + %32 = OpLabel + %33 = OpFunctionCall %void %sign_160933 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/sign/160933.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sign/160933.wgsl.expected.wgsl index 5633954c2c..57ff301d21 100644 --- a/test/tint/builtins/gen/literal/sign/160933.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/sign/160933.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn sign_160933() { - var res : vec4 = sign(vec4(f16())); + var res : vec4 = sign(vec4(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/sign/5d283a.wgsl b/test/tint/builtins/gen/literal/sign/5d283a.wgsl index dc23259a5e..a83e8969ab 100644 --- a/test/tint/builtins/gen/literal/sign/5d283a.wgsl +++ b/test/tint/builtins/gen/literal/sign/5d283a.wgsl @@ -25,7 +25,7 @@ enable f16; // fn sign(vec<3, f16>) -> vec<3, f16> fn sign_5d283a() { - var res: vec3 = sign(vec3(f16())); + var res: vec3 = sign(vec3(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/sign/5d283a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sign/5d283a.wgsl.expected.dxc.hlsl index e8f8c0f7e9..ffe5893433 100644 --- a/test/tint/builtins/gen/literal/sign/5d283a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/sign/5d283a.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sign_5d283a() { - vector res = (float16_t(0.0h)).xxx; + vector res = (float16_t(1.0h)).xxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sign/5d283a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sign/5d283a.wgsl.expected.glsl index 8530a60db9..e7fcb152c4 100644 --- a/test/tint/builtins/gen/literal/sign/5d283a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/sign/5d283a.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void sign_5d283a() { - f16vec3 res = f16vec3(0.0hf); + f16vec3 res = f16vec3(1.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void sign_5d283a() { - f16vec3 res = f16vec3(0.0hf); + f16vec3 res = f16vec3(1.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void sign_5d283a() { - f16vec3 res = f16vec3(0.0hf); + f16vec3 res = f16vec3(1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/sign/5d283a.wgsl.expected.msl b/test/tint/builtins/gen/literal/sign/5d283a.wgsl.expected.msl index b104c0e1d1..7628c40348 100644 --- a/test/tint/builtins/gen/literal/sign/5d283a.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/sign/5d283a.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sign_5d283a() { - half3 res = half3(0.0h); + half3 res = half3(1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sign/5d283a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sign/5d283a.wgsl.expected.spvasm index f36ab38655..78e2a9edbe 100644 --- a/test/tint/builtins/gen/literal/sign/5d283a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/sign/5d283a.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,35 +36,37 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %18 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %sign_5d283a = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %res %15 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %18 - %20 = OpLabel - %21 = OpFunctionCall %void %sign_5d283a +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %sign_5d283a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %23 = OpLabel - %24 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %24 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %void %sign_5d283a + %29 = OpLabel + %30 = OpFunctionCall %void %sign_5d283a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %sign_5d283a + %32 = OpLabel + %33 = OpFunctionCall %void %sign_5d283a OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/sign/5d283a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sign/5d283a.wgsl.expected.wgsl index 754ba8baa0..53ec0543c0 100644 --- a/test/tint/builtins/gen/literal/sign/5d283a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/sign/5d283a.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn sign_5d283a() { - var res : vec3 = sign(vec3(f16())); + var res : vec3 = sign(vec3(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/sign/7c85ea.wgsl b/test/tint/builtins/gen/literal/sign/7c85ea.wgsl index b8d85dca5b..bac048de45 100644 --- a/test/tint/builtins/gen/literal/sign/7c85ea.wgsl +++ b/test/tint/builtins/gen/literal/sign/7c85ea.wgsl @@ -25,7 +25,7 @@ enable f16; // fn sign(f16) -> f16 fn sign_7c85ea() { - var res: f16 = sign(f16()); + var res: f16 = sign(1.h); } @vertex diff --git a/test/tint/builtins/gen/literal/sign/7c85ea.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sign/7c85ea.wgsl.expected.dxc.hlsl index 59e163085b..940219294f 100644 --- a/test/tint/builtins/gen/literal/sign/7c85ea.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/sign/7c85ea.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sign_7c85ea() { - float16_t res = float16_t(0.0h); + float16_t res = float16_t(1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sign/7c85ea.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sign/7c85ea.wgsl.expected.glsl index 200e748626..6c2f3c0f93 100644 --- a/test/tint/builtins/gen/literal/sign/7c85ea.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/sign/7c85ea.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void sign_7c85ea() { - float16_t res = 0.0hf; + float16_t res = 1.0hf; } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void sign_7c85ea() { - float16_t res = 0.0hf; + float16_t res = 1.0hf; } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void sign_7c85ea() { - float16_t res = 0.0hf; + float16_t res = 1.0hf; } void compute_main() { diff --git a/test/tint/builtins/gen/literal/sign/7c85ea.wgsl.expected.msl b/test/tint/builtins/gen/literal/sign/7c85ea.wgsl.expected.msl index 4c1254eb6e..7b130e701a 100644 --- a/test/tint/builtins/gen/literal/sign/7c85ea.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/sign/7c85ea.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sign_7c85ea() { - half res = 0.0h; + half res = 1.0h; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sign/7c85ea.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sign/7c85ea.wgsl.expected.spvasm index 49de559863..990f3af989 100644 --- a/test/tint/builtins/gen/literal/sign/7c85ea.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/sign/7c85ea.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -35,35 +35,36 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %17 = OpTypeFunction %v4float + %17 = OpConstantNull %half + %18 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %sign_7c85ea = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_half Function %14 - OpStore %res %14 + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %res %half_0x1p_0 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %17 - %19 = OpLabel - %20 = OpFunctionCall %void %sign_7c85ea +%vertex_main_inner = OpFunction %v4float None %18 + %20 = OpLabel + %21 = OpFunctionCall %void %sign_7c85ea OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %22 = OpLabel - %23 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %23 + %23 = OpLabel + %24 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %24 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %sign_7c85ea + %27 = OpLabel + %28 = OpFunctionCall %void %sign_7c85ea OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %sign_7c85ea + %30 = OpLabel + %31 = OpFunctionCall %void %sign_7c85ea OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/sign/7c85ea.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sign/7c85ea.wgsl.expected.wgsl index 5080143825..01a4db663e 100644 --- a/test/tint/builtins/gen/literal/sign/7c85ea.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/sign/7c85ea.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn sign_7c85ea() { - var res : f16 = sign(f16()); + var res : f16 = sign(1.0h); } @vertex diff --git a/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl b/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl index 169814e40b..0937baeee5 100644 --- a/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl +++ b/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl @@ -25,7 +25,7 @@ enable f16; // fn sign(vec<2, f16>) -> vec<2, f16> fn sign_ccdb3c() { - var res: vec2 = sign(vec2(f16())); + var res: vec2 = sign(vec2(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl.expected.dxc.hlsl index ac168b5752..90267ec317 100644 --- a/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sign_ccdb3c() { - vector res = (float16_t(0.0h)).xx; + vector res = (float16_t(1.0h)).xx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl.expected.glsl index 706af1304e..58f6dc7ece 100644 --- a/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void sign_ccdb3c() { - f16vec2 res = f16vec2(0.0hf); + f16vec2 res = f16vec2(1.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void sign_ccdb3c() { - f16vec2 res = f16vec2(0.0hf); + f16vec2 res = f16vec2(1.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void sign_ccdb3c() { - f16vec2 res = f16vec2(0.0hf); + f16vec2 res = f16vec2(1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl.expected.msl b/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl.expected.msl index 57c90908b6..9d4ea41abb 100644 --- a/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sign_ccdb3c() { - half2 res = half2(0.0h); + half2 res = half2(1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl.expected.spvasm index a9f3c86ce2..e667af5728 100644 --- a/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,35 +36,37 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %18 = OpTypeFunction %v4float + %19 = OpConstantNull %v2half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %sign_ccdb3c = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %res %15 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %18 - %20 = OpLabel - %21 = OpFunctionCall %void %sign_ccdb3c +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %sign_ccdb3c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %23 = OpLabel - %24 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %24 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %void %sign_ccdb3c + %29 = OpLabel + %30 = OpFunctionCall %void %sign_ccdb3c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %sign_ccdb3c + %32 = OpLabel + %33 = OpFunctionCall %void %sign_ccdb3c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl.expected.wgsl index 0a5f0ec369..2c9acae1ea 100644 --- a/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn sign_ccdb3c() { - var res : vec2 = sign(vec2(f16())); + var res : vec2 = sign(vec2(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/sin/2c903b.wgsl b/test/tint/builtins/gen/literal/sin/2c903b.wgsl index abe172c90e..6b149103c9 100644 --- a/test/tint/builtins/gen/literal/sin/2c903b.wgsl +++ b/test/tint/builtins/gen/literal/sin/2c903b.wgsl @@ -25,7 +25,7 @@ enable f16; // fn sin(vec<3, f16>) -> vec<3, f16> fn sin_2c903b() { - var res: vec3 = sin(vec3(f16())); + var res: vec3 = sin(vec3(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.dxc.hlsl index 8da2e1c888..be59f65eee 100644 --- a/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sin_2c903b() { - vector res = sin((float16_t(0.0h)).xxx); + vector res = sin((float16_t(1.0h)).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.glsl index 21de9a7b39..73bd0a8ed4 100644 --- a/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void sin_2c903b() { - f16vec3 res = sin(f16vec3(0.0hf)); + f16vec3 res = sin(f16vec3(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void sin_2c903b() { - f16vec3 res = sin(f16vec3(0.0hf)); + f16vec3 res = sin(f16vec3(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void sin_2c903b() { - f16vec3 res = sin(f16vec3(0.0hf)); + f16vec3 res = sin(f16vec3(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.msl b/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.msl index 85bf223af8..908d21b6b4 100644 --- a/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sin_2c903b() { - half3 res = sin(half3(0.0h)); + half3 res = sin(half3(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.spvasm index ad41fb308f..1c2492399e 100644 --- a/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %17 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v3half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %sin_2c903b = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3half Function %17 - %13 = OpExtInst %v3half %16 Sin %17 + %res = OpVariable %_ptr_Function_v3half Function %21 + %13 = OpExtInst %v3half %16 Sin %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %sin_2c903b +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %sin_2c903b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %sin_2c903b + %31 = OpLabel + %32 = OpFunctionCall %void %sin_2c903b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %sin_2c903b + %34 = OpLabel + %35 = OpFunctionCall %void %sin_2c903b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.wgsl index dd038f5ccb..9eaacf0028 100644 --- a/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn sin_2c903b() { - var res : vec3 = sin(vec3(f16())); + var res : vec3 = sin(vec3(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/sin/3cca11.wgsl b/test/tint/builtins/gen/literal/sin/3cca11.wgsl index 527f92b51d..edc4cf43ab 100644 --- a/test/tint/builtins/gen/literal/sin/3cca11.wgsl +++ b/test/tint/builtins/gen/literal/sin/3cca11.wgsl @@ -25,7 +25,7 @@ enable f16; // fn sin(vec<2, f16>) -> vec<2, f16> fn sin_3cca11() { - var res: vec2 = sin(vec2(f16())); + var res: vec2 = sin(vec2(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.dxc.hlsl index 2f44faab03..63a1b74221 100644 --- a/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sin_3cca11() { - vector res = sin((float16_t(0.0h)).xx); + vector res = sin((float16_t(1.0h)).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.glsl index 3d2c148fdd..9681333b90 100644 --- a/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void sin_3cca11() { - f16vec2 res = sin(f16vec2(0.0hf)); + f16vec2 res = sin(f16vec2(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void sin_3cca11() { - f16vec2 res = sin(f16vec2(0.0hf)); + f16vec2 res = sin(f16vec2(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void sin_3cca11() { - f16vec2 res = sin(f16vec2(0.0hf)); + f16vec2 res = sin(f16vec2(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.msl b/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.msl index 0e631c7a6e..6606e7ee9c 100644 --- a/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sin_3cca11() { - half2 res = sin(half2(0.0h)); + half2 res = sin(half2(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.spvasm index f80895e250..3b56d50e44 100644 --- a/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %17 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v2half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %sin_3cca11 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2half Function %17 - %13 = OpExtInst %v2half %16 Sin %17 + %res = OpVariable %_ptr_Function_v2half Function %21 + %13 = OpExtInst %v2half %16 Sin %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %sin_3cca11 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %sin_3cca11 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %sin_3cca11 + %31 = OpLabel + %32 = OpFunctionCall %void %sin_3cca11 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %sin_3cca11 + %34 = OpLabel + %35 = OpFunctionCall %void %sin_3cca11 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.wgsl index 31f967aeb6..4f84e034c3 100644 --- a/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn sin_3cca11() { - var res : vec2 = sin(vec2(f16())); + var res : vec2 = sin(vec2(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/sin/5c0712.wgsl b/test/tint/builtins/gen/literal/sin/5c0712.wgsl index 8a165443a1..5c11b0887e 100644 --- a/test/tint/builtins/gen/literal/sin/5c0712.wgsl +++ b/test/tint/builtins/gen/literal/sin/5c0712.wgsl @@ -25,7 +25,7 @@ enable f16; // fn sin(vec<4, f16>) -> vec<4, f16> fn sin_5c0712() { - var res: vec4 = sin(vec4(f16())); + var res: vec4 = sin(vec4(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.dxc.hlsl index ffc0c91d1a..d80cc2cb1b 100644 --- a/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sin_5c0712() { - vector res = sin((float16_t(0.0h)).xxxx); + vector res = sin((float16_t(1.0h)).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.glsl index c16ccdff21..51b1238c06 100644 --- a/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void sin_5c0712() { - f16vec4 res = sin(f16vec4(0.0hf)); + f16vec4 res = sin(f16vec4(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void sin_5c0712() { - f16vec4 res = sin(f16vec4(0.0hf)); + f16vec4 res = sin(f16vec4(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void sin_5c0712() { - f16vec4 res = sin(f16vec4(0.0hf)); + f16vec4 res = sin(f16vec4(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.msl b/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.msl index 93932368b7..2ca221f34f 100644 --- a/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sin_5c0712() { - half4 res = sin(half4(0.0h)); + half4 res = sin(half4(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.spvasm index 5060ea847d..bb518bd9fb 100644 --- a/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %17 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v4half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %sin_5c0712 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4half Function %17 - %13 = OpExtInst %v4half %16 Sin %17 + %res = OpVariable %_ptr_Function_v4half Function %21 + %13 = OpExtInst %v4half %16 Sin %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %sin_5c0712 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %sin_5c0712 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %sin_5c0712 + %31 = OpLabel + %32 = OpFunctionCall %void %sin_5c0712 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %sin_5c0712 + %34 = OpLabel + %35 = OpFunctionCall %void %sin_5c0712 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.wgsl index 451cac035d..43fc5bcc57 100644 --- a/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn sin_5c0712() { - var res : vec4 = sin(vec4(f16())); + var res : vec4 = sin(vec4(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/sin/66a59f.wgsl b/test/tint/builtins/gen/literal/sin/66a59f.wgsl index 9f69a70f52..874c051f88 100644 --- a/test/tint/builtins/gen/literal/sin/66a59f.wgsl +++ b/test/tint/builtins/gen/literal/sin/66a59f.wgsl @@ -25,7 +25,7 @@ enable f16; // fn sin(f16) -> f16 fn sin_66a59f() { - var res: f16 = sin(f16()); + var res: f16 = sin(1.h); } @vertex diff --git a/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.dxc.hlsl index dbb0994a40..111f1b525e 100644 --- a/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sin_66a59f() { - float16_t res = sin(float16_t(0.0h)); + float16_t res = sin(float16_t(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.glsl index dc6b376a82..68bffdd5e7 100644 --- a/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void sin_66a59f() { - float16_t res = sin(0.0hf); + float16_t res = sin(1.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void sin_66a59f() { - float16_t res = sin(0.0hf); + float16_t res = sin(1.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void sin_66a59f() { - float16_t res = sin(0.0hf); + float16_t res = sin(1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.msl b/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.msl index 8204eec080..9c32a9498c 100644 --- a/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sin_66a59f() { - half res = sin(0.0h); + half res = sin(1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.spvasm index 19a2e294c9..00d3618797 100644 --- a/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,36 +36,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %16 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %19 = OpTypeFunction %v4float + %19 = OpConstantNull %half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %sin_66a59f = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_half Function %16 - %13 = OpExtInst %half %15 Sin %16 + %res = OpVariable %_ptr_Function_half Function %19 + %13 = OpExtInst %half %15 Sin %half_0x1p_0 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %sin_66a59f +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %sin_66a59f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %sin_66a59f + %29 = OpLabel + %30 = OpFunctionCall %void %sin_66a59f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %sin_66a59f + %32 = OpLabel + %33 = OpFunctionCall %void %sin_66a59f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.wgsl index afb239be2c..78e208584f 100644 --- a/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn sin_66a59f() { - var res : f16 = sin(f16()); + var res : f16 = sin(1.0h); } @vertex diff --git a/test/tint/builtins/gen/literal/sinh/0908c1.wgsl b/test/tint/builtins/gen/literal/sinh/0908c1.wgsl index dc47091224..576523bf88 100644 --- a/test/tint/builtins/gen/literal/sinh/0908c1.wgsl +++ b/test/tint/builtins/gen/literal/sinh/0908c1.wgsl @@ -25,7 +25,7 @@ enable f16; // fn sinh(vec<3, f16>) -> vec<3, f16> fn sinh_0908c1() { - var res: vec3 = sinh(vec3(f16())); + var res: vec3 = sinh(vec3(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/sinh/0908c1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sinh/0908c1.wgsl.expected.dxc.hlsl index 797d893b31..1f06f77d0a 100644 --- a/test/tint/builtins/gen/literal/sinh/0908c1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/sinh/0908c1.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sinh_0908c1() { - vector res = sinh((float16_t(0.0h)).xxx); + vector res = sinh((float16_t(1.0h)).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sinh/0908c1.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sinh/0908c1.wgsl.expected.glsl index 6130c64bdf..2c61420aea 100644 --- a/test/tint/builtins/gen/literal/sinh/0908c1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/sinh/0908c1.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void sinh_0908c1() { - f16vec3 res = sinh(f16vec3(0.0hf)); + f16vec3 res = sinh(f16vec3(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void sinh_0908c1() { - f16vec3 res = sinh(f16vec3(0.0hf)); + f16vec3 res = sinh(f16vec3(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void sinh_0908c1() { - f16vec3 res = sinh(f16vec3(0.0hf)); + f16vec3 res = sinh(f16vec3(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/sinh/0908c1.wgsl.expected.msl b/test/tint/builtins/gen/literal/sinh/0908c1.wgsl.expected.msl index 5da508a32b..54d1892725 100644 --- a/test/tint/builtins/gen/literal/sinh/0908c1.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/sinh/0908c1.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sinh_0908c1() { - half3 res = sinh(half3(0.0h)); + half3 res = sinh(half3(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sinh/0908c1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sinh/0908c1.wgsl.expected.spvasm index 62c27636c0..3a1f92ccd5 100644 --- a/test/tint/builtins/gen/literal/sinh/0908c1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/sinh/0908c1.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %17 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v3half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %sinh_0908c1 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3half Function %17 - %13 = OpExtInst %v3half %16 Sinh %17 + %res = OpVariable %_ptr_Function_v3half Function %21 + %13 = OpExtInst %v3half %16 Sinh %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %sinh_0908c1 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %sinh_0908c1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %sinh_0908c1 + %31 = OpLabel + %32 = OpFunctionCall %void %sinh_0908c1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %sinh_0908c1 + %34 = OpLabel + %35 = OpFunctionCall %void %sinh_0908c1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/sinh/0908c1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sinh/0908c1.wgsl.expected.wgsl index f583b1084f..1da348b990 100644 --- a/test/tint/builtins/gen/literal/sinh/0908c1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/sinh/0908c1.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn sinh_0908c1() { - var res : vec3 = sinh(vec3(f16())); + var res : vec3 = sinh(vec3(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/sinh/69cce2.wgsl b/test/tint/builtins/gen/literal/sinh/69cce2.wgsl index ad511365a4..2b22eed79a 100644 --- a/test/tint/builtins/gen/literal/sinh/69cce2.wgsl +++ b/test/tint/builtins/gen/literal/sinh/69cce2.wgsl @@ -25,7 +25,7 @@ enable f16; // fn sinh(f16) -> f16 fn sinh_69cce2() { - var res: f16 = sinh(f16()); + var res: f16 = sinh(1.h); } @vertex diff --git a/test/tint/builtins/gen/literal/sinh/69cce2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sinh/69cce2.wgsl.expected.dxc.hlsl index 277210691e..7b8e6ce91a 100644 --- a/test/tint/builtins/gen/literal/sinh/69cce2.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/sinh/69cce2.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sinh_69cce2() { - float16_t res = sinh(float16_t(0.0h)); + float16_t res = sinh(float16_t(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sinh/69cce2.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sinh/69cce2.wgsl.expected.glsl index 4b0c3e4301..a64c8dd4c8 100644 --- a/test/tint/builtins/gen/literal/sinh/69cce2.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/sinh/69cce2.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void sinh_69cce2() { - float16_t res = sinh(0.0hf); + float16_t res = sinh(1.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void sinh_69cce2() { - float16_t res = sinh(0.0hf); + float16_t res = sinh(1.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void sinh_69cce2() { - float16_t res = sinh(0.0hf); + float16_t res = sinh(1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/sinh/69cce2.wgsl.expected.msl b/test/tint/builtins/gen/literal/sinh/69cce2.wgsl.expected.msl index 5fada226f8..ae6c123624 100644 --- a/test/tint/builtins/gen/literal/sinh/69cce2.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/sinh/69cce2.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sinh_69cce2() { - half res = sinh(0.0h); + half res = sinh(1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sinh/69cce2.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sinh/69cce2.wgsl.expected.spvasm index 994f5e4ddb..af0bf6ffdf 100644 --- a/test/tint/builtins/gen/literal/sinh/69cce2.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/sinh/69cce2.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,36 +36,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %16 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %19 = OpTypeFunction %v4float + %19 = OpConstantNull %half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %sinh_69cce2 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_half Function %16 - %13 = OpExtInst %half %15 Sinh %16 + %res = OpVariable %_ptr_Function_half Function %19 + %13 = OpExtInst %half %15 Sinh %half_0x1p_0 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %sinh_69cce2 +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %sinh_69cce2 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %sinh_69cce2 + %29 = OpLabel + %30 = OpFunctionCall %void %sinh_69cce2 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %sinh_69cce2 + %32 = OpLabel + %33 = OpFunctionCall %void %sinh_69cce2 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/sinh/69cce2.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sinh/69cce2.wgsl.expected.wgsl index 8defcbd6d8..1f7cd9a858 100644 --- a/test/tint/builtins/gen/literal/sinh/69cce2.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/sinh/69cce2.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn sinh_69cce2() { - var res : f16 = sinh(f16()); + var res : f16 = sinh(1.0h); } @vertex diff --git a/test/tint/builtins/gen/literal/sinh/924f19.wgsl b/test/tint/builtins/gen/literal/sinh/924f19.wgsl index 09ce2eefea..7c5a2907c5 100644 --- a/test/tint/builtins/gen/literal/sinh/924f19.wgsl +++ b/test/tint/builtins/gen/literal/sinh/924f19.wgsl @@ -25,7 +25,7 @@ enable f16; // fn sinh(vec<2, f16>) -> vec<2, f16> fn sinh_924f19() { - var res: vec2 = sinh(vec2(f16())); + var res: vec2 = sinh(vec2(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/sinh/924f19.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sinh/924f19.wgsl.expected.dxc.hlsl index e79ca20fb6..cdcc434fc7 100644 --- a/test/tint/builtins/gen/literal/sinh/924f19.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/sinh/924f19.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sinh_924f19() { - vector res = sinh((float16_t(0.0h)).xx); + vector res = sinh((float16_t(1.0h)).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sinh/924f19.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sinh/924f19.wgsl.expected.glsl index 844c7ecb17..fd2eb90f54 100644 --- a/test/tint/builtins/gen/literal/sinh/924f19.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/sinh/924f19.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void sinh_924f19() { - f16vec2 res = sinh(f16vec2(0.0hf)); + f16vec2 res = sinh(f16vec2(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void sinh_924f19() { - f16vec2 res = sinh(f16vec2(0.0hf)); + f16vec2 res = sinh(f16vec2(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void sinh_924f19() { - f16vec2 res = sinh(f16vec2(0.0hf)); + f16vec2 res = sinh(f16vec2(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/sinh/924f19.wgsl.expected.msl b/test/tint/builtins/gen/literal/sinh/924f19.wgsl.expected.msl index 48d04aefd7..64fe921593 100644 --- a/test/tint/builtins/gen/literal/sinh/924f19.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/sinh/924f19.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sinh_924f19() { - half2 res = sinh(half2(0.0h)); + half2 res = sinh(half2(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sinh/924f19.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sinh/924f19.wgsl.expected.spvasm index 5f2db5eca2..59e22b3ac4 100644 --- a/test/tint/builtins/gen/literal/sinh/924f19.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/sinh/924f19.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %17 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v2half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %sinh_924f19 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2half Function %17 - %13 = OpExtInst %v2half %16 Sinh %17 + %res = OpVariable %_ptr_Function_v2half Function %21 + %13 = OpExtInst %v2half %16 Sinh %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %sinh_924f19 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %sinh_924f19 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %sinh_924f19 + %31 = OpLabel + %32 = OpFunctionCall %void %sinh_924f19 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %sinh_924f19 + %34 = OpLabel + %35 = OpFunctionCall %void %sinh_924f19 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/sinh/924f19.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sinh/924f19.wgsl.expected.wgsl index d384cab96e..7ebb07c008 100644 --- a/test/tint/builtins/gen/literal/sinh/924f19.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/sinh/924f19.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn sinh_924f19() { - var res : vec2 = sinh(vec2(f16())); + var res : vec2 = sinh(vec2(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl b/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl index 878d0b6855..c73702f8fa 100644 --- a/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl +++ b/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl @@ -25,7 +25,7 @@ enable f16; // fn sinh(vec<4, f16>) -> vec<4, f16> fn sinh_ba7e25() { - var res: vec4 = sinh(vec4(f16())); + var res: vec4 = sinh(vec4(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl.expected.dxc.hlsl index 87cbff08d4..a5b5e1cb6b 100644 --- a/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sinh_ba7e25() { - vector res = sinh((float16_t(0.0h)).xxxx); + vector res = sinh((float16_t(1.0h)).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl.expected.glsl index 61015c09a8..f404443b3a 100644 --- a/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void sinh_ba7e25() { - f16vec4 res = sinh(f16vec4(0.0hf)); + f16vec4 res = sinh(f16vec4(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void sinh_ba7e25() { - f16vec4 res = sinh(f16vec4(0.0hf)); + f16vec4 res = sinh(f16vec4(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void sinh_ba7e25() { - f16vec4 res = sinh(f16vec4(0.0hf)); + f16vec4 res = sinh(f16vec4(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl.expected.msl b/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl.expected.msl index 9aef6b3f81..bd5ec4c811 100644 --- a/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sinh_ba7e25() { - half4 res = sinh(half4(0.0h)); + half4 res = sinh(half4(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl.expected.spvasm index 3e9f2c01a9..51403b1de6 100644 --- a/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %17 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v4half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %sinh_ba7e25 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4half Function %17 - %13 = OpExtInst %v4half %16 Sinh %17 + %res = OpVariable %_ptr_Function_v4half Function %21 + %13 = OpExtInst %v4half %16 Sinh %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %sinh_ba7e25 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %sinh_ba7e25 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %sinh_ba7e25 + %31 = OpLabel + %32 = OpFunctionCall %void %sinh_ba7e25 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %sinh_ba7e25 + %34 = OpLabel + %35 = OpFunctionCall %void %sinh_ba7e25 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl.expected.wgsl index 9587e3ea32..d05628a66d 100644 --- a/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn sinh_ba7e25() { - var res : vec4 = sinh(vec4(f16())); + var res : vec4 = sinh(vec4(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl b/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl index a6bdd56d88..df27cfac1f 100644 --- a/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl +++ b/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl @@ -25,7 +25,7 @@ enable f16; // fn smoothstep(vec<2, f16>, vec<2, f16>, vec<2, f16>) -> vec<2, f16> fn smoothstep_12c031() { - var res: vec2 = smoothstep(vec2(f16()), vec2(f16()), vec2(f16())); + var res: vec2 = smoothstep(vec2(1.h), vec2(1.h), vec2(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl.expected.dxc.hlsl index 836c5b9cfd..3a449d7d5b 100644 --- a/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void smoothstep_12c031() { - vector res = smoothstep((float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx); + vector res = smoothstep((float16_t(1.0h)).xx, (float16_t(1.0h)).xx, (float16_t(1.0h)).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl.expected.glsl b/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl.expected.glsl index 64a110fb30..2e1fb6f12d 100644 --- a/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void smoothstep_12c031() { - f16vec2 res = smoothstep(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf)); + f16vec2 res = smoothstep(f16vec2(1.0hf), f16vec2(1.0hf), f16vec2(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void smoothstep_12c031() { - f16vec2 res = smoothstep(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf)); + f16vec2 res = smoothstep(f16vec2(1.0hf), f16vec2(1.0hf), f16vec2(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void smoothstep_12c031() { - f16vec2 res = smoothstep(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf)); + f16vec2 res = smoothstep(f16vec2(1.0hf), f16vec2(1.0hf), f16vec2(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl.expected.msl b/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl.expected.msl index 1f30e7c3fd..b11f421dfe 100644 --- a/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void smoothstep_12c031() { - half2 res = smoothstep(half2(0.0h), half2(0.0h), half2(0.0h)); + half2 res = smoothstep(half2(1.0h), half2(1.0h), half2(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl.expected.spvasm index aaaee6ec8d..1df4bfc323 100644 --- a/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %17 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v2half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %smoothstep_12c031 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2half Function %17 - %13 = OpExtInst %v2half %16 SmoothStep %17 %17 %17 + %res = OpVariable %_ptr_Function_v2half Function %21 + %13 = OpExtInst %v2half %16 SmoothStep %18 %18 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %smoothstep_12c031 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %smoothstep_12c031 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %smoothstep_12c031 + %31 = OpLabel + %32 = OpFunctionCall %void %smoothstep_12c031 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %smoothstep_12c031 + %34 = OpLabel + %35 = OpFunctionCall %void %smoothstep_12c031 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl.expected.wgsl index 62ad2a7faa..e48b625db4 100644 --- a/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn smoothstep_12c031() { - var res : vec2 = smoothstep(vec2(f16()), vec2(f16()), vec2(f16())); + var res : vec2 = smoothstep(vec2(1.0h), vec2(1.0h), vec2(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl b/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl index d9e1447032..2fe58c0231 100644 --- a/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl +++ b/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl @@ -25,7 +25,7 @@ enable f16; // fn smoothstep(f16, f16, f16) -> f16 fn smoothstep_586e12() { - var res: f16 = smoothstep(f16(), f16(), f16()); + var res: f16 = smoothstep(1.h, 1.h, 1.h); } @vertex diff --git a/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl.expected.dxc.hlsl index 0a0bb8a122..869b831328 100644 --- a/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void smoothstep_586e12() { - float16_t res = smoothstep(float16_t(0.0h), float16_t(0.0h), float16_t(0.0h)); + float16_t res = smoothstep(float16_t(1.0h), float16_t(1.0h), float16_t(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl.expected.glsl b/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl.expected.glsl index 26afc28c2e..33de99360b 100644 --- a/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void smoothstep_586e12() { - float16_t res = smoothstep(0.0hf, 0.0hf, 0.0hf); + float16_t res = smoothstep(1.0hf, 1.0hf, 1.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void smoothstep_586e12() { - float16_t res = smoothstep(0.0hf, 0.0hf, 0.0hf); + float16_t res = smoothstep(1.0hf, 1.0hf, 1.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void smoothstep_586e12() { - float16_t res = smoothstep(0.0hf, 0.0hf, 0.0hf); + float16_t res = smoothstep(1.0hf, 1.0hf, 1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl.expected.msl b/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl.expected.msl index a6a9fb3edb..8ab6ed1737 100644 --- a/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void smoothstep_586e12() { - half res = smoothstep(0.0h, 0.0h, 0.0h); + half res = smoothstep(1.0h, 1.0h, 1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl.expected.spvasm index 38ef86f565..424b166ba8 100644 --- a/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,36 +36,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %16 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %19 = OpTypeFunction %v4float + %19 = OpConstantNull %half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %smoothstep_586e12 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_half Function %16 - %13 = OpExtInst %half %15 SmoothStep %16 %16 %16 + %res = OpVariable %_ptr_Function_half Function %19 + %13 = OpExtInst %half %15 SmoothStep %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %smoothstep_586e12 +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %smoothstep_586e12 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %smoothstep_586e12 + %29 = OpLabel + %30 = OpFunctionCall %void %smoothstep_586e12 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %smoothstep_586e12 + %32 = OpLabel + %33 = OpFunctionCall %void %smoothstep_586e12 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl.expected.wgsl index e6600ae495..bfd4e63d10 100644 --- a/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn smoothstep_586e12() { - var res : f16 = smoothstep(f16(), f16(), f16()); + var res : f16 = smoothstep(1.0h, 1.0h, 1.0h); } @vertex diff --git a/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl b/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl index 4fdbd51a17..b21a6ba5e0 100644 --- a/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl +++ b/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl @@ -25,7 +25,7 @@ enable f16; // fn smoothstep(vec<3, f16>, vec<3, f16>, vec<3, f16>) -> vec<3, f16> fn smoothstep_6e7a74() { - var res: vec3 = smoothstep(vec3(f16()), vec3(f16()), vec3(f16())); + var res: vec3 = smoothstep(vec3(1.h), vec3(1.h), vec3(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl.expected.dxc.hlsl index f1869c2f0a..4a5261e29a 100644 --- a/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void smoothstep_6e7a74() { - vector res = smoothstep((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx); + vector res = smoothstep((float16_t(1.0h)).xxx, (float16_t(1.0h)).xxx, (float16_t(1.0h)).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl.expected.glsl b/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl.expected.glsl index 12129b7acb..39c0e20e3b 100644 --- a/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void smoothstep_6e7a74() { - f16vec3 res = smoothstep(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)); + f16vec3 res = smoothstep(f16vec3(1.0hf), f16vec3(1.0hf), f16vec3(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void smoothstep_6e7a74() { - f16vec3 res = smoothstep(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)); + f16vec3 res = smoothstep(f16vec3(1.0hf), f16vec3(1.0hf), f16vec3(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void smoothstep_6e7a74() { - f16vec3 res = smoothstep(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)); + f16vec3 res = smoothstep(f16vec3(1.0hf), f16vec3(1.0hf), f16vec3(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl.expected.msl b/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl.expected.msl index d90125c05d..e4b202614a 100644 --- a/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void smoothstep_6e7a74() { - half3 res = smoothstep(half3(0.0h), half3(0.0h), half3(0.0h)); + half3 res = smoothstep(half3(1.0h), half3(1.0h), half3(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl.expected.spvasm index 21d9c28463..d381603f51 100644 --- a/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %17 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v3half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %smoothstep_6e7a74 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3half Function %17 - %13 = OpExtInst %v3half %16 SmoothStep %17 %17 %17 + %res = OpVariable %_ptr_Function_v3half Function %21 + %13 = OpExtInst %v3half %16 SmoothStep %18 %18 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %smoothstep_6e7a74 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %smoothstep_6e7a74 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %smoothstep_6e7a74 + %31 = OpLabel + %32 = OpFunctionCall %void %smoothstep_6e7a74 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %smoothstep_6e7a74 + %34 = OpLabel + %35 = OpFunctionCall %void %smoothstep_6e7a74 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl.expected.wgsl index 1a7ea0defd..807bdab7c2 100644 --- a/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn smoothstep_6e7a74() { - var res : vec3 = smoothstep(vec3(f16()), vec3(f16()), vec3(f16())); + var res : vec3 = smoothstep(vec3(1.0h), vec3(1.0h), vec3(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl b/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl index e1de207f74..523df81b74 100644 --- a/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl +++ b/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl @@ -25,7 +25,7 @@ enable f16; // fn smoothstep(vec<4, f16>, vec<4, f16>, vec<4, f16>) -> vec<4, f16> fn smoothstep_c43ebd() { - var res: vec4 = smoothstep(vec4(f16()), vec4(f16()), vec4(f16())); + var res: vec4 = smoothstep(vec4(1.h), vec4(1.h), vec4(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl.expected.dxc.hlsl index e25a8cd277..7c6c44e2be 100644 --- a/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void smoothstep_c43ebd() { - vector res = smoothstep((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx); + vector res = smoothstep((float16_t(1.0h)).xxxx, (float16_t(1.0h)).xxxx, (float16_t(1.0h)).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl.expected.glsl b/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl.expected.glsl index b67a5c869d..996656a130 100644 --- a/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void smoothstep_c43ebd() { - f16vec4 res = smoothstep(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf)); + f16vec4 res = smoothstep(f16vec4(1.0hf), f16vec4(1.0hf), f16vec4(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void smoothstep_c43ebd() { - f16vec4 res = smoothstep(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf)); + f16vec4 res = smoothstep(f16vec4(1.0hf), f16vec4(1.0hf), f16vec4(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void smoothstep_c43ebd() { - f16vec4 res = smoothstep(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf)); + f16vec4 res = smoothstep(f16vec4(1.0hf), f16vec4(1.0hf), f16vec4(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl.expected.msl b/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl.expected.msl index c7743d734e..3503d953e6 100644 --- a/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void smoothstep_c43ebd() { - half4 res = smoothstep(half4(0.0h), half4(0.0h), half4(0.0h)); + half4 res = smoothstep(half4(1.0h), half4(1.0h), half4(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl.expected.spvasm index 9230951f9e..a81f848156 100644 --- a/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %17 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v4half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %smoothstep_c43ebd = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4half Function %17 - %13 = OpExtInst %v4half %16 SmoothStep %17 %17 %17 + %res = OpVariable %_ptr_Function_v4half Function %21 + %13 = OpExtInst %v4half %16 SmoothStep %18 %18 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %smoothstep_c43ebd +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %smoothstep_c43ebd OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %smoothstep_c43ebd + %31 = OpLabel + %32 = OpFunctionCall %void %smoothstep_c43ebd OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %smoothstep_c43ebd + %34 = OpLabel + %35 = OpFunctionCall %void %smoothstep_c43ebd OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl.expected.wgsl index 1b6b725f47..aad2d012d8 100644 --- a/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn smoothstep_c43ebd() { - var res : vec4 = smoothstep(vec4(f16()), vec4(f16()), vec4(f16())); + var res : vec4 = smoothstep(vec4(1.0h), vec4(1.0h), vec4(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl b/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl index 019539d0a3..7a9166a1df 100644 --- a/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl +++ b/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl @@ -25,7 +25,7 @@ enable f16; // fn sqrt(vec<4, f16>) -> vec<4, f16> fn sqrt_803d1c() { - var res: vec4 = sqrt(vec4(f16())); + var res: vec4 = sqrt(vec4(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl.expected.dxc.hlsl index 0b44b8957d..1f072d6cbf 100644 --- a/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sqrt_803d1c() { - vector res = sqrt((float16_t(0.0h)).xxxx); + vector res = sqrt((float16_t(1.0h)).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl.expected.glsl index 2b0c4f5f72..8282522402 100644 --- a/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void sqrt_803d1c() { - f16vec4 res = sqrt(f16vec4(0.0hf)); + f16vec4 res = sqrt(f16vec4(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void sqrt_803d1c() { - f16vec4 res = sqrt(f16vec4(0.0hf)); + f16vec4 res = sqrt(f16vec4(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void sqrt_803d1c() { - f16vec4 res = sqrt(f16vec4(0.0hf)); + f16vec4 res = sqrt(f16vec4(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl.expected.msl b/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl.expected.msl index c85c1aed5b..f5ed424812 100644 --- a/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sqrt_803d1c() { - half4 res = sqrt(half4(0.0h)); + half4 res = sqrt(half4(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl.expected.spvasm index 3204761691..eb9d7284a2 100644 --- a/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %17 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v4half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %sqrt_803d1c = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4half Function %17 - %13 = OpExtInst %v4half %16 Sqrt %17 + %res = OpVariable %_ptr_Function_v4half Function %21 + %13 = OpExtInst %v4half %16 Sqrt %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %sqrt_803d1c +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %sqrt_803d1c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %sqrt_803d1c + %31 = OpLabel + %32 = OpFunctionCall %void %sqrt_803d1c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %sqrt_803d1c + %34 = OpLabel + %35 = OpFunctionCall %void %sqrt_803d1c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl.expected.wgsl index 3361e6057e..52cba12de7 100644 --- a/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn sqrt_803d1c() { - var res : vec4 = sqrt(vec4(f16())); + var res : vec4 = sqrt(vec4(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl b/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl index 7bdb02fc19..7145d1a5b1 100644 --- a/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl +++ b/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl @@ -25,7 +25,7 @@ enable f16; // fn sqrt(vec<3, f16>) -> vec<3, f16> fn sqrt_895a0c() { - var res: vec3 = sqrt(vec3(f16())); + var res: vec3 = sqrt(vec3(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl.expected.dxc.hlsl index 3ce6e95780..b3f2c264ba 100644 --- a/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sqrt_895a0c() { - vector res = sqrt((float16_t(0.0h)).xxx); + vector res = sqrt((float16_t(1.0h)).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl.expected.glsl index d0cedab89a..4a89c94b51 100644 --- a/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void sqrt_895a0c() { - f16vec3 res = sqrt(f16vec3(0.0hf)); + f16vec3 res = sqrt(f16vec3(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void sqrt_895a0c() { - f16vec3 res = sqrt(f16vec3(0.0hf)); + f16vec3 res = sqrt(f16vec3(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void sqrt_895a0c() { - f16vec3 res = sqrt(f16vec3(0.0hf)); + f16vec3 res = sqrt(f16vec3(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl.expected.msl b/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl.expected.msl index 72be3e1f96..e51d2556fd 100644 --- a/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sqrt_895a0c() { - half3 res = sqrt(half3(0.0h)); + half3 res = sqrt(half3(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl.expected.spvasm index bcc0768f43..377745cacf 100644 --- a/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %17 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v3half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %sqrt_895a0c = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3half Function %17 - %13 = OpExtInst %v3half %16 Sqrt %17 + %res = OpVariable %_ptr_Function_v3half Function %21 + %13 = OpExtInst %v3half %16 Sqrt %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %sqrt_895a0c +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %sqrt_895a0c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %sqrt_895a0c + %31 = OpLabel + %32 = OpFunctionCall %void %sqrt_895a0c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %sqrt_895a0c + %34 = OpLabel + %35 = OpFunctionCall %void %sqrt_895a0c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl.expected.wgsl index 44c3686023..b853037eb8 100644 --- a/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn sqrt_895a0c() { - var res : vec3 = sqrt(vec3(f16())); + var res : vec3 = sqrt(vec3(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl b/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl index 4158a6f7f8..3f47df0d44 100644 --- a/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl +++ b/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl @@ -25,7 +25,7 @@ enable f16; // fn sqrt(vec<2, f16>) -> vec<2, f16> fn sqrt_d9ab4d() { - var res: vec2 = sqrt(vec2(f16())); + var res: vec2 = sqrt(vec2(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl.expected.dxc.hlsl index dc9426f224..a31a43c832 100644 --- a/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sqrt_d9ab4d() { - vector res = sqrt((float16_t(0.0h)).xx); + vector res = sqrt((float16_t(1.0h)).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl.expected.glsl index 8a12e8fd13..d31df4cec3 100644 --- a/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void sqrt_d9ab4d() { - f16vec2 res = sqrt(f16vec2(0.0hf)); + f16vec2 res = sqrt(f16vec2(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void sqrt_d9ab4d() { - f16vec2 res = sqrt(f16vec2(0.0hf)); + f16vec2 res = sqrt(f16vec2(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void sqrt_d9ab4d() { - f16vec2 res = sqrt(f16vec2(0.0hf)); + f16vec2 res = sqrt(f16vec2(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl.expected.msl b/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl.expected.msl index d64d5a1e45..acc30f28c4 100644 --- a/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sqrt_d9ab4d() { - half2 res = sqrt(half2(0.0h)); + half2 res = sqrt(half2(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl.expected.spvasm index d18a25136a..f186c135ea 100644 --- a/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %17 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v2half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %sqrt_d9ab4d = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2half Function %17 - %13 = OpExtInst %v2half %16 Sqrt %17 + %res = OpVariable %_ptr_Function_v2half Function %21 + %13 = OpExtInst %v2half %16 Sqrt %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %sqrt_d9ab4d +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %sqrt_d9ab4d OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %sqrt_d9ab4d + %31 = OpLabel + %32 = OpFunctionCall %void %sqrt_d9ab4d OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %sqrt_d9ab4d + %34 = OpLabel + %35 = OpFunctionCall %void %sqrt_d9ab4d OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl.expected.wgsl index ccda9f1474..6b1d995328 100644 --- a/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn sqrt_d9ab4d() { - var res : vec2 = sqrt(vec2(f16())); + var res : vec2 = sqrt(vec2(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl b/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl index 4dc19b0efa..ab7ca7eb09 100644 --- a/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl +++ b/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl @@ -25,7 +25,7 @@ enable f16; // fn sqrt(f16) -> f16 fn sqrt_ec33e9() { - var res: f16 = sqrt(f16()); + var res: f16 = sqrt(1.h); } @vertex diff --git a/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl.expected.dxc.hlsl index c76014e52a..bc3797b100 100644 --- a/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sqrt_ec33e9() { - float16_t res = sqrt(float16_t(0.0h)); + float16_t res = sqrt(float16_t(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl.expected.glsl index 89b0d09846..d08c0af540 100644 --- a/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void sqrt_ec33e9() { - float16_t res = sqrt(0.0hf); + float16_t res = sqrt(1.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void sqrt_ec33e9() { - float16_t res = sqrt(0.0hf); + float16_t res = sqrt(1.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void sqrt_ec33e9() { - float16_t res = sqrt(0.0hf); + float16_t res = sqrt(1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl.expected.msl b/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl.expected.msl index bfd3d49f8c..cdf9675bc6 100644 --- a/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sqrt_ec33e9() { - half res = sqrt(0.0h); + half res = sqrt(1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl.expected.spvasm index a39a404a73..06634a29cf 100644 --- a/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,36 +36,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %16 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %19 = OpTypeFunction %v4float + %19 = OpConstantNull %half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %sqrt_ec33e9 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_half Function %16 - %13 = OpExtInst %half %15 Sqrt %16 + %res = OpVariable %_ptr_Function_half Function %19 + %13 = OpExtInst %half %15 Sqrt %half_0x1p_0 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %sqrt_ec33e9 +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %sqrt_ec33e9 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %sqrt_ec33e9 + %29 = OpLabel + %30 = OpFunctionCall %void %sqrt_ec33e9 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %sqrt_ec33e9 + %32 = OpLabel + %33 = OpFunctionCall %void %sqrt_ec33e9 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl.expected.wgsl index 5145314430..50880e5a51 100644 --- a/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn sqrt_ec33e9() { - var res : f16 = sqrt(f16()); + var res : f16 = sqrt(1.0h); } @vertex diff --git a/test/tint/builtins/gen/literal/step/07cb06.wgsl b/test/tint/builtins/gen/literal/step/07cb06.wgsl index 2baa12b0e7..47da6bfd5c 100644 --- a/test/tint/builtins/gen/literal/step/07cb06.wgsl +++ b/test/tint/builtins/gen/literal/step/07cb06.wgsl @@ -25,7 +25,7 @@ enable f16; // fn step(vec<2, f16>, vec<2, f16>) -> vec<2, f16> fn step_07cb06() { - var res: vec2 = step(vec2(f16()), vec2(f16())); + var res: vec2 = step(vec2(1.h), vec2(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/step/07cb06.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/step/07cb06.wgsl.expected.wgsl index 4ebf853307..31dbd2d03e 100644 --- a/test/tint/builtins/gen/literal/step/07cb06.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/step/07cb06.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn step_07cb06() { - var res : vec2 = step(vec2(f16()), vec2(f16())); + var res : vec2 = step(vec2(1.0h), vec2(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/step/630d07.wgsl b/test/tint/builtins/gen/literal/step/630d07.wgsl index b789a99094..b7fe024e00 100644 --- a/test/tint/builtins/gen/literal/step/630d07.wgsl +++ b/test/tint/builtins/gen/literal/step/630d07.wgsl @@ -25,7 +25,7 @@ enable f16; // fn step(f16, f16) -> f16 fn step_630d07() { - var res: f16 = step(f16(), f16()); + var res: f16 = step(1.h, 1.h); } @vertex diff --git a/test/tint/builtins/gen/literal/step/630d07.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/step/630d07.wgsl.expected.wgsl index 6a0527d1a9..666cdf01a4 100644 --- a/test/tint/builtins/gen/literal/step/630d07.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/step/630d07.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn step_630d07() { - var res : f16 = step(f16(), f16()); + var res : f16 = step(1.0h, 1.0h); } @vertex diff --git a/test/tint/builtins/gen/literal/step/baa320.wgsl b/test/tint/builtins/gen/literal/step/baa320.wgsl index b2e66b0a5b..f30ef358e1 100644 --- a/test/tint/builtins/gen/literal/step/baa320.wgsl +++ b/test/tint/builtins/gen/literal/step/baa320.wgsl @@ -25,7 +25,7 @@ enable f16; // fn step(vec<4, f16>, vec<4, f16>) -> vec<4, f16> fn step_baa320() { - var res: vec4 = step(vec4(f16()), vec4(f16())); + var res: vec4 = step(vec4(1.h), vec4(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/step/baa320.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/step/baa320.wgsl.expected.wgsl index c500a65836..5199ffcf1b 100644 --- a/test/tint/builtins/gen/literal/step/baa320.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/step/baa320.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn step_baa320() { - var res : vec4 = step(vec4(f16()), vec4(f16())); + var res : vec4 = step(vec4(1.0h), vec4(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/step/cc6b61.wgsl b/test/tint/builtins/gen/literal/step/cc6b61.wgsl index 77da1c965b..d4064c5c7c 100644 --- a/test/tint/builtins/gen/literal/step/cc6b61.wgsl +++ b/test/tint/builtins/gen/literal/step/cc6b61.wgsl @@ -25,7 +25,7 @@ enable f16; // fn step(vec<3, f16>, vec<3, f16>) -> vec<3, f16> fn step_cc6b61() { - var res: vec3 = step(vec3(f16()), vec3(f16())); + var res: vec3 = step(vec3(1.h), vec3(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/step/cc6b61.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/step/cc6b61.wgsl.expected.wgsl index d1d9624c44..a68542ac69 100644 --- a/test/tint/builtins/gen/literal/step/cc6b61.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/step/cc6b61.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn step_cc6b61() { - var res : vec3 = step(vec3(f16()), vec3(f16())); + var res : vec3 = step(vec3(1.0h), vec3(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/tan/539e54.wgsl b/test/tint/builtins/gen/literal/tan/539e54.wgsl index 912e7b9e94..ce8f09b0e1 100644 --- a/test/tint/builtins/gen/literal/tan/539e54.wgsl +++ b/test/tint/builtins/gen/literal/tan/539e54.wgsl @@ -25,7 +25,7 @@ enable f16; // fn tan(vec<4, f16>) -> vec<4, f16> fn tan_539e54() { - var res: vec4 = tan(vec4(f16())); + var res: vec4 = tan(vec4(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/tan/539e54.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/tan/539e54.wgsl.expected.dxc.hlsl index aa87efc428..4de5feb396 100644 --- a/test/tint/builtins/gen/literal/tan/539e54.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/tan/539e54.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void tan_539e54() { - vector res = tan((float16_t(0.0h)).xxxx); + vector res = tan((float16_t(1.0h)).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/tan/539e54.wgsl.expected.glsl b/test/tint/builtins/gen/literal/tan/539e54.wgsl.expected.glsl index 8c9412796b..2db4796c5e 100644 --- a/test/tint/builtins/gen/literal/tan/539e54.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/tan/539e54.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void tan_539e54() { - f16vec4 res = tan(f16vec4(0.0hf)); + f16vec4 res = tan(f16vec4(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void tan_539e54() { - f16vec4 res = tan(f16vec4(0.0hf)); + f16vec4 res = tan(f16vec4(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void tan_539e54() { - f16vec4 res = tan(f16vec4(0.0hf)); + f16vec4 res = tan(f16vec4(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/tan/539e54.wgsl.expected.msl b/test/tint/builtins/gen/literal/tan/539e54.wgsl.expected.msl index 268bfda431..eabcb69bd5 100644 --- a/test/tint/builtins/gen/literal/tan/539e54.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/tan/539e54.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void tan_539e54() { - half4 res = tan(half4(0.0h)); + half4 res = tan(half4(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/tan/539e54.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/tan/539e54.wgsl.expected.spvasm index 12de658e73..5c8e22859b 100644 --- a/test/tint/builtins/gen/literal/tan/539e54.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/tan/539e54.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %17 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v4half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tan_539e54 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4half Function %17 - %13 = OpExtInst %v4half %16 Tan %17 + %res = OpVariable %_ptr_Function_v4half Function %21 + %13 = OpExtInst %v4half %16 Tan %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %tan_539e54 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %tan_539e54 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %tan_539e54 + %31 = OpLabel + %32 = OpFunctionCall %void %tan_539e54 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %tan_539e54 + %34 = OpLabel + %35 = OpFunctionCall %void %tan_539e54 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/tan/539e54.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/tan/539e54.wgsl.expected.wgsl index 91e3dfd85e..7554cbe7f9 100644 --- a/test/tint/builtins/gen/literal/tan/539e54.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/tan/539e54.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn tan_539e54() { - var res : vec4 = tan(vec4(f16())); + var res : vec4 = tan(vec4(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl b/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl index 1ff61569cc..a222cb8529 100644 --- a/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl +++ b/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl @@ -25,7 +25,7 @@ enable f16; // fn tan(vec<2, f16>) -> vec<2, f16> fn tan_9f7c9c() { - var res: vec2 = tan(vec2(f16())); + var res: vec2 = tan(vec2(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl.expected.dxc.hlsl index bac155593e..563a5cc9ce 100644 --- a/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void tan_9f7c9c() { - vector res = tan((float16_t(0.0h)).xx); + vector res = tan((float16_t(1.0h)).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl.expected.glsl index 2b07fc4c5a..765a8a1fe2 100644 --- a/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void tan_9f7c9c() { - f16vec2 res = tan(f16vec2(0.0hf)); + f16vec2 res = tan(f16vec2(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void tan_9f7c9c() { - f16vec2 res = tan(f16vec2(0.0hf)); + f16vec2 res = tan(f16vec2(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void tan_9f7c9c() { - f16vec2 res = tan(f16vec2(0.0hf)); + f16vec2 res = tan(f16vec2(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl.expected.msl b/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl.expected.msl index ff408adf59..7780f429f2 100644 --- a/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void tan_9f7c9c() { - half2 res = tan(half2(0.0h)); + half2 res = tan(half2(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl.expected.spvasm index 658d6a6ba2..ef0a883626 100644 --- a/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %17 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v2half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tan_9f7c9c = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2half Function %17 - %13 = OpExtInst %v2half %16 Tan %17 + %res = OpVariable %_ptr_Function_v2half Function %21 + %13 = OpExtInst %v2half %16 Tan %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %tan_9f7c9c +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %tan_9f7c9c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %tan_9f7c9c + %31 = OpLabel + %32 = OpFunctionCall %void %tan_9f7c9c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %tan_9f7c9c + %34 = OpLabel + %35 = OpFunctionCall %void %tan_9f7c9c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl.expected.wgsl index 1287e05b87..f06c471033 100644 --- a/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn tan_9f7c9c() { - var res : vec2 = tan(vec2(f16())); + var res : vec2 = tan(vec2(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/tan/d4d491.wgsl b/test/tint/builtins/gen/literal/tan/d4d491.wgsl index c76db2db78..9b0cd1db2e 100644 --- a/test/tint/builtins/gen/literal/tan/d4d491.wgsl +++ b/test/tint/builtins/gen/literal/tan/d4d491.wgsl @@ -25,7 +25,7 @@ enable f16; // fn tan(f16) -> f16 fn tan_d4d491() { - var res: f16 = tan(f16()); + var res: f16 = tan(1.h); } @vertex diff --git a/test/tint/builtins/gen/literal/tan/d4d491.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/tan/d4d491.wgsl.expected.dxc.hlsl index a4be323480..511c901c98 100644 --- a/test/tint/builtins/gen/literal/tan/d4d491.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/tan/d4d491.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void tan_d4d491() { - float16_t res = tan(float16_t(0.0h)); + float16_t res = tan(float16_t(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/tan/d4d491.wgsl.expected.glsl b/test/tint/builtins/gen/literal/tan/d4d491.wgsl.expected.glsl index e6a73c88b8..05e0766271 100644 --- a/test/tint/builtins/gen/literal/tan/d4d491.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/tan/d4d491.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void tan_d4d491() { - float16_t res = tan(0.0hf); + float16_t res = tan(1.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void tan_d4d491() { - float16_t res = tan(0.0hf); + float16_t res = tan(1.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void tan_d4d491() { - float16_t res = tan(0.0hf); + float16_t res = tan(1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/tan/d4d491.wgsl.expected.msl b/test/tint/builtins/gen/literal/tan/d4d491.wgsl.expected.msl index 3dc2e149eb..fb3879e21e 100644 --- a/test/tint/builtins/gen/literal/tan/d4d491.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/tan/d4d491.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void tan_d4d491() { - half res = tan(0.0h); + half res = tan(1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/tan/d4d491.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/tan/d4d491.wgsl.expected.spvasm index 661dd9a146..af79640575 100644 --- a/test/tint/builtins/gen/literal/tan/d4d491.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/tan/d4d491.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,36 +36,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %16 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %19 = OpTypeFunction %v4float + %19 = OpConstantNull %half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tan_d4d491 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_half Function %16 - %13 = OpExtInst %half %15 Tan %16 + %res = OpVariable %_ptr_Function_half Function %19 + %13 = OpExtInst %half %15 Tan %half_0x1p_0 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %tan_d4d491 +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %tan_d4d491 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %tan_d4d491 + %29 = OpLabel + %30 = OpFunctionCall %void %tan_d4d491 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %tan_d4d491 + %32 = OpLabel + %33 = OpFunctionCall %void %tan_d4d491 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/tan/d4d491.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/tan/d4d491.wgsl.expected.wgsl index da8f919202..2c01808da3 100644 --- a/test/tint/builtins/gen/literal/tan/d4d491.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/tan/d4d491.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn tan_d4d491() { - var res : f16 = tan(f16()); + var res : f16 = tan(1.0h); } @vertex diff --git a/test/tint/builtins/gen/literal/tan/db0456.wgsl b/test/tint/builtins/gen/literal/tan/db0456.wgsl index 9d70504d61..2afdfa6b24 100644 --- a/test/tint/builtins/gen/literal/tan/db0456.wgsl +++ b/test/tint/builtins/gen/literal/tan/db0456.wgsl @@ -25,7 +25,7 @@ enable f16; // fn tan(vec<3, f16>) -> vec<3, f16> fn tan_db0456() { - var res: vec3 = tan(vec3(f16())); + var res: vec3 = tan(vec3(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/tan/db0456.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/tan/db0456.wgsl.expected.dxc.hlsl index 2253d7178d..5899c367b5 100644 --- a/test/tint/builtins/gen/literal/tan/db0456.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/tan/db0456.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void tan_db0456() { - vector res = tan((float16_t(0.0h)).xxx); + vector res = tan((float16_t(1.0h)).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/tan/db0456.wgsl.expected.glsl b/test/tint/builtins/gen/literal/tan/db0456.wgsl.expected.glsl index 4812d1bcea..fe3badef59 100644 --- a/test/tint/builtins/gen/literal/tan/db0456.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/tan/db0456.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void tan_db0456() { - f16vec3 res = tan(f16vec3(0.0hf)); + f16vec3 res = tan(f16vec3(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void tan_db0456() { - f16vec3 res = tan(f16vec3(0.0hf)); + f16vec3 res = tan(f16vec3(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void tan_db0456() { - f16vec3 res = tan(f16vec3(0.0hf)); + f16vec3 res = tan(f16vec3(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/tan/db0456.wgsl.expected.msl b/test/tint/builtins/gen/literal/tan/db0456.wgsl.expected.msl index 3d87665b6e..7adab5625d 100644 --- a/test/tint/builtins/gen/literal/tan/db0456.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/tan/db0456.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void tan_db0456() { - half3 res = tan(half3(0.0h)); + half3 res = tan(half3(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/tan/db0456.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/tan/db0456.wgsl.expected.spvasm index 2f1c402d56..a66872b94f 100644 --- a/test/tint/builtins/gen/literal/tan/db0456.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/tan/db0456.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %17 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v3half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tan_db0456 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3half Function %17 - %13 = OpExtInst %v3half %16 Tan %17 + %res = OpVariable %_ptr_Function_v3half Function %21 + %13 = OpExtInst %v3half %16 Tan %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %tan_db0456 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %tan_db0456 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %tan_db0456 + %31 = OpLabel + %32 = OpFunctionCall %void %tan_db0456 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %tan_db0456 + %34 = OpLabel + %35 = OpFunctionCall %void %tan_db0456 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/tan/db0456.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/tan/db0456.wgsl.expected.wgsl index dc68ad2922..13a6134da0 100644 --- a/test/tint/builtins/gen/literal/tan/db0456.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/tan/db0456.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn tan_db0456() { - var res : vec3 = tan(vec3(f16())); + var res : vec3 = tan(vec3(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl b/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl index a02fef4c6c..8a52a4dc91 100644 --- a/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl +++ b/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl @@ -25,7 +25,7 @@ enable f16; // fn tanh(vec<3, f16>) -> vec<3, f16> fn tanh_06a4fe() { - var res: vec3 = tanh(vec3(f16())); + var res: vec3 = tanh(vec3(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl.expected.dxc.hlsl index fb193b2da9..7bd1656acf 100644 --- a/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void tanh_06a4fe() { - vector res = tanh((float16_t(0.0h)).xxx); + vector res = tanh((float16_t(1.0h)).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl.expected.glsl b/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl.expected.glsl index 0840a2cd06..3b1ec6b728 100644 --- a/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void tanh_06a4fe() { - f16vec3 res = tanh(f16vec3(0.0hf)); + f16vec3 res = tanh(f16vec3(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void tanh_06a4fe() { - f16vec3 res = tanh(f16vec3(0.0hf)); + f16vec3 res = tanh(f16vec3(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void tanh_06a4fe() { - f16vec3 res = tanh(f16vec3(0.0hf)); + f16vec3 res = tanh(f16vec3(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl.expected.msl b/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl.expected.msl index ae1bf02628..7a53efae11 100644 --- a/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void tanh_06a4fe() { - half3 res = tanh(half3(0.0h)); + half3 res = tanh(half3(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl.expected.spvasm index b06c654726..0c187bfd4b 100644 --- a/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %17 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v3half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tanh_06a4fe = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3half Function %17 - %13 = OpExtInst %v3half %16 Tanh %17 + %res = OpVariable %_ptr_Function_v3half Function %21 + %13 = OpExtInst %v3half %16 Tanh %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %tanh_06a4fe +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %tanh_06a4fe OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %tanh_06a4fe + %31 = OpLabel + %32 = OpFunctionCall %void %tanh_06a4fe OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %tanh_06a4fe + %34 = OpLabel + %35 = OpFunctionCall %void %tanh_06a4fe OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl.expected.wgsl index fde59a5219..ecbc835c76 100644 --- a/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn tanh_06a4fe() { - var res : vec3 = tanh(vec3(f16())); + var res : vec3 = tanh(vec3(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/tanh/5b19af.wgsl b/test/tint/builtins/gen/literal/tanh/5b19af.wgsl index b83daaed7a..59d2edc441 100644 --- a/test/tint/builtins/gen/literal/tanh/5b19af.wgsl +++ b/test/tint/builtins/gen/literal/tanh/5b19af.wgsl @@ -25,7 +25,7 @@ enable f16; // fn tanh(f16) -> f16 fn tanh_5b19af() { - var res: f16 = tanh(f16()); + var res: f16 = tanh(1.h); } @vertex diff --git a/test/tint/builtins/gen/literal/tanh/5b19af.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/tanh/5b19af.wgsl.expected.dxc.hlsl index 9d2dee63f6..0beb95e61e 100644 --- a/test/tint/builtins/gen/literal/tanh/5b19af.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/tanh/5b19af.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void tanh_5b19af() { - float16_t res = tanh(float16_t(0.0h)); + float16_t res = tanh(float16_t(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/tanh/5b19af.wgsl.expected.glsl b/test/tint/builtins/gen/literal/tanh/5b19af.wgsl.expected.glsl index b909cb973e..107a42c1a1 100644 --- a/test/tint/builtins/gen/literal/tanh/5b19af.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/tanh/5b19af.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void tanh_5b19af() { - float16_t res = tanh(0.0hf); + float16_t res = tanh(1.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void tanh_5b19af() { - float16_t res = tanh(0.0hf); + float16_t res = tanh(1.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void tanh_5b19af() { - float16_t res = tanh(0.0hf); + float16_t res = tanh(1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/tanh/5b19af.wgsl.expected.msl b/test/tint/builtins/gen/literal/tanh/5b19af.wgsl.expected.msl index a0122945d1..74ce3f2a32 100644 --- a/test/tint/builtins/gen/literal/tanh/5b19af.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/tanh/5b19af.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void tanh_5b19af() { - half res = tanh(0.0h); + half res = tanh(1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/tanh/5b19af.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/tanh/5b19af.wgsl.expected.spvasm index db2580f69f..a7669f7ce9 100644 --- a/test/tint/builtins/gen/literal/tanh/5b19af.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/tanh/5b19af.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,36 +36,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %16 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %19 = OpTypeFunction %v4float + %19 = OpConstantNull %half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tanh_5b19af = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_half Function %16 - %13 = OpExtInst %half %15 Tanh %16 + %res = OpVariable %_ptr_Function_half Function %19 + %13 = OpExtInst %half %15 Tanh %half_0x1p_0 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %tanh_5b19af +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %tanh_5b19af OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %tanh_5b19af + %29 = OpLabel + %30 = OpFunctionCall %void %tanh_5b19af OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %tanh_5b19af + %32 = OpLabel + %33 = OpFunctionCall %void %tanh_5b19af OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/tanh/5b19af.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/tanh/5b19af.wgsl.expected.wgsl index a2e42178b5..01e06f4d3f 100644 --- a/test/tint/builtins/gen/literal/tanh/5b19af.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/tanh/5b19af.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn tanh_5b19af() { - var res : f16 = tanh(f16()); + var res : f16 = tanh(1.0h); } @vertex diff --git a/test/tint/builtins/gen/literal/tanh/6d105a.wgsl b/test/tint/builtins/gen/literal/tanh/6d105a.wgsl index acd3e21433..c489af8b6c 100644 --- a/test/tint/builtins/gen/literal/tanh/6d105a.wgsl +++ b/test/tint/builtins/gen/literal/tanh/6d105a.wgsl @@ -25,7 +25,7 @@ enable f16; // fn tanh(vec<2, f16>) -> vec<2, f16> fn tanh_6d105a() { - var res: vec2 = tanh(vec2(f16())); + var res: vec2 = tanh(vec2(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/tanh/6d105a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/tanh/6d105a.wgsl.expected.dxc.hlsl index 9a1b417fed..f4cb76aa0a 100644 --- a/test/tint/builtins/gen/literal/tanh/6d105a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/tanh/6d105a.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void tanh_6d105a() { - vector res = tanh((float16_t(0.0h)).xx); + vector res = tanh((float16_t(1.0h)).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/tanh/6d105a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/tanh/6d105a.wgsl.expected.glsl index f5aa9d4254..b4a21cd9c0 100644 --- a/test/tint/builtins/gen/literal/tanh/6d105a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/tanh/6d105a.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void tanh_6d105a() { - f16vec2 res = tanh(f16vec2(0.0hf)); + f16vec2 res = tanh(f16vec2(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void tanh_6d105a() { - f16vec2 res = tanh(f16vec2(0.0hf)); + f16vec2 res = tanh(f16vec2(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void tanh_6d105a() { - f16vec2 res = tanh(f16vec2(0.0hf)); + f16vec2 res = tanh(f16vec2(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/tanh/6d105a.wgsl.expected.msl b/test/tint/builtins/gen/literal/tanh/6d105a.wgsl.expected.msl index b9795af0a0..b16a5a598c 100644 --- a/test/tint/builtins/gen/literal/tanh/6d105a.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/tanh/6d105a.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void tanh_6d105a() { - half2 res = tanh(half2(0.0h)); + half2 res = tanh(half2(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/tanh/6d105a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/tanh/6d105a.wgsl.expected.spvasm index 101dbc6ab6..95167d380a 100644 --- a/test/tint/builtins/gen/literal/tanh/6d105a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/tanh/6d105a.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %17 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v2half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tanh_6d105a = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2half Function %17 - %13 = OpExtInst %v2half %16 Tanh %17 + %res = OpVariable %_ptr_Function_v2half Function %21 + %13 = OpExtInst %v2half %16 Tanh %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %tanh_6d105a +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %tanh_6d105a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %tanh_6d105a + %31 = OpLabel + %32 = OpFunctionCall %void %tanh_6d105a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %tanh_6d105a + %34 = OpLabel + %35 = OpFunctionCall %void %tanh_6d105a OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/tanh/6d105a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/tanh/6d105a.wgsl.expected.wgsl index 9b0b089628..1c6722d06f 100644 --- a/test/tint/builtins/gen/literal/tanh/6d105a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/tanh/6d105a.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn tanh_6d105a() { - var res : vec2 = tanh(vec2(f16())); + var res : vec2 = tanh(vec2(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl b/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl index c0579ccae6..dbb6721f16 100644 --- a/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl +++ b/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl @@ -25,7 +25,7 @@ enable f16; // fn tanh(vec<4, f16>) -> vec<4, f16> fn tanh_e8efb3() { - var res: vec4 = tanh(vec4(f16())); + var res: vec4 = tanh(vec4(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl.expected.dxc.hlsl index 547e3c1fd9..6af0a2f3be 100644 --- a/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void tanh_e8efb3() { - vector res = tanh((float16_t(0.0h)).xxxx); + vector res = tanh((float16_t(1.0h)).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl.expected.glsl index 7d9bf9195d..040f77b625 100644 --- a/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void tanh_e8efb3() { - f16vec4 res = tanh(f16vec4(0.0hf)); + f16vec4 res = tanh(f16vec4(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void tanh_e8efb3() { - f16vec4 res = tanh(f16vec4(0.0hf)); + f16vec4 res = tanh(f16vec4(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void tanh_e8efb3() { - f16vec4 res = tanh(f16vec4(0.0hf)); + f16vec4 res = tanh(f16vec4(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl.expected.msl b/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl.expected.msl index 7da14aace6..1d1ac71912 100644 --- a/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void tanh_e8efb3() { - half4 res = tanh(half4(0.0h)); + half4 res = tanh(half4(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl.expected.spvasm index 4b18be4610..230071b236 100644 --- a/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %17 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v4half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tanh_e8efb3 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4half Function %17 - %13 = OpExtInst %v4half %16 Tanh %17 + %res = OpVariable %_ptr_Function_v4half Function %21 + %13 = OpExtInst %v4half %16 Tanh %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %tanh_e8efb3 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %tanh_e8efb3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %tanh_e8efb3 + %31 = OpLabel + %32 = OpFunctionCall %void %tanh_e8efb3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %tanh_e8efb3 + %34 = OpLabel + %35 = OpFunctionCall %void %tanh_e8efb3 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl.expected.wgsl index 5cde1f82de..72600d8f70 100644 --- a/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn tanh_e8efb3() { - var res : vec4 = tanh(vec4(f16())); + var res : vec4 = tanh(vec4(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/transpose/06794e.wgsl b/test/tint/builtins/gen/literal/transpose/06794e.wgsl index a413e2b6a9..53a99bebff 100644 --- a/test/tint/builtins/gen/literal/transpose/06794e.wgsl +++ b/test/tint/builtins/gen/literal/transpose/06794e.wgsl @@ -25,7 +25,7 @@ enable f16; // fn transpose(mat<3, 3, f16>) -> mat<3, 3, f16> fn transpose_06794e() { - var res: mat3x3 = transpose(mat3x3(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16())); + var res: mat3x3 = transpose(mat3x3(1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/transpose/06794e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/transpose/06794e.wgsl.expected.dxc.hlsl index 134ef42e1b..d9407ce2c7 100644 --- a/test/tint/builtins/gen/literal/transpose/06794e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/transpose/06794e.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void transpose_06794e() { - matrix res = transpose(matrix((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx)); + matrix res = transpose(matrix((float16_t(1.0h)).xxx, (float16_t(1.0h)).xxx, (float16_t(1.0h)).xxx)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/transpose/06794e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/transpose/06794e.wgsl.expected.glsl index 045b7372d5..a860488d93 100644 --- a/test/tint/builtins/gen/literal/transpose/06794e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/transpose/06794e.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void transpose_06794e() { - f16mat3 res = transpose(f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))); + f16mat3 res = transpose(f16mat3(f16vec3(1.0hf), f16vec3(1.0hf), f16vec3(1.0hf))); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void transpose_06794e() { - f16mat3 res = transpose(f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))); + f16mat3 res = transpose(f16mat3(f16vec3(1.0hf), f16vec3(1.0hf), f16vec3(1.0hf))); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void transpose_06794e() { - f16mat3 res = transpose(f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))); + f16mat3 res = transpose(f16mat3(f16vec3(1.0hf), f16vec3(1.0hf), f16vec3(1.0hf))); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/transpose/06794e.wgsl.expected.msl b/test/tint/builtins/gen/literal/transpose/06794e.wgsl.expected.msl index e698039053..1a1def4c7f 100644 --- a/test/tint/builtins/gen/literal/transpose/06794e.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/transpose/06794e.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void transpose_06794e() { - half3x3 res = transpose(half3x3(half3(0.0h), half3(0.0h), half3(0.0h))); + half3x3 res = transpose(half3x3(half3(1.0h), half3(1.0h), half3(1.0h))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/transpose/06794e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/transpose/06794e.wgsl.expected.spvasm index 26c14aa0ed..7c401d5735 100644 --- a/test/tint/builtins/gen/literal/transpose/06794e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/transpose/06794e.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 37 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,39 @@ %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 %mat3v3half = OpTypeMatrix %v3half 3 - %17 = OpConstantNull %mat3v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 + %19 = OpConstantComposite %mat3v3half %18 %18 %18 %_ptr_Function_mat3v3half = OpTypePointer Function %mat3v3half - %20 = OpTypeFunction %v4float + %22 = OpConstantNull %mat3v3half + %23 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %transpose_06794e = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_mat3v3half Function %17 - %13 = OpTranspose %mat3v3half %17 + %res = OpVariable %_ptr_Function_mat3v3half Function %22 + %13 = OpTranspose %mat3v3half %19 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %transpose_06794e +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %transpose_06794e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %transpose_06794e - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %9 %32 = OpLabel %33 = OpFunctionCall %void %transpose_06794e OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %9 + %35 = OpLabel + %36 = OpFunctionCall %void %transpose_06794e + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/transpose/06794e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/transpose/06794e.wgsl.expected.wgsl index ac99ba20ee..b1ba09604c 100644 --- a/test/tint/builtins/gen/literal/transpose/06794e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/transpose/06794e.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn transpose_06794e() { - var res : mat3x3 = transpose(mat3x3(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16())); + var res : mat3x3 = transpose(mat3x3(1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/transpose/5edd96.wgsl b/test/tint/builtins/gen/literal/transpose/5edd96.wgsl index dd1c459332..ca694d5170 100644 --- a/test/tint/builtins/gen/literal/transpose/5edd96.wgsl +++ b/test/tint/builtins/gen/literal/transpose/5edd96.wgsl @@ -25,7 +25,7 @@ enable f16; // fn transpose(mat<4, 2, f16>) -> mat<2, 4, f16> fn transpose_5edd96() { - var res: mat2x4 = transpose(mat4x2(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16())); + var res: mat2x4 = transpose(mat4x2(1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/transpose/5edd96.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/transpose/5edd96.wgsl.expected.dxc.hlsl index 1f253b9e80..3c9585cf20 100644 --- a/test/tint/builtins/gen/literal/transpose/5edd96.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/transpose/5edd96.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void transpose_5edd96() { - matrix res = transpose(matrix((float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx)); + matrix res = transpose(matrix((float16_t(1.0h)).xx, (float16_t(1.0h)).xx, (float16_t(1.0h)).xx, (float16_t(1.0h)).xx)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/transpose/5edd96.wgsl.expected.glsl b/test/tint/builtins/gen/literal/transpose/5edd96.wgsl.expected.glsl index 48b8ac197f..d0deba262d 100644 --- a/test/tint/builtins/gen/literal/transpose/5edd96.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/transpose/5edd96.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void transpose_5edd96() { - f16mat2x4 res = transpose(f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))); + f16mat2x4 res = transpose(f16mat4x2(f16vec2(1.0hf), f16vec2(1.0hf), f16vec2(1.0hf), f16vec2(1.0hf))); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void transpose_5edd96() { - f16mat2x4 res = transpose(f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))); + f16mat2x4 res = transpose(f16mat4x2(f16vec2(1.0hf), f16vec2(1.0hf), f16vec2(1.0hf), f16vec2(1.0hf))); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void transpose_5edd96() { - f16mat2x4 res = transpose(f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))); + f16mat2x4 res = transpose(f16mat4x2(f16vec2(1.0hf), f16vec2(1.0hf), f16vec2(1.0hf), f16vec2(1.0hf))); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/transpose/5edd96.wgsl.expected.msl b/test/tint/builtins/gen/literal/transpose/5edd96.wgsl.expected.msl index 09cffcbd1f..538c05a2d1 100644 --- a/test/tint/builtins/gen/literal/transpose/5edd96.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/transpose/5edd96.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void transpose_5edd96() { - half2x4 res = transpose(half4x2(half2(0.0h), half2(0.0h), half2(0.0h), half2(0.0h))); + half2x4 res = transpose(half4x2(half2(1.0h), half2(1.0h), half2(1.0h), half2(1.0h))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/transpose/5edd96.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/transpose/5edd96.wgsl.expected.spvasm index 07e8594864..c85cda19c9 100644 --- a/test/tint/builtins/gen/literal/transpose/5edd96.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/transpose/5edd96.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 39 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -39,37 +39,39 @@ %mat2v4half = OpTypeMatrix %v4half 2 %v2half = OpTypeVector %half 2 %mat4v2half = OpTypeMatrix %v2half 4 - %19 = OpConstantNull %mat4v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %20 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 + %21 = OpConstantComposite %mat4v2half %20 %20 %20 %20 %_ptr_Function_mat2v4half = OpTypePointer Function %mat2v4half - %22 = OpConstantNull %mat2v4half - %23 = OpTypeFunction %v4float + %24 = OpConstantNull %mat2v4half + %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %transpose_5edd96 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_mat2v4half Function %22 - %13 = OpTranspose %mat2v4half %19 + %res = OpVariable %_ptr_Function_mat2v4half Function %24 + %13 = OpTranspose %mat2v4half %21 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %transpose_5edd96 +%vertex_main_inner = OpFunction %v4float None %25 + %27 = OpLabel + %28 = OpFunctionCall %void %transpose_5edd96 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %30 = OpLabel + %31 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %31 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %transpose_5edd96 + %34 = OpLabel + %35 = OpFunctionCall %void %transpose_5edd96 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %transpose_5edd96 + %37 = OpLabel + %38 = OpFunctionCall %void %transpose_5edd96 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/transpose/5edd96.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/transpose/5edd96.wgsl.expected.wgsl index aaf9fbf236..3edbfa2cef 100644 --- a/test/tint/builtins/gen/literal/transpose/5edd96.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/transpose/5edd96.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn transpose_5edd96() { - var res : mat2x4 = transpose(mat4x2(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16())); + var res : mat2x4 = transpose(mat4x2(1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl b/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl index 47e4c776bf..f5992a47f1 100644 --- a/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl +++ b/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl @@ -25,7 +25,7 @@ enable f16; // fn transpose(mat<4, 3, f16>) -> mat<3, 4, f16> fn transpose_5f36bf() { - var res: mat3x4 = transpose(mat4x3(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16())); + var res: mat3x4 = transpose(mat4x3(1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl.expected.dxc.hlsl index b5189243fd..cda6242b02 100644 --- a/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void transpose_5f36bf() { - matrix res = transpose(matrix((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx)); + matrix res = transpose(matrix((float16_t(1.0h)).xxx, (float16_t(1.0h)).xxx, (float16_t(1.0h)).xxx, (float16_t(1.0h)).xxx)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl.expected.glsl b/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl.expected.glsl index bc4a794651..6aba0b9561 100644 --- a/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void transpose_5f36bf() { - f16mat3x4 res = transpose(f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))); + f16mat3x4 res = transpose(f16mat4x3(f16vec3(1.0hf), f16vec3(1.0hf), f16vec3(1.0hf), f16vec3(1.0hf))); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void transpose_5f36bf() { - f16mat3x4 res = transpose(f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))); + f16mat3x4 res = transpose(f16mat4x3(f16vec3(1.0hf), f16vec3(1.0hf), f16vec3(1.0hf), f16vec3(1.0hf))); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void transpose_5f36bf() { - f16mat3x4 res = transpose(f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))); + f16mat3x4 res = transpose(f16mat4x3(f16vec3(1.0hf), f16vec3(1.0hf), f16vec3(1.0hf), f16vec3(1.0hf))); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl.expected.msl b/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl.expected.msl index d931f016ab..05452954e8 100644 --- a/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void transpose_5f36bf() { - half3x4 res = transpose(half4x3(half3(0.0h), half3(0.0h), half3(0.0h), half3(0.0h))); + half3x4 res = transpose(half4x3(half3(1.0h), half3(1.0h), half3(1.0h), half3(1.0h))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl.expected.spvasm index c9e6ffa30f..128367979c 100644 --- a/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 39 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -39,37 +39,39 @@ %mat3v4half = OpTypeMatrix %v4half 3 %v3half = OpTypeVector %half 3 %mat4v3half = OpTypeMatrix %v3half 4 - %19 = OpConstantNull %mat4v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %20 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 + %21 = OpConstantComposite %mat4v3half %20 %20 %20 %20 %_ptr_Function_mat3v4half = OpTypePointer Function %mat3v4half - %22 = OpConstantNull %mat3v4half - %23 = OpTypeFunction %v4float + %24 = OpConstantNull %mat3v4half + %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %transpose_5f36bf = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_mat3v4half Function %22 - %13 = OpTranspose %mat3v4half %19 + %res = OpVariable %_ptr_Function_mat3v4half Function %24 + %13 = OpTranspose %mat3v4half %21 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %transpose_5f36bf +%vertex_main_inner = OpFunction %v4float None %25 + %27 = OpLabel + %28 = OpFunctionCall %void %transpose_5f36bf OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %30 = OpLabel + %31 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %31 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %transpose_5f36bf + %34 = OpLabel + %35 = OpFunctionCall %void %transpose_5f36bf OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %transpose_5f36bf + %37 = OpLabel + %38 = OpFunctionCall %void %transpose_5f36bf OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl.expected.wgsl index 878b15af9e..374302eac7 100644 --- a/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn transpose_5f36bf() { - var res : mat3x4 = transpose(mat4x3(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16())); + var res : mat3x4 = transpose(mat4x3(1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl b/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl index 5a59b3bb4d..bd62bb39bb 100644 --- a/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl +++ b/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl @@ -25,7 +25,7 @@ enable f16; // fn transpose(mat<2, 2, f16>) -> mat<2, 2, f16> fn transpose_7be8b2() { - var res: mat2x2 = transpose(mat2x2(f16(), f16(), f16(), f16())); + var res: mat2x2 = transpose(mat2x2(1.h, 1.h, 1.h, 1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl.expected.dxc.hlsl index e72e2d0fe8..cfa9885d27 100644 --- a/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void transpose_7be8b2() { - matrix res = transpose(matrix((float16_t(0.0h)).xx, (float16_t(0.0h)).xx)); + matrix res = transpose(matrix((float16_t(1.0h)).xx, (float16_t(1.0h)).xx)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl.expected.glsl b/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl.expected.glsl index 44cafb6a5e..1d16a91356 100644 --- a/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void transpose_7be8b2() { - f16mat2 res = transpose(f16mat2(f16vec2(0.0hf), f16vec2(0.0hf))); + f16mat2 res = transpose(f16mat2(f16vec2(1.0hf), f16vec2(1.0hf))); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void transpose_7be8b2() { - f16mat2 res = transpose(f16mat2(f16vec2(0.0hf), f16vec2(0.0hf))); + f16mat2 res = transpose(f16mat2(f16vec2(1.0hf), f16vec2(1.0hf))); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void transpose_7be8b2() { - f16mat2 res = transpose(f16mat2(f16vec2(0.0hf), f16vec2(0.0hf))); + f16mat2 res = transpose(f16mat2(f16vec2(1.0hf), f16vec2(1.0hf))); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl.expected.msl b/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl.expected.msl index 435d12f6e2..68fc99b8c3 100644 --- a/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void transpose_7be8b2() { - half2x2 res = transpose(half2x2(half2(0.0h), half2(0.0h))); + half2x2 res = transpose(half2x2(half2(1.0h), half2(1.0h))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl.expected.spvasm index 7575dcadbc..8c0e82acb8 100644 --- a/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 37 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,39 @@ %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 %mat2v2half = OpTypeMatrix %v2half 2 - %17 = OpConstantNull %mat2v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 + %19 = OpConstantComposite %mat2v2half %18 %18 %_ptr_Function_mat2v2half = OpTypePointer Function %mat2v2half - %20 = OpTypeFunction %v4float + %22 = OpConstantNull %mat2v2half + %23 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %transpose_7be8b2 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_mat2v2half Function %17 - %13 = OpTranspose %mat2v2half %17 + %res = OpVariable %_ptr_Function_mat2v2half Function %22 + %13 = OpTranspose %mat2v2half %19 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %transpose_7be8b2 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %transpose_7be8b2 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %transpose_7be8b2 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %9 %32 = OpLabel %33 = OpFunctionCall %void %transpose_7be8b2 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %9 + %35 = OpLabel + %36 = OpFunctionCall %void %transpose_7be8b2 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl.expected.wgsl index 437f1cea53..9b4281fa8e 100644 --- a/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn transpose_7be8b2() { - var res : mat2x2 = transpose(mat2x2(f16(), f16(), f16(), f16())); + var res : mat2x2 = transpose(mat2x2(1.0h, 1.0h, 1.0h, 1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/transpose/844869.wgsl b/test/tint/builtins/gen/literal/transpose/844869.wgsl index 870582ba6d..0548c1bea7 100644 --- a/test/tint/builtins/gen/literal/transpose/844869.wgsl +++ b/test/tint/builtins/gen/literal/transpose/844869.wgsl @@ -25,7 +25,7 @@ enable f16; // fn transpose(mat<4, 4, f16>) -> mat<4, 4, f16> fn transpose_844869() { - var res: mat4x4 = transpose(mat4x4(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16())); + var res: mat4x4 = transpose(mat4x4(1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/transpose/844869.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/transpose/844869.wgsl.expected.dxc.hlsl index 0ad869b997..f1af6cbe34 100644 --- a/test/tint/builtins/gen/literal/transpose/844869.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/transpose/844869.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void transpose_844869() { - matrix res = transpose(matrix((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx)); + matrix res = transpose(matrix((float16_t(1.0h)).xxxx, (float16_t(1.0h)).xxxx, (float16_t(1.0h)).xxxx, (float16_t(1.0h)).xxxx)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/transpose/844869.wgsl.expected.glsl b/test/tint/builtins/gen/literal/transpose/844869.wgsl.expected.glsl index a244d661b7..46d711bf0c 100644 --- a/test/tint/builtins/gen/literal/transpose/844869.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/transpose/844869.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void transpose_844869() { - f16mat4 res = transpose(f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))); + f16mat4 res = transpose(f16mat4(f16vec4(1.0hf), f16vec4(1.0hf), f16vec4(1.0hf), f16vec4(1.0hf))); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void transpose_844869() { - f16mat4 res = transpose(f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))); + f16mat4 res = transpose(f16mat4(f16vec4(1.0hf), f16vec4(1.0hf), f16vec4(1.0hf), f16vec4(1.0hf))); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void transpose_844869() { - f16mat4 res = transpose(f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))); + f16mat4 res = transpose(f16mat4(f16vec4(1.0hf), f16vec4(1.0hf), f16vec4(1.0hf), f16vec4(1.0hf))); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/transpose/844869.wgsl.expected.msl b/test/tint/builtins/gen/literal/transpose/844869.wgsl.expected.msl index b02ce13d83..0b18d45296 100644 --- a/test/tint/builtins/gen/literal/transpose/844869.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/transpose/844869.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void transpose_844869() { - half4x4 res = transpose(half4x4(half4(0.0h), half4(0.0h), half4(0.0h), half4(0.0h))); + half4x4 res = transpose(half4x4(half4(1.0h), half4(1.0h), half4(1.0h), half4(1.0h))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/transpose/844869.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/transpose/844869.wgsl.expected.spvasm index 830841978c..342309fb59 100644 --- a/test/tint/builtins/gen/literal/transpose/844869.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/transpose/844869.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 37 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,39 @@ %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 %mat4v4half = OpTypeMatrix %v4half 4 - %17 = OpConstantNull %mat4v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 + %19 = OpConstantComposite %mat4v4half %18 %18 %18 %18 %_ptr_Function_mat4v4half = OpTypePointer Function %mat4v4half - %20 = OpTypeFunction %v4float + %22 = OpConstantNull %mat4v4half + %23 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %transpose_844869 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_mat4v4half Function %17 - %13 = OpTranspose %mat4v4half %17 + %res = OpVariable %_ptr_Function_mat4v4half Function %22 + %13 = OpTranspose %mat4v4half %19 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %transpose_844869 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %transpose_844869 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %transpose_844869 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %9 %32 = OpLabel %33 = OpFunctionCall %void %transpose_844869 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %9 + %35 = OpLabel + %36 = OpFunctionCall %void %transpose_844869 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/transpose/844869.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/transpose/844869.wgsl.expected.wgsl index b917ed4147..8f3614940e 100644 --- a/test/tint/builtins/gen/literal/transpose/844869.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/transpose/844869.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn transpose_844869() { - var res : mat4x4 = transpose(mat4x4(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16())); + var res : mat4x4 = transpose(mat4x4(1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl b/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl index e7925471d1..b755bbdfa2 100644 --- a/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl +++ b/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl @@ -25,7 +25,7 @@ enable f16; // fn transpose(mat<3, 4, f16>) -> mat<4, 3, f16> fn transpose_8c06ce() { - var res: mat4x3 = transpose(mat3x4(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16())); + var res: mat4x3 = transpose(mat3x4(1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl.expected.dxc.hlsl index 796214243a..d0ed0a2a4e 100644 --- a/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void transpose_8c06ce() { - matrix res = transpose(matrix((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx)); + matrix res = transpose(matrix((float16_t(1.0h)).xxxx, (float16_t(1.0h)).xxxx, (float16_t(1.0h)).xxxx)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl.expected.glsl b/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl.expected.glsl index 77ffe386f4..aebf782ebb 100644 --- a/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void transpose_8c06ce() { - f16mat4x3 res = transpose(f16mat3x4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))); + f16mat4x3 res = transpose(f16mat3x4(f16vec4(1.0hf), f16vec4(1.0hf), f16vec4(1.0hf))); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void transpose_8c06ce() { - f16mat4x3 res = transpose(f16mat3x4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))); + f16mat4x3 res = transpose(f16mat3x4(f16vec4(1.0hf), f16vec4(1.0hf), f16vec4(1.0hf))); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void transpose_8c06ce() { - f16mat4x3 res = transpose(f16mat3x4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))); + f16mat4x3 res = transpose(f16mat3x4(f16vec4(1.0hf), f16vec4(1.0hf), f16vec4(1.0hf))); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl.expected.msl b/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl.expected.msl index dd48f0306d..1b191a23c4 100644 --- a/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void transpose_8c06ce() { - half4x3 res = transpose(half3x4(half4(0.0h), half4(0.0h), half4(0.0h))); + half4x3 res = transpose(half3x4(half4(1.0h), half4(1.0h), half4(1.0h))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl.expected.spvasm index 04c004eb28..2f35c48b88 100644 --- a/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 39 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -39,37 +39,39 @@ %mat4v3half = OpTypeMatrix %v3half 4 %v4half = OpTypeVector %half 4 %mat3v4half = OpTypeMatrix %v4half 3 - %19 = OpConstantNull %mat3v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %20 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 + %21 = OpConstantComposite %mat3v4half %20 %20 %20 %_ptr_Function_mat4v3half = OpTypePointer Function %mat4v3half - %22 = OpConstantNull %mat4v3half - %23 = OpTypeFunction %v4float + %24 = OpConstantNull %mat4v3half + %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %transpose_8c06ce = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_mat4v3half Function %22 - %13 = OpTranspose %mat4v3half %19 + %res = OpVariable %_ptr_Function_mat4v3half Function %24 + %13 = OpTranspose %mat4v3half %21 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %transpose_8c06ce +%vertex_main_inner = OpFunction %v4float None %25 + %27 = OpLabel + %28 = OpFunctionCall %void %transpose_8c06ce OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %30 = OpLabel + %31 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %31 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %transpose_8c06ce + %34 = OpLabel + %35 = OpFunctionCall %void %transpose_8c06ce OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %transpose_8c06ce + %37 = OpLabel + %38 = OpFunctionCall %void %transpose_8c06ce OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl.expected.wgsl index 09d0c25f34..f2b4dc4c06 100644 --- a/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn transpose_8c06ce() { - var res : mat4x3 = transpose(mat3x4(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16())); + var res : mat4x3 = transpose(mat3x4(1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl b/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl index 7be77d2682..d2e4c2b5c5 100644 --- a/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl +++ b/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl @@ -25,7 +25,7 @@ enable f16; // fn transpose(mat<3, 2, f16>) -> mat<2, 3, f16> fn transpose_b9ad1f() { - var res: mat2x3 = transpose(mat3x2(f16(), f16(), f16(), f16(), f16(), f16())); + var res: mat2x3 = transpose(mat3x2(1.h, 1.h, 1.h, 1.h, 1.h, 1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl.expected.dxc.hlsl index 97e3dcb1bb..1d61c25eb8 100644 --- a/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void transpose_b9ad1f() { - matrix res = transpose(matrix((float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx)); + matrix res = transpose(matrix((float16_t(1.0h)).xx, (float16_t(1.0h)).xx, (float16_t(1.0h)).xx)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl.expected.glsl index f549a0dadd..123e8c4137 100644 --- a/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void transpose_b9ad1f() { - f16mat2x3 res = transpose(f16mat3x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))); + f16mat2x3 res = transpose(f16mat3x2(f16vec2(1.0hf), f16vec2(1.0hf), f16vec2(1.0hf))); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void transpose_b9ad1f() { - f16mat2x3 res = transpose(f16mat3x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))); + f16mat2x3 res = transpose(f16mat3x2(f16vec2(1.0hf), f16vec2(1.0hf), f16vec2(1.0hf))); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void transpose_b9ad1f() { - f16mat2x3 res = transpose(f16mat3x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))); + f16mat2x3 res = transpose(f16mat3x2(f16vec2(1.0hf), f16vec2(1.0hf), f16vec2(1.0hf))); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl.expected.msl b/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl.expected.msl index 6fc6f1d751..d449921e3a 100644 --- a/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void transpose_b9ad1f() { - half2x3 res = transpose(half3x2(half2(0.0h), half2(0.0h), half2(0.0h))); + half2x3 res = transpose(half3x2(half2(1.0h), half2(1.0h), half2(1.0h))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl.expected.spvasm index c3ed30e12b..19c2897449 100644 --- a/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 39 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -39,37 +39,39 @@ %mat2v3half = OpTypeMatrix %v3half 2 %v2half = OpTypeVector %half 2 %mat3v2half = OpTypeMatrix %v2half 3 - %19 = OpConstantNull %mat3v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %20 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 + %21 = OpConstantComposite %mat3v2half %20 %20 %20 %_ptr_Function_mat2v3half = OpTypePointer Function %mat2v3half - %22 = OpConstantNull %mat2v3half - %23 = OpTypeFunction %v4float + %24 = OpConstantNull %mat2v3half + %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %transpose_b9ad1f = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_mat2v3half Function %22 - %13 = OpTranspose %mat2v3half %19 + %res = OpVariable %_ptr_Function_mat2v3half Function %24 + %13 = OpTranspose %mat2v3half %21 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %transpose_b9ad1f +%vertex_main_inner = OpFunction %v4float None %25 + %27 = OpLabel + %28 = OpFunctionCall %void %transpose_b9ad1f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %30 = OpLabel + %31 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %31 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %transpose_b9ad1f + %34 = OpLabel + %35 = OpFunctionCall %void %transpose_b9ad1f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %transpose_b9ad1f + %37 = OpLabel + %38 = OpFunctionCall %void %transpose_b9ad1f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl.expected.wgsl index 49ee3fa258..3d06432d12 100644 --- a/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn transpose_b9ad1f() { - var res : mat2x3 = transpose(mat3x2(f16(), f16(), f16(), f16(), f16(), f16())); + var res : mat2x3 = transpose(mat3x2(1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/transpose/d6faec.wgsl b/test/tint/builtins/gen/literal/transpose/d6faec.wgsl index 4375de3909..ebaa66953d 100644 --- a/test/tint/builtins/gen/literal/transpose/d6faec.wgsl +++ b/test/tint/builtins/gen/literal/transpose/d6faec.wgsl @@ -25,7 +25,7 @@ enable f16; // fn transpose(mat<2, 3, f16>) -> mat<3, 2, f16> fn transpose_d6faec() { - var res: mat3x2 = transpose(mat2x3(f16(), f16(), f16(), f16(), f16(), f16())); + var res: mat3x2 = transpose(mat2x3(1.h, 1.h, 1.h, 1.h, 1.h, 1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/transpose/d6faec.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/transpose/d6faec.wgsl.expected.dxc.hlsl index 4ab9a4aac9..4baafb067a 100644 --- a/test/tint/builtins/gen/literal/transpose/d6faec.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/transpose/d6faec.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void transpose_d6faec() { - matrix res = transpose(matrix((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx)); + matrix res = transpose(matrix((float16_t(1.0h)).xxx, (float16_t(1.0h)).xxx)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/transpose/d6faec.wgsl.expected.glsl b/test/tint/builtins/gen/literal/transpose/d6faec.wgsl.expected.glsl index c7f7f4ba39..3712491ada 100644 --- a/test/tint/builtins/gen/literal/transpose/d6faec.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/transpose/d6faec.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void transpose_d6faec() { - f16mat3x2 res = transpose(f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf))); + f16mat3x2 res = transpose(f16mat2x3(f16vec3(1.0hf), f16vec3(1.0hf))); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void transpose_d6faec() { - f16mat3x2 res = transpose(f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf))); + f16mat3x2 res = transpose(f16mat2x3(f16vec3(1.0hf), f16vec3(1.0hf))); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void transpose_d6faec() { - f16mat3x2 res = transpose(f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf))); + f16mat3x2 res = transpose(f16mat2x3(f16vec3(1.0hf), f16vec3(1.0hf))); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/transpose/d6faec.wgsl.expected.msl b/test/tint/builtins/gen/literal/transpose/d6faec.wgsl.expected.msl index b4629d50e6..b30b952f5e 100644 --- a/test/tint/builtins/gen/literal/transpose/d6faec.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/transpose/d6faec.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void transpose_d6faec() { - half3x2 res = transpose(half2x3(half3(0.0h), half3(0.0h))); + half3x2 res = transpose(half2x3(half3(1.0h), half3(1.0h))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/transpose/d6faec.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/transpose/d6faec.wgsl.expected.spvasm index a9f192ca01..cbbfc9b9db 100644 --- a/test/tint/builtins/gen/literal/transpose/d6faec.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/transpose/d6faec.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 39 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -39,37 +39,39 @@ %mat3v2half = OpTypeMatrix %v2half 3 %v3half = OpTypeVector %half 3 %mat2v3half = OpTypeMatrix %v3half 2 - %19 = OpConstantNull %mat2v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %20 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 + %21 = OpConstantComposite %mat2v3half %20 %20 %_ptr_Function_mat3v2half = OpTypePointer Function %mat3v2half - %22 = OpConstantNull %mat3v2half - %23 = OpTypeFunction %v4float + %24 = OpConstantNull %mat3v2half + %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %transpose_d6faec = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_mat3v2half Function %22 - %13 = OpTranspose %mat3v2half %19 + %res = OpVariable %_ptr_Function_mat3v2half Function %24 + %13 = OpTranspose %mat3v2half %21 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %transpose_d6faec +%vertex_main_inner = OpFunction %v4float None %25 + %27 = OpLabel + %28 = OpFunctionCall %void %transpose_d6faec OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %30 = OpLabel + %31 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %31 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %transpose_d6faec + %34 = OpLabel + %35 = OpFunctionCall %void %transpose_d6faec OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %transpose_d6faec + %37 = OpLabel + %38 = OpFunctionCall %void %transpose_d6faec OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/transpose/d6faec.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/transpose/d6faec.wgsl.expected.wgsl index 5e269447d4..2bf363a1ee 100644 --- a/test/tint/builtins/gen/literal/transpose/d6faec.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/transpose/d6faec.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn transpose_d6faec() { - var res : mat3x2 = transpose(mat2x3(f16(), f16(), f16(), f16(), f16(), f16())); + var res : mat3x2 = transpose(mat2x3(1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/transpose/faeb05.wgsl b/test/tint/builtins/gen/literal/transpose/faeb05.wgsl index 706d3bd2d2..71346b0abc 100644 --- a/test/tint/builtins/gen/literal/transpose/faeb05.wgsl +++ b/test/tint/builtins/gen/literal/transpose/faeb05.wgsl @@ -25,7 +25,7 @@ enable f16; // fn transpose(mat<2, 4, f16>) -> mat<4, 2, f16> fn transpose_faeb05() { - var res: mat4x2 = transpose(mat2x4(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16())); + var res: mat4x2 = transpose(mat2x4(1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/transpose/faeb05.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/transpose/faeb05.wgsl.expected.dxc.hlsl index 2a44dc6b17..3b78a5a2d4 100644 --- a/test/tint/builtins/gen/literal/transpose/faeb05.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/transpose/faeb05.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void transpose_faeb05() { - matrix res = transpose(matrix((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx)); + matrix res = transpose(matrix((float16_t(1.0h)).xxxx, (float16_t(1.0h)).xxxx)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/transpose/faeb05.wgsl.expected.glsl b/test/tint/builtins/gen/literal/transpose/faeb05.wgsl.expected.glsl index 720b3fdd3d..e3822316be 100644 --- a/test/tint/builtins/gen/literal/transpose/faeb05.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/transpose/faeb05.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void transpose_faeb05() { - f16mat4x2 res = transpose(f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf))); + f16mat4x2 res = transpose(f16mat2x4(f16vec4(1.0hf), f16vec4(1.0hf))); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void transpose_faeb05() { - f16mat4x2 res = transpose(f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf))); + f16mat4x2 res = transpose(f16mat2x4(f16vec4(1.0hf), f16vec4(1.0hf))); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void transpose_faeb05() { - f16mat4x2 res = transpose(f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf))); + f16mat4x2 res = transpose(f16mat2x4(f16vec4(1.0hf), f16vec4(1.0hf))); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/transpose/faeb05.wgsl.expected.msl b/test/tint/builtins/gen/literal/transpose/faeb05.wgsl.expected.msl index ec6e27d6b4..e4e8470927 100644 --- a/test/tint/builtins/gen/literal/transpose/faeb05.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/transpose/faeb05.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void transpose_faeb05() { - half4x2 res = transpose(half2x4(half4(0.0h), half4(0.0h))); + half4x2 res = transpose(half2x4(half4(1.0h), half4(1.0h))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/transpose/faeb05.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/transpose/faeb05.wgsl.expected.spvasm index eff9828ad1..50f0184b6a 100644 --- a/test/tint/builtins/gen/literal/transpose/faeb05.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/transpose/faeb05.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 39 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -39,37 +39,39 @@ %mat4v2half = OpTypeMatrix %v2half 4 %v4half = OpTypeVector %half 4 %mat2v4half = OpTypeMatrix %v4half 2 - %19 = OpConstantNull %mat2v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %20 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 + %21 = OpConstantComposite %mat2v4half %20 %20 %_ptr_Function_mat4v2half = OpTypePointer Function %mat4v2half - %22 = OpConstantNull %mat4v2half - %23 = OpTypeFunction %v4float + %24 = OpConstantNull %mat4v2half + %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %transpose_faeb05 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_mat4v2half Function %22 - %13 = OpTranspose %mat4v2half %19 + %res = OpVariable %_ptr_Function_mat4v2half Function %24 + %13 = OpTranspose %mat4v2half %21 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %transpose_faeb05 +%vertex_main_inner = OpFunction %v4float None %25 + %27 = OpLabel + %28 = OpFunctionCall %void %transpose_faeb05 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %30 = OpLabel + %31 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %31 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %transpose_faeb05 + %34 = OpLabel + %35 = OpFunctionCall %void %transpose_faeb05 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %transpose_faeb05 + %37 = OpLabel + %38 = OpFunctionCall %void %transpose_faeb05 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/transpose/faeb05.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/transpose/faeb05.wgsl.expected.wgsl index 795686f1d2..364abc3b3f 100644 --- a/test/tint/builtins/gen/literal/transpose/faeb05.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/transpose/faeb05.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn transpose_faeb05() { - var res : mat4x2 = transpose(mat2x4(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16())); + var res : mat4x2 = transpose(mat2x4(1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/trunc/103ab8.wgsl b/test/tint/builtins/gen/literal/trunc/103ab8.wgsl index 687471966b..5a2495e3ec 100644 --- a/test/tint/builtins/gen/literal/trunc/103ab8.wgsl +++ b/test/tint/builtins/gen/literal/trunc/103ab8.wgsl @@ -25,7 +25,7 @@ enable f16; // fn trunc(vec<3, f16>) -> vec<3, f16> fn trunc_103ab8() { - var res: vec3 = trunc(vec3(f16())); + var res: vec3 = trunc(vec3(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/trunc/103ab8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/trunc/103ab8.wgsl.expected.dxc.hlsl index dd3ebec191..ffe1f6e675 100644 --- a/test/tint/builtins/gen/literal/trunc/103ab8.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/trunc/103ab8.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void trunc_103ab8() { - vector res = trunc((float16_t(0.0h)).xxx); + vector res = trunc((float16_t(1.0h)).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/trunc/103ab8.wgsl.expected.glsl b/test/tint/builtins/gen/literal/trunc/103ab8.wgsl.expected.glsl index da7798a5dd..946f9f3431 100644 --- a/test/tint/builtins/gen/literal/trunc/103ab8.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/trunc/103ab8.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void trunc_103ab8() { - f16vec3 res = trunc(f16vec3(0.0hf)); + f16vec3 res = trunc(f16vec3(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void trunc_103ab8() { - f16vec3 res = trunc(f16vec3(0.0hf)); + f16vec3 res = trunc(f16vec3(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void trunc_103ab8() { - f16vec3 res = trunc(f16vec3(0.0hf)); + f16vec3 res = trunc(f16vec3(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/trunc/103ab8.wgsl.expected.msl b/test/tint/builtins/gen/literal/trunc/103ab8.wgsl.expected.msl index 11217431f5..247d36ce94 100644 --- a/test/tint/builtins/gen/literal/trunc/103ab8.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/trunc/103ab8.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void trunc_103ab8() { - half3 res = trunc(half3(0.0h)); + half3 res = trunc(half3(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/trunc/103ab8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/trunc/103ab8.wgsl.expected.spvasm index e1a21cf9b9..537ed0be20 100644 --- a/test/tint/builtins/gen/literal/trunc/103ab8.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/trunc/103ab8.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %17 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v3half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %trunc_103ab8 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3half Function %17 - %13 = OpExtInst %v3half %16 Trunc %17 + %res = OpVariable %_ptr_Function_v3half Function %21 + %13 = OpExtInst %v3half %16 Trunc %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %trunc_103ab8 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %trunc_103ab8 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %trunc_103ab8 + %31 = OpLabel + %32 = OpFunctionCall %void %trunc_103ab8 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %trunc_103ab8 + %34 = OpLabel + %35 = OpFunctionCall %void %trunc_103ab8 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/trunc/103ab8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/trunc/103ab8.wgsl.expected.wgsl index 9422358d36..260b7fae18 100644 --- a/test/tint/builtins/gen/literal/trunc/103ab8.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/trunc/103ab8.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn trunc_103ab8() { - var res : vec3 = trunc(vec3(f16())); + var res : vec3 = trunc(vec3(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/trunc/a56109.wgsl b/test/tint/builtins/gen/literal/trunc/a56109.wgsl index ef8b02ba12..51ea764cd2 100644 --- a/test/tint/builtins/gen/literal/trunc/a56109.wgsl +++ b/test/tint/builtins/gen/literal/trunc/a56109.wgsl @@ -25,7 +25,7 @@ enable f16; // fn trunc(vec<2, f16>) -> vec<2, f16> fn trunc_a56109() { - var res: vec2 = trunc(vec2(f16())); + var res: vec2 = trunc(vec2(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/trunc/a56109.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/trunc/a56109.wgsl.expected.dxc.hlsl index 0cc0eb22df..ed119b9763 100644 --- a/test/tint/builtins/gen/literal/trunc/a56109.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/trunc/a56109.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void trunc_a56109() { - vector res = trunc((float16_t(0.0h)).xx); + vector res = trunc((float16_t(1.0h)).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/trunc/a56109.wgsl.expected.glsl b/test/tint/builtins/gen/literal/trunc/a56109.wgsl.expected.glsl index d403886e8e..30a7a09a45 100644 --- a/test/tint/builtins/gen/literal/trunc/a56109.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/trunc/a56109.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void trunc_a56109() { - f16vec2 res = trunc(f16vec2(0.0hf)); + f16vec2 res = trunc(f16vec2(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void trunc_a56109() { - f16vec2 res = trunc(f16vec2(0.0hf)); + f16vec2 res = trunc(f16vec2(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void trunc_a56109() { - f16vec2 res = trunc(f16vec2(0.0hf)); + f16vec2 res = trunc(f16vec2(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/trunc/a56109.wgsl.expected.msl b/test/tint/builtins/gen/literal/trunc/a56109.wgsl.expected.msl index 19d67d9bcf..01e926600a 100644 --- a/test/tint/builtins/gen/literal/trunc/a56109.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/trunc/a56109.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void trunc_a56109() { - half2 res = trunc(half2(0.0h)); + half2 res = trunc(half2(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/trunc/a56109.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/trunc/a56109.wgsl.expected.spvasm index 5899e0ff86..1dc8bf31d3 100644 --- a/test/tint/builtins/gen/literal/trunc/a56109.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/trunc/a56109.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %17 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v2half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %trunc_a56109 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2half Function %17 - %13 = OpExtInst %v2half %16 Trunc %17 + %res = OpVariable %_ptr_Function_v2half Function %21 + %13 = OpExtInst %v2half %16 Trunc %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %trunc_a56109 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %trunc_a56109 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %trunc_a56109 + %31 = OpLabel + %32 = OpFunctionCall %void %trunc_a56109 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %trunc_a56109 + %34 = OpLabel + %35 = OpFunctionCall %void %trunc_a56109 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/trunc/a56109.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/trunc/a56109.wgsl.expected.wgsl index 174127ef63..7051d16c4f 100644 --- a/test/tint/builtins/gen/literal/trunc/a56109.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/trunc/a56109.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn trunc_a56109() { - var res : vec2 = trunc(vec2(f16())); + var res : vec2 = trunc(vec2(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl b/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl index 0dccaa6c0b..32f443a641 100644 --- a/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl +++ b/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl @@ -25,7 +25,7 @@ enable f16; // fn trunc(f16) -> f16 fn trunc_cc2b0d() { - var res: f16 = trunc(f16()); + var res: f16 = trunc(1.h); } @vertex diff --git a/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl.expected.dxc.hlsl index b268816347..92d0f9d977 100644 --- a/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void trunc_cc2b0d() { - float16_t res = trunc(float16_t(0.0h)); + float16_t res = trunc(float16_t(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl.expected.glsl index 257a5710b3..00e8be05fd 100644 --- a/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void trunc_cc2b0d() { - float16_t res = trunc(0.0hf); + float16_t res = trunc(1.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void trunc_cc2b0d() { - float16_t res = trunc(0.0hf); + float16_t res = trunc(1.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void trunc_cc2b0d() { - float16_t res = trunc(0.0hf); + float16_t res = trunc(1.0hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl.expected.msl b/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl.expected.msl index b2c50aaa8e..785962cb1f 100644 --- a/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void trunc_cc2b0d() { - half res = trunc(0.0h); + half res = trunc(1.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl.expected.spvasm index 49a49a2092..71302f5148 100644 --- a/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -36,36 +36,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %16 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %19 = OpTypeFunction %v4float + %19 = OpConstantNull %half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %trunc_cc2b0d = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_half Function %16 - %13 = OpExtInst %half %15 Trunc %16 + %res = OpVariable %_ptr_Function_half Function %19 + %13 = OpExtInst %half %15 Trunc %half_0x1p_0 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %trunc_cc2b0d +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %trunc_cc2b0d OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %trunc_cc2b0d + %29 = OpLabel + %30 = OpFunctionCall %void %trunc_cc2b0d OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %trunc_cc2b0d + %32 = OpLabel + %33 = OpFunctionCall %void %trunc_cc2b0d OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl.expected.wgsl index a20cd36e1c..6963297c31 100644 --- a/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn trunc_cc2b0d() { - var res : f16 = trunc(f16()); + var res : f16 = trunc(1.0h); } @vertex diff --git a/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl b/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl index bae66bee52..bbc6432ee9 100644 --- a/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl +++ b/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl @@ -25,7 +25,7 @@ enable f16; // fn trunc(vec<4, f16>) -> vec<4, f16> fn trunc_ce7c17() { - var res: vec4 = trunc(vec4(f16())); + var res: vec4 = trunc(vec4(1.h)); } @vertex diff --git a/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl.expected.dxc.hlsl index 83e63a116f..3d1afee275 100644 --- a/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void trunc_ce7c17() { - vector res = trunc((float16_t(0.0h)).xxxx); + vector res = trunc((float16_t(1.0h)).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl.expected.glsl b/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl.expected.glsl index 1ab86a51ad..751a5a1681 100644 --- a/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void trunc_ce7c17() { - f16vec4 res = trunc(f16vec4(0.0hf)); + f16vec4 res = trunc(f16vec4(1.0hf)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void trunc_ce7c17() { - f16vec4 res = trunc(f16vec4(0.0hf)); + f16vec4 res = trunc(f16vec4(1.0hf)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void trunc_ce7c17() { - f16vec4 res = trunc(f16vec4(0.0hf)); + f16vec4 res = trunc(f16vec4(1.0hf)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl.expected.msl b/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl.expected.msl index bbb5f1e3e2..2676f2e2ff 100644 --- a/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void trunc_ce7c17() { - half4 res = trunc(half4(0.0h)); + half4 res = trunc(half4(1.0h)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl.expected.spvasm index 2eecaa2e26..67233c51c4 100644 --- a/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -37,36 +37,38 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %17 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %18 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v4half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %trunc_ce7c17 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4half Function %17 - %13 = OpExtInst %v4half %16 Trunc %17 + %res = OpVariable %_ptr_Function_v4half Function %21 + %13 = OpExtInst %v4half %16 Trunc %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %trunc_ce7c17 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %trunc_ce7c17 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %trunc_ce7c17 + %31 = OpLabel + %32 = OpFunctionCall %void %trunc_ce7c17 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %trunc_ce7c17 + %34 = OpLabel + %35 = OpFunctionCall %void %trunc_ce7c17 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl.expected.wgsl index 0004a8c4a3..2f491edb30 100644 --- a/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn trunc_ce7c17() { - var res : vec4 = trunc(vec4(f16())); + var res : vec4 = trunc(vec4(1.0h)); } @vertex diff --git a/test/tint/builtins/gen/var/abs/421ca3.wgsl b/test/tint/builtins/gen/var/abs/421ca3.wgsl index c5557d3864..a035251d98 100644 --- a/test/tint/builtins/gen/var/abs/421ca3.wgsl +++ b/test/tint/builtins/gen/var/abs/421ca3.wgsl @@ -25,7 +25,7 @@ enable f16; // fn abs(vec<3, f16>) -> vec<3, f16> fn abs_421ca3() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.h); var res: vec3 = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/421ca3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/abs/421ca3.wgsl.expected.dxc.hlsl index cd5239b78d..3154eb20a8 100644 --- a/test/tint/builtins/gen/var/abs/421ca3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/abs/421ca3.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void abs_421ca3() { - vector arg_0 = (float16_t(0.0h)).xxx; + vector arg_0 = (float16_t(1.0h)).xxx; vector res = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/421ca3.wgsl.expected.glsl b/test/tint/builtins/gen/var/abs/421ca3.wgsl.expected.glsl index 8ddae5f59f..88d0689d30 100644 --- a/test/tint/builtins/gen/var/abs/421ca3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/abs/421ca3.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void abs_421ca3() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = abs(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void abs_421ca3() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = abs(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void abs_421ca3() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/421ca3.wgsl.expected.msl b/test/tint/builtins/gen/var/abs/421ca3.wgsl.expected.msl index e40c3ac86a..798b96ebd8 100644 --- a/test/tint/builtins/gen/var/abs/421ca3.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/abs/421ca3.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void abs_421ca3() { - half3 arg_0 = half3(0.0h); + half3 arg_0 = half3(1.0h); half3 res = fabs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/421ca3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/abs/421ca3.wgsl.expected.spvasm index 1f1be0aec4..3e44894414 100644 --- a/test/tint/builtins/gen/var/abs/421ca3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/abs/421ca3.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %abs_421ca3 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3half Function %15 - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v3half %arg_0 - %18 = OpExtInst %v3half %19 FAbs %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v3half Function %19 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v3half %arg_0 + %20 = OpExtInst %v3half %21 FAbs %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %abs_421ca3 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %abs_421ca3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %abs_421ca3 + %33 = OpLabel + %34 = OpFunctionCall %void %abs_421ca3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %abs_421ca3 + %36 = OpLabel + %37 = OpFunctionCall %void %abs_421ca3 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/abs/421ca3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/abs/421ca3.wgsl.expected.wgsl index 7d15e4aebc..983500285b 100644 --- a/test/tint/builtins/gen/var/abs/421ca3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/abs/421ca3.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn abs_421ca3() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.0h); var res : vec3 = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/538d29.wgsl b/test/tint/builtins/gen/var/abs/538d29.wgsl index 333532f40d..8537d25677 100644 --- a/test/tint/builtins/gen/var/abs/538d29.wgsl +++ b/test/tint/builtins/gen/var/abs/538d29.wgsl @@ -25,7 +25,7 @@ enable f16; // fn abs(vec<4, f16>) -> vec<4, f16> fn abs_538d29() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.h); var res: vec4 = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/538d29.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/abs/538d29.wgsl.expected.dxc.hlsl index 99a98603c7..f22efbc025 100644 --- a/test/tint/builtins/gen/var/abs/538d29.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/abs/538d29.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void abs_538d29() { - vector arg_0 = (float16_t(0.0h)).xxxx; + vector arg_0 = (float16_t(1.0h)).xxxx; vector res = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/538d29.wgsl.expected.glsl b/test/tint/builtins/gen/var/abs/538d29.wgsl.expected.glsl index 10d37e7f97..48fa2e3e5e 100644 --- a/test/tint/builtins/gen/var/abs/538d29.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/abs/538d29.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void abs_538d29() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = abs(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void abs_538d29() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = abs(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void abs_538d29() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/538d29.wgsl.expected.msl b/test/tint/builtins/gen/var/abs/538d29.wgsl.expected.msl index 3c8d74a014..09b242be97 100644 --- a/test/tint/builtins/gen/var/abs/538d29.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/abs/538d29.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void abs_538d29() { - half4 arg_0 = half4(0.0h); + half4 arg_0 = half4(1.0h); half4 res = fabs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/538d29.wgsl.expected.spvasm b/test/tint/builtins/gen/var/abs/538d29.wgsl.expected.spvasm index 777bcc2e4f..dad09f3b83 100644 --- a/test/tint/builtins/gen/var/abs/538d29.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/abs/538d29.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v4half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %abs_538d29 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4half Function %15 - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v4half %arg_0 - %18 = OpExtInst %v4half %19 FAbs %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v4half Function %19 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v4half %arg_0 + %20 = OpExtInst %v4half %21 FAbs %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %abs_538d29 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %abs_538d29 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %abs_538d29 + %33 = OpLabel + %34 = OpFunctionCall %void %abs_538d29 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %abs_538d29 + %36 = OpLabel + %37 = OpFunctionCall %void %abs_538d29 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/abs/538d29.wgsl.expected.wgsl b/test/tint/builtins/gen/var/abs/538d29.wgsl.expected.wgsl index e7749f15e9..4fe6e8e7b0 100644 --- a/test/tint/builtins/gen/var/abs/538d29.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/abs/538d29.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn abs_538d29() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.0h); var res : vec4 = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/5ae4fe.wgsl b/test/tint/builtins/gen/var/abs/5ae4fe.wgsl index 19384bc9b6..470e133491 100644 --- a/test/tint/builtins/gen/var/abs/5ae4fe.wgsl +++ b/test/tint/builtins/gen/var/abs/5ae4fe.wgsl @@ -25,7 +25,7 @@ enable f16; // fn abs(vec<2, f16>) -> vec<2, f16> fn abs_5ae4fe() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.h); var res: vec2 = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/5ae4fe.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/abs/5ae4fe.wgsl.expected.dxc.hlsl index eb119af9b1..326415e678 100644 --- a/test/tint/builtins/gen/var/abs/5ae4fe.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/abs/5ae4fe.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void abs_5ae4fe() { - vector arg_0 = (float16_t(0.0h)).xx; + vector arg_0 = (float16_t(1.0h)).xx; vector res = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/5ae4fe.wgsl.expected.glsl b/test/tint/builtins/gen/var/abs/5ae4fe.wgsl.expected.glsl index 38a613d9a9..65938a32ae 100644 --- a/test/tint/builtins/gen/var/abs/5ae4fe.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/abs/5ae4fe.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void abs_5ae4fe() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = abs(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void abs_5ae4fe() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = abs(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void abs_5ae4fe() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/5ae4fe.wgsl.expected.msl b/test/tint/builtins/gen/var/abs/5ae4fe.wgsl.expected.msl index 2a223eb9ec..965d1c9c9a 100644 --- a/test/tint/builtins/gen/var/abs/5ae4fe.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/abs/5ae4fe.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void abs_5ae4fe() { - half2 arg_0 = half2(0.0h); + half2 arg_0 = half2(1.0h); half2 res = fabs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/5ae4fe.wgsl.expected.spvasm b/test/tint/builtins/gen/var/abs/5ae4fe.wgsl.expected.spvasm index 451a9324b3..297ad4542e 100644 --- a/test/tint/builtins/gen/var/abs/5ae4fe.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/abs/5ae4fe.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v2half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %abs_5ae4fe = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2half Function %15 - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v2half %arg_0 - %18 = OpExtInst %v2half %19 FAbs %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v2half Function %19 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v2half %arg_0 + %20 = OpExtInst %v2half %21 FAbs %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %abs_5ae4fe +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %abs_5ae4fe OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %abs_5ae4fe + %33 = OpLabel + %34 = OpFunctionCall %void %abs_5ae4fe OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %abs_5ae4fe + %36 = OpLabel + %37 = OpFunctionCall %void %abs_5ae4fe OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/abs/5ae4fe.wgsl.expected.wgsl b/test/tint/builtins/gen/var/abs/5ae4fe.wgsl.expected.wgsl index fe5cd69d41..31475e6db8 100644 --- a/test/tint/builtins/gen/var/abs/5ae4fe.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/abs/5ae4fe.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn abs_5ae4fe() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.0h); var res : vec2 = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/fd247f.wgsl b/test/tint/builtins/gen/var/abs/fd247f.wgsl index a347b41699..eddb271f16 100644 --- a/test/tint/builtins/gen/var/abs/fd247f.wgsl +++ b/test/tint/builtins/gen/var/abs/fd247f.wgsl @@ -25,7 +25,7 @@ enable f16; // fn abs(f16) -> f16 fn abs_fd247f() { - var arg_0 = f16(); + var arg_0 = 1.h; var res: f16 = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/fd247f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/abs/fd247f.wgsl.expected.dxc.hlsl index 94ac0c575d..b5f616ac98 100644 --- a/test/tint/builtins/gen/var/abs/fd247f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/abs/fd247f.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void abs_fd247f() { - float16_t arg_0 = float16_t(0.0h); + float16_t arg_0 = float16_t(1.0h); float16_t res = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/fd247f.wgsl.expected.glsl b/test/tint/builtins/gen/var/abs/fd247f.wgsl.expected.glsl index 704f3ef46a..2310d41af4 100644 --- a/test/tint/builtins/gen/var/abs/fd247f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/abs/fd247f.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void abs_fd247f() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = abs(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void abs_fd247f() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = abs(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void abs_fd247f() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/fd247f.wgsl.expected.msl b/test/tint/builtins/gen/var/abs/fd247f.wgsl.expected.msl index 0090547046..41c1bdca48 100644 --- a/test/tint/builtins/gen/var/abs/fd247f.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/abs/fd247f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void abs_fd247f() { - half arg_0 = 0.0h; + half arg_0 = 1.0h; half res = fabs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/fd247f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/abs/fd247f.wgsl.expected.spvasm index 7594c69b3a..20cfa7c038 100644 --- a/test/tint/builtins/gen/var/abs/fd247f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/abs/fd247f.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %18 = OpExtInstImport "GLSL.std.450" + %19 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -37,39 +37,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %21 = OpTypeFunction %v4float + %17 = OpConstantNull %half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %abs_fd247f = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_half Function %14 - %res = OpVariable %_ptr_Function_half Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %half %arg_0 - %17 = OpExtInst %half %18 FAbs %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_half Function %17 + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %arg_0 %half_0x1p_0 + %20 = OpLoad %half %arg_0 + %18 = OpExtInst %half %19 FAbs %20 + OpStore %res %18 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %abs_fd247f +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %abs_fd247f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %abs_fd247f + %31 = OpLabel + %32 = OpFunctionCall %void %abs_fd247f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %abs_fd247f + %34 = OpLabel + %35 = OpFunctionCall %void %abs_fd247f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/abs/fd247f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/abs/fd247f.wgsl.expected.wgsl index 99d265c381..0bf843ad64 100644 --- a/test/tint/builtins/gen/var/abs/fd247f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/abs/fd247f.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn abs_fd247f() { - var arg_0 = f16(); + var arg_0 = 1.0h; var res : f16 = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/acos/004aff.wgsl b/test/tint/builtins/gen/var/acos/004aff.wgsl index a414dbc891..a9301ff8da 100644 --- a/test/tint/builtins/gen/var/acos/004aff.wgsl +++ b/test/tint/builtins/gen/var/acos/004aff.wgsl @@ -25,7 +25,7 @@ enable f16; // fn acos(vec<2, f16>) -> vec<2, f16> fn acos_004aff() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(0.96891242171h); var res: vec2 = acos(arg_0); } diff --git a/test/tint/builtins/gen/var/acos/004aff.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/acos/004aff.wgsl.expected.dxc.hlsl index 46a0caf756..069aa4e98a 100644 --- a/test/tint/builtins/gen/var/acos/004aff.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/acos/004aff.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void acos_004aff() { - vector arg_0 = (float16_t(0.0h)).xx; + vector arg_0 = (float16_t(0.96875h)).xx; vector res = acos(arg_0); } diff --git a/test/tint/builtins/gen/var/acos/004aff.wgsl.expected.glsl b/test/tint/builtins/gen/var/acos/004aff.wgsl.expected.glsl index 1b33ea1962..bfd00d52f4 100644 --- a/test/tint/builtins/gen/var/acos/004aff.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/acos/004aff.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void acos_004aff() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(0.96875hf); f16vec2 res = acos(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void acos_004aff() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(0.96875hf); f16vec2 res = acos(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void acos_004aff() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(0.96875hf); f16vec2 res = acos(arg_0); } diff --git a/test/tint/builtins/gen/var/acos/004aff.wgsl.expected.msl b/test/tint/builtins/gen/var/acos/004aff.wgsl.expected.msl index c5a6e7637b..f4fe636a67 100644 --- a/test/tint/builtins/gen/var/acos/004aff.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/acos/004aff.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void acos_004aff() { - half2 arg_0 = half2(0.0h); + half2 arg_0 = half2(0.96875h); half2 res = acos(arg_0); } diff --git a/test/tint/builtins/gen/var/acos/004aff.wgsl.expected.spvasm b/test/tint/builtins/gen/var/acos/004aff.wgsl.expected.spvasm index b654c2f795..a76aa23c54 100644 --- a/test/tint/builtins/gen/var/acos/004aff.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/acos/004aff.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1_fpn1 = OpConstant %half 0x1.fp-1 + %16 = OpConstantComposite %v2half %half_0x1_fpn1 %half_0x1_fpn1 %_ptr_Function_v2half = OpTypePointer Function %v2half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v2half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %acos_004aff = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2half Function %15 - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v2half %arg_0 - %18 = OpExtInst %v2half %19 Acos %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v2half Function %19 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v2half %arg_0 + %20 = OpExtInst %v2half %21 Acos %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %acos_004aff +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %acos_004aff OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %acos_004aff + %33 = OpLabel + %34 = OpFunctionCall %void %acos_004aff OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %acos_004aff + %36 = OpLabel + %37 = OpFunctionCall %void %acos_004aff OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/acos/004aff.wgsl.expected.wgsl b/test/tint/builtins/gen/var/acos/004aff.wgsl.expected.wgsl index 9f2035be4a..0c0757fa59 100644 --- a/test/tint/builtins/gen/var/acos/004aff.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/acos/004aff.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn acos_004aff() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(0.96875h); var res : vec2 = acos(arg_0); } diff --git a/test/tint/builtins/gen/var/acos/203628.wgsl b/test/tint/builtins/gen/var/acos/203628.wgsl index 6ec10ba5f2..190ed6b91e 100644 --- a/test/tint/builtins/gen/var/acos/203628.wgsl +++ b/test/tint/builtins/gen/var/acos/203628.wgsl @@ -25,7 +25,7 @@ enable f16; // fn acos(vec<4, f16>) -> vec<4, f16> fn acos_203628() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(0.96891242171h); var res: vec4 = acos(arg_0); } diff --git a/test/tint/builtins/gen/var/acos/203628.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/acos/203628.wgsl.expected.dxc.hlsl index b2c8911e27..0f78eff71a 100644 --- a/test/tint/builtins/gen/var/acos/203628.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/acos/203628.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void acos_203628() { - vector arg_0 = (float16_t(0.0h)).xxxx; + vector arg_0 = (float16_t(0.96875h)).xxxx; vector res = acos(arg_0); } diff --git a/test/tint/builtins/gen/var/acos/203628.wgsl.expected.glsl b/test/tint/builtins/gen/var/acos/203628.wgsl.expected.glsl index fa94d0f58c..d02ae5f819 100644 --- a/test/tint/builtins/gen/var/acos/203628.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/acos/203628.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void acos_203628() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(0.96875hf); f16vec4 res = acos(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void acos_203628() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(0.96875hf); f16vec4 res = acos(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void acos_203628() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(0.96875hf); f16vec4 res = acos(arg_0); } diff --git a/test/tint/builtins/gen/var/acos/203628.wgsl.expected.msl b/test/tint/builtins/gen/var/acos/203628.wgsl.expected.msl index 9f35174fd5..de37dfc121 100644 --- a/test/tint/builtins/gen/var/acos/203628.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/acos/203628.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void acos_203628() { - half4 arg_0 = half4(0.0h); + half4 arg_0 = half4(0.96875h); half4 res = acos(arg_0); } diff --git a/test/tint/builtins/gen/var/acos/203628.wgsl.expected.spvasm b/test/tint/builtins/gen/var/acos/203628.wgsl.expected.spvasm index 3069e9aa25..32f8934fca 100644 --- a/test/tint/builtins/gen/var/acos/203628.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/acos/203628.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1_fpn1 = OpConstant %half 0x1.fp-1 + %16 = OpConstantComposite %v4half %half_0x1_fpn1 %half_0x1_fpn1 %half_0x1_fpn1 %half_0x1_fpn1 %_ptr_Function_v4half = OpTypePointer Function %v4half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v4half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %acos_203628 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4half Function %15 - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v4half %arg_0 - %18 = OpExtInst %v4half %19 Acos %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v4half Function %19 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v4half %arg_0 + %20 = OpExtInst %v4half %21 Acos %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %acos_203628 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %acos_203628 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %acos_203628 + %33 = OpLabel + %34 = OpFunctionCall %void %acos_203628 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %acos_203628 + %36 = OpLabel + %37 = OpFunctionCall %void %acos_203628 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/acos/203628.wgsl.expected.wgsl b/test/tint/builtins/gen/var/acos/203628.wgsl.expected.wgsl index 78fc613d50..7ae7a2f988 100644 --- a/test/tint/builtins/gen/var/acos/203628.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/acos/203628.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn acos_203628() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(0.96875h); var res : vec4 = acos(arg_0); } diff --git a/test/tint/builtins/gen/var/acos/303e3d.wgsl b/test/tint/builtins/gen/var/acos/303e3d.wgsl index 39290afec5..2ab53bf149 100644 --- a/test/tint/builtins/gen/var/acos/303e3d.wgsl +++ b/test/tint/builtins/gen/var/acos/303e3d.wgsl @@ -25,7 +25,7 @@ enable f16; // fn acos(f16) -> f16 fn acos_303e3d() { - var arg_0 = f16(); + var arg_0 = 0.96891242171h; var res: f16 = acos(arg_0); } diff --git a/test/tint/builtins/gen/var/acos/303e3d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/acos/303e3d.wgsl.expected.dxc.hlsl index dd39161e8e..109dc17af5 100644 --- a/test/tint/builtins/gen/var/acos/303e3d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/acos/303e3d.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void acos_303e3d() { - float16_t arg_0 = float16_t(0.0h); + float16_t arg_0 = float16_t(0.96875h); float16_t res = acos(arg_0); } diff --git a/test/tint/builtins/gen/var/acos/303e3d.wgsl.expected.glsl b/test/tint/builtins/gen/var/acos/303e3d.wgsl.expected.glsl index 5a6a3e3b17..aec686c135 100644 --- a/test/tint/builtins/gen/var/acos/303e3d.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/acos/303e3d.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void acos_303e3d() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 0.96875hf; float16_t res = acos(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void acos_303e3d() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 0.96875hf; float16_t res = acos(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void acos_303e3d() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 0.96875hf; float16_t res = acos(arg_0); } diff --git a/test/tint/builtins/gen/var/acos/303e3d.wgsl.expected.msl b/test/tint/builtins/gen/var/acos/303e3d.wgsl.expected.msl index 05c4e64b42..79648618b1 100644 --- a/test/tint/builtins/gen/var/acos/303e3d.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/acos/303e3d.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void acos_303e3d() { - half arg_0 = 0.0h; + half arg_0 = 0.96875h; half res = acos(arg_0); } diff --git a/test/tint/builtins/gen/var/acos/303e3d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/acos/303e3d.wgsl.expected.spvasm index b915e0d28d..4f35f228d4 100644 --- a/test/tint/builtins/gen/var/acos/303e3d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/acos/303e3d.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %18 = OpExtInstImport "GLSL.std.450" + %19 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -37,39 +37,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1_fpn1 = OpConstant %half 0x1.fp-1 %_ptr_Function_half = OpTypePointer Function %half - %21 = OpTypeFunction %v4float + %17 = OpConstantNull %half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %acos_303e3d = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_half Function %14 - %res = OpVariable %_ptr_Function_half Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %half %arg_0 - %17 = OpExtInst %half %18 Acos %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_half Function %17 + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %arg_0 %half_0x1_fpn1 + %20 = OpLoad %half %arg_0 + %18 = OpExtInst %half %19 Acos %20 + OpStore %res %18 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %acos_303e3d +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %acos_303e3d OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %acos_303e3d + %31 = OpLabel + %32 = OpFunctionCall %void %acos_303e3d OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %acos_303e3d + %34 = OpLabel + %35 = OpFunctionCall %void %acos_303e3d OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/acos/303e3d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/acos/303e3d.wgsl.expected.wgsl index e91cf5b527..624382b404 100644 --- a/test/tint/builtins/gen/var/acos/303e3d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/acos/303e3d.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn acos_303e3d() { - var arg_0 = f16(); + var arg_0 = 0.96875h; var res : f16 = acos(arg_0); } diff --git a/test/tint/builtins/gen/var/acos/f47057.wgsl b/test/tint/builtins/gen/var/acos/f47057.wgsl index b1b2fe7dc2..cdd663d4b1 100644 --- a/test/tint/builtins/gen/var/acos/f47057.wgsl +++ b/test/tint/builtins/gen/var/acos/f47057.wgsl @@ -25,7 +25,7 @@ enable f16; // fn acos(vec<3, f16>) -> vec<3, f16> fn acos_f47057() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(0.96891242171h); var res: vec3 = acos(arg_0); } diff --git a/test/tint/builtins/gen/var/acos/f47057.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/acos/f47057.wgsl.expected.dxc.hlsl index 8f0fa43bad..55cf89b4ae 100644 --- a/test/tint/builtins/gen/var/acos/f47057.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/acos/f47057.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void acos_f47057() { - vector arg_0 = (float16_t(0.0h)).xxx; + vector arg_0 = (float16_t(0.96875h)).xxx; vector res = acos(arg_0); } diff --git a/test/tint/builtins/gen/var/acos/f47057.wgsl.expected.glsl b/test/tint/builtins/gen/var/acos/f47057.wgsl.expected.glsl index 67209db4c6..1081143d68 100644 --- a/test/tint/builtins/gen/var/acos/f47057.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/acos/f47057.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void acos_f47057() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(0.96875hf); f16vec3 res = acos(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void acos_f47057() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(0.96875hf); f16vec3 res = acos(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void acos_f47057() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(0.96875hf); f16vec3 res = acos(arg_0); } diff --git a/test/tint/builtins/gen/var/acos/f47057.wgsl.expected.msl b/test/tint/builtins/gen/var/acos/f47057.wgsl.expected.msl index 376ae7ee68..f04f96eabc 100644 --- a/test/tint/builtins/gen/var/acos/f47057.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/acos/f47057.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void acos_f47057() { - half3 arg_0 = half3(0.0h); + half3 arg_0 = half3(0.96875h); half3 res = acos(arg_0); } diff --git a/test/tint/builtins/gen/var/acos/f47057.wgsl.expected.spvasm b/test/tint/builtins/gen/var/acos/f47057.wgsl.expected.spvasm index dcfdc44df6..e36b728f78 100644 --- a/test/tint/builtins/gen/var/acos/f47057.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/acos/f47057.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1_fpn1 = OpConstant %half 0x1.fp-1 + %16 = OpConstantComposite %v3half %half_0x1_fpn1 %half_0x1_fpn1 %half_0x1_fpn1 %_ptr_Function_v3half = OpTypePointer Function %v3half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %acos_f47057 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3half Function %15 - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v3half %arg_0 - %18 = OpExtInst %v3half %19 Acos %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v3half Function %19 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v3half %arg_0 + %20 = OpExtInst %v3half %21 Acos %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %acos_f47057 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %acos_f47057 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %acos_f47057 + %33 = OpLabel + %34 = OpFunctionCall %void %acos_f47057 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %acos_f47057 + %36 = OpLabel + %37 = OpFunctionCall %void %acos_f47057 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/acos/f47057.wgsl.expected.wgsl b/test/tint/builtins/gen/var/acos/f47057.wgsl.expected.wgsl index 5b55578aa1..06677eed7b 100644 --- a/test/tint/builtins/gen/var/acos/f47057.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/acos/f47057.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn acos_f47057() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(0.96875h); var res : vec3 = acos(arg_0); } diff --git a/test/tint/builtins/gen/var/acosh/5f49d8.wgsl b/test/tint/builtins/gen/var/acosh/5f49d8.wgsl index d421a819a2..d0bb8456f5 100644 --- a/test/tint/builtins/gen/var/acosh/5f49d8.wgsl +++ b/test/tint/builtins/gen/var/acosh/5f49d8.wgsl @@ -25,7 +25,7 @@ enable f16; // fn acosh(vec<2, f16>) -> vec<2, f16> fn acosh_5f49d8() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.h); var res: vec2 = acosh(arg_0); } diff --git a/test/tint/builtins/gen/var/acosh/5f49d8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/acosh/5f49d8.wgsl.expected.dxc.hlsl index d2768e742e..f9ed81508f 100644 --- a/test/tint/builtins/gen/var/acosh/5f49d8.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/acosh/5f49d8.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ vector tint_acosh(vector x) { } void acosh_5f49d8() { - vector arg_0 = (float16_t(0.0h)).xx; + vector arg_0 = (float16_t(1.0h)).xx; vector res = tint_acosh(arg_0); } diff --git a/test/tint/builtins/gen/var/acosh/5f49d8.wgsl.expected.glsl b/test/tint/builtins/gen/var/acosh/5f49d8.wgsl.expected.glsl index 033e902092..c8b79d95a5 100644 --- a/test/tint/builtins/gen/var/acosh/5f49d8.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/acosh/5f49d8.wgsl.expected.glsl @@ -6,7 +6,7 @@ f16vec2 tint_acosh(f16vec2 x) { } void acosh_5f49d8() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = tint_acosh(arg_0); } @@ -32,7 +32,7 @@ f16vec2 tint_acosh(f16vec2 x) { } void acosh_5f49d8() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = tint_acosh(arg_0); } @@ -52,7 +52,7 @@ f16vec2 tint_acosh(f16vec2 x) { } void acosh_5f49d8() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = tint_acosh(arg_0); } diff --git a/test/tint/builtins/gen/var/acosh/5f49d8.wgsl.expected.msl b/test/tint/builtins/gen/var/acosh/5f49d8.wgsl.expected.msl index b6ed0f0939..e0ceb2df52 100644 --- a/test/tint/builtins/gen/var/acosh/5f49d8.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/acosh/5f49d8.wgsl.expected.msl @@ -6,7 +6,7 @@ half2 tint_acosh(half2 x) { } void acosh_5f49d8() { - half2 arg_0 = half2(0.0h); + half2 arg_0 = half2(1.0h); half2 res = tint_acosh(arg_0); } diff --git a/test/tint/builtins/gen/var/acosh/5f49d8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/acosh/5f49d8.wgsl.expected.spvasm index bb409ff113..b1a06dab2d 100644 --- a/test/tint/builtins/gen/var/acosh/5f49d8.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/acosh/5f49d8.wgsl.expected.spvasm @@ -61,7 +61,7 @@ %27 = OpLabel %arg_0 = OpVariable %_ptr_Function_v2half Function %21 %res = OpVariable %_ptr_Function_v2half Function %21 - OpStore %arg_0 %21 + OpStore %arg_0 %17 %31 = OpLoad %v2half %arg_0 %30 = OpFunctionCall %v2half %tint_acosh %31 OpStore %res %30 diff --git a/test/tint/builtins/gen/var/acosh/5f49d8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/acosh/5f49d8.wgsl.expected.wgsl index 027ad7249e..278bf082cc 100644 --- a/test/tint/builtins/gen/var/acosh/5f49d8.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/acosh/5f49d8.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn acosh_5f49d8() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.0h); var res : vec2 = acosh(arg_0); } diff --git a/test/tint/builtins/gen/var/acosh/a37dfe.wgsl b/test/tint/builtins/gen/var/acosh/a37dfe.wgsl index 805b9faeac..f2413b95a5 100644 --- a/test/tint/builtins/gen/var/acosh/a37dfe.wgsl +++ b/test/tint/builtins/gen/var/acosh/a37dfe.wgsl @@ -25,7 +25,7 @@ enable f16; // fn acosh(f16) -> f16 fn acosh_a37dfe() { - var arg_0 = f16(); + var arg_0 = 1.h; var res: f16 = acosh(arg_0); } diff --git a/test/tint/builtins/gen/var/acosh/a37dfe.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/acosh/a37dfe.wgsl.expected.dxc.hlsl index 632b73091a..b017d33110 100644 --- a/test/tint/builtins/gen/var/acosh/a37dfe.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/acosh/a37dfe.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ float16_t tint_acosh(float16_t x) { } void acosh_a37dfe() { - float16_t arg_0 = float16_t(0.0h); + float16_t arg_0 = float16_t(1.0h); float16_t res = tint_acosh(arg_0); } diff --git a/test/tint/builtins/gen/var/acosh/a37dfe.wgsl.expected.glsl b/test/tint/builtins/gen/var/acosh/a37dfe.wgsl.expected.glsl index be2d5fea3a..d31bcbea67 100644 --- a/test/tint/builtins/gen/var/acosh/a37dfe.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/acosh/a37dfe.wgsl.expected.glsl @@ -6,7 +6,7 @@ float16_t tint_acosh(float16_t x) { } void acosh_a37dfe() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = tint_acosh(arg_0); } @@ -32,7 +32,7 @@ float16_t tint_acosh(float16_t x) { } void acosh_a37dfe() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = tint_acosh(arg_0); } @@ -52,7 +52,7 @@ float16_t tint_acosh(float16_t x) { } void acosh_a37dfe() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = tint_acosh(arg_0); } diff --git a/test/tint/builtins/gen/var/acosh/a37dfe.wgsl.expected.msl b/test/tint/builtins/gen/var/acosh/a37dfe.wgsl.expected.msl index 77aed14e97..954b35dbf6 100644 --- a/test/tint/builtins/gen/var/acosh/a37dfe.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/acosh/a37dfe.wgsl.expected.msl @@ -6,7 +6,7 @@ half tint_acosh(half x) { } void acosh_a37dfe() { - half arg_0 = 0.0h; + half arg_0 = 1.0h; half res = tint_acosh(arg_0); } diff --git a/test/tint/builtins/gen/var/acosh/a37dfe.wgsl.expected.spvasm b/test/tint/builtins/gen/var/acosh/a37dfe.wgsl.expected.spvasm index 1eede38652..d30c5b913a 100644 --- a/test/tint/builtins/gen/var/acosh/a37dfe.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/acosh/a37dfe.wgsl.expected.spvasm @@ -58,7 +58,7 @@ %24 = OpLabel %arg_0 = OpVariable %_ptr_Function_half Function %18 %res = OpVariable %_ptr_Function_half Function %18 - OpStore %arg_0 %18 + OpStore %arg_0 %half_0x1p_0 %28 = OpLoad %half %arg_0 %27 = OpFunctionCall %half %tint_acosh %28 OpStore %res %27 diff --git a/test/tint/builtins/gen/var/acosh/a37dfe.wgsl.expected.wgsl b/test/tint/builtins/gen/var/acosh/a37dfe.wgsl.expected.wgsl index c5a84365b9..dc6a048400 100644 --- a/test/tint/builtins/gen/var/acosh/a37dfe.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/acosh/a37dfe.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn acosh_a37dfe() { - var arg_0 = f16(); + var arg_0 = 1.0h; var res : f16 = acosh(arg_0); } diff --git a/test/tint/builtins/gen/var/acosh/de60d8.wgsl b/test/tint/builtins/gen/var/acosh/de60d8.wgsl index 06b3c4aeea..8b351e926b 100644 --- a/test/tint/builtins/gen/var/acosh/de60d8.wgsl +++ b/test/tint/builtins/gen/var/acosh/de60d8.wgsl @@ -25,7 +25,7 @@ enable f16; // fn acosh(vec<4, f16>) -> vec<4, f16> fn acosh_de60d8() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.h); var res: vec4 = acosh(arg_0); } diff --git a/test/tint/builtins/gen/var/acosh/de60d8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/acosh/de60d8.wgsl.expected.dxc.hlsl index beda5f45dc..c7d2b723bd 100644 --- a/test/tint/builtins/gen/var/acosh/de60d8.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/acosh/de60d8.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ vector tint_acosh(vector x) { } void acosh_de60d8() { - vector arg_0 = (float16_t(0.0h)).xxxx; + vector arg_0 = (float16_t(1.0h)).xxxx; vector res = tint_acosh(arg_0); } diff --git a/test/tint/builtins/gen/var/acosh/de60d8.wgsl.expected.glsl b/test/tint/builtins/gen/var/acosh/de60d8.wgsl.expected.glsl index b63ecb78b7..a9b1dc5a59 100644 --- a/test/tint/builtins/gen/var/acosh/de60d8.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/acosh/de60d8.wgsl.expected.glsl @@ -6,7 +6,7 @@ f16vec4 tint_acosh(f16vec4 x) { } void acosh_de60d8() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = tint_acosh(arg_0); } @@ -32,7 +32,7 @@ f16vec4 tint_acosh(f16vec4 x) { } void acosh_de60d8() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = tint_acosh(arg_0); } @@ -52,7 +52,7 @@ f16vec4 tint_acosh(f16vec4 x) { } void acosh_de60d8() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = tint_acosh(arg_0); } diff --git a/test/tint/builtins/gen/var/acosh/de60d8.wgsl.expected.msl b/test/tint/builtins/gen/var/acosh/de60d8.wgsl.expected.msl index 0514328be3..b708a6f421 100644 --- a/test/tint/builtins/gen/var/acosh/de60d8.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/acosh/de60d8.wgsl.expected.msl @@ -6,7 +6,7 @@ half4 tint_acosh(half4 x) { } void acosh_de60d8() { - half4 arg_0 = half4(0.0h); + half4 arg_0 = half4(1.0h); half4 res = tint_acosh(arg_0); } diff --git a/test/tint/builtins/gen/var/acosh/de60d8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/acosh/de60d8.wgsl.expected.spvasm index 10eef9fe20..2f876ab245 100644 --- a/test/tint/builtins/gen/var/acosh/de60d8.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/acosh/de60d8.wgsl.expected.spvasm @@ -61,7 +61,7 @@ %27 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4half Function %21 %res = OpVariable %_ptr_Function_v4half Function %21 - OpStore %arg_0 %21 + OpStore %arg_0 %17 %31 = OpLoad %v4half %arg_0 %30 = OpFunctionCall %v4half %tint_acosh %31 OpStore %res %30 diff --git a/test/tint/builtins/gen/var/acosh/de60d8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/acosh/de60d8.wgsl.expected.wgsl index d8a3b14733..5cd64040f8 100644 --- a/test/tint/builtins/gen/var/acosh/de60d8.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/acosh/de60d8.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn acosh_de60d8() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.0h); var res : vec4 = acosh(arg_0); } diff --git a/test/tint/builtins/gen/var/acosh/f56574.wgsl b/test/tint/builtins/gen/var/acosh/f56574.wgsl index b6e484af58..f78069a766 100644 --- a/test/tint/builtins/gen/var/acosh/f56574.wgsl +++ b/test/tint/builtins/gen/var/acosh/f56574.wgsl @@ -25,7 +25,7 @@ enable f16; // fn acosh(vec<3, f16>) -> vec<3, f16> fn acosh_f56574() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.h); var res: vec3 = acosh(arg_0); } diff --git a/test/tint/builtins/gen/var/acosh/f56574.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/acosh/f56574.wgsl.expected.dxc.hlsl index b89a6f9730..4caefac4e8 100644 --- a/test/tint/builtins/gen/var/acosh/f56574.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/acosh/f56574.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ vector tint_acosh(vector x) { } void acosh_f56574() { - vector arg_0 = (float16_t(0.0h)).xxx; + vector arg_0 = (float16_t(1.0h)).xxx; vector res = tint_acosh(arg_0); } diff --git a/test/tint/builtins/gen/var/acosh/f56574.wgsl.expected.glsl b/test/tint/builtins/gen/var/acosh/f56574.wgsl.expected.glsl index a5e2a4db81..380997b5b2 100644 --- a/test/tint/builtins/gen/var/acosh/f56574.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/acosh/f56574.wgsl.expected.glsl @@ -6,7 +6,7 @@ f16vec3 tint_acosh(f16vec3 x) { } void acosh_f56574() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = tint_acosh(arg_0); } @@ -32,7 +32,7 @@ f16vec3 tint_acosh(f16vec3 x) { } void acosh_f56574() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = tint_acosh(arg_0); } @@ -52,7 +52,7 @@ f16vec3 tint_acosh(f16vec3 x) { } void acosh_f56574() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = tint_acosh(arg_0); } diff --git a/test/tint/builtins/gen/var/acosh/f56574.wgsl.expected.msl b/test/tint/builtins/gen/var/acosh/f56574.wgsl.expected.msl index 7499b88191..1715c27315 100644 --- a/test/tint/builtins/gen/var/acosh/f56574.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/acosh/f56574.wgsl.expected.msl @@ -6,7 +6,7 @@ half3 tint_acosh(half3 x) { } void acosh_f56574() { - half3 arg_0 = half3(0.0h); + half3 arg_0 = half3(1.0h); half3 res = tint_acosh(arg_0); } diff --git a/test/tint/builtins/gen/var/acosh/f56574.wgsl.expected.spvasm b/test/tint/builtins/gen/var/acosh/f56574.wgsl.expected.spvasm index d818740162..ee25e7a8f5 100644 --- a/test/tint/builtins/gen/var/acosh/f56574.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/acosh/f56574.wgsl.expected.spvasm @@ -61,7 +61,7 @@ %27 = OpLabel %arg_0 = OpVariable %_ptr_Function_v3half Function %21 %res = OpVariable %_ptr_Function_v3half Function %21 - OpStore %arg_0 %21 + OpStore %arg_0 %17 %31 = OpLoad %v3half %arg_0 %30 = OpFunctionCall %v3half %tint_acosh %31 OpStore %res %30 diff --git a/test/tint/builtins/gen/var/acosh/f56574.wgsl.expected.wgsl b/test/tint/builtins/gen/var/acosh/f56574.wgsl.expected.wgsl index 8cbc4f671c..c8cf166e1a 100644 --- a/test/tint/builtins/gen/var/acosh/f56574.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/acosh/f56574.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn acosh_f56574() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.0h); var res : vec3 = acosh(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/11dfda.wgsl b/test/tint/builtins/gen/var/asin/11dfda.wgsl index c9b250607d..4e3eed7ec1 100644 --- a/test/tint/builtins/gen/var/asin/11dfda.wgsl +++ b/test/tint/builtins/gen/var/asin/11dfda.wgsl @@ -25,7 +25,7 @@ enable f16; // fn asin(f16) -> f16 fn asin_11dfda() { - var arg_0 = f16(); + var arg_0 = 0.479425538604h; var res: f16 = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/11dfda.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/asin/11dfda.wgsl.expected.dxc.hlsl index 10ac617a2f..e34b3ab22a 100644 --- a/test/tint/builtins/gen/var/asin/11dfda.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/asin/11dfda.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void asin_11dfda() { - float16_t arg_0 = float16_t(0.0h); + float16_t arg_0 = float16_t(0.479248047h); float16_t res = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/11dfda.wgsl.expected.glsl b/test/tint/builtins/gen/var/asin/11dfda.wgsl.expected.glsl index 948c08d4ad..4100486740 100644 --- a/test/tint/builtins/gen/var/asin/11dfda.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/asin/11dfda.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void asin_11dfda() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 0.479248047hf; float16_t res = asin(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void asin_11dfda() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 0.479248047hf; float16_t res = asin(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void asin_11dfda() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 0.479248047hf; float16_t res = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/11dfda.wgsl.expected.msl b/test/tint/builtins/gen/var/asin/11dfda.wgsl.expected.msl index f59c879943..785eafec97 100644 --- a/test/tint/builtins/gen/var/asin/11dfda.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/asin/11dfda.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void asin_11dfda() { - half arg_0 = 0.0h; + half arg_0 = 0.479248047h; half res = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/11dfda.wgsl.expected.spvasm b/test/tint/builtins/gen/var/asin/11dfda.wgsl.expected.spvasm index 2e6097a9a1..c1fb650d67 100644 --- a/test/tint/builtins/gen/var/asin/11dfda.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/asin/11dfda.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %18 = OpExtInstImport "GLSL.std.450" + %19 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -37,39 +37,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1_eacpn2 = OpConstant %half 0x1.eacp-2 %_ptr_Function_half = OpTypePointer Function %half - %21 = OpTypeFunction %v4float + %17 = OpConstantNull %half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %asin_11dfda = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_half Function %14 - %res = OpVariable %_ptr_Function_half Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %half %arg_0 - %17 = OpExtInst %half %18 Asin %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_half Function %17 + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %arg_0 %half_0x1_eacpn2 + %20 = OpLoad %half %arg_0 + %18 = OpExtInst %half %19 Asin %20 + OpStore %res %18 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %asin_11dfda +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %asin_11dfda OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %asin_11dfda + %31 = OpLabel + %32 = OpFunctionCall %void %asin_11dfda OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %asin_11dfda + %34 = OpLabel + %35 = OpFunctionCall %void %asin_11dfda OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/asin/11dfda.wgsl.expected.wgsl b/test/tint/builtins/gen/var/asin/11dfda.wgsl.expected.wgsl index abe2463306..8e37925169 100644 --- a/test/tint/builtins/gen/var/asin/11dfda.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/asin/11dfda.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn asin_11dfda() { - var arg_0 = f16(); + var arg_0 = 0.479248047h; var res : f16 = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/2d8e29.wgsl b/test/tint/builtins/gen/var/asin/2d8e29.wgsl index fdf613e9a5..2aeaca0896 100644 --- a/test/tint/builtins/gen/var/asin/2d8e29.wgsl +++ b/test/tint/builtins/gen/var/asin/2d8e29.wgsl @@ -25,7 +25,7 @@ enable f16; // fn asin(vec<3, f16>) -> vec<3, f16> fn asin_2d8e29() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(0.479425538604h); var res: vec3 = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/2d8e29.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/asin/2d8e29.wgsl.expected.dxc.hlsl index 4c22612734..201463d752 100644 --- a/test/tint/builtins/gen/var/asin/2d8e29.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/asin/2d8e29.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void asin_2d8e29() { - vector arg_0 = (float16_t(0.0h)).xxx; + vector arg_0 = (float16_t(0.479248047h)).xxx; vector res = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/2d8e29.wgsl.expected.glsl b/test/tint/builtins/gen/var/asin/2d8e29.wgsl.expected.glsl index e5c01aeb73..e554dffeea 100644 --- a/test/tint/builtins/gen/var/asin/2d8e29.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/asin/2d8e29.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void asin_2d8e29() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(0.479248047hf); f16vec3 res = asin(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void asin_2d8e29() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(0.479248047hf); f16vec3 res = asin(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void asin_2d8e29() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(0.479248047hf); f16vec3 res = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/2d8e29.wgsl.expected.msl b/test/tint/builtins/gen/var/asin/2d8e29.wgsl.expected.msl index efafdf5cb7..d4e5c78820 100644 --- a/test/tint/builtins/gen/var/asin/2d8e29.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/asin/2d8e29.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void asin_2d8e29() { - half3 arg_0 = half3(0.0h); + half3 arg_0 = half3(0.479248047h); half3 res = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/2d8e29.wgsl.expected.spvasm b/test/tint/builtins/gen/var/asin/2d8e29.wgsl.expected.spvasm index 292429ed07..98822367f2 100644 --- a/test/tint/builtins/gen/var/asin/2d8e29.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/asin/2d8e29.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1_eacpn2 = OpConstant %half 0x1.eacp-2 + %16 = OpConstantComposite %v3half %half_0x1_eacpn2 %half_0x1_eacpn2 %half_0x1_eacpn2 %_ptr_Function_v3half = OpTypePointer Function %v3half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %asin_2d8e29 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3half Function %15 - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v3half %arg_0 - %18 = OpExtInst %v3half %19 Asin %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v3half Function %19 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v3half %arg_0 + %20 = OpExtInst %v3half %21 Asin %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %asin_2d8e29 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %asin_2d8e29 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %asin_2d8e29 + %33 = OpLabel + %34 = OpFunctionCall %void %asin_2d8e29 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %asin_2d8e29 + %36 = OpLabel + %37 = OpFunctionCall %void %asin_2d8e29 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/asin/2d8e29.wgsl.expected.wgsl b/test/tint/builtins/gen/var/asin/2d8e29.wgsl.expected.wgsl index c93cae1f51..fb3320d76d 100644 --- a/test/tint/builtins/gen/var/asin/2d8e29.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/asin/2d8e29.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn asin_2d8e29() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(0.479248047h); var res : vec3 = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/3cfbd4.wgsl b/test/tint/builtins/gen/var/asin/3cfbd4.wgsl index 022f69af8e..294f30c521 100644 --- a/test/tint/builtins/gen/var/asin/3cfbd4.wgsl +++ b/test/tint/builtins/gen/var/asin/3cfbd4.wgsl @@ -25,7 +25,7 @@ enable f16; // fn asin(vec<4, f16>) -> vec<4, f16> fn asin_3cfbd4() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(0.479425538604h); var res: vec4 = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/3cfbd4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/asin/3cfbd4.wgsl.expected.dxc.hlsl index a35655859b..0d3e91c0fe 100644 --- a/test/tint/builtins/gen/var/asin/3cfbd4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/asin/3cfbd4.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void asin_3cfbd4() { - vector arg_0 = (float16_t(0.0h)).xxxx; + vector arg_0 = (float16_t(0.479248047h)).xxxx; vector res = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/3cfbd4.wgsl.expected.glsl b/test/tint/builtins/gen/var/asin/3cfbd4.wgsl.expected.glsl index 35f9bd9cea..d479eb7660 100644 --- a/test/tint/builtins/gen/var/asin/3cfbd4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/asin/3cfbd4.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void asin_3cfbd4() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(0.479248047hf); f16vec4 res = asin(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void asin_3cfbd4() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(0.479248047hf); f16vec4 res = asin(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void asin_3cfbd4() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(0.479248047hf); f16vec4 res = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/3cfbd4.wgsl.expected.msl b/test/tint/builtins/gen/var/asin/3cfbd4.wgsl.expected.msl index 394f485044..c26ade501c 100644 --- a/test/tint/builtins/gen/var/asin/3cfbd4.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/asin/3cfbd4.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void asin_3cfbd4() { - half4 arg_0 = half4(0.0h); + half4 arg_0 = half4(0.479248047h); half4 res = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/3cfbd4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/asin/3cfbd4.wgsl.expected.spvasm index 35e557c51a..6c6233d424 100644 --- a/test/tint/builtins/gen/var/asin/3cfbd4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/asin/3cfbd4.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1_eacpn2 = OpConstant %half 0x1.eacp-2 + %16 = OpConstantComposite %v4half %half_0x1_eacpn2 %half_0x1_eacpn2 %half_0x1_eacpn2 %half_0x1_eacpn2 %_ptr_Function_v4half = OpTypePointer Function %v4half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v4half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %asin_3cfbd4 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4half Function %15 - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v4half %arg_0 - %18 = OpExtInst %v4half %19 Asin %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v4half Function %19 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v4half %arg_0 + %20 = OpExtInst %v4half %21 Asin %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %asin_3cfbd4 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %asin_3cfbd4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %asin_3cfbd4 + %33 = OpLabel + %34 = OpFunctionCall %void %asin_3cfbd4 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %asin_3cfbd4 + %36 = OpLabel + %37 = OpFunctionCall %void %asin_3cfbd4 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/asin/3cfbd4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/asin/3cfbd4.wgsl.expected.wgsl index 91e42c6252..0366545d67 100644 --- a/test/tint/builtins/gen/var/asin/3cfbd4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/asin/3cfbd4.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn asin_3cfbd4() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(0.479248047h); var res : vec4 = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/b4aced.wgsl b/test/tint/builtins/gen/var/asin/b4aced.wgsl index f69143a4e7..988db7b7c8 100644 --- a/test/tint/builtins/gen/var/asin/b4aced.wgsl +++ b/test/tint/builtins/gen/var/asin/b4aced.wgsl @@ -25,7 +25,7 @@ enable f16; // fn asin(vec<2, f16>) -> vec<2, f16> fn asin_b4aced() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(0.479425538604h); var res: vec2 = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/b4aced.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/asin/b4aced.wgsl.expected.dxc.hlsl index 4d0043aaf2..0613a315f6 100644 --- a/test/tint/builtins/gen/var/asin/b4aced.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/asin/b4aced.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void asin_b4aced() { - vector arg_0 = (float16_t(0.0h)).xx; + vector arg_0 = (float16_t(0.479248047h)).xx; vector res = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/b4aced.wgsl.expected.glsl b/test/tint/builtins/gen/var/asin/b4aced.wgsl.expected.glsl index 65fdee3486..bb6ffad3c1 100644 --- a/test/tint/builtins/gen/var/asin/b4aced.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/asin/b4aced.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void asin_b4aced() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(0.479248047hf); f16vec2 res = asin(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void asin_b4aced() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(0.479248047hf); f16vec2 res = asin(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void asin_b4aced() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(0.479248047hf); f16vec2 res = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/b4aced.wgsl.expected.msl b/test/tint/builtins/gen/var/asin/b4aced.wgsl.expected.msl index c2bab896df..cdb23f604c 100644 --- a/test/tint/builtins/gen/var/asin/b4aced.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/asin/b4aced.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void asin_b4aced() { - half2 arg_0 = half2(0.0h); + half2 arg_0 = half2(0.479248047h); half2 res = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/b4aced.wgsl.expected.spvasm b/test/tint/builtins/gen/var/asin/b4aced.wgsl.expected.spvasm index b11a78292a..d8048cc01c 100644 --- a/test/tint/builtins/gen/var/asin/b4aced.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/asin/b4aced.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1_eacpn2 = OpConstant %half 0x1.eacp-2 + %16 = OpConstantComposite %v2half %half_0x1_eacpn2 %half_0x1_eacpn2 %_ptr_Function_v2half = OpTypePointer Function %v2half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v2half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %asin_b4aced = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2half Function %15 - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v2half %arg_0 - %18 = OpExtInst %v2half %19 Asin %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v2half Function %19 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v2half %arg_0 + %20 = OpExtInst %v2half %21 Asin %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %asin_b4aced +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %asin_b4aced OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %asin_b4aced + %33 = OpLabel + %34 = OpFunctionCall %void %asin_b4aced OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %asin_b4aced + %36 = OpLabel + %37 = OpFunctionCall %void %asin_b4aced OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/asin/b4aced.wgsl.expected.wgsl b/test/tint/builtins/gen/var/asin/b4aced.wgsl.expected.wgsl index 056003b5d9..f493af681c 100644 --- a/test/tint/builtins/gen/var/asin/b4aced.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/asin/b4aced.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn asin_b4aced() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(0.479248047h); var res : vec2 = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asinh/468a48.wgsl b/test/tint/builtins/gen/var/asinh/468a48.wgsl index 6a2992f3c6..8123cefef8 100644 --- a/test/tint/builtins/gen/var/asinh/468a48.wgsl +++ b/test/tint/builtins/gen/var/asinh/468a48.wgsl @@ -25,7 +25,7 @@ enable f16; // fn asinh(f16) -> f16 fn asinh_468a48() { - var arg_0 = f16(); + var arg_0 = 1.h; var res: f16 = asinh(arg_0); } diff --git a/test/tint/builtins/gen/var/asinh/468a48.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/asinh/468a48.wgsl.expected.dxc.hlsl index bdeb8b8e75..42b918ecd8 100644 --- a/test/tint/builtins/gen/var/asinh/468a48.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/asinh/468a48.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ float16_t tint_sinh(float16_t x) { } void asinh_468a48() { - float16_t arg_0 = float16_t(0.0h); + float16_t arg_0 = float16_t(1.0h); float16_t res = tint_sinh(arg_0); } diff --git a/test/tint/builtins/gen/var/asinh/468a48.wgsl.expected.glsl b/test/tint/builtins/gen/var/asinh/468a48.wgsl.expected.glsl index 70eee10d64..3def2f9b8e 100644 --- a/test/tint/builtins/gen/var/asinh/468a48.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/asinh/468a48.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void asinh_468a48() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = asinh(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void asinh_468a48() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = asinh(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void asinh_468a48() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = asinh(arg_0); } diff --git a/test/tint/builtins/gen/var/asinh/468a48.wgsl.expected.msl b/test/tint/builtins/gen/var/asinh/468a48.wgsl.expected.msl index 22a59d4014..7851a469ca 100644 --- a/test/tint/builtins/gen/var/asinh/468a48.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/asinh/468a48.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void asinh_468a48() { - half arg_0 = 0.0h; + half arg_0 = 1.0h; half res = asinh(arg_0); } diff --git a/test/tint/builtins/gen/var/asinh/468a48.wgsl.expected.spvasm b/test/tint/builtins/gen/var/asinh/468a48.wgsl.expected.spvasm index 93c8f5ac26..827a8b4540 100644 --- a/test/tint/builtins/gen/var/asinh/468a48.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/asinh/468a48.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %18 = OpExtInstImport "GLSL.std.450" + %19 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -37,39 +37,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %21 = OpTypeFunction %v4float + %17 = OpConstantNull %half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %asinh_468a48 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_half Function %14 - %res = OpVariable %_ptr_Function_half Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %half %arg_0 - %17 = OpExtInst %half %18 Asinh %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_half Function %17 + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %arg_0 %half_0x1p_0 + %20 = OpLoad %half %arg_0 + %18 = OpExtInst %half %19 Asinh %20 + OpStore %res %18 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %asinh_468a48 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %asinh_468a48 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %asinh_468a48 + %31 = OpLabel + %32 = OpFunctionCall %void %asinh_468a48 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %asinh_468a48 + %34 = OpLabel + %35 = OpFunctionCall %void %asinh_468a48 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/asinh/468a48.wgsl.expected.wgsl b/test/tint/builtins/gen/var/asinh/468a48.wgsl.expected.wgsl index b8b458cd20..9992ba47cf 100644 --- a/test/tint/builtins/gen/var/asinh/468a48.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/asinh/468a48.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn asinh_468a48() { - var arg_0 = f16(); + var arg_0 = 1.0h; var res : f16 = asinh(arg_0); } diff --git a/test/tint/builtins/gen/var/asinh/95ab2b.wgsl b/test/tint/builtins/gen/var/asinh/95ab2b.wgsl index 1c734788da..3fbf508225 100644 --- a/test/tint/builtins/gen/var/asinh/95ab2b.wgsl +++ b/test/tint/builtins/gen/var/asinh/95ab2b.wgsl @@ -25,7 +25,7 @@ enable f16; // fn asinh(vec<4, f16>) -> vec<4, f16> fn asinh_95ab2b() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.h); var res: vec4 = asinh(arg_0); } diff --git a/test/tint/builtins/gen/var/asinh/95ab2b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/asinh/95ab2b.wgsl.expected.dxc.hlsl index bbbe9f7650..5d7141d5fa 100644 --- a/test/tint/builtins/gen/var/asinh/95ab2b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/asinh/95ab2b.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ vector tint_sinh(vector x) { } void asinh_95ab2b() { - vector arg_0 = (float16_t(0.0h)).xxxx; + vector arg_0 = (float16_t(1.0h)).xxxx; vector res = tint_sinh(arg_0); } diff --git a/test/tint/builtins/gen/var/asinh/95ab2b.wgsl.expected.glsl b/test/tint/builtins/gen/var/asinh/95ab2b.wgsl.expected.glsl index ec6f916dc7..2e9eee04e8 100644 --- a/test/tint/builtins/gen/var/asinh/95ab2b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/asinh/95ab2b.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void asinh_95ab2b() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = asinh(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void asinh_95ab2b() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = asinh(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void asinh_95ab2b() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = asinh(arg_0); } diff --git a/test/tint/builtins/gen/var/asinh/95ab2b.wgsl.expected.msl b/test/tint/builtins/gen/var/asinh/95ab2b.wgsl.expected.msl index ab992468c6..46212a104d 100644 --- a/test/tint/builtins/gen/var/asinh/95ab2b.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/asinh/95ab2b.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void asinh_95ab2b() { - half4 arg_0 = half4(0.0h); + half4 arg_0 = half4(1.0h); half4 res = asinh(arg_0); } diff --git a/test/tint/builtins/gen/var/asinh/95ab2b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/asinh/95ab2b.wgsl.expected.spvasm index cbaf25c23a..de21aad51c 100644 --- a/test/tint/builtins/gen/var/asinh/95ab2b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/asinh/95ab2b.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v4half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %asinh_95ab2b = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4half Function %15 - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v4half %arg_0 - %18 = OpExtInst %v4half %19 Asinh %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v4half Function %19 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v4half %arg_0 + %20 = OpExtInst %v4half %21 Asinh %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %asinh_95ab2b +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %asinh_95ab2b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %asinh_95ab2b + %33 = OpLabel + %34 = OpFunctionCall %void %asinh_95ab2b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %asinh_95ab2b + %36 = OpLabel + %37 = OpFunctionCall %void %asinh_95ab2b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/asinh/95ab2b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/asinh/95ab2b.wgsl.expected.wgsl index 882f15d022..e67b0860cb 100644 --- a/test/tint/builtins/gen/var/asinh/95ab2b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/asinh/95ab2b.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn asinh_95ab2b() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.0h); var res : vec4 = asinh(arg_0); } diff --git a/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl b/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl index 6cc709d6f5..f293ed87c7 100644 --- a/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl +++ b/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl @@ -25,7 +25,7 @@ enable f16; // fn asinh(vec<2, f16>) -> vec<2, f16> fn asinh_ad8f8b() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.h); var res: vec2 = asinh(arg_0); } diff --git a/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl.expected.dxc.hlsl index 68d01e676e..8013cebcf7 100644 --- a/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ vector tint_sinh(vector x) { } void asinh_ad8f8b() { - vector arg_0 = (float16_t(0.0h)).xx; + vector arg_0 = (float16_t(1.0h)).xx; vector res = tint_sinh(arg_0); } diff --git a/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl.expected.glsl b/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl.expected.glsl index 2f66aaaab4..1186176236 100644 --- a/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void asinh_ad8f8b() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = asinh(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void asinh_ad8f8b() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = asinh(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void asinh_ad8f8b() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = asinh(arg_0); } diff --git a/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl.expected.msl b/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl.expected.msl index 4a6745f14c..10e476ab44 100644 --- a/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void asinh_ad8f8b() { - half2 arg_0 = half2(0.0h); + half2 arg_0 = half2(1.0h); half2 res = asinh(arg_0); } diff --git a/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl.expected.spvasm index b41573f020..12f4a4d1d7 100644 --- a/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v2half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %asinh_ad8f8b = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2half Function %15 - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v2half %arg_0 - %18 = OpExtInst %v2half %19 Asinh %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v2half Function %19 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v2half %arg_0 + %20 = OpExtInst %v2half %21 Asinh %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %asinh_ad8f8b +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %asinh_ad8f8b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %asinh_ad8f8b + %33 = OpLabel + %34 = OpFunctionCall %void %asinh_ad8f8b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %asinh_ad8f8b + %36 = OpLabel + %37 = OpFunctionCall %void %asinh_ad8f8b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl.expected.wgsl index 2a96fe6b11..48b3931515 100644 --- a/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn asinh_ad8f8b() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.0h); var res : vec2 = asinh(arg_0); } diff --git a/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl b/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl index 648ab732fb..cf01a2216f 100644 --- a/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl +++ b/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl @@ -25,7 +25,7 @@ enable f16; // fn asinh(vec<3, f16>) -> vec<3, f16> fn asinh_fb5e8c() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.h); var res: vec3 = asinh(arg_0); } diff --git a/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl.expected.dxc.hlsl index 2e127aa9e2..8ab935deaf 100644 --- a/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ vector tint_sinh(vector x) { } void asinh_fb5e8c() { - vector arg_0 = (float16_t(0.0h)).xxx; + vector arg_0 = (float16_t(1.0h)).xxx; vector res = tint_sinh(arg_0); } diff --git a/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl.expected.glsl b/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl.expected.glsl index bb5859f703..6abfbdaf55 100644 --- a/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void asinh_fb5e8c() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = asinh(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void asinh_fb5e8c() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = asinh(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void asinh_fb5e8c() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = asinh(arg_0); } diff --git a/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl.expected.msl b/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl.expected.msl index 344f7c5eb7..28621d0040 100644 --- a/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void asinh_fb5e8c() { - half3 arg_0 = half3(0.0h); + half3 arg_0 = half3(1.0h); half3 res = asinh(arg_0); } diff --git a/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl.expected.spvasm index 63c34df8d9..cfef693835 100644 --- a/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %asinh_fb5e8c = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3half Function %15 - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v3half %arg_0 - %18 = OpExtInst %v3half %19 Asinh %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v3half Function %19 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v3half %arg_0 + %20 = OpExtInst %v3half %21 Asinh %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %asinh_fb5e8c +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %asinh_fb5e8c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %asinh_fb5e8c + %33 = OpLabel + %34 = OpFunctionCall %void %asinh_fb5e8c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %asinh_fb5e8c + %36 = OpLabel + %37 = OpFunctionCall %void %asinh_fb5e8c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl.expected.wgsl index c228108c10..98a75eabd3 100644 --- a/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn asinh_fb5e8c() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.0h); var res : vec3 = asinh(arg_0); } diff --git a/test/tint/builtins/gen/var/atan/19faea.wgsl b/test/tint/builtins/gen/var/atan/19faea.wgsl index 14c20e9ca8..a0e6e25370 100644 --- a/test/tint/builtins/gen/var/atan/19faea.wgsl +++ b/test/tint/builtins/gen/var/atan/19faea.wgsl @@ -25,7 +25,7 @@ enable f16; // fn atan(vec<4, f16>) -> vec<4, f16> fn atan_19faea() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.h); var res: vec4 = atan(arg_0); } diff --git a/test/tint/builtins/gen/var/atan/19faea.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atan/19faea.wgsl.expected.dxc.hlsl index 557db5849a..0ee7b59f5b 100644 --- a/test/tint/builtins/gen/var/atan/19faea.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/atan/19faea.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void atan_19faea() { - vector arg_0 = (float16_t(0.0h)).xxxx; + vector arg_0 = (float16_t(1.0h)).xxxx; vector res = atan(arg_0); } diff --git a/test/tint/builtins/gen/var/atan/19faea.wgsl.expected.glsl b/test/tint/builtins/gen/var/atan/19faea.wgsl.expected.glsl index 46811fcf2d..c06175738c 100644 --- a/test/tint/builtins/gen/var/atan/19faea.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/atan/19faea.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void atan_19faea() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = atan(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void atan_19faea() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = atan(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void atan_19faea() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = atan(arg_0); } diff --git a/test/tint/builtins/gen/var/atan/19faea.wgsl.expected.msl b/test/tint/builtins/gen/var/atan/19faea.wgsl.expected.msl index f8d735b3dd..9cdba27db8 100644 --- a/test/tint/builtins/gen/var/atan/19faea.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/atan/19faea.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void atan_19faea() { - half4 arg_0 = half4(0.0h); + half4 arg_0 = half4(1.0h); half4 res = atan(arg_0); } diff --git a/test/tint/builtins/gen/var/atan/19faea.wgsl.expected.spvasm b/test/tint/builtins/gen/var/atan/19faea.wgsl.expected.spvasm index 2daa3f6b0b..eee05ac51b 100644 --- a/test/tint/builtins/gen/var/atan/19faea.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/atan/19faea.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v4half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %atan_19faea = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4half Function %15 - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v4half %arg_0 - %18 = OpExtInst %v4half %19 Atan %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v4half Function %19 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v4half %arg_0 + %20 = OpExtInst %v4half %21 Atan %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %atan_19faea +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %atan_19faea OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %atan_19faea + %33 = OpLabel + %34 = OpFunctionCall %void %atan_19faea OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %atan_19faea + %36 = OpLabel + %37 = OpFunctionCall %void %atan_19faea OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/atan/19faea.wgsl.expected.wgsl b/test/tint/builtins/gen/var/atan/19faea.wgsl.expected.wgsl index d93bec72a5..4f67d35c54 100644 --- a/test/tint/builtins/gen/var/atan/19faea.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/atan/19faea.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn atan_19faea() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.0h); var res : vec4 = atan(arg_0); } diff --git a/test/tint/builtins/gen/var/atan/1e1764.wgsl b/test/tint/builtins/gen/var/atan/1e1764.wgsl index 2f5d3b90dc..090685594a 100644 --- a/test/tint/builtins/gen/var/atan/1e1764.wgsl +++ b/test/tint/builtins/gen/var/atan/1e1764.wgsl @@ -25,7 +25,7 @@ enable f16; // fn atan(vec<2, f16>) -> vec<2, f16> fn atan_1e1764() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.h); var res: vec2 = atan(arg_0); } diff --git a/test/tint/builtins/gen/var/atan/1e1764.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atan/1e1764.wgsl.expected.dxc.hlsl index 6cb0a491fb..c9b433552d 100644 --- a/test/tint/builtins/gen/var/atan/1e1764.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/atan/1e1764.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void atan_1e1764() { - vector arg_0 = (float16_t(0.0h)).xx; + vector arg_0 = (float16_t(1.0h)).xx; vector res = atan(arg_0); } diff --git a/test/tint/builtins/gen/var/atan/1e1764.wgsl.expected.glsl b/test/tint/builtins/gen/var/atan/1e1764.wgsl.expected.glsl index 8c16874da2..18121b6487 100644 --- a/test/tint/builtins/gen/var/atan/1e1764.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/atan/1e1764.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void atan_1e1764() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = atan(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void atan_1e1764() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = atan(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void atan_1e1764() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = atan(arg_0); } diff --git a/test/tint/builtins/gen/var/atan/1e1764.wgsl.expected.msl b/test/tint/builtins/gen/var/atan/1e1764.wgsl.expected.msl index f7651c4178..3e8f50dcd1 100644 --- a/test/tint/builtins/gen/var/atan/1e1764.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/atan/1e1764.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void atan_1e1764() { - half2 arg_0 = half2(0.0h); + half2 arg_0 = half2(1.0h); half2 res = atan(arg_0); } diff --git a/test/tint/builtins/gen/var/atan/1e1764.wgsl.expected.spvasm b/test/tint/builtins/gen/var/atan/1e1764.wgsl.expected.spvasm index 0a1b7de1c7..fcc60e58ce 100644 --- a/test/tint/builtins/gen/var/atan/1e1764.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/atan/1e1764.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v2half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %atan_1e1764 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2half Function %15 - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v2half %arg_0 - %18 = OpExtInst %v2half %19 Atan %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v2half Function %19 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v2half %arg_0 + %20 = OpExtInst %v2half %21 Atan %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %atan_1e1764 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %atan_1e1764 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %atan_1e1764 + %33 = OpLabel + %34 = OpFunctionCall %void %atan_1e1764 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %atan_1e1764 + %36 = OpLabel + %37 = OpFunctionCall %void %atan_1e1764 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/atan/1e1764.wgsl.expected.wgsl b/test/tint/builtins/gen/var/atan/1e1764.wgsl.expected.wgsl index 86ba26788d..2f1424fd76 100644 --- a/test/tint/builtins/gen/var/atan/1e1764.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/atan/1e1764.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn atan_1e1764() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.0h); var res : vec2 = atan(arg_0); } diff --git a/test/tint/builtins/gen/var/atan/a5f421.wgsl b/test/tint/builtins/gen/var/atan/a5f421.wgsl index c76fe4ceee..26f335840b 100644 --- a/test/tint/builtins/gen/var/atan/a5f421.wgsl +++ b/test/tint/builtins/gen/var/atan/a5f421.wgsl @@ -25,7 +25,7 @@ enable f16; // fn atan(vec<3, f16>) -> vec<3, f16> fn atan_a5f421() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.h); var res: vec3 = atan(arg_0); } diff --git a/test/tint/builtins/gen/var/atan/a5f421.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atan/a5f421.wgsl.expected.dxc.hlsl index aca9149beb..880f20e3f1 100644 --- a/test/tint/builtins/gen/var/atan/a5f421.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/atan/a5f421.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void atan_a5f421() { - vector arg_0 = (float16_t(0.0h)).xxx; + vector arg_0 = (float16_t(1.0h)).xxx; vector res = atan(arg_0); } diff --git a/test/tint/builtins/gen/var/atan/a5f421.wgsl.expected.glsl b/test/tint/builtins/gen/var/atan/a5f421.wgsl.expected.glsl index e4a545a61a..45600594b6 100644 --- a/test/tint/builtins/gen/var/atan/a5f421.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/atan/a5f421.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void atan_a5f421() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = atan(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void atan_a5f421() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = atan(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void atan_a5f421() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = atan(arg_0); } diff --git a/test/tint/builtins/gen/var/atan/a5f421.wgsl.expected.msl b/test/tint/builtins/gen/var/atan/a5f421.wgsl.expected.msl index 800084d68e..3951381164 100644 --- a/test/tint/builtins/gen/var/atan/a5f421.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/atan/a5f421.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void atan_a5f421() { - half3 arg_0 = half3(0.0h); + half3 arg_0 = half3(1.0h); half3 res = atan(arg_0); } diff --git a/test/tint/builtins/gen/var/atan/a5f421.wgsl.expected.spvasm b/test/tint/builtins/gen/var/atan/a5f421.wgsl.expected.spvasm index c41d678766..b620384426 100644 --- a/test/tint/builtins/gen/var/atan/a5f421.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/atan/a5f421.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %atan_a5f421 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3half Function %15 - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v3half %arg_0 - %18 = OpExtInst %v3half %19 Atan %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v3half Function %19 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v3half %arg_0 + %20 = OpExtInst %v3half %21 Atan %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %atan_a5f421 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %atan_a5f421 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %atan_a5f421 + %33 = OpLabel + %34 = OpFunctionCall %void %atan_a5f421 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %atan_a5f421 + %36 = OpLabel + %37 = OpFunctionCall %void %atan_a5f421 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/atan/a5f421.wgsl.expected.wgsl b/test/tint/builtins/gen/var/atan/a5f421.wgsl.expected.wgsl index 48d261a315..f4230d0c50 100644 --- a/test/tint/builtins/gen/var/atan/a5f421.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/atan/a5f421.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn atan_a5f421() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.0h); var res : vec3 = atan(arg_0); } diff --git a/test/tint/builtins/gen/var/atan/a7ba61.wgsl b/test/tint/builtins/gen/var/atan/a7ba61.wgsl index a19eafc469..53fd0e47a9 100644 --- a/test/tint/builtins/gen/var/atan/a7ba61.wgsl +++ b/test/tint/builtins/gen/var/atan/a7ba61.wgsl @@ -25,7 +25,7 @@ enable f16; // fn atan(f16) -> f16 fn atan_a7ba61() { - var arg_0 = f16(); + var arg_0 = 1.h; var res: f16 = atan(arg_0); } diff --git a/test/tint/builtins/gen/var/atan/a7ba61.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atan/a7ba61.wgsl.expected.dxc.hlsl index 2697f3e783..3bcfc82851 100644 --- a/test/tint/builtins/gen/var/atan/a7ba61.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/atan/a7ba61.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void atan_a7ba61() { - float16_t arg_0 = float16_t(0.0h); + float16_t arg_0 = float16_t(1.0h); float16_t res = atan(arg_0); } diff --git a/test/tint/builtins/gen/var/atan/a7ba61.wgsl.expected.glsl b/test/tint/builtins/gen/var/atan/a7ba61.wgsl.expected.glsl index 4f7d41f548..45344fff73 100644 --- a/test/tint/builtins/gen/var/atan/a7ba61.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/atan/a7ba61.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void atan_a7ba61() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = atan(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void atan_a7ba61() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = atan(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void atan_a7ba61() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = atan(arg_0); } diff --git a/test/tint/builtins/gen/var/atan/a7ba61.wgsl.expected.msl b/test/tint/builtins/gen/var/atan/a7ba61.wgsl.expected.msl index 33674c9fd0..7cefaec70c 100644 --- a/test/tint/builtins/gen/var/atan/a7ba61.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/atan/a7ba61.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void atan_a7ba61() { - half arg_0 = 0.0h; + half arg_0 = 1.0h; half res = atan(arg_0); } diff --git a/test/tint/builtins/gen/var/atan/a7ba61.wgsl.expected.spvasm b/test/tint/builtins/gen/var/atan/a7ba61.wgsl.expected.spvasm index 2442909f4e..42fe3bc7b9 100644 --- a/test/tint/builtins/gen/var/atan/a7ba61.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/atan/a7ba61.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %18 = OpExtInstImport "GLSL.std.450" + %19 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -37,39 +37,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %21 = OpTypeFunction %v4float + %17 = OpConstantNull %half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %atan_a7ba61 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_half Function %14 - %res = OpVariable %_ptr_Function_half Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %half %arg_0 - %17 = OpExtInst %half %18 Atan %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_half Function %17 + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %arg_0 %half_0x1p_0 + %20 = OpLoad %half %arg_0 + %18 = OpExtInst %half %19 Atan %20 + OpStore %res %18 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %atan_a7ba61 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %atan_a7ba61 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %atan_a7ba61 + %31 = OpLabel + %32 = OpFunctionCall %void %atan_a7ba61 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %atan_a7ba61 + %34 = OpLabel + %35 = OpFunctionCall %void %atan_a7ba61 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/atan/a7ba61.wgsl.expected.wgsl b/test/tint/builtins/gen/var/atan/a7ba61.wgsl.expected.wgsl index 2237e13955..cbd8a898fe 100644 --- a/test/tint/builtins/gen/var/atan/a7ba61.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/atan/a7ba61.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn atan_a7ba61() { - var arg_0 = f16(); + var arg_0 = 1.0h; var res : f16 = atan(arg_0); } diff --git a/test/tint/builtins/gen/var/atan2/21dfea.wgsl b/test/tint/builtins/gen/var/atan2/21dfea.wgsl index f45981bc42..636ca4adb1 100644 --- a/test/tint/builtins/gen/var/atan2/21dfea.wgsl +++ b/test/tint/builtins/gen/var/atan2/21dfea.wgsl @@ -25,8 +25,8 @@ enable f16; // fn atan2(vec<3, f16>, vec<3, f16>) -> vec<3, f16> fn atan2_21dfea() { - var arg_0 = vec3(f16()); - var arg_1 = vec3(f16()); + var arg_0 = vec3(1.h); + var arg_1 = vec3(1.h); var res: vec3 = atan2(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/atan2/21dfea.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atan2/21dfea.wgsl.expected.dxc.hlsl index 811f791bec..2e50bddb9e 100644 --- a/test/tint/builtins/gen/var/atan2/21dfea.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/atan2/21dfea.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void atan2_21dfea() { - vector arg_0 = (float16_t(0.0h)).xxx; - vector arg_1 = (float16_t(0.0h)).xxx; + vector arg_0 = (float16_t(1.0h)).xxx; + vector arg_1 = (float16_t(1.0h)).xxx; vector res = atan2(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/atan2/21dfea.wgsl.expected.glsl b/test/tint/builtins/gen/var/atan2/21dfea.wgsl.expected.glsl index e10e1d9bbf..d5fdaa5aee 100644 --- a/test/tint/builtins/gen/var/atan2/21dfea.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/atan2/21dfea.wgsl.expected.glsl @@ -2,8 +2,8 @@ #extension GL_AMD_gpu_shader_half_float : require void atan2_21dfea() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); f16vec3 res = atan(arg_0, arg_1); } @@ -25,8 +25,8 @@ void main() { precision mediump float; void atan2_21dfea() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); f16vec3 res = atan(arg_0, arg_1); } @@ -42,8 +42,8 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void atan2_21dfea() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); f16vec3 res = atan(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/atan2/21dfea.wgsl.expected.msl b/test/tint/builtins/gen/var/atan2/21dfea.wgsl.expected.msl index 2ed4954aaf..dc7e8bc06c 100644 --- a/test/tint/builtins/gen/var/atan2/21dfea.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/atan2/21dfea.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void atan2_21dfea() { - half3 arg_0 = half3(0.0h); - half3 arg_1 = half3(0.0h); + half3 arg_0 = half3(1.0h); + half3 arg_1 = half3(1.0h); half3 res = atan2(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/atan2/21dfea.wgsl.expected.spvasm b/test/tint/builtins/gen/var/atan2/21dfea.wgsl.expected.spvasm index 22b64b3ebc..3fefd38720 100644 --- a/test/tint/builtins/gen/var/atan2/21dfea.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/atan2/21dfea.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %20 = OpExtInstImport "GLSL.std.450" + %22 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -39,42 +39,44 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %24 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %atan2_21dfea = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3half Function %15 - %arg_1 = OpVariable %_ptr_Function_v3half Function %15 - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - %21 = OpLoad %v3half %arg_0 - %22 = OpLoad %v3half %arg_1 - %19 = OpExtInst %v3half %20 Atan2 %21 %22 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v3half Function %19 + %arg_1 = OpVariable %_ptr_Function_v3half Function %19 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + %23 = OpLoad %v3half %arg_0 + %24 = OpLoad %v3half %arg_1 + %21 = OpExtInst %v3half %22 Atan2 %23 %24 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %atan2_21dfea +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %atan2_21dfea OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %atan2_21dfea + %35 = OpLabel + %36 = OpFunctionCall %void %atan2_21dfea OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %atan2_21dfea + %38 = OpLabel + %39 = OpFunctionCall %void %atan2_21dfea OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/atan2/21dfea.wgsl.expected.wgsl b/test/tint/builtins/gen/var/atan2/21dfea.wgsl.expected.wgsl index e4c6b6b893..0ab468d9c3 100644 --- a/test/tint/builtins/gen/var/atan2/21dfea.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/atan2/21dfea.wgsl.expected.wgsl @@ -1,8 +1,8 @@ enable f16; fn atan2_21dfea() { - var arg_0 = vec3(f16()); - var arg_1 = vec3(f16()); + var arg_0 = vec3(1.0h); + var arg_1 = vec3(1.0h); var res : vec3 = atan2(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/atan2/93febc.wgsl b/test/tint/builtins/gen/var/atan2/93febc.wgsl index a09bf18e21..1b2c63bc61 100644 --- a/test/tint/builtins/gen/var/atan2/93febc.wgsl +++ b/test/tint/builtins/gen/var/atan2/93febc.wgsl @@ -25,8 +25,8 @@ enable f16; // fn atan2(vec<2, f16>, vec<2, f16>) -> vec<2, f16> fn atan2_93febc() { - var arg_0 = vec2(f16()); - var arg_1 = vec2(f16()); + var arg_0 = vec2(1.h); + var arg_1 = vec2(1.h); var res: vec2 = atan2(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/atan2/93febc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atan2/93febc.wgsl.expected.dxc.hlsl index 780ec69979..fa686ae4db 100644 --- a/test/tint/builtins/gen/var/atan2/93febc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/atan2/93febc.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void atan2_93febc() { - vector arg_0 = (float16_t(0.0h)).xx; - vector arg_1 = (float16_t(0.0h)).xx; + vector arg_0 = (float16_t(1.0h)).xx; + vector arg_1 = (float16_t(1.0h)).xx; vector res = atan2(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/atan2/93febc.wgsl.expected.glsl b/test/tint/builtins/gen/var/atan2/93febc.wgsl.expected.glsl index 2184e82e82..c46a5d1efb 100644 --- a/test/tint/builtins/gen/var/atan2/93febc.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/atan2/93febc.wgsl.expected.glsl @@ -2,8 +2,8 @@ #extension GL_AMD_gpu_shader_half_float : require void atan2_93febc() { - f16vec2 arg_0 = f16vec2(0.0hf); - f16vec2 arg_1 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_1 = f16vec2(1.0hf); f16vec2 res = atan(arg_0, arg_1); } @@ -25,8 +25,8 @@ void main() { precision mediump float; void atan2_93febc() { - f16vec2 arg_0 = f16vec2(0.0hf); - f16vec2 arg_1 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_1 = f16vec2(1.0hf); f16vec2 res = atan(arg_0, arg_1); } @@ -42,8 +42,8 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void atan2_93febc() { - f16vec2 arg_0 = f16vec2(0.0hf); - f16vec2 arg_1 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_1 = f16vec2(1.0hf); f16vec2 res = atan(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/atan2/93febc.wgsl.expected.msl b/test/tint/builtins/gen/var/atan2/93febc.wgsl.expected.msl index 27e327db2e..4da1248263 100644 --- a/test/tint/builtins/gen/var/atan2/93febc.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/atan2/93febc.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void atan2_93febc() { - half2 arg_0 = half2(0.0h); - half2 arg_1 = half2(0.0h); + half2 arg_0 = half2(1.0h); + half2 arg_1 = half2(1.0h); half2 res = atan2(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/atan2/93febc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/atan2/93febc.wgsl.expected.spvasm index bdcbc06b41..d9d1415d76 100644 --- a/test/tint/builtins/gen/var/atan2/93febc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/atan2/93febc.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %20 = OpExtInstImport "GLSL.std.450" + %22 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -39,42 +39,44 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %24 = OpTypeFunction %v4float + %19 = OpConstantNull %v2half + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %atan2_93febc = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2half Function %15 - %arg_1 = OpVariable %_ptr_Function_v2half Function %15 - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - %21 = OpLoad %v2half %arg_0 - %22 = OpLoad %v2half %arg_1 - %19 = OpExtInst %v2half %20 Atan2 %21 %22 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v2half Function %19 + %arg_1 = OpVariable %_ptr_Function_v2half Function %19 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + %23 = OpLoad %v2half %arg_0 + %24 = OpLoad %v2half %arg_1 + %21 = OpExtInst %v2half %22 Atan2 %23 %24 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %atan2_93febc +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %atan2_93febc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %atan2_93febc + %35 = OpLabel + %36 = OpFunctionCall %void %atan2_93febc OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %atan2_93febc + %38 = OpLabel + %39 = OpFunctionCall %void %atan2_93febc OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/atan2/93febc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/atan2/93febc.wgsl.expected.wgsl index 487d27110c..7516baa31c 100644 --- a/test/tint/builtins/gen/var/atan2/93febc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/atan2/93febc.wgsl.expected.wgsl @@ -1,8 +1,8 @@ enable f16; fn atan2_93febc() { - var arg_0 = vec2(f16()); - var arg_1 = vec2(f16()); + var arg_0 = vec2(1.0h); + var arg_1 = vec2(1.0h); var res : vec2 = atan2(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/atan2/ca698e.wgsl b/test/tint/builtins/gen/var/atan2/ca698e.wgsl index e1c18bc74a..1cc112e731 100644 --- a/test/tint/builtins/gen/var/atan2/ca698e.wgsl +++ b/test/tint/builtins/gen/var/atan2/ca698e.wgsl @@ -25,8 +25,8 @@ enable f16; // fn atan2(f16, f16) -> f16 fn atan2_ca698e() { - var arg_0 = f16(); - var arg_1 = f16(); + var arg_0 = 1.h; + var arg_1 = 1.h; var res: f16 = atan2(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/atan2/ca698e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atan2/ca698e.wgsl.expected.dxc.hlsl index 0d5b1d999e..4fd16b620e 100644 --- a/test/tint/builtins/gen/var/atan2/ca698e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/atan2/ca698e.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void atan2_ca698e() { - float16_t arg_0 = float16_t(0.0h); - float16_t arg_1 = float16_t(0.0h); + float16_t arg_0 = float16_t(1.0h); + float16_t arg_1 = float16_t(1.0h); float16_t res = atan2(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/atan2/ca698e.wgsl.expected.glsl b/test/tint/builtins/gen/var/atan2/ca698e.wgsl.expected.glsl index 3db5c43a7a..72dfcd93aa 100644 --- a/test/tint/builtins/gen/var/atan2/ca698e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/atan2/ca698e.wgsl.expected.glsl @@ -2,8 +2,8 @@ #extension GL_AMD_gpu_shader_half_float : require void atan2_ca698e() { - float16_t arg_0 = 0.0hf; - float16_t arg_1 = 0.0hf; + float16_t arg_0 = 1.0hf; + float16_t arg_1 = 1.0hf; float16_t res = atan(arg_0, arg_1); } @@ -25,8 +25,8 @@ void main() { precision mediump float; void atan2_ca698e() { - float16_t arg_0 = 0.0hf; - float16_t arg_1 = 0.0hf; + float16_t arg_0 = 1.0hf; + float16_t arg_1 = 1.0hf; float16_t res = atan(arg_0, arg_1); } @@ -42,8 +42,8 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void atan2_ca698e() { - float16_t arg_0 = 0.0hf; - float16_t arg_1 = 0.0hf; + float16_t arg_0 = 1.0hf; + float16_t arg_1 = 1.0hf; float16_t res = atan(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/atan2/ca698e.wgsl.expected.msl b/test/tint/builtins/gen/var/atan2/ca698e.wgsl.expected.msl index 575cd00cb4..40641e94ca 100644 --- a/test/tint/builtins/gen/var/atan2/ca698e.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/atan2/ca698e.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void atan2_ca698e() { - half arg_0 = 0.0h; - half arg_1 = 0.0h; + half arg_0 = 1.0h; + half arg_1 = 1.0h; half res = atan2(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/atan2/ca698e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/atan2/ca698e.wgsl.expected.spvasm index 01adb51acf..64133e1d37 100644 --- a/test/tint/builtins/gen/var/atan2/ca698e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/atan2/ca698e.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,42 +38,43 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %23 = OpTypeFunction %v4float + %17 = OpConstantNull %half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %atan2_ca698e = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_half Function %14 - %arg_1 = OpVariable %_ptr_Function_half Function %14 - %res = OpVariable %_ptr_Function_half Function %14 - OpStore %arg_0 %14 - OpStore %arg_1 %14 - %20 = OpLoad %half %arg_0 - %21 = OpLoad %half %arg_1 - %18 = OpExtInst %half %19 Atan2 %20 %21 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_half Function %17 + %arg_1 = OpVariable %_ptr_Function_half Function %17 + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %arg_0 %half_0x1p_0 + OpStore %arg_1 %half_0x1p_0 + %21 = OpLoad %half %arg_0 + %22 = OpLoad %half %arg_1 + %19 = OpExtInst %half %20 Atan2 %21 %22 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %atan2_ca698e +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %atan2_ca698e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %atan2_ca698e + %33 = OpLabel + %34 = OpFunctionCall %void %atan2_ca698e OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %atan2_ca698e + %36 = OpLabel + %37 = OpFunctionCall %void %atan2_ca698e OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/atan2/ca698e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/atan2/ca698e.wgsl.expected.wgsl index 1097b260d6..68eaa92528 100644 --- a/test/tint/builtins/gen/var/atan2/ca698e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/atan2/ca698e.wgsl.expected.wgsl @@ -1,8 +1,8 @@ enable f16; fn atan2_ca698e() { - var arg_0 = f16(); - var arg_1 = f16(); + var arg_0 = 1.0h; + var arg_1 = 1.0h; var res : f16 = atan2(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/atan2/d983ab.wgsl b/test/tint/builtins/gen/var/atan2/d983ab.wgsl index 2d87cea9f0..b538cf8baf 100644 --- a/test/tint/builtins/gen/var/atan2/d983ab.wgsl +++ b/test/tint/builtins/gen/var/atan2/d983ab.wgsl @@ -25,8 +25,8 @@ enable f16; // fn atan2(vec<4, f16>, vec<4, f16>) -> vec<4, f16> fn atan2_d983ab() { - var arg_0 = vec4(f16()); - var arg_1 = vec4(f16()); + var arg_0 = vec4(1.h); + var arg_1 = vec4(1.h); var res: vec4 = atan2(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/atan2/d983ab.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atan2/d983ab.wgsl.expected.dxc.hlsl index 1e09843ae4..50d70eae7c 100644 --- a/test/tint/builtins/gen/var/atan2/d983ab.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/atan2/d983ab.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void atan2_d983ab() { - vector arg_0 = (float16_t(0.0h)).xxxx; - vector arg_1 = (float16_t(0.0h)).xxxx; + vector arg_0 = (float16_t(1.0h)).xxxx; + vector arg_1 = (float16_t(1.0h)).xxxx; vector res = atan2(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/atan2/d983ab.wgsl.expected.glsl b/test/tint/builtins/gen/var/atan2/d983ab.wgsl.expected.glsl index 294b5375c4..00eb85b2f5 100644 --- a/test/tint/builtins/gen/var/atan2/d983ab.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/atan2/d983ab.wgsl.expected.glsl @@ -2,8 +2,8 @@ #extension GL_AMD_gpu_shader_half_float : require void atan2_d983ab() { - f16vec4 arg_0 = f16vec4(0.0hf); - f16vec4 arg_1 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_1 = f16vec4(1.0hf); f16vec4 res = atan(arg_0, arg_1); } @@ -25,8 +25,8 @@ void main() { precision mediump float; void atan2_d983ab() { - f16vec4 arg_0 = f16vec4(0.0hf); - f16vec4 arg_1 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_1 = f16vec4(1.0hf); f16vec4 res = atan(arg_0, arg_1); } @@ -42,8 +42,8 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void atan2_d983ab() { - f16vec4 arg_0 = f16vec4(0.0hf); - f16vec4 arg_1 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_1 = f16vec4(1.0hf); f16vec4 res = atan(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/atan2/d983ab.wgsl.expected.msl b/test/tint/builtins/gen/var/atan2/d983ab.wgsl.expected.msl index 1f3cdbc58c..ff2c65575a 100644 --- a/test/tint/builtins/gen/var/atan2/d983ab.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/atan2/d983ab.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void atan2_d983ab() { - half4 arg_0 = half4(0.0h); - half4 arg_1 = half4(0.0h); + half4 arg_0 = half4(1.0h); + half4 arg_1 = half4(1.0h); half4 res = atan2(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/atan2/d983ab.wgsl.expected.spvasm b/test/tint/builtins/gen/var/atan2/d983ab.wgsl.expected.spvasm index a8b43d8044..5e8d61700a 100644 --- a/test/tint/builtins/gen/var/atan2/d983ab.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/atan2/d983ab.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %20 = OpExtInstImport "GLSL.std.450" + %22 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -39,42 +39,44 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %24 = OpTypeFunction %v4float + %19 = OpConstantNull %v4half + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %atan2_d983ab = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4half Function %15 - %arg_1 = OpVariable %_ptr_Function_v4half Function %15 - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - %21 = OpLoad %v4half %arg_0 - %22 = OpLoad %v4half %arg_1 - %19 = OpExtInst %v4half %20 Atan2 %21 %22 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v4half Function %19 + %arg_1 = OpVariable %_ptr_Function_v4half Function %19 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + %23 = OpLoad %v4half %arg_0 + %24 = OpLoad %v4half %arg_1 + %21 = OpExtInst %v4half %22 Atan2 %23 %24 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %atan2_d983ab +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %atan2_d983ab OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %atan2_d983ab + %35 = OpLabel + %36 = OpFunctionCall %void %atan2_d983ab OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %atan2_d983ab + %38 = OpLabel + %39 = OpFunctionCall %void %atan2_d983ab OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/atan2/d983ab.wgsl.expected.wgsl b/test/tint/builtins/gen/var/atan2/d983ab.wgsl.expected.wgsl index 8d7f9377e8..b83cab2fc2 100644 --- a/test/tint/builtins/gen/var/atan2/d983ab.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/atan2/d983ab.wgsl.expected.wgsl @@ -1,8 +1,8 @@ enable f16; fn atan2_d983ab() { - var arg_0 = vec4(f16()); - var arg_1 = vec4(f16()); + var arg_0 = vec4(1.0h); + var arg_1 = vec4(1.0h); var res : vec4 = atan2(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/atanh/5bf88d.wgsl b/test/tint/builtins/gen/var/atanh/5bf88d.wgsl index 9ad6f3fe48..76390193a7 100644 --- a/test/tint/builtins/gen/var/atanh/5bf88d.wgsl +++ b/test/tint/builtins/gen/var/atanh/5bf88d.wgsl @@ -25,7 +25,7 @@ enable f16; // fn atanh(vec<2, f16>) -> vec<2, f16> fn atanh_5bf88d() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(0.5h); var res: vec2 = atanh(arg_0); } diff --git a/test/tint/builtins/gen/var/atanh/5bf88d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atanh/5bf88d.wgsl.expected.dxc.hlsl index 50adf29658..e3fc26bd79 100644 --- a/test/tint/builtins/gen/var/atanh/5bf88d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/atanh/5bf88d.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ vector tint_atanh(vector x) { } void atanh_5bf88d() { - vector arg_0 = (float16_t(0.0h)).xx; + vector arg_0 = (float16_t(0.5h)).xx; vector res = tint_atanh(arg_0); } diff --git a/test/tint/builtins/gen/var/atanh/5bf88d.wgsl.expected.glsl b/test/tint/builtins/gen/var/atanh/5bf88d.wgsl.expected.glsl index d8e42b98e6..fb6f974b7a 100644 --- a/test/tint/builtins/gen/var/atanh/5bf88d.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/atanh/5bf88d.wgsl.expected.glsl @@ -6,7 +6,7 @@ f16vec2 tint_atanh(f16vec2 x) { } void atanh_5bf88d() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(0.5hf); f16vec2 res = tint_atanh(arg_0); } @@ -32,7 +32,7 @@ f16vec2 tint_atanh(f16vec2 x) { } void atanh_5bf88d() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(0.5hf); f16vec2 res = tint_atanh(arg_0); } @@ -52,7 +52,7 @@ f16vec2 tint_atanh(f16vec2 x) { } void atanh_5bf88d() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(0.5hf); f16vec2 res = tint_atanh(arg_0); } diff --git a/test/tint/builtins/gen/var/atanh/5bf88d.wgsl.expected.msl b/test/tint/builtins/gen/var/atanh/5bf88d.wgsl.expected.msl index 633f841000..ffbe3da617 100644 --- a/test/tint/builtins/gen/var/atanh/5bf88d.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/atanh/5bf88d.wgsl.expected.msl @@ -6,7 +6,7 @@ half2 tint_atanh(half2 x) { } void atanh_5bf88d() { - half2 arg_0 = half2(0.0h); + half2 arg_0 = half2(0.5h); half2 res = tint_atanh(arg_0); } diff --git a/test/tint/builtins/gen/var/atanh/5bf88d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/atanh/5bf88d.wgsl.expected.spvasm index 55870bc65c..46a928a7bb 100644 --- a/test/tint/builtins/gen/var/atanh/5bf88d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/atanh/5bf88d.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 47 +; Bound: 49 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -46,8 +46,10 @@ %21 = OpConstantNull %v2half %void = OpTypeVoid %24 = OpTypeFunction %void +%half_0x1pn1 = OpConstant %half 0x1p-1 + %29 = OpConstantComposite %v2half %half_0x1pn1 %half_0x1pn1 %_ptr_Function_v2half = OpTypePointer Function %v2half - %33 = OpTypeFunction %v4float + %35 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_atanh = OpFunction %v2half None %9 %x = OpFunctionParameter %v2half @@ -61,31 +63,31 @@ %27 = OpLabel %arg_0 = OpVariable %_ptr_Function_v2half Function %21 %res = OpVariable %_ptr_Function_v2half Function %21 - OpStore %arg_0 %21 - %31 = OpLoad %v2half %arg_0 - %30 = OpFunctionCall %v2half %tint_atanh %31 - OpStore %res %30 + OpStore %arg_0 %29 + %33 = OpLoad %v2half %arg_0 + %32 = OpFunctionCall %v2half %tint_atanh %33 + OpStore %res %32 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %atanh_5bf88d +%vertex_main_inner = OpFunction %v4float None %35 + %37 = OpLabel + %38 = OpFunctionCall %void %atanh_5bf88d OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %24 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %40 = OpLabel + %41 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %41 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %24 - %42 = OpLabel - %43 = OpFunctionCall %void %atanh_5bf88d + %44 = OpLabel + %45 = OpFunctionCall %void %atanh_5bf88d OpReturn OpFunctionEnd %compute_main = OpFunction %void None %24 - %45 = OpLabel - %46 = OpFunctionCall %void %atanh_5bf88d + %47 = OpLabel + %48 = OpFunctionCall %void %atanh_5bf88d OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/atanh/5bf88d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/atanh/5bf88d.wgsl.expected.wgsl index 3d38ee5257..621b0454a3 100644 --- a/test/tint/builtins/gen/var/atanh/5bf88d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/atanh/5bf88d.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn atanh_5bf88d() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(0.5h); var res : vec2 = atanh(arg_0); } diff --git a/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl b/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl index bbe88cba03..c2611e2efb 100644 --- a/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl +++ b/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl @@ -25,7 +25,7 @@ enable f16; // fn atanh(f16) -> f16 fn atanh_d2d8cd() { - var arg_0 = f16(); + var arg_0 = 0.5h; var res: f16 = atanh(arg_0); } diff --git a/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl.expected.dxc.hlsl index bf8166ad75..1d7ad2a4ea 100644 --- a/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ float16_t tint_atanh(float16_t x) { } void atanh_d2d8cd() { - float16_t arg_0 = float16_t(0.0h); + float16_t arg_0 = float16_t(0.5h); float16_t res = tint_atanh(arg_0); } diff --git a/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl.expected.glsl b/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl.expected.glsl index d829f337c4..f06eec3220 100644 --- a/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl.expected.glsl @@ -6,7 +6,7 @@ float16_t tint_atanh(float16_t x) { } void atanh_d2d8cd() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 0.5hf; float16_t res = tint_atanh(arg_0); } @@ -32,7 +32,7 @@ float16_t tint_atanh(float16_t x) { } void atanh_d2d8cd() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 0.5hf; float16_t res = tint_atanh(arg_0); } @@ -52,7 +52,7 @@ float16_t tint_atanh(float16_t x) { } void atanh_d2d8cd() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 0.5hf; float16_t res = tint_atanh(arg_0); } diff --git a/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl.expected.msl b/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl.expected.msl index d76fbdd82e..69a4fd9932 100644 --- a/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl.expected.msl @@ -6,7 +6,7 @@ half tint_atanh(half x) { } void atanh_d2d8cd() { - half arg_0 = 0.0h; + half arg_0 = 0.5h; half res = tint_atanh(arg_0); } diff --git a/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl.expected.spvasm b/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl.expected.spvasm index 343b75f623..45273a1ee0 100644 --- a/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 44 +; Bound: 45 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -43,8 +43,9 @@ %18 = OpConstantNull %half %void = OpTypeVoid %21 = OpTypeFunction %void +%half_0x1pn1 = OpConstant %half 0x1p-1 %_ptr_Function_half = OpTypePointer Function %half - %30 = OpTypeFunction %v4float + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_atanh = OpFunction %half None %9 %x = OpFunctionParameter %half @@ -58,31 +59,31 @@ %24 = OpLabel %arg_0 = OpVariable %_ptr_Function_half Function %18 %res = OpVariable %_ptr_Function_half Function %18 - OpStore %arg_0 %18 - %28 = OpLoad %half %arg_0 - %27 = OpFunctionCall %half %tint_atanh %28 - OpStore %res %27 + OpStore %arg_0 %half_0x1pn1 + %29 = OpLoad %half %arg_0 + %28 = OpFunctionCall %half %tint_atanh %29 + OpStore %res %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %atanh_d2d8cd +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %atanh_d2d8cd OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %21 - %35 = OpLabel - %36 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %36 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %21 - %39 = OpLabel - %40 = OpFunctionCall %void %atanh_d2d8cd + %40 = OpLabel + %41 = OpFunctionCall %void %atanh_d2d8cd OpReturn OpFunctionEnd %compute_main = OpFunction %void None %21 - %42 = OpLabel - %43 = OpFunctionCall %void %atanh_d2d8cd + %43 = OpLabel + %44 = OpFunctionCall %void %atanh_d2d8cd OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl.expected.wgsl b/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl.expected.wgsl index f9720ab61b..c0e95136b3 100644 --- a/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn atanh_d2d8cd() { - var arg_0 = f16(); + var arg_0 = 0.5h; var res : f16 = atanh(arg_0); } diff --git a/test/tint/builtins/gen/var/atanh/e3b450.wgsl b/test/tint/builtins/gen/var/atanh/e3b450.wgsl index f1fa1f3658..0c2cc85aa5 100644 --- a/test/tint/builtins/gen/var/atanh/e3b450.wgsl +++ b/test/tint/builtins/gen/var/atanh/e3b450.wgsl @@ -25,7 +25,7 @@ enable f16; // fn atanh(vec<4, f16>) -> vec<4, f16> fn atanh_e3b450() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(0.5h); var res: vec4 = atanh(arg_0); } diff --git a/test/tint/builtins/gen/var/atanh/e3b450.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atanh/e3b450.wgsl.expected.dxc.hlsl index e36b362efb..d597786e1b 100644 --- a/test/tint/builtins/gen/var/atanh/e3b450.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/atanh/e3b450.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ vector tint_atanh(vector x) { } void atanh_e3b450() { - vector arg_0 = (float16_t(0.0h)).xxxx; + vector arg_0 = (float16_t(0.5h)).xxxx; vector res = tint_atanh(arg_0); } diff --git a/test/tint/builtins/gen/var/atanh/e3b450.wgsl.expected.glsl b/test/tint/builtins/gen/var/atanh/e3b450.wgsl.expected.glsl index 160e4643a2..d8fb476edf 100644 --- a/test/tint/builtins/gen/var/atanh/e3b450.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/atanh/e3b450.wgsl.expected.glsl @@ -6,7 +6,7 @@ f16vec4 tint_atanh(f16vec4 x) { } void atanh_e3b450() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(0.5hf); f16vec4 res = tint_atanh(arg_0); } @@ -32,7 +32,7 @@ f16vec4 tint_atanh(f16vec4 x) { } void atanh_e3b450() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(0.5hf); f16vec4 res = tint_atanh(arg_0); } @@ -52,7 +52,7 @@ f16vec4 tint_atanh(f16vec4 x) { } void atanh_e3b450() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(0.5hf); f16vec4 res = tint_atanh(arg_0); } diff --git a/test/tint/builtins/gen/var/atanh/e3b450.wgsl.expected.msl b/test/tint/builtins/gen/var/atanh/e3b450.wgsl.expected.msl index 70237ec209..be6587e69d 100644 --- a/test/tint/builtins/gen/var/atanh/e3b450.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/atanh/e3b450.wgsl.expected.msl @@ -6,7 +6,7 @@ half4 tint_atanh(half4 x) { } void atanh_e3b450() { - half4 arg_0 = half4(0.0h); + half4 arg_0 = half4(0.5h); half4 res = tint_atanh(arg_0); } diff --git a/test/tint/builtins/gen/var/atanh/e3b450.wgsl.expected.spvasm b/test/tint/builtins/gen/var/atanh/e3b450.wgsl.expected.spvasm index b284d66e04..28e9d79203 100644 --- a/test/tint/builtins/gen/var/atanh/e3b450.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/atanh/e3b450.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 47 +; Bound: 49 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -46,8 +46,10 @@ %21 = OpConstantNull %v4half %void = OpTypeVoid %24 = OpTypeFunction %void +%half_0x1pn1 = OpConstant %half 0x1p-1 + %29 = OpConstantComposite %v4half %half_0x1pn1 %half_0x1pn1 %half_0x1pn1 %half_0x1pn1 %_ptr_Function_v4half = OpTypePointer Function %v4half - %33 = OpTypeFunction %v4float + %35 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_atanh = OpFunction %v4half None %9 %x = OpFunctionParameter %v4half @@ -61,31 +63,31 @@ %27 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4half Function %21 %res = OpVariable %_ptr_Function_v4half Function %21 - OpStore %arg_0 %21 - %31 = OpLoad %v4half %arg_0 - %30 = OpFunctionCall %v4half %tint_atanh %31 - OpStore %res %30 + OpStore %arg_0 %29 + %33 = OpLoad %v4half %arg_0 + %32 = OpFunctionCall %v4half %tint_atanh %33 + OpStore %res %32 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %atanh_e3b450 +%vertex_main_inner = OpFunction %v4float None %35 + %37 = OpLabel + %38 = OpFunctionCall %void %atanh_e3b450 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %24 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %40 = OpLabel + %41 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %41 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %24 - %42 = OpLabel - %43 = OpFunctionCall %void %atanh_e3b450 + %44 = OpLabel + %45 = OpFunctionCall %void %atanh_e3b450 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %24 - %45 = OpLabel - %46 = OpFunctionCall %void %atanh_e3b450 + %47 = OpLabel + %48 = OpFunctionCall %void %atanh_e3b450 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/atanh/e3b450.wgsl.expected.wgsl b/test/tint/builtins/gen/var/atanh/e3b450.wgsl.expected.wgsl index c4fe719b28..fe06f7c3af 100644 --- a/test/tint/builtins/gen/var/atanh/e3b450.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/atanh/e3b450.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn atanh_e3b450() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(0.5h); var res : vec4 = atanh(arg_0); } diff --git a/test/tint/builtins/gen/var/atanh/ec4b06.wgsl b/test/tint/builtins/gen/var/atanh/ec4b06.wgsl index 57babedd92..cad022d6c7 100644 --- a/test/tint/builtins/gen/var/atanh/ec4b06.wgsl +++ b/test/tint/builtins/gen/var/atanh/ec4b06.wgsl @@ -25,7 +25,7 @@ enable f16; // fn atanh(vec<3, f16>) -> vec<3, f16> fn atanh_ec4b06() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(0.5h); var res: vec3 = atanh(arg_0); } diff --git a/test/tint/builtins/gen/var/atanh/ec4b06.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atanh/ec4b06.wgsl.expected.dxc.hlsl index f59fe902f8..308519b66a 100644 --- a/test/tint/builtins/gen/var/atanh/ec4b06.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/atanh/ec4b06.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ vector tint_atanh(vector x) { } void atanh_ec4b06() { - vector arg_0 = (float16_t(0.0h)).xxx; + vector arg_0 = (float16_t(0.5h)).xxx; vector res = tint_atanh(arg_0); } diff --git a/test/tint/builtins/gen/var/atanh/ec4b06.wgsl.expected.glsl b/test/tint/builtins/gen/var/atanh/ec4b06.wgsl.expected.glsl index 13d4a41cb5..7a85673930 100644 --- a/test/tint/builtins/gen/var/atanh/ec4b06.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/atanh/ec4b06.wgsl.expected.glsl @@ -6,7 +6,7 @@ f16vec3 tint_atanh(f16vec3 x) { } void atanh_ec4b06() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(0.5hf); f16vec3 res = tint_atanh(arg_0); } @@ -32,7 +32,7 @@ f16vec3 tint_atanh(f16vec3 x) { } void atanh_ec4b06() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(0.5hf); f16vec3 res = tint_atanh(arg_0); } @@ -52,7 +52,7 @@ f16vec3 tint_atanh(f16vec3 x) { } void atanh_ec4b06() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(0.5hf); f16vec3 res = tint_atanh(arg_0); } diff --git a/test/tint/builtins/gen/var/atanh/ec4b06.wgsl.expected.msl b/test/tint/builtins/gen/var/atanh/ec4b06.wgsl.expected.msl index 6238a7df21..0f79076d96 100644 --- a/test/tint/builtins/gen/var/atanh/ec4b06.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/atanh/ec4b06.wgsl.expected.msl @@ -6,7 +6,7 @@ half3 tint_atanh(half3 x) { } void atanh_ec4b06() { - half3 arg_0 = half3(0.0h); + half3 arg_0 = half3(0.5h); half3 res = tint_atanh(arg_0); } diff --git a/test/tint/builtins/gen/var/atanh/ec4b06.wgsl.expected.spvasm b/test/tint/builtins/gen/var/atanh/ec4b06.wgsl.expected.spvasm index c58d4e33f5..dea51360a5 100644 --- a/test/tint/builtins/gen/var/atanh/ec4b06.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/atanh/ec4b06.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 47 +; Bound: 49 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -46,8 +46,10 @@ %21 = OpConstantNull %v3half %void = OpTypeVoid %24 = OpTypeFunction %void +%half_0x1pn1 = OpConstant %half 0x1p-1 + %29 = OpConstantComposite %v3half %half_0x1pn1 %half_0x1pn1 %half_0x1pn1 %_ptr_Function_v3half = OpTypePointer Function %v3half - %33 = OpTypeFunction %v4float + %35 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_atanh = OpFunction %v3half None %9 %x = OpFunctionParameter %v3half @@ -61,31 +63,31 @@ %27 = OpLabel %arg_0 = OpVariable %_ptr_Function_v3half Function %21 %res = OpVariable %_ptr_Function_v3half Function %21 - OpStore %arg_0 %21 - %31 = OpLoad %v3half %arg_0 - %30 = OpFunctionCall %v3half %tint_atanh %31 - OpStore %res %30 + OpStore %arg_0 %29 + %33 = OpLoad %v3half %arg_0 + %32 = OpFunctionCall %v3half %tint_atanh %33 + OpStore %res %32 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %atanh_ec4b06 +%vertex_main_inner = OpFunction %v4float None %35 + %37 = OpLabel + %38 = OpFunctionCall %void %atanh_ec4b06 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %24 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %40 = OpLabel + %41 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %41 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %24 - %42 = OpLabel - %43 = OpFunctionCall %void %atanh_ec4b06 + %44 = OpLabel + %45 = OpFunctionCall %void %atanh_ec4b06 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %24 - %45 = OpLabel - %46 = OpFunctionCall %void %atanh_ec4b06 + %47 = OpLabel + %48 = OpFunctionCall %void %atanh_ec4b06 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/atanh/ec4b06.wgsl.expected.wgsl b/test/tint/builtins/gen/var/atanh/ec4b06.wgsl.expected.wgsl index b22a682d07..39c4b83588 100644 --- a/test/tint/builtins/gen/var/atanh/ec4b06.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/atanh/ec4b06.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn atanh_ec4b06() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(0.5h); var res : vec3 = atanh(arg_0); } diff --git a/test/tint/builtins/gen/var/ceil/09bf52.wgsl b/test/tint/builtins/gen/var/ceil/09bf52.wgsl index a248d8656e..cbaee7b199 100644 --- a/test/tint/builtins/gen/var/ceil/09bf52.wgsl +++ b/test/tint/builtins/gen/var/ceil/09bf52.wgsl @@ -25,7 +25,7 @@ enable f16; // fn ceil(vec<3, f16>) -> vec<3, f16> fn ceil_09bf52() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.5h); var res: vec3 = ceil(arg_0); } diff --git a/test/tint/builtins/gen/var/ceil/09bf52.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/ceil/09bf52.wgsl.expected.dxc.hlsl index f513773952..e3fd593679 100644 --- a/test/tint/builtins/gen/var/ceil/09bf52.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/ceil/09bf52.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void ceil_09bf52() { - vector arg_0 = (float16_t(0.0h)).xxx; + vector arg_0 = (float16_t(1.5h)).xxx; vector res = ceil(arg_0); } diff --git a/test/tint/builtins/gen/var/ceil/09bf52.wgsl.expected.glsl b/test/tint/builtins/gen/var/ceil/09bf52.wgsl.expected.glsl index 252778dc52..6ef9722688 100644 --- a/test/tint/builtins/gen/var/ceil/09bf52.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/ceil/09bf52.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void ceil_09bf52() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.5hf); f16vec3 res = ceil(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void ceil_09bf52() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.5hf); f16vec3 res = ceil(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void ceil_09bf52() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.5hf); f16vec3 res = ceil(arg_0); } diff --git a/test/tint/builtins/gen/var/ceil/09bf52.wgsl.expected.msl b/test/tint/builtins/gen/var/ceil/09bf52.wgsl.expected.msl index 9ee766b625..96a9b32dc7 100644 --- a/test/tint/builtins/gen/var/ceil/09bf52.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/ceil/09bf52.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void ceil_09bf52() { - half3 arg_0 = half3(0.0h); + half3 arg_0 = half3(1.5h); half3 res = ceil(arg_0); } diff --git a/test/tint/builtins/gen/var/ceil/09bf52.wgsl.expected.spvasm b/test/tint/builtins/gen/var/ceil/09bf52.wgsl.expected.spvasm index dcc2ae08bd..feea5268d4 100644 --- a/test/tint/builtins/gen/var/ceil/09bf52.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/ceil/09bf52.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1_8p_0 = OpConstant %half 0x1.8p+0 + %16 = OpConstantComposite %v3half %half_0x1_8p_0 %half_0x1_8p_0 %half_0x1_8p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %ceil_09bf52 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3half Function %15 - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v3half %arg_0 - %18 = OpExtInst %v3half %19 Ceil %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v3half Function %19 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v3half %arg_0 + %20 = OpExtInst %v3half %21 Ceil %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %ceil_09bf52 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %ceil_09bf52 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %ceil_09bf52 + %33 = OpLabel + %34 = OpFunctionCall %void %ceil_09bf52 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %ceil_09bf52 + %36 = OpLabel + %37 = OpFunctionCall %void %ceil_09bf52 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/ceil/09bf52.wgsl.expected.wgsl b/test/tint/builtins/gen/var/ceil/09bf52.wgsl.expected.wgsl index c190c8922a..35408a5332 100644 --- a/test/tint/builtins/gen/var/ceil/09bf52.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/ceil/09bf52.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn ceil_09bf52() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.5h); var res : vec3 = ceil(arg_0); } diff --git a/test/tint/builtins/gen/var/ceil/18c240.wgsl b/test/tint/builtins/gen/var/ceil/18c240.wgsl index 76d060cfea..5e554cc986 100644 --- a/test/tint/builtins/gen/var/ceil/18c240.wgsl +++ b/test/tint/builtins/gen/var/ceil/18c240.wgsl @@ -25,7 +25,7 @@ enable f16; // fn ceil(vec<2, f16>) -> vec<2, f16> fn ceil_18c240() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.5h); var res: vec2 = ceil(arg_0); } diff --git a/test/tint/builtins/gen/var/ceil/18c240.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/ceil/18c240.wgsl.expected.dxc.hlsl index 5080e4666a..cfbc86d529 100644 --- a/test/tint/builtins/gen/var/ceil/18c240.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/ceil/18c240.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void ceil_18c240() { - vector arg_0 = (float16_t(0.0h)).xx; + vector arg_0 = (float16_t(1.5h)).xx; vector res = ceil(arg_0); } diff --git a/test/tint/builtins/gen/var/ceil/18c240.wgsl.expected.glsl b/test/tint/builtins/gen/var/ceil/18c240.wgsl.expected.glsl index 5b75aaacd1..d76e772ba9 100644 --- a/test/tint/builtins/gen/var/ceil/18c240.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/ceil/18c240.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void ceil_18c240() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.5hf); f16vec2 res = ceil(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void ceil_18c240() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.5hf); f16vec2 res = ceil(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void ceil_18c240() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.5hf); f16vec2 res = ceil(arg_0); } diff --git a/test/tint/builtins/gen/var/ceil/18c240.wgsl.expected.msl b/test/tint/builtins/gen/var/ceil/18c240.wgsl.expected.msl index dab2bcc65f..d10193a6e0 100644 --- a/test/tint/builtins/gen/var/ceil/18c240.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/ceil/18c240.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void ceil_18c240() { - half2 arg_0 = half2(0.0h); + half2 arg_0 = half2(1.5h); half2 res = ceil(arg_0); } diff --git a/test/tint/builtins/gen/var/ceil/18c240.wgsl.expected.spvasm b/test/tint/builtins/gen/var/ceil/18c240.wgsl.expected.spvasm index 2bb39dee3f..f5b89dee9e 100644 --- a/test/tint/builtins/gen/var/ceil/18c240.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/ceil/18c240.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1_8p_0 = OpConstant %half 0x1.8p+0 + %16 = OpConstantComposite %v2half %half_0x1_8p_0 %half_0x1_8p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v2half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %ceil_18c240 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2half Function %15 - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v2half %arg_0 - %18 = OpExtInst %v2half %19 Ceil %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v2half Function %19 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v2half %arg_0 + %20 = OpExtInst %v2half %21 Ceil %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %ceil_18c240 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %ceil_18c240 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %ceil_18c240 + %33 = OpLabel + %34 = OpFunctionCall %void %ceil_18c240 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %ceil_18c240 + %36 = OpLabel + %37 = OpFunctionCall %void %ceil_18c240 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/ceil/18c240.wgsl.expected.wgsl b/test/tint/builtins/gen/var/ceil/18c240.wgsl.expected.wgsl index aaf0fad6bd..dc2a45487b 100644 --- a/test/tint/builtins/gen/var/ceil/18c240.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/ceil/18c240.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn ceil_18c240() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.5h); var res : vec2 = ceil(arg_0); } diff --git a/test/tint/builtins/gen/var/ceil/4bca2a.wgsl b/test/tint/builtins/gen/var/ceil/4bca2a.wgsl index 28f5121b3d..5af7c60275 100644 --- a/test/tint/builtins/gen/var/ceil/4bca2a.wgsl +++ b/test/tint/builtins/gen/var/ceil/4bca2a.wgsl @@ -25,7 +25,7 @@ enable f16; // fn ceil(vec<4, f16>) -> vec<4, f16> fn ceil_4bca2a() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.5h); var res: vec4 = ceil(arg_0); } diff --git a/test/tint/builtins/gen/var/ceil/4bca2a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/ceil/4bca2a.wgsl.expected.dxc.hlsl index 804cde298a..23da27f366 100644 --- a/test/tint/builtins/gen/var/ceil/4bca2a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/ceil/4bca2a.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void ceil_4bca2a() { - vector arg_0 = (float16_t(0.0h)).xxxx; + vector arg_0 = (float16_t(1.5h)).xxxx; vector res = ceil(arg_0); } diff --git a/test/tint/builtins/gen/var/ceil/4bca2a.wgsl.expected.glsl b/test/tint/builtins/gen/var/ceil/4bca2a.wgsl.expected.glsl index d9ac78fa2d..1f114125e9 100644 --- a/test/tint/builtins/gen/var/ceil/4bca2a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/ceil/4bca2a.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void ceil_4bca2a() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.5hf); f16vec4 res = ceil(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void ceil_4bca2a() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.5hf); f16vec4 res = ceil(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void ceil_4bca2a() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.5hf); f16vec4 res = ceil(arg_0); } diff --git a/test/tint/builtins/gen/var/ceil/4bca2a.wgsl.expected.msl b/test/tint/builtins/gen/var/ceil/4bca2a.wgsl.expected.msl index 82cc7148fa..c19ee3e055 100644 --- a/test/tint/builtins/gen/var/ceil/4bca2a.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/ceil/4bca2a.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void ceil_4bca2a() { - half4 arg_0 = half4(0.0h); + half4 arg_0 = half4(1.5h); half4 res = ceil(arg_0); } diff --git a/test/tint/builtins/gen/var/ceil/4bca2a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/ceil/4bca2a.wgsl.expected.spvasm index e0f5dea8b6..63f2c7d2f7 100644 --- a/test/tint/builtins/gen/var/ceil/4bca2a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/ceil/4bca2a.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1_8p_0 = OpConstant %half 0x1.8p+0 + %16 = OpConstantComposite %v4half %half_0x1_8p_0 %half_0x1_8p_0 %half_0x1_8p_0 %half_0x1_8p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v4half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %ceil_4bca2a = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4half Function %15 - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v4half %arg_0 - %18 = OpExtInst %v4half %19 Ceil %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v4half Function %19 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v4half %arg_0 + %20 = OpExtInst %v4half %21 Ceil %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %ceil_4bca2a +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %ceil_4bca2a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %ceil_4bca2a + %33 = OpLabel + %34 = OpFunctionCall %void %ceil_4bca2a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %ceil_4bca2a + %36 = OpLabel + %37 = OpFunctionCall %void %ceil_4bca2a OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/ceil/4bca2a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/ceil/4bca2a.wgsl.expected.wgsl index 682d1c394d..3cfbbfb09f 100644 --- a/test/tint/builtins/gen/var/ceil/4bca2a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/ceil/4bca2a.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn ceil_4bca2a() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.5h); var res : vec4 = ceil(arg_0); } diff --git a/test/tint/builtins/gen/var/ceil/f3f889.wgsl b/test/tint/builtins/gen/var/ceil/f3f889.wgsl index 2053a508f4..b6dd4eb0ef 100644 --- a/test/tint/builtins/gen/var/ceil/f3f889.wgsl +++ b/test/tint/builtins/gen/var/ceil/f3f889.wgsl @@ -25,7 +25,7 @@ enable f16; // fn ceil(f16) -> f16 fn ceil_f3f889() { - var arg_0 = f16(); + var arg_0 = 1.5h; var res: f16 = ceil(arg_0); } diff --git a/test/tint/builtins/gen/var/ceil/f3f889.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/ceil/f3f889.wgsl.expected.dxc.hlsl index 03dab80377..483ceb6b41 100644 --- a/test/tint/builtins/gen/var/ceil/f3f889.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/ceil/f3f889.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void ceil_f3f889() { - float16_t arg_0 = float16_t(0.0h); + float16_t arg_0 = float16_t(1.5h); float16_t res = ceil(arg_0); } diff --git a/test/tint/builtins/gen/var/ceil/f3f889.wgsl.expected.glsl b/test/tint/builtins/gen/var/ceil/f3f889.wgsl.expected.glsl index 3459b17432..5bef6ff6f2 100644 --- a/test/tint/builtins/gen/var/ceil/f3f889.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/ceil/f3f889.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void ceil_f3f889() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.5hf; float16_t res = ceil(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void ceil_f3f889() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.5hf; float16_t res = ceil(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void ceil_f3f889() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.5hf; float16_t res = ceil(arg_0); } diff --git a/test/tint/builtins/gen/var/ceil/f3f889.wgsl.expected.msl b/test/tint/builtins/gen/var/ceil/f3f889.wgsl.expected.msl index 48f8d6d794..2b7e48dd9e 100644 --- a/test/tint/builtins/gen/var/ceil/f3f889.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/ceil/f3f889.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void ceil_f3f889() { - half arg_0 = 0.0h; + half arg_0 = 1.5h; half res = ceil(arg_0); } diff --git a/test/tint/builtins/gen/var/ceil/f3f889.wgsl.expected.spvasm b/test/tint/builtins/gen/var/ceil/f3f889.wgsl.expected.spvasm index 4d48df9faa..0d412df001 100644 --- a/test/tint/builtins/gen/var/ceil/f3f889.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/ceil/f3f889.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %18 = OpExtInstImport "GLSL.std.450" + %19 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -37,39 +37,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1_8p_0 = OpConstant %half 0x1.8p+0 %_ptr_Function_half = OpTypePointer Function %half - %21 = OpTypeFunction %v4float + %17 = OpConstantNull %half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %ceil_f3f889 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_half Function %14 - %res = OpVariable %_ptr_Function_half Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %half %arg_0 - %17 = OpExtInst %half %18 Ceil %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_half Function %17 + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %arg_0 %half_0x1_8p_0 + %20 = OpLoad %half %arg_0 + %18 = OpExtInst %half %19 Ceil %20 + OpStore %res %18 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %ceil_f3f889 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %ceil_f3f889 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %ceil_f3f889 + %31 = OpLabel + %32 = OpFunctionCall %void %ceil_f3f889 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %ceil_f3f889 + %34 = OpLabel + %35 = OpFunctionCall %void %ceil_f3f889 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/ceil/f3f889.wgsl.expected.wgsl b/test/tint/builtins/gen/var/ceil/f3f889.wgsl.expected.wgsl index d00960ecd8..442e78f2b7 100644 --- a/test/tint/builtins/gen/var/ceil/f3f889.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/ceil/f3f889.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn ceil_f3f889() { - var arg_0 = f16(); + var arg_0 = 1.5h; var res : f16 = ceil(arg_0); } diff --git a/test/tint/builtins/gen/var/clamp/235b29.wgsl b/test/tint/builtins/gen/var/clamp/235b29.wgsl index c77a34095b..27cdc7c1b5 100644 --- a/test/tint/builtins/gen/var/clamp/235b29.wgsl +++ b/test/tint/builtins/gen/var/clamp/235b29.wgsl @@ -25,9 +25,9 @@ enable f16; // fn clamp(vec<2, f16>, vec<2, f16>, vec<2, f16>) -> vec<2, f16> fn clamp_235b29() { - var arg_0 = vec2(f16()); - var arg_1 = vec2(f16()); - var arg_2 = vec2(f16()); + var arg_0 = vec2(1.h); + var arg_1 = vec2(1.h); + var arg_2 = vec2(1.h); var res: vec2 = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/235b29.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/clamp/235b29.wgsl.expected.dxc.hlsl index 0bab035852..7840136837 100644 --- a/test/tint/builtins/gen/var/clamp/235b29.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/clamp/235b29.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void clamp_235b29() { - vector arg_0 = (float16_t(0.0h)).xx; - vector arg_1 = (float16_t(0.0h)).xx; - vector arg_2 = (float16_t(0.0h)).xx; + vector arg_0 = (float16_t(1.0h)).xx; + vector arg_1 = (float16_t(1.0h)).xx; + vector arg_2 = (float16_t(1.0h)).xx; vector res = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/235b29.wgsl.expected.glsl b/test/tint/builtins/gen/var/clamp/235b29.wgsl.expected.glsl index 1921aab221..e721222094 100644 --- a/test/tint/builtins/gen/var/clamp/235b29.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/clamp/235b29.wgsl.expected.glsl @@ -2,9 +2,9 @@ #extension GL_AMD_gpu_shader_half_float : require void clamp_235b29() { - f16vec2 arg_0 = f16vec2(0.0hf); - f16vec2 arg_1 = f16vec2(0.0hf); - f16vec2 arg_2 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_1 = f16vec2(1.0hf); + f16vec2 arg_2 = f16vec2(1.0hf); f16vec2 res = clamp(arg_0, arg_1, arg_2); } @@ -26,9 +26,9 @@ void main() { precision mediump float; void clamp_235b29() { - f16vec2 arg_0 = f16vec2(0.0hf); - f16vec2 arg_1 = f16vec2(0.0hf); - f16vec2 arg_2 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_1 = f16vec2(1.0hf); + f16vec2 arg_2 = f16vec2(1.0hf); f16vec2 res = clamp(arg_0, arg_1, arg_2); } @@ -44,9 +44,9 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void clamp_235b29() { - f16vec2 arg_0 = f16vec2(0.0hf); - f16vec2 arg_1 = f16vec2(0.0hf); - f16vec2 arg_2 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_1 = f16vec2(1.0hf); + f16vec2 arg_2 = f16vec2(1.0hf); f16vec2 res = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/235b29.wgsl.expected.msl b/test/tint/builtins/gen/var/clamp/235b29.wgsl.expected.msl index 1d2f620b4f..16a71cbf95 100644 --- a/test/tint/builtins/gen/var/clamp/235b29.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/clamp/235b29.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void clamp_235b29() { - half2 arg_0 = half2(0.0h); - half2 arg_1 = half2(0.0h); - half2 arg_2 = half2(0.0h); + half2 arg_0 = half2(1.0h); + half2 arg_1 = half2(1.0h); + half2 arg_2 = half2(1.0h); half2 res = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/235b29.wgsl.expected.spvasm b/test/tint/builtins/gen/var/clamp/235b29.wgsl.expected.spvasm index c93b5b8cc0..3d10d2ff94 100644 --- a/test/tint/builtins/gen/var/clamp/235b29.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/clamp/235b29.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 42 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %21 = OpExtInstImport "GLSL.std.450" + %23 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -40,45 +40,47 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %26 = OpTypeFunction %v4float + %19 = OpConstantNull %v2half + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %clamp_235b29 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2half Function %15 - %arg_1 = OpVariable %_ptr_Function_v2half Function %15 - %arg_2 = OpVariable %_ptr_Function_v2half Function %15 - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - OpStore %arg_2 %15 - %22 = OpLoad %v2half %arg_0 - %23 = OpLoad %v2half %arg_1 - %24 = OpLoad %v2half %arg_2 - %20 = OpExtInst %v2half %21 NClamp %22 %23 %24 - OpStore %res %20 + %arg_0 = OpVariable %_ptr_Function_v2half Function %19 + %arg_1 = OpVariable %_ptr_Function_v2half Function %19 + %arg_2 = OpVariable %_ptr_Function_v2half Function %19 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + OpStore %arg_2 %16 + %24 = OpLoad %v2half %arg_0 + %25 = OpLoad %v2half %arg_1 + %26 = OpLoad %v2half %arg_2 + %22 = OpExtInst %v2half %23 NClamp %24 %25 %26 + OpStore %res %22 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %clamp_235b29 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %clamp_235b29 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %clamp_235b29 + %37 = OpLabel + %38 = OpFunctionCall %void %clamp_235b29 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %void %clamp_235b29 + %40 = OpLabel + %41 = OpFunctionCall %void %clamp_235b29 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/clamp/235b29.wgsl.expected.wgsl b/test/tint/builtins/gen/var/clamp/235b29.wgsl.expected.wgsl index 93013b2912..b39b925b86 100644 --- a/test/tint/builtins/gen/var/clamp/235b29.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/clamp/235b29.wgsl.expected.wgsl @@ -1,9 +1,9 @@ enable f16; fn clamp_235b29() { - var arg_0 = vec2(f16()); - var arg_1 = vec2(f16()); - var arg_2 = vec2(f16()); + var arg_0 = vec2(1.0h); + var arg_1 = vec2(1.0h); + var arg_2 = vec2(1.0h); var res : vec2 = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/2c251b.wgsl b/test/tint/builtins/gen/var/clamp/2c251b.wgsl index 95d83b921a..b4b458a7f6 100644 --- a/test/tint/builtins/gen/var/clamp/2c251b.wgsl +++ b/test/tint/builtins/gen/var/clamp/2c251b.wgsl @@ -25,9 +25,9 @@ enable f16; // fn clamp(vec<4, f16>, vec<4, f16>, vec<4, f16>) -> vec<4, f16> fn clamp_2c251b() { - var arg_0 = vec4(f16()); - var arg_1 = vec4(f16()); - var arg_2 = vec4(f16()); + var arg_0 = vec4(1.h); + var arg_1 = vec4(1.h); + var arg_2 = vec4(1.h); var res: vec4 = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/2c251b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/clamp/2c251b.wgsl.expected.dxc.hlsl index 71ec4f69a2..6323b4bd68 100644 --- a/test/tint/builtins/gen/var/clamp/2c251b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/clamp/2c251b.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void clamp_2c251b() { - vector arg_0 = (float16_t(0.0h)).xxxx; - vector arg_1 = (float16_t(0.0h)).xxxx; - vector arg_2 = (float16_t(0.0h)).xxxx; + vector arg_0 = (float16_t(1.0h)).xxxx; + vector arg_1 = (float16_t(1.0h)).xxxx; + vector arg_2 = (float16_t(1.0h)).xxxx; vector res = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/2c251b.wgsl.expected.glsl b/test/tint/builtins/gen/var/clamp/2c251b.wgsl.expected.glsl index 6c4f3c1514..680ad9efa3 100644 --- a/test/tint/builtins/gen/var/clamp/2c251b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/clamp/2c251b.wgsl.expected.glsl @@ -2,9 +2,9 @@ #extension GL_AMD_gpu_shader_half_float : require void clamp_2c251b() { - f16vec4 arg_0 = f16vec4(0.0hf); - f16vec4 arg_1 = f16vec4(0.0hf); - f16vec4 arg_2 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_1 = f16vec4(1.0hf); + f16vec4 arg_2 = f16vec4(1.0hf); f16vec4 res = clamp(arg_0, arg_1, arg_2); } @@ -26,9 +26,9 @@ void main() { precision mediump float; void clamp_2c251b() { - f16vec4 arg_0 = f16vec4(0.0hf); - f16vec4 arg_1 = f16vec4(0.0hf); - f16vec4 arg_2 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_1 = f16vec4(1.0hf); + f16vec4 arg_2 = f16vec4(1.0hf); f16vec4 res = clamp(arg_0, arg_1, arg_2); } @@ -44,9 +44,9 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void clamp_2c251b() { - f16vec4 arg_0 = f16vec4(0.0hf); - f16vec4 arg_1 = f16vec4(0.0hf); - f16vec4 arg_2 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_1 = f16vec4(1.0hf); + f16vec4 arg_2 = f16vec4(1.0hf); f16vec4 res = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/2c251b.wgsl.expected.msl b/test/tint/builtins/gen/var/clamp/2c251b.wgsl.expected.msl index b84d2b06af..8bbe301ee3 100644 --- a/test/tint/builtins/gen/var/clamp/2c251b.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/clamp/2c251b.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void clamp_2c251b() { - half4 arg_0 = half4(0.0h); - half4 arg_1 = half4(0.0h); - half4 arg_2 = half4(0.0h); + half4 arg_0 = half4(1.0h); + half4 arg_1 = half4(1.0h); + half4 arg_2 = half4(1.0h); half4 res = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/2c251b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/clamp/2c251b.wgsl.expected.spvasm index 995110b45b..e7f9e12d04 100644 --- a/test/tint/builtins/gen/var/clamp/2c251b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/clamp/2c251b.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 42 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %21 = OpExtInstImport "GLSL.std.450" + %23 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -40,45 +40,47 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %26 = OpTypeFunction %v4float + %19 = OpConstantNull %v4half + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %clamp_2c251b = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4half Function %15 - %arg_1 = OpVariable %_ptr_Function_v4half Function %15 - %arg_2 = OpVariable %_ptr_Function_v4half Function %15 - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - OpStore %arg_2 %15 - %22 = OpLoad %v4half %arg_0 - %23 = OpLoad %v4half %arg_1 - %24 = OpLoad %v4half %arg_2 - %20 = OpExtInst %v4half %21 NClamp %22 %23 %24 - OpStore %res %20 + %arg_0 = OpVariable %_ptr_Function_v4half Function %19 + %arg_1 = OpVariable %_ptr_Function_v4half Function %19 + %arg_2 = OpVariable %_ptr_Function_v4half Function %19 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + OpStore %arg_2 %16 + %24 = OpLoad %v4half %arg_0 + %25 = OpLoad %v4half %arg_1 + %26 = OpLoad %v4half %arg_2 + %22 = OpExtInst %v4half %23 NClamp %24 %25 %26 + OpStore %res %22 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %clamp_2c251b +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %clamp_2c251b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %clamp_2c251b + %37 = OpLabel + %38 = OpFunctionCall %void %clamp_2c251b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %void %clamp_2c251b + %40 = OpLabel + %41 = OpFunctionCall %void %clamp_2c251b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/clamp/2c251b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/clamp/2c251b.wgsl.expected.wgsl index 66ca8c34fa..e4b9b2489e 100644 --- a/test/tint/builtins/gen/var/clamp/2c251b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/clamp/2c251b.wgsl.expected.wgsl @@ -1,9 +1,9 @@ enable f16; fn clamp_2c251b() { - var arg_0 = vec4(f16()); - var arg_1 = vec4(f16()); - var arg_2 = vec4(f16()); + var arg_0 = vec4(1.0h); + var arg_1 = vec4(1.0h); + var arg_2 = vec4(1.0h); var res : vec4 = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/553ffb.wgsl b/test/tint/builtins/gen/var/clamp/553ffb.wgsl index accceec0d5..cf841968c2 100644 --- a/test/tint/builtins/gen/var/clamp/553ffb.wgsl +++ b/test/tint/builtins/gen/var/clamp/553ffb.wgsl @@ -25,9 +25,9 @@ enable f16; // fn clamp(f16, f16, f16) -> f16 fn clamp_553ffb() { - var arg_0 = f16(); - var arg_1 = f16(); - var arg_2 = f16(); + var arg_0 = 1.h; + var arg_1 = 1.h; + var arg_2 = 1.h; var res: f16 = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/553ffb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/clamp/553ffb.wgsl.expected.dxc.hlsl index 3b9eae4e48..9b52ff19ae 100644 --- a/test/tint/builtins/gen/var/clamp/553ffb.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/clamp/553ffb.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void clamp_553ffb() { - float16_t arg_0 = float16_t(0.0h); - float16_t arg_1 = float16_t(0.0h); - float16_t arg_2 = float16_t(0.0h); + float16_t arg_0 = float16_t(1.0h); + float16_t arg_1 = float16_t(1.0h); + float16_t arg_2 = float16_t(1.0h); float16_t res = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/553ffb.wgsl.expected.glsl b/test/tint/builtins/gen/var/clamp/553ffb.wgsl.expected.glsl index 30b888f626..7381ed86a6 100644 --- a/test/tint/builtins/gen/var/clamp/553ffb.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/clamp/553ffb.wgsl.expected.glsl @@ -2,9 +2,9 @@ #extension GL_AMD_gpu_shader_half_float : require void clamp_553ffb() { - float16_t arg_0 = 0.0hf; - float16_t arg_1 = 0.0hf; - float16_t arg_2 = 0.0hf; + float16_t arg_0 = 1.0hf; + float16_t arg_1 = 1.0hf; + float16_t arg_2 = 1.0hf; float16_t res = clamp(arg_0, arg_1, arg_2); } @@ -26,9 +26,9 @@ void main() { precision mediump float; void clamp_553ffb() { - float16_t arg_0 = 0.0hf; - float16_t arg_1 = 0.0hf; - float16_t arg_2 = 0.0hf; + float16_t arg_0 = 1.0hf; + float16_t arg_1 = 1.0hf; + float16_t arg_2 = 1.0hf; float16_t res = clamp(arg_0, arg_1, arg_2); } @@ -44,9 +44,9 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void clamp_553ffb() { - float16_t arg_0 = 0.0hf; - float16_t arg_1 = 0.0hf; - float16_t arg_2 = 0.0hf; + float16_t arg_0 = 1.0hf; + float16_t arg_1 = 1.0hf; + float16_t arg_2 = 1.0hf; float16_t res = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/553ffb.wgsl.expected.msl b/test/tint/builtins/gen/var/clamp/553ffb.wgsl.expected.msl index 27aaf05b6f..4b78c06b53 100644 --- a/test/tint/builtins/gen/var/clamp/553ffb.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/clamp/553ffb.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void clamp_553ffb() { - half arg_0 = 0.0h; - half arg_1 = 0.0h; - half arg_2 = 0.0h; + half arg_0 = 1.0h; + half arg_1 = 1.0h; + half arg_2 = 1.0h; half res = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/553ffb.wgsl.expected.spvasm b/test/tint/builtins/gen/var/clamp/553ffb.wgsl.expected.spvasm index 4254790664..a5291a7f65 100644 --- a/test/tint/builtins/gen/var/clamp/553ffb.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/clamp/553ffb.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 40 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %20 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -39,45 +39,46 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %25 = OpTypeFunction %v4float + %17 = OpConstantNull %half + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %clamp_553ffb = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_half Function %14 - %arg_1 = OpVariable %_ptr_Function_half Function %14 - %arg_2 = OpVariable %_ptr_Function_half Function %14 - %res = OpVariable %_ptr_Function_half Function %14 - OpStore %arg_0 %14 - OpStore %arg_1 %14 - OpStore %arg_2 %14 - %21 = OpLoad %half %arg_0 - %22 = OpLoad %half %arg_1 - %23 = OpLoad %half %arg_2 - %19 = OpExtInst %half %20 NClamp %21 %22 %23 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_half Function %17 + %arg_1 = OpVariable %_ptr_Function_half Function %17 + %arg_2 = OpVariable %_ptr_Function_half Function %17 + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %arg_0 %half_0x1p_0 + OpStore %arg_1 %half_0x1p_0 + OpStore %arg_2 %half_0x1p_0 + %22 = OpLoad %half %arg_0 + %23 = OpLoad %half %arg_1 + %24 = OpLoad %half %arg_2 + %20 = OpExtInst %half %21 NClamp %22 %23 %24 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %clamp_553ffb +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %clamp_553ffb OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %clamp_553ffb + %35 = OpLabel + %36 = OpFunctionCall %void %clamp_553ffb OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %37 = OpLabel - %38 = OpFunctionCall %void %clamp_553ffb + %38 = OpLabel + %39 = OpFunctionCall %void %clamp_553ffb OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/clamp/553ffb.wgsl.expected.wgsl b/test/tint/builtins/gen/var/clamp/553ffb.wgsl.expected.wgsl index 875ec681d6..7a447e3a5f 100644 --- a/test/tint/builtins/gen/var/clamp/553ffb.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/clamp/553ffb.wgsl.expected.wgsl @@ -1,9 +1,9 @@ enable f16; fn clamp_553ffb() { - var arg_0 = f16(); - var arg_1 = f16(); - var arg_2 = f16(); + var arg_0 = 1.0h; + var arg_1 = 1.0h; + var arg_2 = 1.0h; var res : f16 = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/b195eb.wgsl b/test/tint/builtins/gen/var/clamp/b195eb.wgsl index b0680c3e20..f4f03ff6c9 100644 --- a/test/tint/builtins/gen/var/clamp/b195eb.wgsl +++ b/test/tint/builtins/gen/var/clamp/b195eb.wgsl @@ -25,9 +25,9 @@ enable f16; // fn clamp(vec<3, f16>, vec<3, f16>, vec<3, f16>) -> vec<3, f16> fn clamp_b195eb() { - var arg_0 = vec3(f16()); - var arg_1 = vec3(f16()); - var arg_2 = vec3(f16()); + var arg_0 = vec3(1.h); + var arg_1 = vec3(1.h); + var arg_2 = vec3(1.h); var res: vec3 = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/b195eb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/clamp/b195eb.wgsl.expected.dxc.hlsl index 51d3bc68d0..dffd29fbed 100644 --- a/test/tint/builtins/gen/var/clamp/b195eb.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/clamp/b195eb.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void clamp_b195eb() { - vector arg_0 = (float16_t(0.0h)).xxx; - vector arg_1 = (float16_t(0.0h)).xxx; - vector arg_2 = (float16_t(0.0h)).xxx; + vector arg_0 = (float16_t(1.0h)).xxx; + vector arg_1 = (float16_t(1.0h)).xxx; + vector arg_2 = (float16_t(1.0h)).xxx; vector res = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/b195eb.wgsl.expected.glsl b/test/tint/builtins/gen/var/clamp/b195eb.wgsl.expected.glsl index d1d0084050..222c3d0d3c 100644 --- a/test/tint/builtins/gen/var/clamp/b195eb.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/clamp/b195eb.wgsl.expected.glsl @@ -2,9 +2,9 @@ #extension GL_AMD_gpu_shader_half_float : require void clamp_b195eb() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); - f16vec3 arg_2 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); + f16vec3 arg_2 = f16vec3(1.0hf); f16vec3 res = clamp(arg_0, arg_1, arg_2); } @@ -26,9 +26,9 @@ void main() { precision mediump float; void clamp_b195eb() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); - f16vec3 arg_2 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); + f16vec3 arg_2 = f16vec3(1.0hf); f16vec3 res = clamp(arg_0, arg_1, arg_2); } @@ -44,9 +44,9 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void clamp_b195eb() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); - f16vec3 arg_2 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); + f16vec3 arg_2 = f16vec3(1.0hf); f16vec3 res = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/b195eb.wgsl.expected.msl b/test/tint/builtins/gen/var/clamp/b195eb.wgsl.expected.msl index 3bedc87f91..6f9f9de681 100644 --- a/test/tint/builtins/gen/var/clamp/b195eb.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/clamp/b195eb.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void clamp_b195eb() { - half3 arg_0 = half3(0.0h); - half3 arg_1 = half3(0.0h); - half3 arg_2 = half3(0.0h); + half3 arg_0 = half3(1.0h); + half3 arg_1 = half3(1.0h); + half3 arg_2 = half3(1.0h); half3 res = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/b195eb.wgsl.expected.spvasm b/test/tint/builtins/gen/var/clamp/b195eb.wgsl.expected.spvasm index 2383ac6f7e..9b6bd0c1c1 100644 --- a/test/tint/builtins/gen/var/clamp/b195eb.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/clamp/b195eb.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 42 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %21 = OpExtInstImport "GLSL.std.450" + %23 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -40,45 +40,47 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %26 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %clamp_b195eb = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3half Function %15 - %arg_1 = OpVariable %_ptr_Function_v3half Function %15 - %arg_2 = OpVariable %_ptr_Function_v3half Function %15 - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - OpStore %arg_2 %15 - %22 = OpLoad %v3half %arg_0 - %23 = OpLoad %v3half %arg_1 - %24 = OpLoad %v3half %arg_2 - %20 = OpExtInst %v3half %21 NClamp %22 %23 %24 - OpStore %res %20 + %arg_0 = OpVariable %_ptr_Function_v3half Function %19 + %arg_1 = OpVariable %_ptr_Function_v3half Function %19 + %arg_2 = OpVariable %_ptr_Function_v3half Function %19 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + OpStore %arg_2 %16 + %24 = OpLoad %v3half %arg_0 + %25 = OpLoad %v3half %arg_1 + %26 = OpLoad %v3half %arg_2 + %22 = OpExtInst %v3half %23 NClamp %24 %25 %26 + OpStore %res %22 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %clamp_b195eb +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %clamp_b195eb OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %clamp_b195eb + %37 = OpLabel + %38 = OpFunctionCall %void %clamp_b195eb OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %void %clamp_b195eb + %40 = OpLabel + %41 = OpFunctionCall %void %clamp_b195eb OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/clamp/b195eb.wgsl.expected.wgsl b/test/tint/builtins/gen/var/clamp/b195eb.wgsl.expected.wgsl index 7baa8c0ee0..82ce2adff9 100644 --- a/test/tint/builtins/gen/var/clamp/b195eb.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/clamp/b195eb.wgsl.expected.wgsl @@ -1,9 +1,9 @@ enable f16; fn clamp_b195eb() { - var arg_0 = vec3(f16()); - var arg_1 = vec3(f16()); - var arg_2 = vec3(f16()); + var arg_0 = vec3(1.0h); + var arg_1 = vec3(1.0h); + var arg_2 = vec3(1.0h); var res : vec3 = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/cos/0835a8.wgsl b/test/tint/builtins/gen/var/cos/0835a8.wgsl index 305a93ebe7..c356198ecf 100644 --- a/test/tint/builtins/gen/var/cos/0835a8.wgsl +++ b/test/tint/builtins/gen/var/cos/0835a8.wgsl @@ -25,7 +25,7 @@ enable f16; // fn cos(vec<3, f16>) -> vec<3, f16> fn cos_0835a8() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.h); var res: vec3 = cos(arg_0); } diff --git a/test/tint/builtins/gen/var/cos/0835a8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/cos/0835a8.wgsl.expected.dxc.hlsl index cced281af6..919fcc19ea 100644 --- a/test/tint/builtins/gen/var/cos/0835a8.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/cos/0835a8.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void cos_0835a8() { - vector arg_0 = (float16_t(0.0h)).xxx; + vector arg_0 = (float16_t(1.0h)).xxx; vector res = cos(arg_0); } diff --git a/test/tint/builtins/gen/var/cos/0835a8.wgsl.expected.glsl b/test/tint/builtins/gen/var/cos/0835a8.wgsl.expected.glsl index bafe1a5463..a923fd634e 100644 --- a/test/tint/builtins/gen/var/cos/0835a8.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/cos/0835a8.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void cos_0835a8() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = cos(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void cos_0835a8() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = cos(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void cos_0835a8() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = cos(arg_0); } diff --git a/test/tint/builtins/gen/var/cos/0835a8.wgsl.expected.msl b/test/tint/builtins/gen/var/cos/0835a8.wgsl.expected.msl index 9420e0baf2..b554124abc 100644 --- a/test/tint/builtins/gen/var/cos/0835a8.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/cos/0835a8.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void cos_0835a8() { - half3 arg_0 = half3(0.0h); + half3 arg_0 = half3(1.0h); half3 res = cos(arg_0); } diff --git a/test/tint/builtins/gen/var/cos/0835a8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/cos/0835a8.wgsl.expected.spvasm index 9ae25ea410..87cd164e41 100644 --- a/test/tint/builtins/gen/var/cos/0835a8.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/cos/0835a8.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %cos_0835a8 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3half Function %15 - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v3half %arg_0 - %18 = OpExtInst %v3half %19 Cos %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v3half Function %19 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v3half %arg_0 + %20 = OpExtInst %v3half %21 Cos %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %cos_0835a8 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %cos_0835a8 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %cos_0835a8 + %33 = OpLabel + %34 = OpFunctionCall %void %cos_0835a8 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %cos_0835a8 + %36 = OpLabel + %37 = OpFunctionCall %void %cos_0835a8 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/cos/0835a8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/cos/0835a8.wgsl.expected.wgsl index 9646c47041..43b8eed452 100644 --- a/test/tint/builtins/gen/var/cos/0835a8.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/cos/0835a8.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn cos_0835a8() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.0h); var res : vec3 = cos(arg_0); } diff --git a/test/tint/builtins/gen/var/cos/0a89f7.wgsl b/test/tint/builtins/gen/var/cos/0a89f7.wgsl index 57ead0ae8d..ce5ef06cc5 100644 --- a/test/tint/builtins/gen/var/cos/0a89f7.wgsl +++ b/test/tint/builtins/gen/var/cos/0a89f7.wgsl @@ -25,7 +25,7 @@ enable f16; // fn cos(vec<4, f16>) -> vec<4, f16> fn cos_0a89f7() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.h); var res: vec4 = cos(arg_0); } diff --git a/test/tint/builtins/gen/var/cos/0a89f7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/cos/0a89f7.wgsl.expected.dxc.hlsl index 3d47a4ab2b..b6dac40d94 100644 --- a/test/tint/builtins/gen/var/cos/0a89f7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/cos/0a89f7.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void cos_0a89f7() { - vector arg_0 = (float16_t(0.0h)).xxxx; + vector arg_0 = (float16_t(1.0h)).xxxx; vector res = cos(arg_0); } diff --git a/test/tint/builtins/gen/var/cos/0a89f7.wgsl.expected.glsl b/test/tint/builtins/gen/var/cos/0a89f7.wgsl.expected.glsl index ba601e2f1a..cfc1cb02fa 100644 --- a/test/tint/builtins/gen/var/cos/0a89f7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/cos/0a89f7.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void cos_0a89f7() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = cos(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void cos_0a89f7() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = cos(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void cos_0a89f7() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = cos(arg_0); } diff --git a/test/tint/builtins/gen/var/cos/0a89f7.wgsl.expected.msl b/test/tint/builtins/gen/var/cos/0a89f7.wgsl.expected.msl index 82d913de47..f89f5aad2f 100644 --- a/test/tint/builtins/gen/var/cos/0a89f7.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/cos/0a89f7.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void cos_0a89f7() { - half4 arg_0 = half4(0.0h); + half4 arg_0 = half4(1.0h); half4 res = cos(arg_0); } diff --git a/test/tint/builtins/gen/var/cos/0a89f7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/cos/0a89f7.wgsl.expected.spvasm index c2987df17f..c8aabaa125 100644 --- a/test/tint/builtins/gen/var/cos/0a89f7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/cos/0a89f7.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v4half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %cos_0a89f7 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4half Function %15 - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v4half %arg_0 - %18 = OpExtInst %v4half %19 Cos %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v4half Function %19 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v4half %arg_0 + %20 = OpExtInst %v4half %21 Cos %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %cos_0a89f7 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %cos_0a89f7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %cos_0a89f7 + %33 = OpLabel + %34 = OpFunctionCall %void %cos_0a89f7 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %cos_0a89f7 + %36 = OpLabel + %37 = OpFunctionCall %void %cos_0a89f7 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/cos/0a89f7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/cos/0a89f7.wgsl.expected.wgsl index 9d809bd010..8e6922bd7a 100644 --- a/test/tint/builtins/gen/var/cos/0a89f7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/cos/0a89f7.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn cos_0a89f7() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.0h); var res : vec4 = cos(arg_0); } diff --git a/test/tint/builtins/gen/var/cos/5bc2c6.wgsl b/test/tint/builtins/gen/var/cos/5bc2c6.wgsl index f539734fb8..0bb9c532e7 100644 --- a/test/tint/builtins/gen/var/cos/5bc2c6.wgsl +++ b/test/tint/builtins/gen/var/cos/5bc2c6.wgsl @@ -25,7 +25,7 @@ enable f16; // fn cos(vec<2, f16>) -> vec<2, f16> fn cos_5bc2c6() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.h); var res: vec2 = cos(arg_0); } diff --git a/test/tint/builtins/gen/var/cos/5bc2c6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/cos/5bc2c6.wgsl.expected.dxc.hlsl index 09dad0a3da..37f2acc3f0 100644 --- a/test/tint/builtins/gen/var/cos/5bc2c6.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/cos/5bc2c6.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void cos_5bc2c6() { - vector arg_0 = (float16_t(0.0h)).xx; + vector arg_0 = (float16_t(1.0h)).xx; vector res = cos(arg_0); } diff --git a/test/tint/builtins/gen/var/cos/5bc2c6.wgsl.expected.glsl b/test/tint/builtins/gen/var/cos/5bc2c6.wgsl.expected.glsl index 511a5070e1..68cc14ee97 100644 --- a/test/tint/builtins/gen/var/cos/5bc2c6.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/cos/5bc2c6.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void cos_5bc2c6() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = cos(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void cos_5bc2c6() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = cos(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void cos_5bc2c6() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = cos(arg_0); } diff --git a/test/tint/builtins/gen/var/cos/5bc2c6.wgsl.expected.msl b/test/tint/builtins/gen/var/cos/5bc2c6.wgsl.expected.msl index 0eb35962e6..adc4e860d5 100644 --- a/test/tint/builtins/gen/var/cos/5bc2c6.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/cos/5bc2c6.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void cos_5bc2c6() { - half2 arg_0 = half2(0.0h); + half2 arg_0 = half2(1.0h); half2 res = cos(arg_0); } diff --git a/test/tint/builtins/gen/var/cos/5bc2c6.wgsl.expected.spvasm b/test/tint/builtins/gen/var/cos/5bc2c6.wgsl.expected.spvasm index e3000bb0d1..b51aa37543 100644 --- a/test/tint/builtins/gen/var/cos/5bc2c6.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/cos/5bc2c6.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v2half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %cos_5bc2c6 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2half Function %15 - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v2half %arg_0 - %18 = OpExtInst %v2half %19 Cos %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v2half Function %19 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v2half %arg_0 + %20 = OpExtInst %v2half %21 Cos %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %cos_5bc2c6 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %cos_5bc2c6 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %cos_5bc2c6 + %33 = OpLabel + %34 = OpFunctionCall %void %cos_5bc2c6 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %cos_5bc2c6 + %36 = OpLabel + %37 = OpFunctionCall %void %cos_5bc2c6 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/cos/5bc2c6.wgsl.expected.wgsl b/test/tint/builtins/gen/var/cos/5bc2c6.wgsl.expected.wgsl index f5711b7cca..5921e36dd4 100644 --- a/test/tint/builtins/gen/var/cos/5bc2c6.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/cos/5bc2c6.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn cos_5bc2c6() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.0h); var res : vec2 = cos(arg_0); } diff --git a/test/tint/builtins/gen/var/cos/fc047d.wgsl b/test/tint/builtins/gen/var/cos/fc047d.wgsl index 0daf862c95..c98a8e6dac 100644 --- a/test/tint/builtins/gen/var/cos/fc047d.wgsl +++ b/test/tint/builtins/gen/var/cos/fc047d.wgsl @@ -25,7 +25,7 @@ enable f16; // fn cos(f16) -> f16 fn cos_fc047d() { - var arg_0 = f16(); + var arg_0 = 1.h; var res: f16 = cos(arg_0); } diff --git a/test/tint/builtins/gen/var/cos/fc047d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/cos/fc047d.wgsl.expected.dxc.hlsl index 54b9f70a02..da5643ca9d 100644 --- a/test/tint/builtins/gen/var/cos/fc047d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/cos/fc047d.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void cos_fc047d() { - float16_t arg_0 = float16_t(0.0h); + float16_t arg_0 = float16_t(1.0h); float16_t res = cos(arg_0); } diff --git a/test/tint/builtins/gen/var/cos/fc047d.wgsl.expected.glsl b/test/tint/builtins/gen/var/cos/fc047d.wgsl.expected.glsl index 093b9d2e4c..2d154c5545 100644 --- a/test/tint/builtins/gen/var/cos/fc047d.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/cos/fc047d.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void cos_fc047d() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = cos(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void cos_fc047d() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = cos(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void cos_fc047d() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = cos(arg_0); } diff --git a/test/tint/builtins/gen/var/cos/fc047d.wgsl.expected.msl b/test/tint/builtins/gen/var/cos/fc047d.wgsl.expected.msl index 2c230eb3df..676a0e7d86 100644 --- a/test/tint/builtins/gen/var/cos/fc047d.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/cos/fc047d.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void cos_fc047d() { - half arg_0 = 0.0h; + half arg_0 = 1.0h; half res = cos(arg_0); } diff --git a/test/tint/builtins/gen/var/cos/fc047d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/cos/fc047d.wgsl.expected.spvasm index 4adfb5efe3..ad3b3e14ec 100644 --- a/test/tint/builtins/gen/var/cos/fc047d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/cos/fc047d.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %18 = OpExtInstImport "GLSL.std.450" + %19 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -37,39 +37,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %21 = OpTypeFunction %v4float + %17 = OpConstantNull %half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %cos_fc047d = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_half Function %14 - %res = OpVariable %_ptr_Function_half Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %half %arg_0 - %17 = OpExtInst %half %18 Cos %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_half Function %17 + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %arg_0 %half_0x1p_0 + %20 = OpLoad %half %arg_0 + %18 = OpExtInst %half %19 Cos %20 + OpStore %res %18 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %cos_fc047d +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %cos_fc047d OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %cos_fc047d + %31 = OpLabel + %32 = OpFunctionCall %void %cos_fc047d OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %cos_fc047d + %34 = OpLabel + %35 = OpFunctionCall %void %cos_fc047d OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/cos/fc047d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/cos/fc047d.wgsl.expected.wgsl index 2230ba231a..da53171b33 100644 --- a/test/tint/builtins/gen/var/cos/fc047d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/cos/fc047d.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn cos_fc047d() { - var arg_0 = f16(); + var arg_0 = 1.0h; var res : f16 = cos(arg_0); } diff --git a/test/tint/builtins/gen/var/cosh/2ed778.wgsl b/test/tint/builtins/gen/var/cosh/2ed778.wgsl index b1f69a8002..6fa64e4a62 100644 --- a/test/tint/builtins/gen/var/cosh/2ed778.wgsl +++ b/test/tint/builtins/gen/var/cosh/2ed778.wgsl @@ -25,7 +25,7 @@ enable f16; // fn cosh(f16) -> f16 fn cosh_2ed778() { - var arg_0 = f16(); + var arg_0 = 1.h; var res: f16 = cosh(arg_0); } diff --git a/test/tint/builtins/gen/var/cosh/2ed778.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/cosh/2ed778.wgsl.expected.dxc.hlsl index 6689a7fa3f..ebaf4cd5da 100644 --- a/test/tint/builtins/gen/var/cosh/2ed778.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/cosh/2ed778.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void cosh_2ed778() { - float16_t arg_0 = float16_t(0.0h); + float16_t arg_0 = float16_t(1.0h); float16_t res = cosh(arg_0); } diff --git a/test/tint/builtins/gen/var/cosh/2ed778.wgsl.expected.glsl b/test/tint/builtins/gen/var/cosh/2ed778.wgsl.expected.glsl index 52057b9508..fdf36dfe68 100644 --- a/test/tint/builtins/gen/var/cosh/2ed778.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/cosh/2ed778.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void cosh_2ed778() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = cosh(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void cosh_2ed778() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = cosh(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void cosh_2ed778() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = cosh(arg_0); } diff --git a/test/tint/builtins/gen/var/cosh/2ed778.wgsl.expected.msl b/test/tint/builtins/gen/var/cosh/2ed778.wgsl.expected.msl index 6f72358aae..d79ff184bc 100644 --- a/test/tint/builtins/gen/var/cosh/2ed778.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/cosh/2ed778.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void cosh_2ed778() { - half arg_0 = 0.0h; + half arg_0 = 1.0h; half res = cosh(arg_0); } diff --git a/test/tint/builtins/gen/var/cosh/2ed778.wgsl.expected.spvasm b/test/tint/builtins/gen/var/cosh/2ed778.wgsl.expected.spvasm index 2079d7e03b..00f1d05408 100644 --- a/test/tint/builtins/gen/var/cosh/2ed778.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/cosh/2ed778.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %18 = OpExtInstImport "GLSL.std.450" + %19 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -37,39 +37,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %21 = OpTypeFunction %v4float + %17 = OpConstantNull %half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %cosh_2ed778 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_half Function %14 - %res = OpVariable %_ptr_Function_half Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %half %arg_0 - %17 = OpExtInst %half %18 Cosh %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_half Function %17 + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %arg_0 %half_0x1p_0 + %20 = OpLoad %half %arg_0 + %18 = OpExtInst %half %19 Cosh %20 + OpStore %res %18 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %cosh_2ed778 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %cosh_2ed778 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %cosh_2ed778 + %31 = OpLabel + %32 = OpFunctionCall %void %cosh_2ed778 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %cosh_2ed778 + %34 = OpLabel + %35 = OpFunctionCall %void %cosh_2ed778 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/cosh/2ed778.wgsl.expected.wgsl b/test/tint/builtins/gen/var/cosh/2ed778.wgsl.expected.wgsl index 4d5670595f..c86f551056 100644 --- a/test/tint/builtins/gen/var/cosh/2ed778.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/cosh/2ed778.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn cosh_2ed778() { - var arg_0 = f16(); + var arg_0 = 1.0h; var res : f16 = cosh(arg_0); } diff --git a/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl b/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl index 133748afb0..8ef43e726f 100644 --- a/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl +++ b/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl @@ -25,7 +25,7 @@ enable f16; // fn cosh(vec<4, f16>) -> vec<4, f16> fn cosh_3b7bbf() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.h); var res: vec4 = cosh(arg_0); } diff --git a/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl.expected.dxc.hlsl index 5a96478604..8872b6ec61 100644 --- a/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void cosh_3b7bbf() { - vector arg_0 = (float16_t(0.0h)).xxxx; + vector arg_0 = (float16_t(1.0h)).xxxx; vector res = cosh(arg_0); } diff --git a/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl.expected.glsl b/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl.expected.glsl index 8ea08d9328..987508a476 100644 --- a/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void cosh_3b7bbf() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = cosh(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void cosh_3b7bbf() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = cosh(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void cosh_3b7bbf() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = cosh(arg_0); } diff --git a/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl.expected.msl b/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl.expected.msl index 12acf5fd52..b359421b8b 100644 --- a/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void cosh_3b7bbf() { - half4 arg_0 = half4(0.0h); + half4 arg_0 = half4(1.0h); half4 res = cosh(arg_0); } diff --git a/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl.expected.spvasm b/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl.expected.spvasm index 3b9f8d4ba1..f526da5d3f 100644 --- a/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v4half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %cosh_3b7bbf = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4half Function %15 - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v4half %arg_0 - %18 = OpExtInst %v4half %19 Cosh %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v4half Function %19 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v4half %arg_0 + %20 = OpExtInst %v4half %21 Cosh %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %cosh_3b7bbf +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %cosh_3b7bbf OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %cosh_3b7bbf + %33 = OpLabel + %34 = OpFunctionCall %void %cosh_3b7bbf OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %cosh_3b7bbf + %36 = OpLabel + %37 = OpFunctionCall %void %cosh_3b7bbf OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl.expected.wgsl b/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl.expected.wgsl index 06d346d94e..185b5f3f96 100644 --- a/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn cosh_3b7bbf() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.0h); var res : vec4 = cosh(arg_0); } diff --git a/test/tint/builtins/gen/var/cosh/43b672.wgsl b/test/tint/builtins/gen/var/cosh/43b672.wgsl index a1e32ad8da..4da21032ca 100644 --- a/test/tint/builtins/gen/var/cosh/43b672.wgsl +++ b/test/tint/builtins/gen/var/cosh/43b672.wgsl @@ -25,7 +25,7 @@ enable f16; // fn cosh(vec<2, f16>) -> vec<2, f16> fn cosh_43b672() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.h); var res: vec2 = cosh(arg_0); } diff --git a/test/tint/builtins/gen/var/cosh/43b672.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/cosh/43b672.wgsl.expected.dxc.hlsl index db19b27193..6e196c72b9 100644 --- a/test/tint/builtins/gen/var/cosh/43b672.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/cosh/43b672.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void cosh_43b672() { - vector arg_0 = (float16_t(0.0h)).xx; + vector arg_0 = (float16_t(1.0h)).xx; vector res = cosh(arg_0); } diff --git a/test/tint/builtins/gen/var/cosh/43b672.wgsl.expected.glsl b/test/tint/builtins/gen/var/cosh/43b672.wgsl.expected.glsl index 8c60a2cd95..79a299c576 100644 --- a/test/tint/builtins/gen/var/cosh/43b672.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/cosh/43b672.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void cosh_43b672() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = cosh(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void cosh_43b672() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = cosh(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void cosh_43b672() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = cosh(arg_0); } diff --git a/test/tint/builtins/gen/var/cosh/43b672.wgsl.expected.msl b/test/tint/builtins/gen/var/cosh/43b672.wgsl.expected.msl index 1a50e7e669..528da9f371 100644 --- a/test/tint/builtins/gen/var/cosh/43b672.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/cosh/43b672.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void cosh_43b672() { - half2 arg_0 = half2(0.0h); + half2 arg_0 = half2(1.0h); half2 res = cosh(arg_0); } diff --git a/test/tint/builtins/gen/var/cosh/43b672.wgsl.expected.spvasm b/test/tint/builtins/gen/var/cosh/43b672.wgsl.expected.spvasm index 5658285aea..bc597ceac9 100644 --- a/test/tint/builtins/gen/var/cosh/43b672.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/cosh/43b672.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v2half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %cosh_43b672 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2half Function %15 - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v2half %arg_0 - %18 = OpExtInst %v2half %19 Cosh %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v2half Function %19 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v2half %arg_0 + %20 = OpExtInst %v2half %21 Cosh %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %cosh_43b672 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %cosh_43b672 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %cosh_43b672 + %33 = OpLabel + %34 = OpFunctionCall %void %cosh_43b672 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %cosh_43b672 + %36 = OpLabel + %37 = OpFunctionCall %void %cosh_43b672 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/cosh/43b672.wgsl.expected.wgsl b/test/tint/builtins/gen/var/cosh/43b672.wgsl.expected.wgsl index 979119f2b6..c73fb44ae8 100644 --- a/test/tint/builtins/gen/var/cosh/43b672.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/cosh/43b672.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn cosh_43b672() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.0h); var res : vec2 = cosh(arg_0); } diff --git a/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl b/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl index 10b551b180..895a1671c1 100644 --- a/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl +++ b/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl @@ -25,7 +25,7 @@ enable f16; // fn cosh(vec<3, f16>) -> vec<3, f16> fn cosh_b1b8a0() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.h); var res: vec3 = cosh(arg_0); } diff --git a/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl.expected.dxc.hlsl index a058cd26b0..f7e411c1c0 100644 --- a/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void cosh_b1b8a0() { - vector arg_0 = (float16_t(0.0h)).xxx; + vector arg_0 = (float16_t(1.0h)).xxx; vector res = cosh(arg_0); } diff --git a/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl.expected.glsl b/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl.expected.glsl index 6566e922c4..d9e62036fe 100644 --- a/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void cosh_b1b8a0() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = cosh(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void cosh_b1b8a0() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = cosh(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void cosh_b1b8a0() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = cosh(arg_0); } diff --git a/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl.expected.msl b/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl.expected.msl index 2cf0802e2c..f350cd56bd 100644 --- a/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void cosh_b1b8a0() { - half3 arg_0 = half3(0.0h); + half3 arg_0 = half3(1.0h); half3 res = cosh(arg_0); } diff --git a/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl.expected.spvasm index 29505ec4ba..c096e6f85c 100644 --- a/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %cosh_b1b8a0 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3half Function %15 - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v3half %arg_0 - %18 = OpExtInst %v3half %19 Cosh %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v3half Function %19 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v3half %arg_0 + %20 = OpExtInst %v3half %21 Cosh %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %cosh_b1b8a0 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %cosh_b1b8a0 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %cosh_b1b8a0 + %33 = OpLabel + %34 = OpFunctionCall %void %cosh_b1b8a0 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %cosh_b1b8a0 + %36 = OpLabel + %37 = OpFunctionCall %void %cosh_b1b8a0 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl.expected.wgsl index 273765b77d..f0d9b86ec6 100644 --- a/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn cosh_b1b8a0() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.0h); var res : vec3 = cosh(arg_0); } diff --git a/test/tint/builtins/gen/var/cross/9857cb.wgsl b/test/tint/builtins/gen/var/cross/9857cb.wgsl index cc7409f17c..c3690455b8 100644 --- a/test/tint/builtins/gen/var/cross/9857cb.wgsl +++ b/test/tint/builtins/gen/var/cross/9857cb.wgsl @@ -25,8 +25,8 @@ enable f16; // fn cross(vec3, vec3) -> vec3 fn cross_9857cb() { - var arg_0 = vec3(f16()); - var arg_1 = vec3(f16()); + var arg_0 = vec3(1.h); + var arg_1 = vec3(1.h); var res: vec3 = cross(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.dxc.hlsl index fdb9f034ef..c612c29b7b 100644 --- a/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void cross_9857cb() { - vector arg_0 = (float16_t(0.0h)).xxx; - vector arg_1 = (float16_t(0.0h)).xxx; + vector arg_0 = (float16_t(1.0h)).xxx; + vector arg_1 = (float16_t(1.0h)).xxx; vector res = cross(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.glsl b/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.glsl index 8d62b4025e..b5f1a53d80 100644 --- a/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.glsl @@ -2,8 +2,8 @@ #extension GL_AMD_gpu_shader_half_float : require void cross_9857cb() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); f16vec3 res = cross(arg_0, arg_1); } @@ -25,8 +25,8 @@ void main() { precision mediump float; void cross_9857cb() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); f16vec3 res = cross(arg_0, arg_1); } @@ -42,8 +42,8 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void cross_9857cb() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); f16vec3 res = cross(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.msl b/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.msl index 23ad005920..d977572dc8 100644 --- a/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void cross_9857cb() { - half3 arg_0 = half3(0.0h); - half3 arg_1 = half3(0.0h); + half3 arg_0 = half3(1.0h); + half3 arg_1 = half3(1.0h); half3 res = cross(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.spvasm b/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.spvasm index 3f88a0b061..3d4096e3fb 100644 --- a/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %20 = OpExtInstImport "GLSL.std.450" + %22 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -39,42 +39,44 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %24 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %cross_9857cb = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3half Function %15 - %arg_1 = OpVariable %_ptr_Function_v3half Function %15 - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - %21 = OpLoad %v3half %arg_0 - %22 = OpLoad %v3half %arg_1 - %19 = OpExtInst %v3half %20 Cross %21 %22 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v3half Function %19 + %arg_1 = OpVariable %_ptr_Function_v3half Function %19 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + %23 = OpLoad %v3half %arg_0 + %24 = OpLoad %v3half %arg_1 + %21 = OpExtInst %v3half %22 Cross %23 %24 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %cross_9857cb +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %cross_9857cb OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %cross_9857cb + %35 = OpLabel + %36 = OpFunctionCall %void %cross_9857cb OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %cross_9857cb + %38 = OpLabel + %39 = OpFunctionCall %void %cross_9857cb OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.wgsl b/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.wgsl index f1706c4213..6fdeaeb4b6 100644 --- a/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.wgsl @@ -1,8 +1,8 @@ enable f16; fn cross_9857cb() { - var arg_0 = vec3(f16()); - var arg_1 = vec3(f16()); + var arg_0 = vec3(1.0h); + var arg_1 = vec3(1.0h); var res : vec3 = cross(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/degrees/3055d3.wgsl b/test/tint/builtins/gen/var/degrees/3055d3.wgsl index 2ccb71f726..0929dda29e 100644 --- a/test/tint/builtins/gen/var/degrees/3055d3.wgsl +++ b/test/tint/builtins/gen/var/degrees/3055d3.wgsl @@ -25,7 +25,7 @@ enable f16; // fn degrees(vec<4, f16>) -> vec<4, f16> fn degrees_3055d3() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.h); var res: vec4 = degrees(arg_0); } diff --git a/test/tint/builtins/gen/var/degrees/3055d3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/degrees/3055d3.wgsl.expected.dxc.hlsl index b7a4b58df9..e2b7da8179 100644 --- a/test/tint/builtins/gen/var/degrees/3055d3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/degrees/3055d3.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ vector tint_degrees(vector param_0) { } void degrees_3055d3() { - vector arg_0 = (float16_t(0.0h)).xxxx; + vector arg_0 = (float16_t(1.0h)).xxxx; vector res = tint_degrees(arg_0); } diff --git a/test/tint/builtins/gen/var/degrees/3055d3.wgsl.expected.glsl b/test/tint/builtins/gen/var/degrees/3055d3.wgsl.expected.glsl index 8a051036cb..0b4d067d5e 100644 --- a/test/tint/builtins/gen/var/degrees/3055d3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/degrees/3055d3.wgsl.expected.glsl @@ -7,7 +7,7 @@ f16vec4 tint_degrees(f16vec4 param_0) { void degrees_3055d3() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = tint_degrees(arg_0); } @@ -34,7 +34,7 @@ f16vec4 tint_degrees(f16vec4 param_0) { void degrees_3055d3() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = tint_degrees(arg_0); } @@ -55,7 +55,7 @@ f16vec4 tint_degrees(f16vec4 param_0) { void degrees_3055d3() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = tint_degrees(arg_0); } diff --git a/test/tint/builtins/gen/var/degrees/3055d3.wgsl.expected.msl b/test/tint/builtins/gen/var/degrees/3055d3.wgsl.expected.msl index e4ca478fba..a14dbf813d 100644 --- a/test/tint/builtins/gen/var/degrees/3055d3.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/degrees/3055d3.wgsl.expected.msl @@ -7,7 +7,7 @@ half4 tint_degrees(half4 param_0) { } void degrees_3055d3() { - half4 arg_0 = half4(0.0h); + half4 arg_0 = half4(1.0h); half4 res = tint_degrees(arg_0); } diff --git a/test/tint/builtins/gen/var/degrees/3055d3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/degrees/3055d3.wgsl.expected.spvasm index 2604fcfe33..f7b5aa16a2 100644 --- a/test/tint/builtins/gen/var/degrees/3055d3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/degrees/3055d3.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v4half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %degrees_3055d3 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4half Function %15 - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v4half %arg_0 - %18 = OpExtInst %v4half %19 Degrees %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v4half Function %19 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v4half %arg_0 + %20 = OpExtInst %v4half %21 Degrees %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %degrees_3055d3 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %degrees_3055d3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %degrees_3055d3 + %33 = OpLabel + %34 = OpFunctionCall %void %degrees_3055d3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %degrees_3055d3 + %36 = OpLabel + %37 = OpFunctionCall %void %degrees_3055d3 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/degrees/3055d3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/degrees/3055d3.wgsl.expected.wgsl index 284c1c8c72..b0f9f140ea 100644 --- a/test/tint/builtins/gen/var/degrees/3055d3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/degrees/3055d3.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn degrees_3055d3() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.0h); var res : vec4 = degrees(arg_0); } diff --git a/test/tint/builtins/gen/var/degrees/5e9805.wgsl b/test/tint/builtins/gen/var/degrees/5e9805.wgsl index 3b13f5f558..736d6cc57f 100644 --- a/test/tint/builtins/gen/var/degrees/5e9805.wgsl +++ b/test/tint/builtins/gen/var/degrees/5e9805.wgsl @@ -25,7 +25,7 @@ enable f16; // fn degrees(f16) -> f16 fn degrees_5e9805() { - var arg_0 = f16(); + var arg_0 = 1.h; var res: f16 = degrees(arg_0); } diff --git a/test/tint/builtins/gen/var/degrees/5e9805.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/degrees/5e9805.wgsl.expected.dxc.hlsl index b23805c45e..3616145305 100644 --- a/test/tint/builtins/gen/var/degrees/5e9805.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/degrees/5e9805.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ float16_t tint_degrees(float16_t param_0) { } void degrees_5e9805() { - float16_t arg_0 = float16_t(0.0h); + float16_t arg_0 = float16_t(1.0h); float16_t res = tint_degrees(arg_0); } diff --git a/test/tint/builtins/gen/var/degrees/5e9805.wgsl.expected.glsl b/test/tint/builtins/gen/var/degrees/5e9805.wgsl.expected.glsl index 69aaca4062..5f997f2ffc 100644 --- a/test/tint/builtins/gen/var/degrees/5e9805.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/degrees/5e9805.wgsl.expected.glsl @@ -7,7 +7,7 @@ float16_t tint_degrees(float16_t param_0) { void degrees_5e9805() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = tint_degrees(arg_0); } @@ -34,7 +34,7 @@ float16_t tint_degrees(float16_t param_0) { void degrees_5e9805() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = tint_degrees(arg_0); } @@ -55,7 +55,7 @@ float16_t tint_degrees(float16_t param_0) { void degrees_5e9805() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = tint_degrees(arg_0); } diff --git a/test/tint/builtins/gen/var/degrees/5e9805.wgsl.expected.msl b/test/tint/builtins/gen/var/degrees/5e9805.wgsl.expected.msl index 6639be5e18..a3fde5cd6b 100644 --- a/test/tint/builtins/gen/var/degrees/5e9805.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/degrees/5e9805.wgsl.expected.msl @@ -7,7 +7,7 @@ half tint_degrees(half param_0) { } void degrees_5e9805() { - half arg_0 = 0.0h; + half arg_0 = 1.0h; half res = tint_degrees(arg_0); } diff --git a/test/tint/builtins/gen/var/degrees/5e9805.wgsl.expected.spvasm b/test/tint/builtins/gen/var/degrees/5e9805.wgsl.expected.spvasm index bb166209c3..a27b49a035 100644 --- a/test/tint/builtins/gen/var/degrees/5e9805.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/degrees/5e9805.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %18 = OpExtInstImport "GLSL.std.450" + %19 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -37,39 +37,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %21 = OpTypeFunction %v4float + %17 = OpConstantNull %half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %degrees_5e9805 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_half Function %14 - %res = OpVariable %_ptr_Function_half Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %half %arg_0 - %17 = OpExtInst %half %18 Degrees %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_half Function %17 + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %arg_0 %half_0x1p_0 + %20 = OpLoad %half %arg_0 + %18 = OpExtInst %half %19 Degrees %20 + OpStore %res %18 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %degrees_5e9805 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %degrees_5e9805 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %degrees_5e9805 + %31 = OpLabel + %32 = OpFunctionCall %void %degrees_5e9805 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %degrees_5e9805 + %34 = OpLabel + %35 = OpFunctionCall %void %degrees_5e9805 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/degrees/5e9805.wgsl.expected.wgsl b/test/tint/builtins/gen/var/degrees/5e9805.wgsl.expected.wgsl index 1d9e554e2e..76d31b9452 100644 --- a/test/tint/builtins/gen/var/degrees/5e9805.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/degrees/5e9805.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn degrees_5e9805() { - var arg_0 = f16(); + var arg_0 = 1.0h; var res : f16 = degrees(arg_0); } diff --git a/test/tint/builtins/gen/var/degrees/dfe8f4.wgsl b/test/tint/builtins/gen/var/degrees/dfe8f4.wgsl index 6cd4a1de97..fea71fe402 100644 --- a/test/tint/builtins/gen/var/degrees/dfe8f4.wgsl +++ b/test/tint/builtins/gen/var/degrees/dfe8f4.wgsl @@ -25,7 +25,7 @@ enable f16; // fn degrees(vec<3, f16>) -> vec<3, f16> fn degrees_dfe8f4() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.h); var res: vec3 = degrees(arg_0); } diff --git a/test/tint/builtins/gen/var/degrees/dfe8f4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/degrees/dfe8f4.wgsl.expected.dxc.hlsl index 392869bdb9..2e9d20370c 100644 --- a/test/tint/builtins/gen/var/degrees/dfe8f4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/degrees/dfe8f4.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ vector tint_degrees(vector param_0) { } void degrees_dfe8f4() { - vector arg_0 = (float16_t(0.0h)).xxx; + vector arg_0 = (float16_t(1.0h)).xxx; vector res = tint_degrees(arg_0); } diff --git a/test/tint/builtins/gen/var/degrees/dfe8f4.wgsl.expected.glsl b/test/tint/builtins/gen/var/degrees/dfe8f4.wgsl.expected.glsl index d82db9e073..df61492168 100644 --- a/test/tint/builtins/gen/var/degrees/dfe8f4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/degrees/dfe8f4.wgsl.expected.glsl @@ -7,7 +7,7 @@ f16vec3 tint_degrees(f16vec3 param_0) { void degrees_dfe8f4() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = tint_degrees(arg_0); } @@ -34,7 +34,7 @@ f16vec3 tint_degrees(f16vec3 param_0) { void degrees_dfe8f4() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = tint_degrees(arg_0); } @@ -55,7 +55,7 @@ f16vec3 tint_degrees(f16vec3 param_0) { void degrees_dfe8f4() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = tint_degrees(arg_0); } diff --git a/test/tint/builtins/gen/var/degrees/dfe8f4.wgsl.expected.msl b/test/tint/builtins/gen/var/degrees/dfe8f4.wgsl.expected.msl index cf288cdb58..c9135cdb96 100644 --- a/test/tint/builtins/gen/var/degrees/dfe8f4.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/degrees/dfe8f4.wgsl.expected.msl @@ -7,7 +7,7 @@ half3 tint_degrees(half3 param_0) { } void degrees_dfe8f4() { - half3 arg_0 = half3(0.0h); + half3 arg_0 = half3(1.0h); half3 res = tint_degrees(arg_0); } diff --git a/test/tint/builtins/gen/var/degrees/dfe8f4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/degrees/dfe8f4.wgsl.expected.spvasm index 32166139d0..bb67782342 100644 --- a/test/tint/builtins/gen/var/degrees/dfe8f4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/degrees/dfe8f4.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %degrees_dfe8f4 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3half Function %15 - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v3half %arg_0 - %18 = OpExtInst %v3half %19 Degrees %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v3half Function %19 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v3half %arg_0 + %20 = OpExtInst %v3half %21 Degrees %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %degrees_dfe8f4 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %degrees_dfe8f4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %degrees_dfe8f4 + %33 = OpLabel + %34 = OpFunctionCall %void %degrees_dfe8f4 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %degrees_dfe8f4 + %36 = OpLabel + %37 = OpFunctionCall %void %degrees_dfe8f4 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/degrees/dfe8f4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/degrees/dfe8f4.wgsl.expected.wgsl index 3ec216f1bb..7cdbf02d24 100644 --- a/test/tint/builtins/gen/var/degrees/dfe8f4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/degrees/dfe8f4.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn degrees_dfe8f4() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.0h); var res : vec3 = degrees(arg_0); } diff --git a/test/tint/builtins/gen/var/degrees/f59715.wgsl b/test/tint/builtins/gen/var/degrees/f59715.wgsl index a091857dc5..4cb5747423 100644 --- a/test/tint/builtins/gen/var/degrees/f59715.wgsl +++ b/test/tint/builtins/gen/var/degrees/f59715.wgsl @@ -25,7 +25,7 @@ enable f16; // fn degrees(vec<2, f16>) -> vec<2, f16> fn degrees_f59715() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.h); var res: vec2 = degrees(arg_0); } diff --git a/test/tint/builtins/gen/var/degrees/f59715.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/degrees/f59715.wgsl.expected.dxc.hlsl index 2bf6ba7b6b..1936b6aed1 100644 --- a/test/tint/builtins/gen/var/degrees/f59715.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/degrees/f59715.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ vector tint_degrees(vector param_0) { } void degrees_f59715() { - vector arg_0 = (float16_t(0.0h)).xx; + vector arg_0 = (float16_t(1.0h)).xx; vector res = tint_degrees(arg_0); } diff --git a/test/tint/builtins/gen/var/degrees/f59715.wgsl.expected.glsl b/test/tint/builtins/gen/var/degrees/f59715.wgsl.expected.glsl index 0273ac4221..d4665f0859 100644 --- a/test/tint/builtins/gen/var/degrees/f59715.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/degrees/f59715.wgsl.expected.glsl @@ -7,7 +7,7 @@ f16vec2 tint_degrees(f16vec2 param_0) { void degrees_f59715() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = tint_degrees(arg_0); } @@ -34,7 +34,7 @@ f16vec2 tint_degrees(f16vec2 param_0) { void degrees_f59715() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = tint_degrees(arg_0); } @@ -55,7 +55,7 @@ f16vec2 tint_degrees(f16vec2 param_0) { void degrees_f59715() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = tint_degrees(arg_0); } diff --git a/test/tint/builtins/gen/var/degrees/f59715.wgsl.expected.msl b/test/tint/builtins/gen/var/degrees/f59715.wgsl.expected.msl index a454ff0a37..5a10bbff68 100644 --- a/test/tint/builtins/gen/var/degrees/f59715.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/degrees/f59715.wgsl.expected.msl @@ -7,7 +7,7 @@ half2 tint_degrees(half2 param_0) { } void degrees_f59715() { - half2 arg_0 = half2(0.0h); + half2 arg_0 = half2(1.0h); half2 res = tint_degrees(arg_0); } diff --git a/test/tint/builtins/gen/var/degrees/f59715.wgsl.expected.spvasm b/test/tint/builtins/gen/var/degrees/f59715.wgsl.expected.spvasm index dfdcb2435f..fec5d9fc93 100644 --- a/test/tint/builtins/gen/var/degrees/f59715.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/degrees/f59715.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v2half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %degrees_f59715 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2half Function %15 - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v2half %arg_0 - %18 = OpExtInst %v2half %19 Degrees %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v2half Function %19 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v2half %arg_0 + %20 = OpExtInst %v2half %21 Degrees %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %degrees_f59715 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %degrees_f59715 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %degrees_f59715 + %33 = OpLabel + %34 = OpFunctionCall %void %degrees_f59715 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %degrees_f59715 + %36 = OpLabel + %37 = OpFunctionCall %void %degrees_f59715 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/degrees/f59715.wgsl.expected.wgsl b/test/tint/builtins/gen/var/degrees/f59715.wgsl.expected.wgsl index b3a6abf730..80f75e62da 100644 --- a/test/tint/builtins/gen/var/degrees/f59715.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/degrees/f59715.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn degrees_f59715() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.0h); var res : vec2 = degrees(arg_0); } diff --git a/test/tint/builtins/gen/var/determinant/32bfde.wgsl b/test/tint/builtins/gen/var/determinant/32bfde.wgsl index fd0a38e315..93c2ccf5f0 100644 --- a/test/tint/builtins/gen/var/determinant/32bfde.wgsl +++ b/test/tint/builtins/gen/var/determinant/32bfde.wgsl @@ -25,7 +25,7 @@ enable f16; // fn determinant(mat<4, 4, f16>) -> f16 fn determinant_32bfde() { - var arg_0 = mat4x4(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16()); + var arg_0 = mat4x4(1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h); var res: f16 = determinant(arg_0); } diff --git a/test/tint/builtins/gen/var/determinant/32bfde.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/determinant/32bfde.wgsl.expected.dxc.hlsl index 21bb924a04..a2bf98fe75 100644 --- a/test/tint/builtins/gen/var/determinant/32bfde.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/determinant/32bfde.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void determinant_32bfde() { - matrix arg_0 = matrix((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx); + matrix arg_0 = matrix((float16_t(1.0h)).xxxx, (float16_t(1.0h)).xxxx, (float16_t(1.0h)).xxxx, (float16_t(1.0h)).xxxx); float16_t res = determinant(arg_0); } diff --git a/test/tint/builtins/gen/var/determinant/32bfde.wgsl.expected.glsl b/test/tint/builtins/gen/var/determinant/32bfde.wgsl.expected.glsl index 2edc4dbcb3..ecf8080e6c 100644 --- a/test/tint/builtins/gen/var/determinant/32bfde.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/determinant/32bfde.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void determinant_32bfde() { - f16mat4 arg_0 = f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf)); + f16mat4 arg_0 = f16mat4(f16vec4(1.0hf), f16vec4(1.0hf), f16vec4(1.0hf), f16vec4(1.0hf)); float16_t res = determinant(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void determinant_32bfde() { - f16mat4 arg_0 = f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf)); + f16mat4 arg_0 = f16mat4(f16vec4(1.0hf), f16vec4(1.0hf), f16vec4(1.0hf), f16vec4(1.0hf)); float16_t res = determinant(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void determinant_32bfde() { - f16mat4 arg_0 = f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf)); + f16mat4 arg_0 = f16mat4(f16vec4(1.0hf), f16vec4(1.0hf), f16vec4(1.0hf), f16vec4(1.0hf)); float16_t res = determinant(arg_0); } diff --git a/test/tint/builtins/gen/var/determinant/32bfde.wgsl.expected.msl b/test/tint/builtins/gen/var/determinant/32bfde.wgsl.expected.msl index 2398440469..78edf50d7e 100644 --- a/test/tint/builtins/gen/var/determinant/32bfde.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/determinant/32bfde.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void determinant_32bfde() { - half4x4 arg_0 = half4x4(half4(0.0h), half4(0.0h), half4(0.0h), half4(0.0h)); + half4x4 arg_0 = half4x4(half4(1.0h), half4(1.0h), half4(1.0h), half4(1.0h)); half res = determinant(arg_0); } diff --git a/test/tint/builtins/gen/var/determinant/32bfde.wgsl.expected.spvasm b/test/tint/builtins/gen/var/determinant/32bfde.wgsl.expected.spvasm index 3af3168271..9e1612e61c 100644 --- a/test/tint/builtins/gen/var/determinant/32bfde.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/determinant/32bfde.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 42 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %20 = OpExtInstImport "GLSL.std.450" + %23 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -39,41 +39,44 @@ %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 %mat4v4half = OpTypeMatrix %v4half 4 - %16 = OpConstantNull %mat4v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %17 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 + %18 = OpConstantComposite %mat4v4half %17 %17 %17 %17 %_ptr_Function_mat4v4half = OpTypePointer Function %mat4v4half + %21 = OpConstantNull %mat4v4half %_ptr_Function_half = OpTypePointer Function %half - %24 = OpConstantNull %half - %25 = OpTypeFunction %v4float + %27 = OpConstantNull %half + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %determinant_32bfde = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_mat4v4half Function %16 - %res = OpVariable %_ptr_Function_half Function %24 - OpStore %arg_0 %16 - %21 = OpLoad %mat4v4half %arg_0 - %19 = OpExtInst %half %20 Determinant %21 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_mat4v4half Function %21 + %res = OpVariable %_ptr_Function_half Function %27 + OpStore %arg_0 %18 + %24 = OpLoad %mat4v4half %arg_0 + %22 = OpExtInst %half %23 Determinant %24 + OpStore %res %22 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %determinant_32bfde +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %determinant_32bfde OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %determinant_32bfde - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %9 %37 = OpLabel %38 = OpFunctionCall %void %determinant_32bfde OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %9 + %40 = OpLabel + %41 = OpFunctionCall %void %determinant_32bfde + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/determinant/32bfde.wgsl.expected.wgsl b/test/tint/builtins/gen/var/determinant/32bfde.wgsl.expected.wgsl index c0fcade5c0..e172f25fba 100644 --- a/test/tint/builtins/gen/var/determinant/32bfde.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/determinant/32bfde.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn determinant_32bfde() { - var arg_0 = mat4x4(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16()); + var arg_0 = mat4x4(1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h); var res : f16 = determinant(arg_0); } diff --git a/test/tint/builtins/gen/var/determinant/d7c86f.wgsl b/test/tint/builtins/gen/var/determinant/d7c86f.wgsl index b071018e54..35a33c8856 100644 --- a/test/tint/builtins/gen/var/determinant/d7c86f.wgsl +++ b/test/tint/builtins/gen/var/determinant/d7c86f.wgsl @@ -25,7 +25,7 @@ enable f16; // fn determinant(mat<3, 3, f16>) -> f16 fn determinant_d7c86f() { - var arg_0 = mat3x3(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16()); + var arg_0 = mat3x3(1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h); var res: f16 = determinant(arg_0); } diff --git a/test/tint/builtins/gen/var/determinant/d7c86f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/determinant/d7c86f.wgsl.expected.dxc.hlsl index 899cb344ae..5abf230adc 100644 --- a/test/tint/builtins/gen/var/determinant/d7c86f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/determinant/d7c86f.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void determinant_d7c86f() { - matrix arg_0 = matrix((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx); + matrix arg_0 = matrix((float16_t(1.0h)).xxx, (float16_t(1.0h)).xxx, (float16_t(1.0h)).xxx); float16_t res = determinant(arg_0); } diff --git a/test/tint/builtins/gen/var/determinant/d7c86f.wgsl.expected.glsl b/test/tint/builtins/gen/var/determinant/d7c86f.wgsl.expected.glsl index 9718310c09..e1423fd828 100644 --- a/test/tint/builtins/gen/var/determinant/d7c86f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/determinant/d7c86f.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void determinant_d7c86f() { - f16mat3 arg_0 = f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)); + f16mat3 arg_0 = f16mat3(f16vec3(1.0hf), f16vec3(1.0hf), f16vec3(1.0hf)); float16_t res = determinant(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void determinant_d7c86f() { - f16mat3 arg_0 = f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)); + f16mat3 arg_0 = f16mat3(f16vec3(1.0hf), f16vec3(1.0hf), f16vec3(1.0hf)); float16_t res = determinant(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void determinant_d7c86f() { - f16mat3 arg_0 = f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)); + f16mat3 arg_0 = f16mat3(f16vec3(1.0hf), f16vec3(1.0hf), f16vec3(1.0hf)); float16_t res = determinant(arg_0); } diff --git a/test/tint/builtins/gen/var/determinant/d7c86f.wgsl.expected.msl b/test/tint/builtins/gen/var/determinant/d7c86f.wgsl.expected.msl index a3b282f07a..789c6f1a4f 100644 --- a/test/tint/builtins/gen/var/determinant/d7c86f.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/determinant/d7c86f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void determinant_d7c86f() { - half3x3 arg_0 = half3x3(half3(0.0h), half3(0.0h), half3(0.0h)); + half3x3 arg_0 = half3x3(half3(1.0h), half3(1.0h), half3(1.0h)); half res = determinant(arg_0); } diff --git a/test/tint/builtins/gen/var/determinant/d7c86f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/determinant/d7c86f.wgsl.expected.spvasm index 0540412c56..931fae8bc7 100644 --- a/test/tint/builtins/gen/var/determinant/d7c86f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/determinant/d7c86f.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 42 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %20 = OpExtInstImport "GLSL.std.450" + %23 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -39,41 +39,44 @@ %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 %mat3v3half = OpTypeMatrix %v3half 3 - %16 = OpConstantNull %mat3v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %17 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 + %18 = OpConstantComposite %mat3v3half %17 %17 %17 %_ptr_Function_mat3v3half = OpTypePointer Function %mat3v3half + %21 = OpConstantNull %mat3v3half %_ptr_Function_half = OpTypePointer Function %half - %24 = OpConstantNull %half - %25 = OpTypeFunction %v4float + %27 = OpConstantNull %half + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %determinant_d7c86f = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_mat3v3half Function %16 - %res = OpVariable %_ptr_Function_half Function %24 - OpStore %arg_0 %16 - %21 = OpLoad %mat3v3half %arg_0 - %19 = OpExtInst %half %20 Determinant %21 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_mat3v3half Function %21 + %res = OpVariable %_ptr_Function_half Function %27 + OpStore %arg_0 %18 + %24 = OpLoad %mat3v3half %arg_0 + %22 = OpExtInst %half %23 Determinant %24 + OpStore %res %22 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %determinant_d7c86f +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %determinant_d7c86f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %determinant_d7c86f - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %9 %37 = OpLabel %38 = OpFunctionCall %void %determinant_d7c86f OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %9 + %40 = OpLabel + %41 = OpFunctionCall %void %determinant_d7c86f + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/determinant/d7c86f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/determinant/d7c86f.wgsl.expected.wgsl index aae4d08d2c..2c27978544 100644 --- a/test/tint/builtins/gen/var/determinant/d7c86f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/determinant/d7c86f.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn determinant_d7c86f() { - var arg_0 = mat3x3(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16()); + var arg_0 = mat3x3(1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h); var res : f16 = determinant(arg_0); } diff --git a/test/tint/builtins/gen/var/determinant/fc12a5.wgsl b/test/tint/builtins/gen/var/determinant/fc12a5.wgsl index bcb0f6e481..c2a57d6795 100644 --- a/test/tint/builtins/gen/var/determinant/fc12a5.wgsl +++ b/test/tint/builtins/gen/var/determinant/fc12a5.wgsl @@ -25,7 +25,7 @@ enable f16; // fn determinant(mat<2, 2, f16>) -> f16 fn determinant_fc12a5() { - var arg_0 = mat2x2(f16(), f16(), f16(), f16()); + var arg_0 = mat2x2(1.h, 1.h, 1.h, 1.h); var res: f16 = determinant(arg_0); } diff --git a/test/tint/builtins/gen/var/determinant/fc12a5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/determinant/fc12a5.wgsl.expected.dxc.hlsl index 46328d560a..691fa80984 100644 --- a/test/tint/builtins/gen/var/determinant/fc12a5.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/determinant/fc12a5.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void determinant_fc12a5() { - matrix arg_0 = matrix((float16_t(0.0h)).xx, (float16_t(0.0h)).xx); + matrix arg_0 = matrix((float16_t(1.0h)).xx, (float16_t(1.0h)).xx); float16_t res = determinant(arg_0); } diff --git a/test/tint/builtins/gen/var/determinant/fc12a5.wgsl.expected.glsl b/test/tint/builtins/gen/var/determinant/fc12a5.wgsl.expected.glsl index a8dbfa6a0f..9cfd01497b 100644 --- a/test/tint/builtins/gen/var/determinant/fc12a5.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/determinant/fc12a5.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void determinant_fc12a5() { - f16mat2 arg_0 = f16mat2(f16vec2(0.0hf), f16vec2(0.0hf)); + f16mat2 arg_0 = f16mat2(f16vec2(1.0hf), f16vec2(1.0hf)); float16_t res = determinant(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void determinant_fc12a5() { - f16mat2 arg_0 = f16mat2(f16vec2(0.0hf), f16vec2(0.0hf)); + f16mat2 arg_0 = f16mat2(f16vec2(1.0hf), f16vec2(1.0hf)); float16_t res = determinant(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void determinant_fc12a5() { - f16mat2 arg_0 = f16mat2(f16vec2(0.0hf), f16vec2(0.0hf)); + f16mat2 arg_0 = f16mat2(f16vec2(1.0hf), f16vec2(1.0hf)); float16_t res = determinant(arg_0); } diff --git a/test/tint/builtins/gen/var/determinant/fc12a5.wgsl.expected.msl b/test/tint/builtins/gen/var/determinant/fc12a5.wgsl.expected.msl index 2e6b14e149..4c6e8cafdf 100644 --- a/test/tint/builtins/gen/var/determinant/fc12a5.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/determinant/fc12a5.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void determinant_fc12a5() { - half2x2 arg_0 = half2x2(half2(0.0h), half2(0.0h)); + half2x2 arg_0 = half2x2(half2(1.0h), half2(1.0h)); half res = determinant(arg_0); } diff --git a/test/tint/builtins/gen/var/determinant/fc12a5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/determinant/fc12a5.wgsl.expected.spvasm index 1141730e28..aa2d81f0c3 100644 --- a/test/tint/builtins/gen/var/determinant/fc12a5.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/determinant/fc12a5.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 42 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %20 = OpExtInstImport "GLSL.std.450" + %23 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -39,41 +39,44 @@ %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 %mat2v2half = OpTypeMatrix %v2half 2 - %16 = OpConstantNull %mat2v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %17 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 + %18 = OpConstantComposite %mat2v2half %17 %17 %_ptr_Function_mat2v2half = OpTypePointer Function %mat2v2half + %21 = OpConstantNull %mat2v2half %_ptr_Function_half = OpTypePointer Function %half - %24 = OpConstantNull %half - %25 = OpTypeFunction %v4float + %27 = OpConstantNull %half + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %determinant_fc12a5 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_mat2v2half Function %16 - %res = OpVariable %_ptr_Function_half Function %24 - OpStore %arg_0 %16 - %21 = OpLoad %mat2v2half %arg_0 - %19 = OpExtInst %half %20 Determinant %21 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_mat2v2half Function %21 + %res = OpVariable %_ptr_Function_half Function %27 + OpStore %arg_0 %18 + %24 = OpLoad %mat2v2half %arg_0 + %22 = OpExtInst %half %23 Determinant %24 + OpStore %res %22 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %determinant_fc12a5 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %determinant_fc12a5 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %determinant_fc12a5 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %9 %37 = OpLabel %38 = OpFunctionCall %void %determinant_fc12a5 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %9 + %40 = OpLabel + %41 = OpFunctionCall %void %determinant_fc12a5 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/determinant/fc12a5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/determinant/fc12a5.wgsl.expected.wgsl index 225d3cfd93..26cd988f1a 100644 --- a/test/tint/builtins/gen/var/determinant/fc12a5.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/determinant/fc12a5.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn determinant_fc12a5() { - var arg_0 = mat2x2(f16(), f16(), f16(), f16()); + var arg_0 = mat2x2(1.0h, 1.0h, 1.0h, 1.0h); var res : f16 = determinant(arg_0); } diff --git a/test/tint/builtins/gen/var/distance/7272f3.wgsl b/test/tint/builtins/gen/var/distance/7272f3.wgsl index f8aad30c93..40cdbe5c97 100644 --- a/test/tint/builtins/gen/var/distance/7272f3.wgsl +++ b/test/tint/builtins/gen/var/distance/7272f3.wgsl @@ -25,8 +25,8 @@ enable f16; // fn distance(vec<4, f16>, vec<4, f16>) -> f16 fn distance_7272f3() { - var arg_0 = vec4(f16()); - var arg_1 = vec4(f16()); + var arg_0 = vec4(1.h); + var arg_1 = vec4(1.h); var res: f16 = distance(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/distance/7272f3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/distance/7272f3.wgsl.expected.dxc.hlsl index 1b62fdc621..ddcf49ae94 100644 --- a/test/tint/builtins/gen/var/distance/7272f3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/distance/7272f3.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void distance_7272f3() { - vector arg_0 = (float16_t(0.0h)).xxxx; - vector arg_1 = (float16_t(0.0h)).xxxx; + vector arg_0 = (float16_t(1.0h)).xxxx; + vector arg_1 = (float16_t(1.0h)).xxxx; float16_t res = distance(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/distance/7272f3.wgsl.expected.glsl b/test/tint/builtins/gen/var/distance/7272f3.wgsl.expected.glsl index 16eba83445..6f171d7c6e 100644 --- a/test/tint/builtins/gen/var/distance/7272f3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/distance/7272f3.wgsl.expected.glsl @@ -2,8 +2,8 @@ #extension GL_AMD_gpu_shader_half_float : require void distance_7272f3() { - f16vec4 arg_0 = f16vec4(0.0hf); - f16vec4 arg_1 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_1 = f16vec4(1.0hf); float16_t res = distance(arg_0, arg_1); } @@ -25,8 +25,8 @@ void main() { precision mediump float; void distance_7272f3() { - f16vec4 arg_0 = f16vec4(0.0hf); - f16vec4 arg_1 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_1 = f16vec4(1.0hf); float16_t res = distance(arg_0, arg_1); } @@ -42,8 +42,8 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void distance_7272f3() { - f16vec4 arg_0 = f16vec4(0.0hf); - f16vec4 arg_1 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_1 = f16vec4(1.0hf); float16_t res = distance(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/distance/7272f3.wgsl.expected.msl b/test/tint/builtins/gen/var/distance/7272f3.wgsl.expected.msl index 24a1476c81..6f0a7c13d3 100644 --- a/test/tint/builtins/gen/var/distance/7272f3.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/distance/7272f3.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void distance_7272f3() { - half4 arg_0 = half4(0.0h); - half4 arg_1 = half4(0.0h); + half4 arg_0 = half4(1.0h); + half4 arg_1 = half4(1.0h); half res = distance(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/distance/7272f3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/distance/7272f3.wgsl.expected.spvasm index 967f8eab46..457f5d50a4 100644 --- a/test/tint/builtins/gen/var/distance/7272f3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/distance/7272f3.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 42 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %20 = OpExtInstImport "GLSL.std.450" + %22 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -39,44 +39,46 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half + %19 = OpConstantNull %v4half %_ptr_Function_half = OpTypePointer Function %half - %25 = OpConstantNull %half - %26 = OpTypeFunction %v4float + %27 = OpConstantNull %half + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %distance_7272f3 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4half Function %15 - %arg_1 = OpVariable %_ptr_Function_v4half Function %15 - %res = OpVariable %_ptr_Function_half Function %25 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - %21 = OpLoad %v4half %arg_0 - %22 = OpLoad %v4half %arg_1 - %19 = OpExtInst %half %20 Distance %21 %22 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v4half Function %19 + %arg_1 = OpVariable %_ptr_Function_v4half Function %19 + %res = OpVariable %_ptr_Function_half Function %27 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + %23 = OpLoad %v4half %arg_0 + %24 = OpLoad %v4half %arg_1 + %21 = OpExtInst %half %22 Distance %23 %24 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %distance_7272f3 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %distance_7272f3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %distance_7272f3 + %37 = OpLabel + %38 = OpFunctionCall %void %distance_7272f3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %void %distance_7272f3 + %40 = OpLabel + %41 = OpFunctionCall %void %distance_7272f3 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/distance/7272f3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/distance/7272f3.wgsl.expected.wgsl index 3689ad7631..0b7e3774de 100644 --- a/test/tint/builtins/gen/var/distance/7272f3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/distance/7272f3.wgsl.expected.wgsl @@ -1,8 +1,8 @@ enable f16; fn distance_7272f3() { - var arg_0 = vec4(f16()); - var arg_1 = vec4(f16()); + var arg_0 = vec4(1.0h); + var arg_1 = vec4(1.0h); var res : f16 = distance(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/distance/7d201f.wgsl b/test/tint/builtins/gen/var/distance/7d201f.wgsl index a66064c8b5..2d8cad987e 100644 --- a/test/tint/builtins/gen/var/distance/7d201f.wgsl +++ b/test/tint/builtins/gen/var/distance/7d201f.wgsl @@ -25,8 +25,8 @@ enable f16; // fn distance(f16, f16) -> f16 fn distance_7d201f() { - var arg_0 = f16(); - var arg_1 = f16(); + var arg_0 = 1.h; + var arg_1 = 1.h; var res: f16 = distance(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/distance/7d201f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/distance/7d201f.wgsl.expected.dxc.hlsl index e83ccf12fe..c3c38ad26c 100644 --- a/test/tint/builtins/gen/var/distance/7d201f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/distance/7d201f.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void distance_7d201f() { - float16_t arg_0 = float16_t(0.0h); - float16_t arg_1 = float16_t(0.0h); + float16_t arg_0 = float16_t(1.0h); + float16_t arg_1 = float16_t(1.0h); float16_t res = distance(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/distance/7d201f.wgsl.expected.glsl b/test/tint/builtins/gen/var/distance/7d201f.wgsl.expected.glsl index 0ed25e6a06..83f64d9cdb 100644 --- a/test/tint/builtins/gen/var/distance/7d201f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/distance/7d201f.wgsl.expected.glsl @@ -2,8 +2,8 @@ #extension GL_AMD_gpu_shader_half_float : require void distance_7d201f() { - float16_t arg_0 = 0.0hf; - float16_t arg_1 = 0.0hf; + float16_t arg_0 = 1.0hf; + float16_t arg_1 = 1.0hf; float16_t res = distance(arg_0, arg_1); } @@ -25,8 +25,8 @@ void main() { precision mediump float; void distance_7d201f() { - float16_t arg_0 = 0.0hf; - float16_t arg_1 = 0.0hf; + float16_t arg_0 = 1.0hf; + float16_t arg_1 = 1.0hf; float16_t res = distance(arg_0, arg_1); } @@ -42,8 +42,8 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void distance_7d201f() { - float16_t arg_0 = 0.0hf; - float16_t arg_1 = 0.0hf; + float16_t arg_0 = 1.0hf; + float16_t arg_1 = 1.0hf; float16_t res = distance(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/distance/7d201f.wgsl.expected.msl b/test/tint/builtins/gen/var/distance/7d201f.wgsl.expected.msl index 780d62ec89..cb18d26927 100644 --- a/test/tint/builtins/gen/var/distance/7d201f.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/distance/7d201f.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void distance_7d201f() { - half arg_0 = 0.0h; - half arg_1 = 0.0h; + half arg_0 = 1.0h; + half arg_1 = 1.0h; half res = fabs(arg_0 - arg_1); } diff --git a/test/tint/builtins/gen/var/distance/7d201f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/distance/7d201f.wgsl.expected.spvasm index b39b43cfbb..1718943261 100644 --- a/test/tint/builtins/gen/var/distance/7d201f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/distance/7d201f.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,42 +38,43 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %23 = OpTypeFunction %v4float + %17 = OpConstantNull %half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %distance_7d201f = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_half Function %14 - %arg_1 = OpVariable %_ptr_Function_half Function %14 - %res = OpVariable %_ptr_Function_half Function %14 - OpStore %arg_0 %14 - OpStore %arg_1 %14 - %20 = OpLoad %half %arg_0 - %21 = OpLoad %half %arg_1 - %18 = OpExtInst %half %19 Distance %20 %21 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_half Function %17 + %arg_1 = OpVariable %_ptr_Function_half Function %17 + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %arg_0 %half_0x1p_0 + OpStore %arg_1 %half_0x1p_0 + %21 = OpLoad %half %arg_0 + %22 = OpLoad %half %arg_1 + %19 = OpExtInst %half %20 Distance %21 %22 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %distance_7d201f +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %distance_7d201f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %distance_7d201f + %33 = OpLabel + %34 = OpFunctionCall %void %distance_7d201f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %distance_7d201f + %36 = OpLabel + %37 = OpFunctionCall %void %distance_7d201f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/distance/7d201f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/distance/7d201f.wgsl.expected.wgsl index 4480b58193..01bd486937 100644 --- a/test/tint/builtins/gen/var/distance/7d201f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/distance/7d201f.wgsl.expected.wgsl @@ -1,8 +1,8 @@ enable f16; fn distance_7d201f() { - var arg_0 = f16(); - var arg_1 = f16(); + var arg_0 = 1.0h; + var arg_1 = 1.0h; var res : f16 = distance(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/distance/892a5d.wgsl b/test/tint/builtins/gen/var/distance/892a5d.wgsl index 2a5c2080ce..457acd167c 100644 --- a/test/tint/builtins/gen/var/distance/892a5d.wgsl +++ b/test/tint/builtins/gen/var/distance/892a5d.wgsl @@ -25,8 +25,8 @@ enable f16; // fn distance(vec<2, f16>, vec<2, f16>) -> f16 fn distance_892a5d() { - var arg_0 = vec2(f16()); - var arg_1 = vec2(f16()); + var arg_0 = vec2(1.h); + var arg_1 = vec2(1.h); var res: f16 = distance(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/distance/892a5d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/distance/892a5d.wgsl.expected.dxc.hlsl index 034e57e09b..e3a0d1a16a 100644 --- a/test/tint/builtins/gen/var/distance/892a5d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/distance/892a5d.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void distance_892a5d() { - vector arg_0 = (float16_t(0.0h)).xx; - vector arg_1 = (float16_t(0.0h)).xx; + vector arg_0 = (float16_t(1.0h)).xx; + vector arg_1 = (float16_t(1.0h)).xx; float16_t res = distance(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/distance/892a5d.wgsl.expected.glsl b/test/tint/builtins/gen/var/distance/892a5d.wgsl.expected.glsl index a615b6f8e3..aeb2c001d9 100644 --- a/test/tint/builtins/gen/var/distance/892a5d.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/distance/892a5d.wgsl.expected.glsl @@ -2,8 +2,8 @@ #extension GL_AMD_gpu_shader_half_float : require void distance_892a5d() { - f16vec2 arg_0 = f16vec2(0.0hf); - f16vec2 arg_1 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_1 = f16vec2(1.0hf); float16_t res = distance(arg_0, arg_1); } @@ -25,8 +25,8 @@ void main() { precision mediump float; void distance_892a5d() { - f16vec2 arg_0 = f16vec2(0.0hf); - f16vec2 arg_1 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_1 = f16vec2(1.0hf); float16_t res = distance(arg_0, arg_1); } @@ -42,8 +42,8 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void distance_892a5d() { - f16vec2 arg_0 = f16vec2(0.0hf); - f16vec2 arg_1 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_1 = f16vec2(1.0hf); float16_t res = distance(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/distance/892a5d.wgsl.expected.msl b/test/tint/builtins/gen/var/distance/892a5d.wgsl.expected.msl index 8fe755ddb3..29351e7dff 100644 --- a/test/tint/builtins/gen/var/distance/892a5d.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/distance/892a5d.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void distance_892a5d() { - half2 arg_0 = half2(0.0h); - half2 arg_1 = half2(0.0h); + half2 arg_0 = half2(1.0h); + half2 arg_1 = half2(1.0h); half res = distance(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/distance/892a5d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/distance/892a5d.wgsl.expected.spvasm index 59a5d06ed9..2beafc3f1c 100644 --- a/test/tint/builtins/gen/var/distance/892a5d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/distance/892a5d.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 42 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %20 = OpExtInstImport "GLSL.std.450" + %22 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -39,44 +39,46 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half + %19 = OpConstantNull %v2half %_ptr_Function_half = OpTypePointer Function %half - %25 = OpConstantNull %half - %26 = OpTypeFunction %v4float + %27 = OpConstantNull %half + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %distance_892a5d = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2half Function %15 - %arg_1 = OpVariable %_ptr_Function_v2half Function %15 - %res = OpVariable %_ptr_Function_half Function %25 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - %21 = OpLoad %v2half %arg_0 - %22 = OpLoad %v2half %arg_1 - %19 = OpExtInst %half %20 Distance %21 %22 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v2half Function %19 + %arg_1 = OpVariable %_ptr_Function_v2half Function %19 + %res = OpVariable %_ptr_Function_half Function %27 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + %23 = OpLoad %v2half %arg_0 + %24 = OpLoad %v2half %arg_1 + %21 = OpExtInst %half %22 Distance %23 %24 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %distance_892a5d +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %distance_892a5d OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %distance_892a5d + %37 = OpLabel + %38 = OpFunctionCall %void %distance_892a5d OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %void %distance_892a5d + %40 = OpLabel + %41 = OpFunctionCall %void %distance_892a5d OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/distance/892a5d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/distance/892a5d.wgsl.expected.wgsl index 279adafbd4..dac66dcd97 100644 --- a/test/tint/builtins/gen/var/distance/892a5d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/distance/892a5d.wgsl.expected.wgsl @@ -1,8 +1,8 @@ enable f16; fn distance_892a5d() { - var arg_0 = vec2(f16()); - var arg_1 = vec2(f16()); + var arg_0 = vec2(1.0h); + var arg_1 = vec2(1.0h); var res : f16 = distance(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/distance/928fa0.wgsl b/test/tint/builtins/gen/var/distance/928fa0.wgsl index 83a533b887..3c115bbd9d 100644 --- a/test/tint/builtins/gen/var/distance/928fa0.wgsl +++ b/test/tint/builtins/gen/var/distance/928fa0.wgsl @@ -25,8 +25,8 @@ enable f16; // fn distance(vec<3, f16>, vec<3, f16>) -> f16 fn distance_928fa0() { - var arg_0 = vec3(f16()); - var arg_1 = vec3(f16()); + var arg_0 = vec3(1.h); + var arg_1 = vec3(1.h); var res: f16 = distance(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/distance/928fa0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/distance/928fa0.wgsl.expected.dxc.hlsl index 097d7b8edd..00de962f9e 100644 --- a/test/tint/builtins/gen/var/distance/928fa0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/distance/928fa0.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void distance_928fa0() { - vector arg_0 = (float16_t(0.0h)).xxx; - vector arg_1 = (float16_t(0.0h)).xxx; + vector arg_0 = (float16_t(1.0h)).xxx; + vector arg_1 = (float16_t(1.0h)).xxx; float16_t res = distance(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/distance/928fa0.wgsl.expected.glsl b/test/tint/builtins/gen/var/distance/928fa0.wgsl.expected.glsl index 77dd598b10..52fedf6664 100644 --- a/test/tint/builtins/gen/var/distance/928fa0.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/distance/928fa0.wgsl.expected.glsl @@ -2,8 +2,8 @@ #extension GL_AMD_gpu_shader_half_float : require void distance_928fa0() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); float16_t res = distance(arg_0, arg_1); } @@ -25,8 +25,8 @@ void main() { precision mediump float; void distance_928fa0() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); float16_t res = distance(arg_0, arg_1); } @@ -42,8 +42,8 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void distance_928fa0() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); float16_t res = distance(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/distance/928fa0.wgsl.expected.msl b/test/tint/builtins/gen/var/distance/928fa0.wgsl.expected.msl index b2a96ab114..79b06d8507 100644 --- a/test/tint/builtins/gen/var/distance/928fa0.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/distance/928fa0.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void distance_928fa0() { - half3 arg_0 = half3(0.0h); - half3 arg_1 = half3(0.0h); + half3 arg_0 = half3(1.0h); + half3 arg_1 = half3(1.0h); half res = distance(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/distance/928fa0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/distance/928fa0.wgsl.expected.spvasm index 96965393a9..18c6a14b15 100644 --- a/test/tint/builtins/gen/var/distance/928fa0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/distance/928fa0.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 42 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %20 = OpExtInstImport "GLSL.std.450" + %22 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -39,44 +39,46 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half + %19 = OpConstantNull %v3half %_ptr_Function_half = OpTypePointer Function %half - %25 = OpConstantNull %half - %26 = OpTypeFunction %v4float + %27 = OpConstantNull %half + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %distance_928fa0 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3half Function %15 - %arg_1 = OpVariable %_ptr_Function_v3half Function %15 - %res = OpVariable %_ptr_Function_half Function %25 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - %21 = OpLoad %v3half %arg_0 - %22 = OpLoad %v3half %arg_1 - %19 = OpExtInst %half %20 Distance %21 %22 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v3half Function %19 + %arg_1 = OpVariable %_ptr_Function_v3half Function %19 + %res = OpVariable %_ptr_Function_half Function %27 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + %23 = OpLoad %v3half %arg_0 + %24 = OpLoad %v3half %arg_1 + %21 = OpExtInst %half %22 Distance %23 %24 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %distance_928fa0 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %distance_928fa0 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %distance_928fa0 + %37 = OpLabel + %38 = OpFunctionCall %void %distance_928fa0 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %void %distance_928fa0 + %40 = OpLabel + %41 = OpFunctionCall %void %distance_928fa0 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/distance/928fa0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/distance/928fa0.wgsl.expected.wgsl index 840d9e5cf0..de4c41d207 100644 --- a/test/tint/builtins/gen/var/distance/928fa0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/distance/928fa0.wgsl.expected.wgsl @@ -1,8 +1,8 @@ enable f16; fn distance_928fa0() { - var arg_0 = vec3(f16()); - var arg_1 = vec3(f16()); + var arg_0 = vec3(1.0h); + var arg_1 = vec3(1.0h); var res : f16 = distance(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/8e40f1.wgsl b/test/tint/builtins/gen/var/dot/8e40f1.wgsl index eceecd1056..7ddd2b0df9 100644 --- a/test/tint/builtins/gen/var/dot/8e40f1.wgsl +++ b/test/tint/builtins/gen/var/dot/8e40f1.wgsl @@ -25,8 +25,8 @@ enable f16; // fn dot(vec<3, f16>, vec<3, f16>) -> f16 fn dot_8e40f1() { - var arg_0 = vec3(f16()); - var arg_1 = vec3(f16()); + var arg_0 = vec3(1.h); + var arg_1 = vec3(1.h); var res: f16 = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/8e40f1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/dot/8e40f1.wgsl.expected.dxc.hlsl index ad11be220a..7d4895c8fa 100644 --- a/test/tint/builtins/gen/var/dot/8e40f1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/dot/8e40f1.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void dot_8e40f1() { - vector arg_0 = (float16_t(0.0h)).xxx; - vector arg_1 = (float16_t(0.0h)).xxx; + vector arg_0 = (float16_t(1.0h)).xxx; + vector arg_1 = (float16_t(1.0h)).xxx; float16_t res = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/8e40f1.wgsl.expected.glsl b/test/tint/builtins/gen/var/dot/8e40f1.wgsl.expected.glsl index 18066bf0c5..2443ac5a9c 100644 --- a/test/tint/builtins/gen/var/dot/8e40f1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/dot/8e40f1.wgsl.expected.glsl @@ -2,8 +2,8 @@ #extension GL_AMD_gpu_shader_half_float : require void dot_8e40f1() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); float16_t res = dot(arg_0, arg_1); } @@ -25,8 +25,8 @@ void main() { precision mediump float; void dot_8e40f1() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); float16_t res = dot(arg_0, arg_1); } @@ -42,8 +42,8 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void dot_8e40f1() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); float16_t res = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/8e40f1.wgsl.expected.msl b/test/tint/builtins/gen/var/dot/8e40f1.wgsl.expected.msl index eacb81c04d..d4618eaf87 100644 --- a/test/tint/builtins/gen/var/dot/8e40f1.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/dot/8e40f1.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void dot_8e40f1() { - half3 arg_0 = half3(0.0h); - half3 arg_1 = half3(0.0h); + half3 arg_0 = half3(1.0h); + half3 arg_1 = half3(1.0h); half res = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/8e40f1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/dot/8e40f1.wgsl.expected.spvasm index 6bed79d843..e11563e343 100644 --- a/test/tint/builtins/gen/var/dot/8e40f1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/dot/8e40f1.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 41 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -38,44 +38,46 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half + %19 = OpConstantNull %v3half %_ptr_Function_half = OpTypePointer Function %half - %24 = OpConstantNull %half - %25 = OpTypeFunction %v4float + %26 = OpConstantNull %half + %27 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %dot_8e40f1 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3half Function %15 - %arg_1 = OpVariable %_ptr_Function_v3half Function %15 - %res = OpVariable %_ptr_Function_half Function %24 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - %20 = OpLoad %v3half %arg_0 - %21 = OpLoad %v3half %arg_1 - %19 = OpDot %half %20 %21 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v3half Function %19 + %arg_1 = OpVariable %_ptr_Function_v3half Function %19 + %res = OpVariable %_ptr_Function_half Function %26 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + %22 = OpLoad %v3half %arg_0 + %23 = OpLoad %v3half %arg_1 + %21 = OpDot %half %22 %23 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %dot_8e40f1 +%vertex_main_inner = OpFunction %v4float None %27 + %29 = OpLabel + %30 = OpFunctionCall %void %dot_8e40f1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %32 = OpLabel + %33 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %33 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %dot_8e40f1 + %36 = OpLabel + %37 = OpFunctionCall %void %dot_8e40f1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %37 = OpLabel - %38 = OpFunctionCall %void %dot_8e40f1 + %39 = OpLabel + %40 = OpFunctionCall %void %dot_8e40f1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/dot/8e40f1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/dot/8e40f1.wgsl.expected.wgsl index db92b086bc..4fb113c96c 100644 --- a/test/tint/builtins/gen/var/dot/8e40f1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/dot/8e40f1.wgsl.expected.wgsl @@ -1,8 +1,8 @@ enable f16; fn dot_8e40f1() { - var arg_0 = vec3(f16()); - var arg_1 = vec3(f16()); + var arg_0 = vec3(1.0h); + var arg_1 = vec3(1.0h); var res : f16 = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/cd5a04.wgsl b/test/tint/builtins/gen/var/dot/cd5a04.wgsl index 9226d5cffb..a5899b818d 100644 --- a/test/tint/builtins/gen/var/dot/cd5a04.wgsl +++ b/test/tint/builtins/gen/var/dot/cd5a04.wgsl @@ -25,8 +25,8 @@ enable f16; // fn dot(vec<2, f16>, vec<2, f16>) -> f16 fn dot_cd5a04() { - var arg_0 = vec2(f16()); - var arg_1 = vec2(f16()); + var arg_0 = vec2(1.h); + var arg_1 = vec2(1.h); var res: f16 = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/cd5a04.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/dot/cd5a04.wgsl.expected.dxc.hlsl index 27c17be74c..8a4975fdde 100644 --- a/test/tint/builtins/gen/var/dot/cd5a04.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/dot/cd5a04.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void dot_cd5a04() { - vector arg_0 = (float16_t(0.0h)).xx; - vector arg_1 = (float16_t(0.0h)).xx; + vector arg_0 = (float16_t(1.0h)).xx; + vector arg_1 = (float16_t(1.0h)).xx; float16_t res = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/cd5a04.wgsl.expected.glsl b/test/tint/builtins/gen/var/dot/cd5a04.wgsl.expected.glsl index 03060cef0e..9016385333 100644 --- a/test/tint/builtins/gen/var/dot/cd5a04.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/dot/cd5a04.wgsl.expected.glsl @@ -2,8 +2,8 @@ #extension GL_AMD_gpu_shader_half_float : require void dot_cd5a04() { - f16vec2 arg_0 = f16vec2(0.0hf); - f16vec2 arg_1 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_1 = f16vec2(1.0hf); float16_t res = dot(arg_0, arg_1); } @@ -25,8 +25,8 @@ void main() { precision mediump float; void dot_cd5a04() { - f16vec2 arg_0 = f16vec2(0.0hf); - f16vec2 arg_1 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_1 = f16vec2(1.0hf); float16_t res = dot(arg_0, arg_1); } @@ -42,8 +42,8 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void dot_cd5a04() { - f16vec2 arg_0 = f16vec2(0.0hf); - f16vec2 arg_1 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_1 = f16vec2(1.0hf); float16_t res = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/cd5a04.wgsl.expected.msl b/test/tint/builtins/gen/var/dot/cd5a04.wgsl.expected.msl index b70c4db63d..7c6e7b8f2d 100644 --- a/test/tint/builtins/gen/var/dot/cd5a04.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/dot/cd5a04.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void dot_cd5a04() { - half2 arg_0 = half2(0.0h); - half2 arg_1 = half2(0.0h); + half2 arg_0 = half2(1.0h); + half2 arg_1 = half2(1.0h); half res = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/cd5a04.wgsl.expected.spvasm b/test/tint/builtins/gen/var/dot/cd5a04.wgsl.expected.spvasm index 9cef5f77fa..6375b60ea0 100644 --- a/test/tint/builtins/gen/var/dot/cd5a04.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/dot/cd5a04.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 41 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -38,44 +38,46 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half + %19 = OpConstantNull %v2half %_ptr_Function_half = OpTypePointer Function %half - %24 = OpConstantNull %half - %25 = OpTypeFunction %v4float + %26 = OpConstantNull %half + %27 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %dot_cd5a04 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2half Function %15 - %arg_1 = OpVariable %_ptr_Function_v2half Function %15 - %res = OpVariable %_ptr_Function_half Function %24 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - %20 = OpLoad %v2half %arg_0 - %21 = OpLoad %v2half %arg_1 - %19 = OpDot %half %20 %21 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v2half Function %19 + %arg_1 = OpVariable %_ptr_Function_v2half Function %19 + %res = OpVariable %_ptr_Function_half Function %26 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + %22 = OpLoad %v2half %arg_0 + %23 = OpLoad %v2half %arg_1 + %21 = OpDot %half %22 %23 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %dot_cd5a04 +%vertex_main_inner = OpFunction %v4float None %27 + %29 = OpLabel + %30 = OpFunctionCall %void %dot_cd5a04 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %32 = OpLabel + %33 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %33 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %dot_cd5a04 + %36 = OpLabel + %37 = OpFunctionCall %void %dot_cd5a04 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %37 = OpLabel - %38 = OpFunctionCall %void %dot_cd5a04 + %39 = OpLabel + %40 = OpFunctionCall %void %dot_cd5a04 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/dot/cd5a04.wgsl.expected.wgsl b/test/tint/builtins/gen/var/dot/cd5a04.wgsl.expected.wgsl index 8fc1a17fc2..feadf7927c 100644 --- a/test/tint/builtins/gen/var/dot/cd5a04.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/dot/cd5a04.wgsl.expected.wgsl @@ -1,8 +1,8 @@ enable f16; fn dot_cd5a04() { - var arg_0 = vec2(f16()); - var arg_1 = vec2(f16()); + var arg_0 = vec2(1.0h); + var arg_1 = vec2(1.0h); var res : f16 = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/d0d179.wgsl b/test/tint/builtins/gen/var/dot/d0d179.wgsl index 972ce4323e..b0d97df2e1 100644 --- a/test/tint/builtins/gen/var/dot/d0d179.wgsl +++ b/test/tint/builtins/gen/var/dot/d0d179.wgsl @@ -25,8 +25,8 @@ enable f16; // fn dot(vec<4, f16>, vec<4, f16>) -> f16 fn dot_d0d179() { - var arg_0 = vec4(f16()); - var arg_1 = vec4(f16()); + var arg_0 = vec4(1.h); + var arg_1 = vec4(1.h); var res: f16 = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/d0d179.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/dot/d0d179.wgsl.expected.dxc.hlsl index e6a5b4c7a7..15b532b276 100644 --- a/test/tint/builtins/gen/var/dot/d0d179.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/dot/d0d179.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void dot_d0d179() { - vector arg_0 = (float16_t(0.0h)).xxxx; - vector arg_1 = (float16_t(0.0h)).xxxx; + vector arg_0 = (float16_t(1.0h)).xxxx; + vector arg_1 = (float16_t(1.0h)).xxxx; float16_t res = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/d0d179.wgsl.expected.glsl b/test/tint/builtins/gen/var/dot/d0d179.wgsl.expected.glsl index fd6939cedb..6401f345de 100644 --- a/test/tint/builtins/gen/var/dot/d0d179.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/dot/d0d179.wgsl.expected.glsl @@ -2,8 +2,8 @@ #extension GL_AMD_gpu_shader_half_float : require void dot_d0d179() { - f16vec4 arg_0 = f16vec4(0.0hf); - f16vec4 arg_1 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_1 = f16vec4(1.0hf); float16_t res = dot(arg_0, arg_1); } @@ -25,8 +25,8 @@ void main() { precision mediump float; void dot_d0d179() { - f16vec4 arg_0 = f16vec4(0.0hf); - f16vec4 arg_1 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_1 = f16vec4(1.0hf); float16_t res = dot(arg_0, arg_1); } @@ -42,8 +42,8 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void dot_d0d179() { - f16vec4 arg_0 = f16vec4(0.0hf); - f16vec4 arg_1 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_1 = f16vec4(1.0hf); float16_t res = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/d0d179.wgsl.expected.msl b/test/tint/builtins/gen/var/dot/d0d179.wgsl.expected.msl index 4a83867129..0f8b6a0d83 100644 --- a/test/tint/builtins/gen/var/dot/d0d179.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/dot/d0d179.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void dot_d0d179() { - half4 arg_0 = half4(0.0h); - half4 arg_1 = half4(0.0h); + half4 arg_0 = half4(1.0h); + half4 arg_1 = half4(1.0h); half res = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/d0d179.wgsl.expected.spvasm b/test/tint/builtins/gen/var/dot/d0d179.wgsl.expected.spvasm index 5bca82850a..c3516fa176 100644 --- a/test/tint/builtins/gen/var/dot/d0d179.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/dot/d0d179.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 41 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -38,44 +38,46 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half + %19 = OpConstantNull %v4half %_ptr_Function_half = OpTypePointer Function %half - %24 = OpConstantNull %half - %25 = OpTypeFunction %v4float + %26 = OpConstantNull %half + %27 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %dot_d0d179 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4half Function %15 - %arg_1 = OpVariable %_ptr_Function_v4half Function %15 - %res = OpVariable %_ptr_Function_half Function %24 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - %20 = OpLoad %v4half %arg_0 - %21 = OpLoad %v4half %arg_1 - %19 = OpDot %half %20 %21 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v4half Function %19 + %arg_1 = OpVariable %_ptr_Function_v4half Function %19 + %res = OpVariable %_ptr_Function_half Function %26 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + %22 = OpLoad %v4half %arg_0 + %23 = OpLoad %v4half %arg_1 + %21 = OpDot %half %22 %23 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %dot_d0d179 +%vertex_main_inner = OpFunction %v4float None %27 + %29 = OpLabel + %30 = OpFunctionCall %void %dot_d0d179 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %32 = OpLabel + %33 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %33 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %dot_d0d179 + %36 = OpLabel + %37 = OpFunctionCall %void %dot_d0d179 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %37 = OpLabel - %38 = OpFunctionCall %void %dot_d0d179 + %39 = OpLabel + %40 = OpFunctionCall %void %dot_d0d179 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/dot/d0d179.wgsl.expected.wgsl b/test/tint/builtins/gen/var/dot/d0d179.wgsl.expected.wgsl index 3297912d2d..c5cc59e43c 100644 --- a/test/tint/builtins/gen/var/dot/d0d179.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/dot/d0d179.wgsl.expected.wgsl @@ -1,8 +1,8 @@ enable f16; fn dot_d0d179() { - var arg_0 = vec4(f16()); - var arg_1 = vec4(f16()); + var arg_0 = vec4(1.0h); + var arg_1 = vec4(1.0h); var res : f16 = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/exp/13806d.wgsl b/test/tint/builtins/gen/var/exp/13806d.wgsl index 6c3ccde44c..d1a3936528 100644 --- a/test/tint/builtins/gen/var/exp/13806d.wgsl +++ b/test/tint/builtins/gen/var/exp/13806d.wgsl @@ -25,7 +25,7 @@ enable f16; // fn exp(vec<3, f16>) -> vec<3, f16> fn exp_13806d() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.h); var res: vec3 = exp(arg_0); } diff --git a/test/tint/builtins/gen/var/exp/13806d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/exp/13806d.wgsl.expected.dxc.hlsl index eb7e5a8895..6d669f8bee 100644 --- a/test/tint/builtins/gen/var/exp/13806d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/exp/13806d.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void exp_13806d() { - vector arg_0 = (float16_t(0.0h)).xxx; + vector arg_0 = (float16_t(1.0h)).xxx; vector res = exp(arg_0); } diff --git a/test/tint/builtins/gen/var/exp/13806d.wgsl.expected.glsl b/test/tint/builtins/gen/var/exp/13806d.wgsl.expected.glsl index 72d5c8a5d6..5f834eb2bf 100644 --- a/test/tint/builtins/gen/var/exp/13806d.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/exp/13806d.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void exp_13806d() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = exp(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void exp_13806d() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = exp(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void exp_13806d() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = exp(arg_0); } diff --git a/test/tint/builtins/gen/var/exp/13806d.wgsl.expected.msl b/test/tint/builtins/gen/var/exp/13806d.wgsl.expected.msl index 891a68a9d4..9076003a4f 100644 --- a/test/tint/builtins/gen/var/exp/13806d.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/exp/13806d.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void exp_13806d() { - half3 arg_0 = half3(0.0h); + half3 arg_0 = half3(1.0h); half3 res = exp(arg_0); } diff --git a/test/tint/builtins/gen/var/exp/13806d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/exp/13806d.wgsl.expected.spvasm index 90c05375c8..131c0ab942 100644 --- a/test/tint/builtins/gen/var/exp/13806d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/exp/13806d.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %exp_13806d = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3half Function %15 - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v3half %arg_0 - %18 = OpExtInst %v3half %19 Exp %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v3half Function %19 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v3half %arg_0 + %20 = OpExtInst %v3half %21 Exp %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %exp_13806d +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %exp_13806d OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %exp_13806d + %33 = OpLabel + %34 = OpFunctionCall %void %exp_13806d OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %exp_13806d + %36 = OpLabel + %37 = OpFunctionCall %void %exp_13806d OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/exp/13806d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/exp/13806d.wgsl.expected.wgsl index 044b03aa4c..0004e77c19 100644 --- a/test/tint/builtins/gen/var/exp/13806d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/exp/13806d.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn exp_13806d() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.0h); var res : vec3 = exp(arg_0); } diff --git a/test/tint/builtins/gen/var/exp/2e08e2.wgsl b/test/tint/builtins/gen/var/exp/2e08e2.wgsl index 15f67b1b9c..a9ef44cfe5 100644 --- a/test/tint/builtins/gen/var/exp/2e08e2.wgsl +++ b/test/tint/builtins/gen/var/exp/2e08e2.wgsl @@ -25,7 +25,7 @@ enable f16; // fn exp(vec<2, f16>) -> vec<2, f16> fn exp_2e08e2() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.h); var res: vec2 = exp(arg_0); } diff --git a/test/tint/builtins/gen/var/exp/2e08e2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/exp/2e08e2.wgsl.expected.dxc.hlsl index e9d14139a7..93cc7d9850 100644 --- a/test/tint/builtins/gen/var/exp/2e08e2.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/exp/2e08e2.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void exp_2e08e2() { - vector arg_0 = (float16_t(0.0h)).xx; + vector arg_0 = (float16_t(1.0h)).xx; vector res = exp(arg_0); } diff --git a/test/tint/builtins/gen/var/exp/2e08e2.wgsl.expected.glsl b/test/tint/builtins/gen/var/exp/2e08e2.wgsl.expected.glsl index f53e9a7ffc..ce344e1eda 100644 --- a/test/tint/builtins/gen/var/exp/2e08e2.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/exp/2e08e2.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void exp_2e08e2() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = exp(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void exp_2e08e2() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = exp(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void exp_2e08e2() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = exp(arg_0); } diff --git a/test/tint/builtins/gen/var/exp/2e08e2.wgsl.expected.msl b/test/tint/builtins/gen/var/exp/2e08e2.wgsl.expected.msl index cc293279fa..0aee12f63c 100644 --- a/test/tint/builtins/gen/var/exp/2e08e2.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/exp/2e08e2.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void exp_2e08e2() { - half2 arg_0 = half2(0.0h); + half2 arg_0 = half2(1.0h); half2 res = exp(arg_0); } diff --git a/test/tint/builtins/gen/var/exp/2e08e2.wgsl.expected.spvasm b/test/tint/builtins/gen/var/exp/2e08e2.wgsl.expected.spvasm index 6c662e04b1..1d2f8cce31 100644 --- a/test/tint/builtins/gen/var/exp/2e08e2.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/exp/2e08e2.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v2half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %exp_2e08e2 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2half Function %15 - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v2half %arg_0 - %18 = OpExtInst %v2half %19 Exp %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v2half Function %19 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v2half %arg_0 + %20 = OpExtInst %v2half %21 Exp %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %exp_2e08e2 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %exp_2e08e2 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %exp_2e08e2 + %33 = OpLabel + %34 = OpFunctionCall %void %exp_2e08e2 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %exp_2e08e2 + %36 = OpLabel + %37 = OpFunctionCall %void %exp_2e08e2 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/exp/2e08e2.wgsl.expected.wgsl b/test/tint/builtins/gen/var/exp/2e08e2.wgsl.expected.wgsl index c041e1a63c..c9f55428f1 100644 --- a/test/tint/builtins/gen/var/exp/2e08e2.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/exp/2e08e2.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn exp_2e08e2() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.0h); var res : vec2 = exp(arg_0); } diff --git a/test/tint/builtins/gen/var/exp/611a87.wgsl b/test/tint/builtins/gen/var/exp/611a87.wgsl index 86e69d5924..3e01f3eb28 100644 --- a/test/tint/builtins/gen/var/exp/611a87.wgsl +++ b/test/tint/builtins/gen/var/exp/611a87.wgsl @@ -25,7 +25,7 @@ enable f16; // fn exp(vec<4, f16>) -> vec<4, f16> fn exp_611a87() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.h); var res: vec4 = exp(arg_0); } diff --git a/test/tint/builtins/gen/var/exp/611a87.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/exp/611a87.wgsl.expected.dxc.hlsl index 7b99c789f3..bf65c06cbf 100644 --- a/test/tint/builtins/gen/var/exp/611a87.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/exp/611a87.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void exp_611a87() { - vector arg_0 = (float16_t(0.0h)).xxxx; + vector arg_0 = (float16_t(1.0h)).xxxx; vector res = exp(arg_0); } diff --git a/test/tint/builtins/gen/var/exp/611a87.wgsl.expected.glsl b/test/tint/builtins/gen/var/exp/611a87.wgsl.expected.glsl index ed49b7cd38..f0c864bc2a 100644 --- a/test/tint/builtins/gen/var/exp/611a87.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/exp/611a87.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void exp_611a87() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = exp(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void exp_611a87() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = exp(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void exp_611a87() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = exp(arg_0); } diff --git a/test/tint/builtins/gen/var/exp/611a87.wgsl.expected.msl b/test/tint/builtins/gen/var/exp/611a87.wgsl.expected.msl index dd3d353de5..de79282f7e 100644 --- a/test/tint/builtins/gen/var/exp/611a87.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/exp/611a87.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void exp_611a87() { - half4 arg_0 = half4(0.0h); + half4 arg_0 = half4(1.0h); half4 res = exp(arg_0); } diff --git a/test/tint/builtins/gen/var/exp/611a87.wgsl.expected.spvasm b/test/tint/builtins/gen/var/exp/611a87.wgsl.expected.spvasm index 17d3daf799..64efbc30c6 100644 --- a/test/tint/builtins/gen/var/exp/611a87.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/exp/611a87.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v4half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %exp_611a87 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4half Function %15 - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v4half %arg_0 - %18 = OpExtInst %v4half %19 Exp %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v4half Function %19 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v4half %arg_0 + %20 = OpExtInst %v4half %21 Exp %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %exp_611a87 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %exp_611a87 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %exp_611a87 + %33 = OpLabel + %34 = OpFunctionCall %void %exp_611a87 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %exp_611a87 + %36 = OpLabel + %37 = OpFunctionCall %void %exp_611a87 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/exp/611a87.wgsl.expected.wgsl b/test/tint/builtins/gen/var/exp/611a87.wgsl.expected.wgsl index d208a93878..5a865ff977 100644 --- a/test/tint/builtins/gen/var/exp/611a87.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/exp/611a87.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn exp_611a87() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.0h); var res : vec4 = exp(arg_0); } diff --git a/test/tint/builtins/gen/var/exp/c18fe9.wgsl b/test/tint/builtins/gen/var/exp/c18fe9.wgsl index e28c16ab4b..9b5eacd08b 100644 --- a/test/tint/builtins/gen/var/exp/c18fe9.wgsl +++ b/test/tint/builtins/gen/var/exp/c18fe9.wgsl @@ -25,7 +25,7 @@ enable f16; // fn exp(f16) -> f16 fn exp_c18fe9() { - var arg_0 = f16(); + var arg_0 = 1.h; var res: f16 = exp(arg_0); } diff --git a/test/tint/builtins/gen/var/exp/c18fe9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/exp/c18fe9.wgsl.expected.dxc.hlsl index c137c9c5c1..990ca7f41d 100644 --- a/test/tint/builtins/gen/var/exp/c18fe9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/exp/c18fe9.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void exp_c18fe9() { - float16_t arg_0 = float16_t(0.0h); + float16_t arg_0 = float16_t(1.0h); float16_t res = exp(arg_0); } diff --git a/test/tint/builtins/gen/var/exp/c18fe9.wgsl.expected.glsl b/test/tint/builtins/gen/var/exp/c18fe9.wgsl.expected.glsl index 73b9ba13eb..4d85adff1f 100644 --- a/test/tint/builtins/gen/var/exp/c18fe9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/exp/c18fe9.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void exp_c18fe9() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = exp(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void exp_c18fe9() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = exp(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void exp_c18fe9() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = exp(arg_0); } diff --git a/test/tint/builtins/gen/var/exp/c18fe9.wgsl.expected.msl b/test/tint/builtins/gen/var/exp/c18fe9.wgsl.expected.msl index 6bcb8c64e2..aa3653616e 100644 --- a/test/tint/builtins/gen/var/exp/c18fe9.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/exp/c18fe9.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void exp_c18fe9() { - half arg_0 = 0.0h; + half arg_0 = 1.0h; half res = exp(arg_0); } diff --git a/test/tint/builtins/gen/var/exp/c18fe9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/exp/c18fe9.wgsl.expected.spvasm index 8575fb843a..f2899ba112 100644 --- a/test/tint/builtins/gen/var/exp/c18fe9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/exp/c18fe9.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %18 = OpExtInstImport "GLSL.std.450" + %19 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -37,39 +37,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %21 = OpTypeFunction %v4float + %17 = OpConstantNull %half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %exp_c18fe9 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_half Function %14 - %res = OpVariable %_ptr_Function_half Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %half %arg_0 - %17 = OpExtInst %half %18 Exp %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_half Function %17 + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %arg_0 %half_0x1p_0 + %20 = OpLoad %half %arg_0 + %18 = OpExtInst %half %19 Exp %20 + OpStore %res %18 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %exp_c18fe9 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %exp_c18fe9 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %exp_c18fe9 + %31 = OpLabel + %32 = OpFunctionCall %void %exp_c18fe9 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %exp_c18fe9 + %34 = OpLabel + %35 = OpFunctionCall %void %exp_c18fe9 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/exp/c18fe9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/exp/c18fe9.wgsl.expected.wgsl index 3daf44c664..1dc2377e22 100644 --- a/test/tint/builtins/gen/var/exp/c18fe9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/exp/c18fe9.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn exp_c18fe9() { - var arg_0 = f16(); + var arg_0 = 1.0h; var res : f16 = exp(arg_0); } diff --git a/test/tint/builtins/gen/var/exp2/151a4c.wgsl b/test/tint/builtins/gen/var/exp2/151a4c.wgsl index 5a42f5b46f..624605c26d 100644 --- a/test/tint/builtins/gen/var/exp2/151a4c.wgsl +++ b/test/tint/builtins/gen/var/exp2/151a4c.wgsl @@ -25,7 +25,7 @@ enable f16; // fn exp2(vec<2, f16>) -> vec<2, f16> fn exp2_151a4c() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.h); var res: vec2 = exp2(arg_0); } diff --git a/test/tint/builtins/gen/var/exp2/151a4c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/exp2/151a4c.wgsl.expected.dxc.hlsl index d1633f9d7e..7dda4b2515 100644 --- a/test/tint/builtins/gen/var/exp2/151a4c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/exp2/151a4c.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void exp2_151a4c() { - vector arg_0 = (float16_t(0.0h)).xx; + vector arg_0 = (float16_t(1.0h)).xx; vector res = exp2(arg_0); } diff --git a/test/tint/builtins/gen/var/exp2/151a4c.wgsl.expected.glsl b/test/tint/builtins/gen/var/exp2/151a4c.wgsl.expected.glsl index a3e4e9381f..8eac3ec661 100644 --- a/test/tint/builtins/gen/var/exp2/151a4c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/exp2/151a4c.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void exp2_151a4c() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = exp2(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void exp2_151a4c() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = exp2(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void exp2_151a4c() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = exp2(arg_0); } diff --git a/test/tint/builtins/gen/var/exp2/151a4c.wgsl.expected.msl b/test/tint/builtins/gen/var/exp2/151a4c.wgsl.expected.msl index 26b057cd5e..f45a8f863d 100644 --- a/test/tint/builtins/gen/var/exp2/151a4c.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/exp2/151a4c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void exp2_151a4c() { - half2 arg_0 = half2(0.0h); + half2 arg_0 = half2(1.0h); half2 res = exp2(arg_0); } diff --git a/test/tint/builtins/gen/var/exp2/151a4c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/exp2/151a4c.wgsl.expected.spvasm index 7db1e64e22..e9cbdcbefa 100644 --- a/test/tint/builtins/gen/var/exp2/151a4c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/exp2/151a4c.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v2half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %exp2_151a4c = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2half Function %15 - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v2half %arg_0 - %18 = OpExtInst %v2half %19 Exp2 %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v2half Function %19 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v2half %arg_0 + %20 = OpExtInst %v2half %21 Exp2 %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %exp2_151a4c +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %exp2_151a4c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %exp2_151a4c + %33 = OpLabel + %34 = OpFunctionCall %void %exp2_151a4c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %exp2_151a4c + %36 = OpLabel + %37 = OpFunctionCall %void %exp2_151a4c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/exp2/151a4c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/exp2/151a4c.wgsl.expected.wgsl index 33f0c7f702..83cb186624 100644 --- a/test/tint/builtins/gen/var/exp2/151a4c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/exp2/151a4c.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn exp2_151a4c() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.0h); var res : vec2 = exp2(arg_0); } diff --git a/test/tint/builtins/gen/var/exp2/751377.wgsl b/test/tint/builtins/gen/var/exp2/751377.wgsl index 9f15ce7925..682fa91b8a 100644 --- a/test/tint/builtins/gen/var/exp2/751377.wgsl +++ b/test/tint/builtins/gen/var/exp2/751377.wgsl @@ -25,7 +25,7 @@ enable f16; // fn exp2(vec<3, f16>) -> vec<3, f16> fn exp2_751377() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.h); var res: vec3 = exp2(arg_0); } diff --git a/test/tint/builtins/gen/var/exp2/751377.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/exp2/751377.wgsl.expected.dxc.hlsl index e6251d2770..4cecb51dfb 100644 --- a/test/tint/builtins/gen/var/exp2/751377.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/exp2/751377.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void exp2_751377() { - vector arg_0 = (float16_t(0.0h)).xxx; + vector arg_0 = (float16_t(1.0h)).xxx; vector res = exp2(arg_0); } diff --git a/test/tint/builtins/gen/var/exp2/751377.wgsl.expected.glsl b/test/tint/builtins/gen/var/exp2/751377.wgsl.expected.glsl index 93e0de7380..e11657e5c5 100644 --- a/test/tint/builtins/gen/var/exp2/751377.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/exp2/751377.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void exp2_751377() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = exp2(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void exp2_751377() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = exp2(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void exp2_751377() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = exp2(arg_0); } diff --git a/test/tint/builtins/gen/var/exp2/751377.wgsl.expected.msl b/test/tint/builtins/gen/var/exp2/751377.wgsl.expected.msl index ee675e3f78..b786bebe1f 100644 --- a/test/tint/builtins/gen/var/exp2/751377.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/exp2/751377.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void exp2_751377() { - half3 arg_0 = half3(0.0h); + half3 arg_0 = half3(1.0h); half3 res = exp2(arg_0); } diff --git a/test/tint/builtins/gen/var/exp2/751377.wgsl.expected.spvasm b/test/tint/builtins/gen/var/exp2/751377.wgsl.expected.spvasm index a6a7c0c133..dc1d8c67ae 100644 --- a/test/tint/builtins/gen/var/exp2/751377.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/exp2/751377.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %exp2_751377 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3half Function %15 - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v3half %arg_0 - %18 = OpExtInst %v3half %19 Exp2 %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v3half Function %19 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v3half %arg_0 + %20 = OpExtInst %v3half %21 Exp2 %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %exp2_751377 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %exp2_751377 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %exp2_751377 + %33 = OpLabel + %34 = OpFunctionCall %void %exp2_751377 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %exp2_751377 + %36 = OpLabel + %37 = OpFunctionCall %void %exp2_751377 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/exp2/751377.wgsl.expected.wgsl b/test/tint/builtins/gen/var/exp2/751377.wgsl.expected.wgsl index 54d18f084c..600e49162c 100644 --- a/test/tint/builtins/gen/var/exp2/751377.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/exp2/751377.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn exp2_751377() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.0h); var res : vec3 = exp2(arg_0); } diff --git a/test/tint/builtins/gen/var/exp2/b408e4.wgsl b/test/tint/builtins/gen/var/exp2/b408e4.wgsl index 25f4d91ebe..61a04d57de 100644 --- a/test/tint/builtins/gen/var/exp2/b408e4.wgsl +++ b/test/tint/builtins/gen/var/exp2/b408e4.wgsl @@ -25,7 +25,7 @@ enable f16; // fn exp2(f16) -> f16 fn exp2_b408e4() { - var arg_0 = f16(); + var arg_0 = 1.h; var res: f16 = exp2(arg_0); } diff --git a/test/tint/builtins/gen/var/exp2/b408e4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/exp2/b408e4.wgsl.expected.dxc.hlsl index 1da83c0d56..bab994cbeb 100644 --- a/test/tint/builtins/gen/var/exp2/b408e4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/exp2/b408e4.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void exp2_b408e4() { - float16_t arg_0 = float16_t(0.0h); + float16_t arg_0 = float16_t(1.0h); float16_t res = exp2(arg_0); } diff --git a/test/tint/builtins/gen/var/exp2/b408e4.wgsl.expected.glsl b/test/tint/builtins/gen/var/exp2/b408e4.wgsl.expected.glsl index 978b7dfe08..573ddc0a0a 100644 --- a/test/tint/builtins/gen/var/exp2/b408e4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/exp2/b408e4.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void exp2_b408e4() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = exp2(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void exp2_b408e4() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = exp2(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void exp2_b408e4() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = exp2(arg_0); } diff --git a/test/tint/builtins/gen/var/exp2/b408e4.wgsl.expected.msl b/test/tint/builtins/gen/var/exp2/b408e4.wgsl.expected.msl index 3e0cbb24fa..b0e32accb9 100644 --- a/test/tint/builtins/gen/var/exp2/b408e4.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/exp2/b408e4.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void exp2_b408e4() { - half arg_0 = 0.0h; + half arg_0 = 1.0h; half res = exp2(arg_0); } diff --git a/test/tint/builtins/gen/var/exp2/b408e4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/exp2/b408e4.wgsl.expected.spvasm index c387afbc58..73e5b91c55 100644 --- a/test/tint/builtins/gen/var/exp2/b408e4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/exp2/b408e4.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %18 = OpExtInstImport "GLSL.std.450" + %19 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -37,39 +37,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %21 = OpTypeFunction %v4float + %17 = OpConstantNull %half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %exp2_b408e4 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_half Function %14 - %res = OpVariable %_ptr_Function_half Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %half %arg_0 - %17 = OpExtInst %half %18 Exp2 %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_half Function %17 + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %arg_0 %half_0x1p_0 + %20 = OpLoad %half %arg_0 + %18 = OpExtInst %half %19 Exp2 %20 + OpStore %res %18 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %exp2_b408e4 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %exp2_b408e4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %exp2_b408e4 + %31 = OpLabel + %32 = OpFunctionCall %void %exp2_b408e4 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %exp2_b408e4 + %34 = OpLabel + %35 = OpFunctionCall %void %exp2_b408e4 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/exp2/b408e4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/exp2/b408e4.wgsl.expected.wgsl index 0772e03956..d439dc5017 100644 --- a/test/tint/builtins/gen/var/exp2/b408e4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/exp2/b408e4.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn exp2_b408e4() { - var arg_0 = f16(); + var arg_0 = 1.0h; var res : f16 = exp2(arg_0); } diff --git a/test/tint/builtins/gen/var/exp2/ffa827.wgsl b/test/tint/builtins/gen/var/exp2/ffa827.wgsl index f9fc7cbd63..1755b0092f 100644 --- a/test/tint/builtins/gen/var/exp2/ffa827.wgsl +++ b/test/tint/builtins/gen/var/exp2/ffa827.wgsl @@ -25,7 +25,7 @@ enable f16; // fn exp2(vec<4, f16>) -> vec<4, f16> fn exp2_ffa827() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.h); var res: vec4 = exp2(arg_0); } diff --git a/test/tint/builtins/gen/var/exp2/ffa827.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/exp2/ffa827.wgsl.expected.dxc.hlsl index 199b7a8b8a..b5bb9c21d6 100644 --- a/test/tint/builtins/gen/var/exp2/ffa827.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/exp2/ffa827.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void exp2_ffa827() { - vector arg_0 = (float16_t(0.0h)).xxxx; + vector arg_0 = (float16_t(1.0h)).xxxx; vector res = exp2(arg_0); } diff --git a/test/tint/builtins/gen/var/exp2/ffa827.wgsl.expected.glsl b/test/tint/builtins/gen/var/exp2/ffa827.wgsl.expected.glsl index eacdcb00e1..753e499413 100644 --- a/test/tint/builtins/gen/var/exp2/ffa827.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/exp2/ffa827.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void exp2_ffa827() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = exp2(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void exp2_ffa827() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = exp2(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void exp2_ffa827() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = exp2(arg_0); } diff --git a/test/tint/builtins/gen/var/exp2/ffa827.wgsl.expected.msl b/test/tint/builtins/gen/var/exp2/ffa827.wgsl.expected.msl index 0dc6782398..5258bd2a1c 100644 --- a/test/tint/builtins/gen/var/exp2/ffa827.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/exp2/ffa827.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void exp2_ffa827() { - half4 arg_0 = half4(0.0h); + half4 arg_0 = half4(1.0h); half4 res = exp2(arg_0); } diff --git a/test/tint/builtins/gen/var/exp2/ffa827.wgsl.expected.spvasm b/test/tint/builtins/gen/var/exp2/ffa827.wgsl.expected.spvasm index d343ed6620..cd61ab5ed4 100644 --- a/test/tint/builtins/gen/var/exp2/ffa827.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/exp2/ffa827.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v4half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %exp2_ffa827 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4half Function %15 - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v4half %arg_0 - %18 = OpExtInst %v4half %19 Exp2 %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v4half Function %19 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v4half %arg_0 + %20 = OpExtInst %v4half %21 Exp2 %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %exp2_ffa827 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %exp2_ffa827 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %exp2_ffa827 + %33 = OpLabel + %34 = OpFunctionCall %void %exp2_ffa827 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %exp2_ffa827 + %36 = OpLabel + %37 = OpFunctionCall %void %exp2_ffa827 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/exp2/ffa827.wgsl.expected.wgsl b/test/tint/builtins/gen/var/exp2/ffa827.wgsl.expected.wgsl index cc00537444..8dccfdf5f4 100644 --- a/test/tint/builtins/gen/var/exp2/ffa827.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/exp2/ffa827.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn exp2_ffa827() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.0h); var res : vec4 = exp2(arg_0); } diff --git a/test/tint/builtins/gen/var/faceForward/524986.wgsl b/test/tint/builtins/gen/var/faceForward/524986.wgsl index 1dafe7bcfe..e1c67a7cef 100644 --- a/test/tint/builtins/gen/var/faceForward/524986.wgsl +++ b/test/tint/builtins/gen/var/faceForward/524986.wgsl @@ -25,9 +25,9 @@ enable f16; // fn faceForward(vec<3, f16>, vec<3, f16>, vec<3, f16>) -> vec<3, f16> fn faceForward_524986() { - var arg_0 = vec3(f16()); - var arg_1 = vec3(f16()); - var arg_2 = vec3(f16()); + var arg_0 = vec3(1.h); + var arg_1 = vec3(1.h); + var arg_2 = vec3(1.h); var res: vec3 = faceForward(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/faceForward/524986.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/faceForward/524986.wgsl.expected.dxc.hlsl index ebf2086ccc..71085cb2db 100644 --- a/test/tint/builtins/gen/var/faceForward/524986.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/faceForward/524986.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void faceForward_524986() { - vector arg_0 = (float16_t(0.0h)).xxx; - vector arg_1 = (float16_t(0.0h)).xxx; - vector arg_2 = (float16_t(0.0h)).xxx; + vector arg_0 = (float16_t(1.0h)).xxx; + vector arg_1 = (float16_t(1.0h)).xxx; + vector arg_2 = (float16_t(1.0h)).xxx; vector res = faceforward(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/faceForward/524986.wgsl.expected.glsl b/test/tint/builtins/gen/var/faceForward/524986.wgsl.expected.glsl index a53d71045d..83a9c60d12 100644 --- a/test/tint/builtins/gen/var/faceForward/524986.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/faceForward/524986.wgsl.expected.glsl @@ -2,9 +2,9 @@ #extension GL_AMD_gpu_shader_half_float : require void faceForward_524986() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); - f16vec3 arg_2 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); + f16vec3 arg_2 = f16vec3(1.0hf); f16vec3 res = faceforward(arg_0, arg_1, arg_2); } @@ -26,9 +26,9 @@ void main() { precision mediump float; void faceForward_524986() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); - f16vec3 arg_2 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); + f16vec3 arg_2 = f16vec3(1.0hf); f16vec3 res = faceforward(arg_0, arg_1, arg_2); } @@ -44,9 +44,9 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void faceForward_524986() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); - f16vec3 arg_2 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); + f16vec3 arg_2 = f16vec3(1.0hf); f16vec3 res = faceforward(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/faceForward/524986.wgsl.expected.msl b/test/tint/builtins/gen/var/faceForward/524986.wgsl.expected.msl index 71beddb9a4..141e5ae245 100644 --- a/test/tint/builtins/gen/var/faceForward/524986.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/faceForward/524986.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void faceForward_524986() { - half3 arg_0 = half3(0.0h); - half3 arg_1 = half3(0.0h); - half3 arg_2 = half3(0.0h); + half3 arg_0 = half3(1.0h); + half3 arg_1 = half3(1.0h); + half3 arg_2 = half3(1.0h); half3 res = faceforward(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/faceForward/524986.wgsl.expected.spvasm b/test/tint/builtins/gen/var/faceForward/524986.wgsl.expected.spvasm index 7c84d75b56..0bf053a6b2 100644 --- a/test/tint/builtins/gen/var/faceForward/524986.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/faceForward/524986.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 42 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %21 = OpExtInstImport "GLSL.std.450" + %23 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -40,45 +40,47 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %26 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %faceForward_524986 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3half Function %15 - %arg_1 = OpVariable %_ptr_Function_v3half Function %15 - %arg_2 = OpVariable %_ptr_Function_v3half Function %15 - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - OpStore %arg_2 %15 - %22 = OpLoad %v3half %arg_0 - %23 = OpLoad %v3half %arg_1 - %24 = OpLoad %v3half %arg_2 - %20 = OpExtInst %v3half %21 FaceForward %22 %23 %24 - OpStore %res %20 + %arg_0 = OpVariable %_ptr_Function_v3half Function %19 + %arg_1 = OpVariable %_ptr_Function_v3half Function %19 + %arg_2 = OpVariable %_ptr_Function_v3half Function %19 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + OpStore %arg_2 %16 + %24 = OpLoad %v3half %arg_0 + %25 = OpLoad %v3half %arg_1 + %26 = OpLoad %v3half %arg_2 + %22 = OpExtInst %v3half %23 FaceForward %24 %25 %26 + OpStore %res %22 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %faceForward_524986 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %faceForward_524986 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %faceForward_524986 + %37 = OpLabel + %38 = OpFunctionCall %void %faceForward_524986 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %void %faceForward_524986 + %40 = OpLabel + %41 = OpFunctionCall %void %faceForward_524986 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/faceForward/524986.wgsl.expected.wgsl b/test/tint/builtins/gen/var/faceForward/524986.wgsl.expected.wgsl index 99a0ce8f7c..578fa24e07 100644 --- a/test/tint/builtins/gen/var/faceForward/524986.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/faceForward/524986.wgsl.expected.wgsl @@ -1,9 +1,9 @@ enable f16; fn faceForward_524986() { - var arg_0 = vec3(f16()); - var arg_1 = vec3(f16()); - var arg_2 = vec3(f16()); + var arg_0 = vec3(1.0h); + var arg_1 = vec3(1.0h); + var arg_2 = vec3(1.0h); var res : vec3 = faceForward(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl b/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl index 4c15845b28..7b8d403889 100644 --- a/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl +++ b/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl @@ -25,9 +25,9 @@ enable f16; // fn faceForward(vec<4, f16>, vec<4, f16>, vec<4, f16>) -> vec<4, f16> fn faceForward_cc63dc() { - var arg_0 = vec4(f16()); - var arg_1 = vec4(f16()); - var arg_2 = vec4(f16()); + var arg_0 = vec4(1.h); + var arg_1 = vec4(1.h); + var arg_2 = vec4(1.h); var res: vec4 = faceForward(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl.expected.dxc.hlsl index 9137554b02..ffcbad2614 100644 --- a/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void faceForward_cc63dc() { - vector arg_0 = (float16_t(0.0h)).xxxx; - vector arg_1 = (float16_t(0.0h)).xxxx; - vector arg_2 = (float16_t(0.0h)).xxxx; + vector arg_0 = (float16_t(1.0h)).xxxx; + vector arg_1 = (float16_t(1.0h)).xxxx; + vector arg_2 = (float16_t(1.0h)).xxxx; vector res = faceforward(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl.expected.glsl b/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl.expected.glsl index 37cf24fcf5..2c6a87d410 100644 --- a/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl.expected.glsl @@ -2,9 +2,9 @@ #extension GL_AMD_gpu_shader_half_float : require void faceForward_cc63dc() { - f16vec4 arg_0 = f16vec4(0.0hf); - f16vec4 arg_1 = f16vec4(0.0hf); - f16vec4 arg_2 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_1 = f16vec4(1.0hf); + f16vec4 arg_2 = f16vec4(1.0hf); f16vec4 res = faceforward(arg_0, arg_1, arg_2); } @@ -26,9 +26,9 @@ void main() { precision mediump float; void faceForward_cc63dc() { - f16vec4 arg_0 = f16vec4(0.0hf); - f16vec4 arg_1 = f16vec4(0.0hf); - f16vec4 arg_2 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_1 = f16vec4(1.0hf); + f16vec4 arg_2 = f16vec4(1.0hf); f16vec4 res = faceforward(arg_0, arg_1, arg_2); } @@ -44,9 +44,9 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void faceForward_cc63dc() { - f16vec4 arg_0 = f16vec4(0.0hf); - f16vec4 arg_1 = f16vec4(0.0hf); - f16vec4 arg_2 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_1 = f16vec4(1.0hf); + f16vec4 arg_2 = f16vec4(1.0hf); f16vec4 res = faceforward(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl.expected.msl b/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl.expected.msl index aa5ce15687..21b98001e6 100644 --- a/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void faceForward_cc63dc() { - half4 arg_0 = half4(0.0h); - half4 arg_1 = half4(0.0h); - half4 arg_2 = half4(0.0h); + half4 arg_0 = half4(1.0h); + half4 arg_1 = half4(1.0h); + half4 arg_2 = half4(1.0h); half4 res = faceforward(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl.expected.spvasm index eccdf4368f..bff0d15778 100644 --- a/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 42 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %21 = OpExtInstImport "GLSL.std.450" + %23 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -40,45 +40,47 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %26 = OpTypeFunction %v4float + %19 = OpConstantNull %v4half + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %faceForward_cc63dc = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4half Function %15 - %arg_1 = OpVariable %_ptr_Function_v4half Function %15 - %arg_2 = OpVariable %_ptr_Function_v4half Function %15 - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - OpStore %arg_2 %15 - %22 = OpLoad %v4half %arg_0 - %23 = OpLoad %v4half %arg_1 - %24 = OpLoad %v4half %arg_2 - %20 = OpExtInst %v4half %21 FaceForward %22 %23 %24 - OpStore %res %20 + %arg_0 = OpVariable %_ptr_Function_v4half Function %19 + %arg_1 = OpVariable %_ptr_Function_v4half Function %19 + %arg_2 = OpVariable %_ptr_Function_v4half Function %19 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + OpStore %arg_2 %16 + %24 = OpLoad %v4half %arg_0 + %25 = OpLoad %v4half %arg_1 + %26 = OpLoad %v4half %arg_2 + %22 = OpExtInst %v4half %23 FaceForward %24 %25 %26 + OpStore %res %22 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %faceForward_cc63dc +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %faceForward_cc63dc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %faceForward_cc63dc + %37 = OpLabel + %38 = OpFunctionCall %void %faceForward_cc63dc OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %void %faceForward_cc63dc + %40 = OpLabel + %41 = OpFunctionCall %void %faceForward_cc63dc OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl.expected.wgsl index 48f247d081..2622013a49 100644 --- a/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl.expected.wgsl @@ -1,9 +1,9 @@ enable f16; fn faceForward_cc63dc() { - var arg_0 = vec4(f16()); - var arg_1 = vec4(f16()); - var arg_2 = vec4(f16()); + var arg_0 = vec4(1.0h); + var arg_1 = vec4(1.0h); + var arg_2 = vec4(1.0h); var res : vec4 = faceForward(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl b/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl index 51da087a3a..8e54844f8a 100644 --- a/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl +++ b/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl @@ -25,9 +25,9 @@ enable f16; // fn faceForward(vec<2, f16>, vec<2, f16>, vec<2, f16>) -> vec<2, f16> fn faceForward_fb0f2e() { - var arg_0 = vec2(f16()); - var arg_1 = vec2(f16()); - var arg_2 = vec2(f16()); + var arg_0 = vec2(1.h); + var arg_1 = vec2(1.h); + var arg_2 = vec2(1.h); var res: vec2 = faceForward(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl.expected.dxc.hlsl index 9e0972c562..82fcd39356 100644 --- a/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void faceForward_fb0f2e() { - vector arg_0 = (float16_t(0.0h)).xx; - vector arg_1 = (float16_t(0.0h)).xx; - vector arg_2 = (float16_t(0.0h)).xx; + vector arg_0 = (float16_t(1.0h)).xx; + vector arg_1 = (float16_t(1.0h)).xx; + vector arg_2 = (float16_t(1.0h)).xx; vector res = faceforward(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl.expected.glsl b/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl.expected.glsl index 9dfcea05eb..8ebf21e216 100644 --- a/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl.expected.glsl @@ -2,9 +2,9 @@ #extension GL_AMD_gpu_shader_half_float : require void faceForward_fb0f2e() { - f16vec2 arg_0 = f16vec2(0.0hf); - f16vec2 arg_1 = f16vec2(0.0hf); - f16vec2 arg_2 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_1 = f16vec2(1.0hf); + f16vec2 arg_2 = f16vec2(1.0hf); f16vec2 res = faceforward(arg_0, arg_1, arg_2); } @@ -26,9 +26,9 @@ void main() { precision mediump float; void faceForward_fb0f2e() { - f16vec2 arg_0 = f16vec2(0.0hf); - f16vec2 arg_1 = f16vec2(0.0hf); - f16vec2 arg_2 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_1 = f16vec2(1.0hf); + f16vec2 arg_2 = f16vec2(1.0hf); f16vec2 res = faceforward(arg_0, arg_1, arg_2); } @@ -44,9 +44,9 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void faceForward_fb0f2e() { - f16vec2 arg_0 = f16vec2(0.0hf); - f16vec2 arg_1 = f16vec2(0.0hf); - f16vec2 arg_2 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_1 = f16vec2(1.0hf); + f16vec2 arg_2 = f16vec2(1.0hf); f16vec2 res = faceforward(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl.expected.msl b/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl.expected.msl index 9a425c70cc..68d7ad232b 100644 --- a/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void faceForward_fb0f2e() { - half2 arg_0 = half2(0.0h); - half2 arg_1 = half2(0.0h); - half2 arg_2 = half2(0.0h); + half2 arg_0 = half2(1.0h); + half2 arg_1 = half2(1.0h); + half2 arg_2 = half2(1.0h); half2 res = faceforward(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl.expected.spvasm index a5f1f816ad..89391813e4 100644 --- a/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 42 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %21 = OpExtInstImport "GLSL.std.450" + %23 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -40,45 +40,47 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %26 = OpTypeFunction %v4float + %19 = OpConstantNull %v2half + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %faceForward_fb0f2e = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2half Function %15 - %arg_1 = OpVariable %_ptr_Function_v2half Function %15 - %arg_2 = OpVariable %_ptr_Function_v2half Function %15 - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - OpStore %arg_2 %15 - %22 = OpLoad %v2half %arg_0 - %23 = OpLoad %v2half %arg_1 - %24 = OpLoad %v2half %arg_2 - %20 = OpExtInst %v2half %21 FaceForward %22 %23 %24 - OpStore %res %20 + %arg_0 = OpVariable %_ptr_Function_v2half Function %19 + %arg_1 = OpVariable %_ptr_Function_v2half Function %19 + %arg_2 = OpVariable %_ptr_Function_v2half Function %19 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + OpStore %arg_2 %16 + %24 = OpLoad %v2half %arg_0 + %25 = OpLoad %v2half %arg_1 + %26 = OpLoad %v2half %arg_2 + %22 = OpExtInst %v2half %23 FaceForward %24 %25 %26 + OpStore %res %22 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %faceForward_fb0f2e +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %faceForward_fb0f2e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %faceForward_fb0f2e + %37 = OpLabel + %38 = OpFunctionCall %void %faceForward_fb0f2e OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %void %faceForward_fb0f2e + %40 = OpLabel + %41 = OpFunctionCall %void %faceForward_fb0f2e OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl.expected.wgsl index 985cbab1af..70ca64b03b 100644 --- a/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl.expected.wgsl @@ -1,9 +1,9 @@ enable f16; fn faceForward_fb0f2e() { - var arg_0 = vec2(f16()); - var arg_1 = vec2(f16()); - var arg_2 = vec2(f16()); + var arg_0 = vec2(1.0h); + var arg_1 = vec2(1.0h); + var arg_2 = vec2(1.0h); var res : vec2 = faceForward(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/floor/3802c0.wgsl b/test/tint/builtins/gen/var/floor/3802c0.wgsl index 22ede14734..220e79dbe9 100644 --- a/test/tint/builtins/gen/var/floor/3802c0.wgsl +++ b/test/tint/builtins/gen/var/floor/3802c0.wgsl @@ -25,7 +25,7 @@ enable f16; // fn floor(vec<3, f16>) -> vec<3, f16> fn floor_3802c0() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.5h); var res: vec3 = floor(arg_0); } diff --git a/test/tint/builtins/gen/var/floor/3802c0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/floor/3802c0.wgsl.expected.dxc.hlsl index a997d823f0..b1cd810f8d 100644 --- a/test/tint/builtins/gen/var/floor/3802c0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/floor/3802c0.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void floor_3802c0() { - vector arg_0 = (float16_t(0.0h)).xxx; + vector arg_0 = (float16_t(1.5h)).xxx; vector res = floor(arg_0); } diff --git a/test/tint/builtins/gen/var/floor/3802c0.wgsl.expected.glsl b/test/tint/builtins/gen/var/floor/3802c0.wgsl.expected.glsl index 2f0dabfa35..6216160d48 100644 --- a/test/tint/builtins/gen/var/floor/3802c0.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/floor/3802c0.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void floor_3802c0() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.5hf); f16vec3 res = floor(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void floor_3802c0() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.5hf); f16vec3 res = floor(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void floor_3802c0() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.5hf); f16vec3 res = floor(arg_0); } diff --git a/test/tint/builtins/gen/var/floor/3802c0.wgsl.expected.msl b/test/tint/builtins/gen/var/floor/3802c0.wgsl.expected.msl index 48f2187e8d..dd9f442b4d 100644 --- a/test/tint/builtins/gen/var/floor/3802c0.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/floor/3802c0.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void floor_3802c0() { - half3 arg_0 = half3(0.0h); + half3 arg_0 = half3(1.5h); half3 res = floor(arg_0); } diff --git a/test/tint/builtins/gen/var/floor/3802c0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/floor/3802c0.wgsl.expected.spvasm index 8c34a52ae4..c903d74dce 100644 --- a/test/tint/builtins/gen/var/floor/3802c0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/floor/3802c0.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1_8p_0 = OpConstant %half 0x1.8p+0 + %16 = OpConstantComposite %v3half %half_0x1_8p_0 %half_0x1_8p_0 %half_0x1_8p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %floor_3802c0 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3half Function %15 - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v3half %arg_0 - %18 = OpExtInst %v3half %19 Floor %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v3half Function %19 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v3half %arg_0 + %20 = OpExtInst %v3half %21 Floor %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %floor_3802c0 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %floor_3802c0 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %floor_3802c0 + %33 = OpLabel + %34 = OpFunctionCall %void %floor_3802c0 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %floor_3802c0 + %36 = OpLabel + %37 = OpFunctionCall %void %floor_3802c0 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/floor/3802c0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/floor/3802c0.wgsl.expected.wgsl index e668dbc57e..4ca298af2f 100644 --- a/test/tint/builtins/gen/var/floor/3802c0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/floor/3802c0.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn floor_3802c0() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.5h); var res : vec3 = floor(arg_0); } diff --git a/test/tint/builtins/gen/var/floor/84658c.wgsl b/test/tint/builtins/gen/var/floor/84658c.wgsl index 9cf6d75491..aa130e43e8 100644 --- a/test/tint/builtins/gen/var/floor/84658c.wgsl +++ b/test/tint/builtins/gen/var/floor/84658c.wgsl @@ -25,7 +25,7 @@ enable f16; // fn floor(vec<2, f16>) -> vec<2, f16> fn floor_84658c() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.5h); var res: vec2 = floor(arg_0); } diff --git a/test/tint/builtins/gen/var/floor/84658c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/floor/84658c.wgsl.expected.dxc.hlsl index d10e8f8b52..0ed6ecd550 100644 --- a/test/tint/builtins/gen/var/floor/84658c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/floor/84658c.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void floor_84658c() { - vector arg_0 = (float16_t(0.0h)).xx; + vector arg_0 = (float16_t(1.5h)).xx; vector res = floor(arg_0); } diff --git a/test/tint/builtins/gen/var/floor/84658c.wgsl.expected.glsl b/test/tint/builtins/gen/var/floor/84658c.wgsl.expected.glsl index 6c2236fcc7..1403f8e5d7 100644 --- a/test/tint/builtins/gen/var/floor/84658c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/floor/84658c.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void floor_84658c() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.5hf); f16vec2 res = floor(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void floor_84658c() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.5hf); f16vec2 res = floor(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void floor_84658c() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.5hf); f16vec2 res = floor(arg_0); } diff --git a/test/tint/builtins/gen/var/floor/84658c.wgsl.expected.msl b/test/tint/builtins/gen/var/floor/84658c.wgsl.expected.msl index dbc91a4c58..41e3d05cfa 100644 --- a/test/tint/builtins/gen/var/floor/84658c.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/floor/84658c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void floor_84658c() { - half2 arg_0 = half2(0.0h); + half2 arg_0 = half2(1.5h); half2 res = floor(arg_0); } diff --git a/test/tint/builtins/gen/var/floor/84658c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/floor/84658c.wgsl.expected.spvasm index 5ab1072c26..0a4395d444 100644 --- a/test/tint/builtins/gen/var/floor/84658c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/floor/84658c.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1_8p_0 = OpConstant %half 0x1.8p+0 + %16 = OpConstantComposite %v2half %half_0x1_8p_0 %half_0x1_8p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v2half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %floor_84658c = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2half Function %15 - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v2half %arg_0 - %18 = OpExtInst %v2half %19 Floor %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v2half Function %19 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v2half %arg_0 + %20 = OpExtInst %v2half %21 Floor %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %floor_84658c +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %floor_84658c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %floor_84658c + %33 = OpLabel + %34 = OpFunctionCall %void %floor_84658c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %floor_84658c + %36 = OpLabel + %37 = OpFunctionCall %void %floor_84658c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/floor/84658c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/floor/84658c.wgsl.expected.wgsl index af40f90ea0..d823b5a91a 100644 --- a/test/tint/builtins/gen/var/floor/84658c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/floor/84658c.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn floor_84658c() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.5h); var res : vec2 = floor(arg_0); } diff --git a/test/tint/builtins/gen/var/floor/a2d31b.wgsl b/test/tint/builtins/gen/var/floor/a2d31b.wgsl index edc990a1fe..3bdccebdf8 100644 --- a/test/tint/builtins/gen/var/floor/a2d31b.wgsl +++ b/test/tint/builtins/gen/var/floor/a2d31b.wgsl @@ -25,7 +25,7 @@ enable f16; // fn floor(vec<4, f16>) -> vec<4, f16> fn floor_a2d31b() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.5h); var res: vec4 = floor(arg_0); } diff --git a/test/tint/builtins/gen/var/floor/a2d31b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/floor/a2d31b.wgsl.expected.dxc.hlsl index 3eccce668e..d32492cafe 100644 --- a/test/tint/builtins/gen/var/floor/a2d31b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/floor/a2d31b.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void floor_a2d31b() { - vector arg_0 = (float16_t(0.0h)).xxxx; + vector arg_0 = (float16_t(1.5h)).xxxx; vector res = floor(arg_0); } diff --git a/test/tint/builtins/gen/var/floor/a2d31b.wgsl.expected.glsl b/test/tint/builtins/gen/var/floor/a2d31b.wgsl.expected.glsl index 4e2d116377..dc60c85ce2 100644 --- a/test/tint/builtins/gen/var/floor/a2d31b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/floor/a2d31b.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void floor_a2d31b() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.5hf); f16vec4 res = floor(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void floor_a2d31b() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.5hf); f16vec4 res = floor(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void floor_a2d31b() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.5hf); f16vec4 res = floor(arg_0); } diff --git a/test/tint/builtins/gen/var/floor/a2d31b.wgsl.expected.msl b/test/tint/builtins/gen/var/floor/a2d31b.wgsl.expected.msl index 521eda3580..c261f68b52 100644 --- a/test/tint/builtins/gen/var/floor/a2d31b.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/floor/a2d31b.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void floor_a2d31b() { - half4 arg_0 = half4(0.0h); + half4 arg_0 = half4(1.5h); half4 res = floor(arg_0); } diff --git a/test/tint/builtins/gen/var/floor/a2d31b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/floor/a2d31b.wgsl.expected.spvasm index 4cf75b1f50..763f2fcb75 100644 --- a/test/tint/builtins/gen/var/floor/a2d31b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/floor/a2d31b.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1_8p_0 = OpConstant %half 0x1.8p+0 + %16 = OpConstantComposite %v4half %half_0x1_8p_0 %half_0x1_8p_0 %half_0x1_8p_0 %half_0x1_8p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v4half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %floor_a2d31b = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4half Function %15 - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v4half %arg_0 - %18 = OpExtInst %v4half %19 Floor %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v4half Function %19 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v4half %arg_0 + %20 = OpExtInst %v4half %21 Floor %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %floor_a2d31b +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %floor_a2d31b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %floor_a2d31b + %33 = OpLabel + %34 = OpFunctionCall %void %floor_a2d31b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %floor_a2d31b + %36 = OpLabel + %37 = OpFunctionCall %void %floor_a2d31b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/floor/a2d31b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/floor/a2d31b.wgsl.expected.wgsl index 7b23f7d38a..ec9a507dd3 100644 --- a/test/tint/builtins/gen/var/floor/a2d31b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/floor/a2d31b.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn floor_a2d31b() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.5h); var res : vec4 = floor(arg_0); } diff --git a/test/tint/builtins/gen/var/floor/b6e09c.wgsl b/test/tint/builtins/gen/var/floor/b6e09c.wgsl index 7ddbc74948..a73b789956 100644 --- a/test/tint/builtins/gen/var/floor/b6e09c.wgsl +++ b/test/tint/builtins/gen/var/floor/b6e09c.wgsl @@ -25,7 +25,7 @@ enable f16; // fn floor(f16) -> f16 fn floor_b6e09c() { - var arg_0 = f16(); + var arg_0 = 1.5h; var res: f16 = floor(arg_0); } diff --git a/test/tint/builtins/gen/var/floor/b6e09c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/floor/b6e09c.wgsl.expected.dxc.hlsl index a13fef1f77..6094c412d9 100644 --- a/test/tint/builtins/gen/var/floor/b6e09c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/floor/b6e09c.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void floor_b6e09c() { - float16_t arg_0 = float16_t(0.0h); + float16_t arg_0 = float16_t(1.5h); float16_t res = floor(arg_0); } diff --git a/test/tint/builtins/gen/var/floor/b6e09c.wgsl.expected.glsl b/test/tint/builtins/gen/var/floor/b6e09c.wgsl.expected.glsl index 5a9ededee0..530debd39b 100644 --- a/test/tint/builtins/gen/var/floor/b6e09c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/floor/b6e09c.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void floor_b6e09c() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.5hf; float16_t res = floor(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void floor_b6e09c() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.5hf; float16_t res = floor(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void floor_b6e09c() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.5hf; float16_t res = floor(arg_0); } diff --git a/test/tint/builtins/gen/var/floor/b6e09c.wgsl.expected.msl b/test/tint/builtins/gen/var/floor/b6e09c.wgsl.expected.msl index eddf8f2c10..4907c873c1 100644 --- a/test/tint/builtins/gen/var/floor/b6e09c.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/floor/b6e09c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void floor_b6e09c() { - half arg_0 = 0.0h; + half arg_0 = 1.5h; half res = floor(arg_0); } diff --git a/test/tint/builtins/gen/var/floor/b6e09c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/floor/b6e09c.wgsl.expected.spvasm index 45cc608104..7db04dba64 100644 --- a/test/tint/builtins/gen/var/floor/b6e09c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/floor/b6e09c.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %18 = OpExtInstImport "GLSL.std.450" + %19 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -37,39 +37,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1_8p_0 = OpConstant %half 0x1.8p+0 %_ptr_Function_half = OpTypePointer Function %half - %21 = OpTypeFunction %v4float + %17 = OpConstantNull %half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %floor_b6e09c = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_half Function %14 - %res = OpVariable %_ptr_Function_half Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %half %arg_0 - %17 = OpExtInst %half %18 Floor %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_half Function %17 + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %arg_0 %half_0x1_8p_0 + %20 = OpLoad %half %arg_0 + %18 = OpExtInst %half %19 Floor %20 + OpStore %res %18 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %floor_b6e09c +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %floor_b6e09c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %floor_b6e09c + %31 = OpLabel + %32 = OpFunctionCall %void %floor_b6e09c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %floor_b6e09c + %34 = OpLabel + %35 = OpFunctionCall %void %floor_b6e09c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/floor/b6e09c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/floor/b6e09c.wgsl.expected.wgsl index 68db5d7201..62567c5d12 100644 --- a/test/tint/builtins/gen/var/floor/b6e09c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/floor/b6e09c.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn floor_b6e09c() { - var arg_0 = f16(); + var arg_0 = 1.5h; var res : f16 = floor(arg_0); } diff --git a/test/tint/builtins/gen/var/fma/ab7818.wgsl b/test/tint/builtins/gen/var/fma/ab7818.wgsl index ab0ffd7e47..2d0cacc877 100644 --- a/test/tint/builtins/gen/var/fma/ab7818.wgsl +++ b/test/tint/builtins/gen/var/fma/ab7818.wgsl @@ -25,9 +25,9 @@ enable f16; // fn fma(vec<4, f16>, vec<4, f16>, vec<4, f16>) -> vec<4, f16> fn fma_ab7818() { - var arg_0 = vec4(f16()); - var arg_1 = vec4(f16()); - var arg_2 = vec4(f16()); + var arg_0 = vec4(1.h); + var arg_1 = vec4(1.h); + var arg_2 = vec4(1.h); var res: vec4 = fma(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/fma/ab7818.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/fma/ab7818.wgsl.expected.dxc.hlsl index ba7fd240c1..2577424d72 100644 --- a/test/tint/builtins/gen/var/fma/ab7818.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/fma/ab7818.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void fma_ab7818() { - vector arg_0 = (float16_t(0.0h)).xxxx; - vector arg_1 = (float16_t(0.0h)).xxxx; - vector arg_2 = (float16_t(0.0h)).xxxx; + vector arg_0 = (float16_t(1.0h)).xxxx; + vector arg_1 = (float16_t(1.0h)).xxxx; + vector arg_2 = (float16_t(1.0h)).xxxx; vector res = mad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/fma/ab7818.wgsl.expected.glsl b/test/tint/builtins/gen/var/fma/ab7818.wgsl.expected.glsl index 210f2f999d..968b92e5a9 100644 --- a/test/tint/builtins/gen/var/fma/ab7818.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/fma/ab7818.wgsl.expected.glsl @@ -2,9 +2,9 @@ #extension GL_AMD_gpu_shader_half_float : require void fma_ab7818() { - f16vec4 arg_0 = f16vec4(0.0hf); - f16vec4 arg_1 = f16vec4(0.0hf); - f16vec4 arg_2 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_1 = f16vec4(1.0hf); + f16vec4 arg_2 = f16vec4(1.0hf); f16vec4 res = ((arg_0) * (arg_1) + (arg_2)); } @@ -26,9 +26,9 @@ void main() { precision mediump float; void fma_ab7818() { - f16vec4 arg_0 = f16vec4(0.0hf); - f16vec4 arg_1 = f16vec4(0.0hf); - f16vec4 arg_2 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_1 = f16vec4(1.0hf); + f16vec4 arg_2 = f16vec4(1.0hf); f16vec4 res = ((arg_0) * (arg_1) + (arg_2)); } @@ -44,9 +44,9 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void fma_ab7818() { - f16vec4 arg_0 = f16vec4(0.0hf); - f16vec4 arg_1 = f16vec4(0.0hf); - f16vec4 arg_2 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_1 = f16vec4(1.0hf); + f16vec4 arg_2 = f16vec4(1.0hf); f16vec4 res = ((arg_0) * (arg_1) + (arg_2)); } diff --git a/test/tint/builtins/gen/var/fma/ab7818.wgsl.expected.msl b/test/tint/builtins/gen/var/fma/ab7818.wgsl.expected.msl index 7618e6d448..ac5cd841c1 100644 --- a/test/tint/builtins/gen/var/fma/ab7818.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/fma/ab7818.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void fma_ab7818() { - half4 arg_0 = half4(0.0h); - half4 arg_1 = half4(0.0h); - half4 arg_2 = half4(0.0h); + half4 arg_0 = half4(1.0h); + half4 arg_1 = half4(1.0h); + half4 arg_2 = half4(1.0h); half4 res = fma(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/fma/ab7818.wgsl.expected.spvasm b/test/tint/builtins/gen/var/fma/ab7818.wgsl.expected.spvasm index cfe30fe69c..39bd7abed0 100644 --- a/test/tint/builtins/gen/var/fma/ab7818.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/fma/ab7818.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 42 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %21 = OpExtInstImport "GLSL.std.450" + %23 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -40,45 +40,47 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %26 = OpTypeFunction %v4float + %19 = OpConstantNull %v4half + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %fma_ab7818 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4half Function %15 - %arg_1 = OpVariable %_ptr_Function_v4half Function %15 - %arg_2 = OpVariable %_ptr_Function_v4half Function %15 - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - OpStore %arg_2 %15 - %22 = OpLoad %v4half %arg_0 - %23 = OpLoad %v4half %arg_1 - %24 = OpLoad %v4half %arg_2 - %20 = OpExtInst %v4half %21 Fma %22 %23 %24 - OpStore %res %20 + %arg_0 = OpVariable %_ptr_Function_v4half Function %19 + %arg_1 = OpVariable %_ptr_Function_v4half Function %19 + %arg_2 = OpVariable %_ptr_Function_v4half Function %19 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + OpStore %arg_2 %16 + %24 = OpLoad %v4half %arg_0 + %25 = OpLoad %v4half %arg_1 + %26 = OpLoad %v4half %arg_2 + %22 = OpExtInst %v4half %23 Fma %24 %25 %26 + OpStore %res %22 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %fma_ab7818 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %fma_ab7818 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %fma_ab7818 + %37 = OpLabel + %38 = OpFunctionCall %void %fma_ab7818 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %void %fma_ab7818 + %40 = OpLabel + %41 = OpFunctionCall %void %fma_ab7818 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/fma/ab7818.wgsl.expected.wgsl b/test/tint/builtins/gen/var/fma/ab7818.wgsl.expected.wgsl index 14808bab52..a858af1561 100644 --- a/test/tint/builtins/gen/var/fma/ab7818.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/fma/ab7818.wgsl.expected.wgsl @@ -1,9 +1,9 @@ enable f16; fn fma_ab7818() { - var arg_0 = vec4(f16()); - var arg_1 = vec4(f16()); - var arg_2 = vec4(f16()); + var arg_0 = vec4(1.0h); + var arg_1 = vec4(1.0h); + var arg_2 = vec4(1.0h); var res : vec4 = fma(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/fma/bf21b6.wgsl b/test/tint/builtins/gen/var/fma/bf21b6.wgsl index 7fa271160c..93baf09e51 100644 --- a/test/tint/builtins/gen/var/fma/bf21b6.wgsl +++ b/test/tint/builtins/gen/var/fma/bf21b6.wgsl @@ -25,9 +25,9 @@ enable f16; // fn fma(vec<2, f16>, vec<2, f16>, vec<2, f16>) -> vec<2, f16> fn fma_bf21b6() { - var arg_0 = vec2(f16()); - var arg_1 = vec2(f16()); - var arg_2 = vec2(f16()); + var arg_0 = vec2(1.h); + var arg_1 = vec2(1.h); + var arg_2 = vec2(1.h); var res: vec2 = fma(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/fma/bf21b6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/fma/bf21b6.wgsl.expected.dxc.hlsl index fad050827b..b9a8d05808 100644 --- a/test/tint/builtins/gen/var/fma/bf21b6.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/fma/bf21b6.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void fma_bf21b6() { - vector arg_0 = (float16_t(0.0h)).xx; - vector arg_1 = (float16_t(0.0h)).xx; - vector arg_2 = (float16_t(0.0h)).xx; + vector arg_0 = (float16_t(1.0h)).xx; + vector arg_1 = (float16_t(1.0h)).xx; + vector arg_2 = (float16_t(1.0h)).xx; vector res = mad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/fma/bf21b6.wgsl.expected.glsl b/test/tint/builtins/gen/var/fma/bf21b6.wgsl.expected.glsl index d6376ec1ff..68d2e468a7 100644 --- a/test/tint/builtins/gen/var/fma/bf21b6.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/fma/bf21b6.wgsl.expected.glsl @@ -2,9 +2,9 @@ #extension GL_AMD_gpu_shader_half_float : require void fma_bf21b6() { - f16vec2 arg_0 = f16vec2(0.0hf); - f16vec2 arg_1 = f16vec2(0.0hf); - f16vec2 arg_2 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_1 = f16vec2(1.0hf); + f16vec2 arg_2 = f16vec2(1.0hf); f16vec2 res = ((arg_0) * (arg_1) + (arg_2)); } @@ -26,9 +26,9 @@ void main() { precision mediump float; void fma_bf21b6() { - f16vec2 arg_0 = f16vec2(0.0hf); - f16vec2 arg_1 = f16vec2(0.0hf); - f16vec2 arg_2 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_1 = f16vec2(1.0hf); + f16vec2 arg_2 = f16vec2(1.0hf); f16vec2 res = ((arg_0) * (arg_1) + (arg_2)); } @@ -44,9 +44,9 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void fma_bf21b6() { - f16vec2 arg_0 = f16vec2(0.0hf); - f16vec2 arg_1 = f16vec2(0.0hf); - f16vec2 arg_2 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_1 = f16vec2(1.0hf); + f16vec2 arg_2 = f16vec2(1.0hf); f16vec2 res = ((arg_0) * (arg_1) + (arg_2)); } diff --git a/test/tint/builtins/gen/var/fma/bf21b6.wgsl.expected.msl b/test/tint/builtins/gen/var/fma/bf21b6.wgsl.expected.msl index fd5f39ce59..beef6a7604 100644 --- a/test/tint/builtins/gen/var/fma/bf21b6.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/fma/bf21b6.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void fma_bf21b6() { - half2 arg_0 = half2(0.0h); - half2 arg_1 = half2(0.0h); - half2 arg_2 = half2(0.0h); + half2 arg_0 = half2(1.0h); + half2 arg_1 = half2(1.0h); + half2 arg_2 = half2(1.0h); half2 res = fma(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/fma/bf21b6.wgsl.expected.spvasm b/test/tint/builtins/gen/var/fma/bf21b6.wgsl.expected.spvasm index d66229d6f1..5e403bd365 100644 --- a/test/tint/builtins/gen/var/fma/bf21b6.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/fma/bf21b6.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 42 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %21 = OpExtInstImport "GLSL.std.450" + %23 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -40,45 +40,47 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %26 = OpTypeFunction %v4float + %19 = OpConstantNull %v2half + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %fma_bf21b6 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2half Function %15 - %arg_1 = OpVariable %_ptr_Function_v2half Function %15 - %arg_2 = OpVariable %_ptr_Function_v2half Function %15 - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - OpStore %arg_2 %15 - %22 = OpLoad %v2half %arg_0 - %23 = OpLoad %v2half %arg_1 - %24 = OpLoad %v2half %arg_2 - %20 = OpExtInst %v2half %21 Fma %22 %23 %24 - OpStore %res %20 + %arg_0 = OpVariable %_ptr_Function_v2half Function %19 + %arg_1 = OpVariable %_ptr_Function_v2half Function %19 + %arg_2 = OpVariable %_ptr_Function_v2half Function %19 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + OpStore %arg_2 %16 + %24 = OpLoad %v2half %arg_0 + %25 = OpLoad %v2half %arg_1 + %26 = OpLoad %v2half %arg_2 + %22 = OpExtInst %v2half %23 Fma %24 %25 %26 + OpStore %res %22 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %fma_bf21b6 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %fma_bf21b6 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %fma_bf21b6 + %37 = OpLabel + %38 = OpFunctionCall %void %fma_bf21b6 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %void %fma_bf21b6 + %40 = OpLabel + %41 = OpFunctionCall %void %fma_bf21b6 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/fma/bf21b6.wgsl.expected.wgsl b/test/tint/builtins/gen/var/fma/bf21b6.wgsl.expected.wgsl index aef061d83a..d2f54c3b92 100644 --- a/test/tint/builtins/gen/var/fma/bf21b6.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/fma/bf21b6.wgsl.expected.wgsl @@ -1,9 +1,9 @@ enable f16; fn fma_bf21b6() { - var arg_0 = vec2(f16()); - var arg_1 = vec2(f16()); - var arg_2 = vec2(f16()); + var arg_0 = vec2(1.0h); + var arg_1 = vec2(1.0h); + var arg_2 = vec2(1.0h); var res : vec2 = fma(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/fma/c8abb3.wgsl b/test/tint/builtins/gen/var/fma/c8abb3.wgsl index c86a6991f0..cd25769dcc 100644 --- a/test/tint/builtins/gen/var/fma/c8abb3.wgsl +++ b/test/tint/builtins/gen/var/fma/c8abb3.wgsl @@ -25,9 +25,9 @@ enable f16; // fn fma(f16, f16, f16) -> f16 fn fma_c8abb3() { - var arg_0 = f16(); - var arg_1 = f16(); - var arg_2 = f16(); + var arg_0 = 1.h; + var arg_1 = 1.h; + var arg_2 = 1.h; var res: f16 = fma(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/fma/c8abb3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/fma/c8abb3.wgsl.expected.dxc.hlsl index ce25e33259..8c0c958fc3 100644 --- a/test/tint/builtins/gen/var/fma/c8abb3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/fma/c8abb3.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void fma_c8abb3() { - float16_t arg_0 = float16_t(0.0h); - float16_t arg_1 = float16_t(0.0h); - float16_t arg_2 = float16_t(0.0h); + float16_t arg_0 = float16_t(1.0h); + float16_t arg_1 = float16_t(1.0h); + float16_t arg_2 = float16_t(1.0h); float16_t res = mad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/fma/c8abb3.wgsl.expected.glsl b/test/tint/builtins/gen/var/fma/c8abb3.wgsl.expected.glsl index 971fb93533..286d7c3b55 100644 --- a/test/tint/builtins/gen/var/fma/c8abb3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/fma/c8abb3.wgsl.expected.glsl @@ -2,9 +2,9 @@ #extension GL_AMD_gpu_shader_half_float : require void fma_c8abb3() { - float16_t arg_0 = 0.0hf; - float16_t arg_1 = 0.0hf; - float16_t arg_2 = 0.0hf; + float16_t arg_0 = 1.0hf; + float16_t arg_1 = 1.0hf; + float16_t arg_2 = 1.0hf; float16_t res = ((arg_0) * (arg_1) + (arg_2)); } @@ -26,9 +26,9 @@ void main() { precision mediump float; void fma_c8abb3() { - float16_t arg_0 = 0.0hf; - float16_t arg_1 = 0.0hf; - float16_t arg_2 = 0.0hf; + float16_t arg_0 = 1.0hf; + float16_t arg_1 = 1.0hf; + float16_t arg_2 = 1.0hf; float16_t res = ((arg_0) * (arg_1) + (arg_2)); } @@ -44,9 +44,9 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void fma_c8abb3() { - float16_t arg_0 = 0.0hf; - float16_t arg_1 = 0.0hf; - float16_t arg_2 = 0.0hf; + float16_t arg_0 = 1.0hf; + float16_t arg_1 = 1.0hf; + float16_t arg_2 = 1.0hf; float16_t res = ((arg_0) * (arg_1) + (arg_2)); } diff --git a/test/tint/builtins/gen/var/fma/c8abb3.wgsl.expected.msl b/test/tint/builtins/gen/var/fma/c8abb3.wgsl.expected.msl index 8cef0c3de5..9b513e7186 100644 --- a/test/tint/builtins/gen/var/fma/c8abb3.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/fma/c8abb3.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void fma_c8abb3() { - half arg_0 = 0.0h; - half arg_1 = 0.0h; - half arg_2 = 0.0h; + half arg_0 = 1.0h; + half arg_1 = 1.0h; + half arg_2 = 1.0h; half res = fma(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/fma/c8abb3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/fma/c8abb3.wgsl.expected.spvasm index b033681808..fe35e5d931 100644 --- a/test/tint/builtins/gen/var/fma/c8abb3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/fma/c8abb3.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 40 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %20 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -39,45 +39,46 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %25 = OpTypeFunction %v4float + %17 = OpConstantNull %half + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %fma_c8abb3 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_half Function %14 - %arg_1 = OpVariable %_ptr_Function_half Function %14 - %arg_2 = OpVariable %_ptr_Function_half Function %14 - %res = OpVariable %_ptr_Function_half Function %14 - OpStore %arg_0 %14 - OpStore %arg_1 %14 - OpStore %arg_2 %14 - %21 = OpLoad %half %arg_0 - %22 = OpLoad %half %arg_1 - %23 = OpLoad %half %arg_2 - %19 = OpExtInst %half %20 Fma %21 %22 %23 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_half Function %17 + %arg_1 = OpVariable %_ptr_Function_half Function %17 + %arg_2 = OpVariable %_ptr_Function_half Function %17 + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %arg_0 %half_0x1p_0 + OpStore %arg_1 %half_0x1p_0 + OpStore %arg_2 %half_0x1p_0 + %22 = OpLoad %half %arg_0 + %23 = OpLoad %half %arg_1 + %24 = OpLoad %half %arg_2 + %20 = OpExtInst %half %21 Fma %22 %23 %24 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %fma_c8abb3 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %fma_c8abb3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %fma_c8abb3 + %35 = OpLabel + %36 = OpFunctionCall %void %fma_c8abb3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %37 = OpLabel - %38 = OpFunctionCall %void %fma_c8abb3 + %38 = OpLabel + %39 = OpFunctionCall %void %fma_c8abb3 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/fma/c8abb3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/fma/c8abb3.wgsl.expected.wgsl index 6f24f34dc5..6d3be88971 100644 --- a/test/tint/builtins/gen/var/fma/c8abb3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/fma/c8abb3.wgsl.expected.wgsl @@ -1,9 +1,9 @@ enable f16; fn fma_c8abb3() { - var arg_0 = f16(); - var arg_1 = f16(); - var arg_2 = f16(); + var arg_0 = 1.0h; + var arg_1 = 1.0h; + var arg_2 = 1.0h; var res : f16 = fma(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/fma/e7abdc.wgsl b/test/tint/builtins/gen/var/fma/e7abdc.wgsl index a07279df16..c8ffdadae9 100644 --- a/test/tint/builtins/gen/var/fma/e7abdc.wgsl +++ b/test/tint/builtins/gen/var/fma/e7abdc.wgsl @@ -25,9 +25,9 @@ enable f16; // fn fma(vec<3, f16>, vec<3, f16>, vec<3, f16>) -> vec<3, f16> fn fma_e7abdc() { - var arg_0 = vec3(f16()); - var arg_1 = vec3(f16()); - var arg_2 = vec3(f16()); + var arg_0 = vec3(1.h); + var arg_1 = vec3(1.h); + var arg_2 = vec3(1.h); var res: vec3 = fma(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/fma/e7abdc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/fma/e7abdc.wgsl.expected.dxc.hlsl index b6b357e77b..d9701f82fe 100644 --- a/test/tint/builtins/gen/var/fma/e7abdc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/fma/e7abdc.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void fma_e7abdc() { - vector arg_0 = (float16_t(0.0h)).xxx; - vector arg_1 = (float16_t(0.0h)).xxx; - vector arg_2 = (float16_t(0.0h)).xxx; + vector arg_0 = (float16_t(1.0h)).xxx; + vector arg_1 = (float16_t(1.0h)).xxx; + vector arg_2 = (float16_t(1.0h)).xxx; vector res = mad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/fma/e7abdc.wgsl.expected.glsl b/test/tint/builtins/gen/var/fma/e7abdc.wgsl.expected.glsl index ba47f42fee..58b28ba3e7 100644 --- a/test/tint/builtins/gen/var/fma/e7abdc.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/fma/e7abdc.wgsl.expected.glsl @@ -2,9 +2,9 @@ #extension GL_AMD_gpu_shader_half_float : require void fma_e7abdc() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); - f16vec3 arg_2 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); + f16vec3 arg_2 = f16vec3(1.0hf); f16vec3 res = ((arg_0) * (arg_1) + (arg_2)); } @@ -26,9 +26,9 @@ void main() { precision mediump float; void fma_e7abdc() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); - f16vec3 arg_2 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); + f16vec3 arg_2 = f16vec3(1.0hf); f16vec3 res = ((arg_0) * (arg_1) + (arg_2)); } @@ -44,9 +44,9 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void fma_e7abdc() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); - f16vec3 arg_2 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); + f16vec3 arg_2 = f16vec3(1.0hf); f16vec3 res = ((arg_0) * (arg_1) + (arg_2)); } diff --git a/test/tint/builtins/gen/var/fma/e7abdc.wgsl.expected.msl b/test/tint/builtins/gen/var/fma/e7abdc.wgsl.expected.msl index c7e165ade3..4014cfc65a 100644 --- a/test/tint/builtins/gen/var/fma/e7abdc.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/fma/e7abdc.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void fma_e7abdc() { - half3 arg_0 = half3(0.0h); - half3 arg_1 = half3(0.0h); - half3 arg_2 = half3(0.0h); + half3 arg_0 = half3(1.0h); + half3 arg_1 = half3(1.0h); + half3 arg_2 = half3(1.0h); half3 res = fma(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/fma/e7abdc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/fma/e7abdc.wgsl.expected.spvasm index c9aaaf7a64..c5c6a7a53c 100644 --- a/test/tint/builtins/gen/var/fma/e7abdc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/fma/e7abdc.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 42 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %21 = OpExtInstImport "GLSL.std.450" + %23 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -40,45 +40,47 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %26 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %fma_e7abdc = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3half Function %15 - %arg_1 = OpVariable %_ptr_Function_v3half Function %15 - %arg_2 = OpVariable %_ptr_Function_v3half Function %15 - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - OpStore %arg_2 %15 - %22 = OpLoad %v3half %arg_0 - %23 = OpLoad %v3half %arg_1 - %24 = OpLoad %v3half %arg_2 - %20 = OpExtInst %v3half %21 Fma %22 %23 %24 - OpStore %res %20 + %arg_0 = OpVariable %_ptr_Function_v3half Function %19 + %arg_1 = OpVariable %_ptr_Function_v3half Function %19 + %arg_2 = OpVariable %_ptr_Function_v3half Function %19 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + OpStore %arg_2 %16 + %24 = OpLoad %v3half %arg_0 + %25 = OpLoad %v3half %arg_1 + %26 = OpLoad %v3half %arg_2 + %22 = OpExtInst %v3half %23 Fma %24 %25 %26 + OpStore %res %22 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %fma_e7abdc +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %fma_e7abdc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %fma_e7abdc + %37 = OpLabel + %38 = OpFunctionCall %void %fma_e7abdc OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %void %fma_e7abdc + %40 = OpLabel + %41 = OpFunctionCall %void %fma_e7abdc OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/fma/e7abdc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/fma/e7abdc.wgsl.expected.wgsl index 2dbbcac3fc..fd8ecb1a0d 100644 --- a/test/tint/builtins/gen/var/fma/e7abdc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/fma/e7abdc.wgsl.expected.wgsl @@ -1,9 +1,9 @@ enable f16; fn fma_e7abdc() { - var arg_0 = vec3(f16()); - var arg_1 = vec3(f16()); - var arg_2 = vec3(f16()); + var arg_0 = vec3(1.0h); + var arg_1 = vec3(1.0h); + var arg_2 = vec3(1.0h); var res : vec3 = fma(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/fract/181aa9.wgsl b/test/tint/builtins/gen/var/fract/181aa9.wgsl index 12cc4bf347..1ffd186392 100644 --- a/test/tint/builtins/gen/var/fract/181aa9.wgsl +++ b/test/tint/builtins/gen/var/fract/181aa9.wgsl @@ -25,7 +25,7 @@ enable f16; // fn fract(vec<2, f16>) -> vec<2, f16> fn fract_181aa9() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.h); var res: vec2 = fract(arg_0); } diff --git a/test/tint/builtins/gen/var/fract/181aa9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/fract/181aa9.wgsl.expected.dxc.hlsl index 08a307dbd7..6d73d2eae4 100644 --- a/test/tint/builtins/gen/var/fract/181aa9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/fract/181aa9.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void fract_181aa9() { - vector arg_0 = (float16_t(0.0h)).xx; + vector arg_0 = (float16_t(1.0h)).xx; vector res = frac(arg_0); } diff --git a/test/tint/builtins/gen/var/fract/181aa9.wgsl.expected.glsl b/test/tint/builtins/gen/var/fract/181aa9.wgsl.expected.glsl index e9871d3d3c..f2283f736b 100644 --- a/test/tint/builtins/gen/var/fract/181aa9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/fract/181aa9.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void fract_181aa9() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = fract(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void fract_181aa9() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = fract(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void fract_181aa9() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = fract(arg_0); } diff --git a/test/tint/builtins/gen/var/fract/181aa9.wgsl.expected.msl b/test/tint/builtins/gen/var/fract/181aa9.wgsl.expected.msl index f3351da3af..a44159fc74 100644 --- a/test/tint/builtins/gen/var/fract/181aa9.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/fract/181aa9.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void fract_181aa9() { - half2 arg_0 = half2(0.0h); + half2 arg_0 = half2(1.0h); half2 res = fract(arg_0); } diff --git a/test/tint/builtins/gen/var/fract/181aa9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/fract/181aa9.wgsl.expected.spvasm index 47d1ee6787..95c9f98819 100644 --- a/test/tint/builtins/gen/var/fract/181aa9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/fract/181aa9.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v2half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %fract_181aa9 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2half Function %15 - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v2half %arg_0 - %18 = OpExtInst %v2half %19 Fract %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v2half Function %19 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v2half %arg_0 + %20 = OpExtInst %v2half %21 Fract %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %fract_181aa9 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %fract_181aa9 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %fract_181aa9 + %33 = OpLabel + %34 = OpFunctionCall %void %fract_181aa9 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %fract_181aa9 + %36 = OpLabel + %37 = OpFunctionCall %void %fract_181aa9 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/fract/181aa9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/fract/181aa9.wgsl.expected.wgsl index 6e73c70769..c65421c442 100644 --- a/test/tint/builtins/gen/var/fract/181aa9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/fract/181aa9.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn fract_181aa9() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.0h); var res : vec2 = fract(arg_0); } diff --git a/test/tint/builtins/gen/var/fract/498c77.wgsl b/test/tint/builtins/gen/var/fract/498c77.wgsl index aef30b3549..5ea4700d9d 100644 --- a/test/tint/builtins/gen/var/fract/498c77.wgsl +++ b/test/tint/builtins/gen/var/fract/498c77.wgsl @@ -25,7 +25,7 @@ enable f16; // fn fract(vec<4, f16>) -> vec<4, f16> fn fract_498c77() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.h); var res: vec4 = fract(arg_0); } diff --git a/test/tint/builtins/gen/var/fract/498c77.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/fract/498c77.wgsl.expected.dxc.hlsl index d9e34efb4f..5887de1df0 100644 --- a/test/tint/builtins/gen/var/fract/498c77.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/fract/498c77.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void fract_498c77() { - vector arg_0 = (float16_t(0.0h)).xxxx; + vector arg_0 = (float16_t(1.0h)).xxxx; vector res = frac(arg_0); } diff --git a/test/tint/builtins/gen/var/fract/498c77.wgsl.expected.glsl b/test/tint/builtins/gen/var/fract/498c77.wgsl.expected.glsl index c9daa26d24..1e866f592f 100644 --- a/test/tint/builtins/gen/var/fract/498c77.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/fract/498c77.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void fract_498c77() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = fract(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void fract_498c77() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = fract(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void fract_498c77() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = fract(arg_0); } diff --git a/test/tint/builtins/gen/var/fract/498c77.wgsl.expected.msl b/test/tint/builtins/gen/var/fract/498c77.wgsl.expected.msl index 3f7a3f18e9..9c087965bc 100644 --- a/test/tint/builtins/gen/var/fract/498c77.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/fract/498c77.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void fract_498c77() { - half4 arg_0 = half4(0.0h); + half4 arg_0 = half4(1.0h); half4 res = fract(arg_0); } diff --git a/test/tint/builtins/gen/var/fract/498c77.wgsl.expected.spvasm b/test/tint/builtins/gen/var/fract/498c77.wgsl.expected.spvasm index 62ab9e0992..2ec1d9d77f 100644 --- a/test/tint/builtins/gen/var/fract/498c77.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/fract/498c77.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v4half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %fract_498c77 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4half Function %15 - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v4half %arg_0 - %18 = OpExtInst %v4half %19 Fract %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v4half Function %19 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v4half %arg_0 + %20 = OpExtInst %v4half %21 Fract %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %fract_498c77 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %fract_498c77 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %fract_498c77 + %33 = OpLabel + %34 = OpFunctionCall %void %fract_498c77 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %fract_498c77 + %36 = OpLabel + %37 = OpFunctionCall %void %fract_498c77 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/fract/498c77.wgsl.expected.wgsl b/test/tint/builtins/gen/var/fract/498c77.wgsl.expected.wgsl index 325c892908..72e50bb035 100644 --- a/test/tint/builtins/gen/var/fract/498c77.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/fract/498c77.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn fract_498c77() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.0h); var res : vec4 = fract(arg_0); } diff --git a/test/tint/builtins/gen/var/fract/958a1d.wgsl b/test/tint/builtins/gen/var/fract/958a1d.wgsl index 187f494946..dbcf68ce7e 100644 --- a/test/tint/builtins/gen/var/fract/958a1d.wgsl +++ b/test/tint/builtins/gen/var/fract/958a1d.wgsl @@ -25,7 +25,7 @@ enable f16; // fn fract(vec<3, f16>) -> vec<3, f16> fn fract_958a1d() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.h); var res: vec3 = fract(arg_0); } diff --git a/test/tint/builtins/gen/var/fract/958a1d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/fract/958a1d.wgsl.expected.dxc.hlsl index 98322b9651..3fd76d197e 100644 --- a/test/tint/builtins/gen/var/fract/958a1d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/fract/958a1d.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void fract_958a1d() { - vector arg_0 = (float16_t(0.0h)).xxx; + vector arg_0 = (float16_t(1.0h)).xxx; vector res = frac(arg_0); } diff --git a/test/tint/builtins/gen/var/fract/958a1d.wgsl.expected.glsl b/test/tint/builtins/gen/var/fract/958a1d.wgsl.expected.glsl index 283602bbf9..99bf6a5883 100644 --- a/test/tint/builtins/gen/var/fract/958a1d.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/fract/958a1d.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void fract_958a1d() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = fract(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void fract_958a1d() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = fract(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void fract_958a1d() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = fract(arg_0); } diff --git a/test/tint/builtins/gen/var/fract/958a1d.wgsl.expected.msl b/test/tint/builtins/gen/var/fract/958a1d.wgsl.expected.msl index 745157e8d7..1d0856f4a1 100644 --- a/test/tint/builtins/gen/var/fract/958a1d.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/fract/958a1d.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void fract_958a1d() { - half3 arg_0 = half3(0.0h); + half3 arg_0 = half3(1.0h); half3 res = fract(arg_0); } diff --git a/test/tint/builtins/gen/var/fract/958a1d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/fract/958a1d.wgsl.expected.spvasm index 9393329722..b0a0294c8e 100644 --- a/test/tint/builtins/gen/var/fract/958a1d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/fract/958a1d.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %fract_958a1d = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3half Function %15 - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v3half %arg_0 - %18 = OpExtInst %v3half %19 Fract %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v3half Function %19 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v3half %arg_0 + %20 = OpExtInst %v3half %21 Fract %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %fract_958a1d +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %fract_958a1d OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %fract_958a1d + %33 = OpLabel + %34 = OpFunctionCall %void %fract_958a1d OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %fract_958a1d + %36 = OpLabel + %37 = OpFunctionCall %void %fract_958a1d OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/fract/958a1d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/fract/958a1d.wgsl.expected.wgsl index d35d4d5513..e573af5e0a 100644 --- a/test/tint/builtins/gen/var/fract/958a1d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/fract/958a1d.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn fract_958a1d() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.0h); var res : vec3 = fract(arg_0); } diff --git a/test/tint/builtins/gen/var/fract/eb38ce.wgsl b/test/tint/builtins/gen/var/fract/eb38ce.wgsl index 435df2c91b..27a5dbcef9 100644 --- a/test/tint/builtins/gen/var/fract/eb38ce.wgsl +++ b/test/tint/builtins/gen/var/fract/eb38ce.wgsl @@ -25,7 +25,7 @@ enable f16; // fn fract(f16) -> f16 fn fract_eb38ce() { - var arg_0 = f16(); + var arg_0 = 1.h; var res: f16 = fract(arg_0); } diff --git a/test/tint/builtins/gen/var/fract/eb38ce.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/fract/eb38ce.wgsl.expected.dxc.hlsl index 9aa5d74d2b..f815007869 100644 --- a/test/tint/builtins/gen/var/fract/eb38ce.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/fract/eb38ce.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void fract_eb38ce() { - float16_t arg_0 = float16_t(0.0h); + float16_t arg_0 = float16_t(1.0h); float16_t res = frac(arg_0); } diff --git a/test/tint/builtins/gen/var/fract/eb38ce.wgsl.expected.glsl b/test/tint/builtins/gen/var/fract/eb38ce.wgsl.expected.glsl index bb439189a8..c463851e52 100644 --- a/test/tint/builtins/gen/var/fract/eb38ce.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/fract/eb38ce.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void fract_eb38ce() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = fract(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void fract_eb38ce() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = fract(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void fract_eb38ce() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = fract(arg_0); } diff --git a/test/tint/builtins/gen/var/fract/eb38ce.wgsl.expected.msl b/test/tint/builtins/gen/var/fract/eb38ce.wgsl.expected.msl index 6ca36be1f4..69756a8c41 100644 --- a/test/tint/builtins/gen/var/fract/eb38ce.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/fract/eb38ce.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void fract_eb38ce() { - half arg_0 = 0.0h; + half arg_0 = 1.0h; half res = fract(arg_0); } diff --git a/test/tint/builtins/gen/var/fract/eb38ce.wgsl.expected.spvasm b/test/tint/builtins/gen/var/fract/eb38ce.wgsl.expected.spvasm index 1d320c349d..d6180923e0 100644 --- a/test/tint/builtins/gen/var/fract/eb38ce.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/fract/eb38ce.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %18 = OpExtInstImport "GLSL.std.450" + %19 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -37,39 +37,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %21 = OpTypeFunction %v4float + %17 = OpConstantNull %half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %fract_eb38ce = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_half Function %14 - %res = OpVariable %_ptr_Function_half Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %half %arg_0 - %17 = OpExtInst %half %18 Fract %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_half Function %17 + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %arg_0 %half_0x1p_0 + %20 = OpLoad %half %arg_0 + %18 = OpExtInst %half %19 Fract %20 + OpStore %res %18 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %fract_eb38ce +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %fract_eb38ce OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %fract_eb38ce + %31 = OpLabel + %32 = OpFunctionCall %void %fract_eb38ce OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %fract_eb38ce + %34 = OpLabel + %35 = OpFunctionCall %void %fract_eb38ce OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/fract/eb38ce.wgsl.expected.wgsl b/test/tint/builtins/gen/var/fract/eb38ce.wgsl.expected.wgsl index a590daeccd..51cf528fc8 100644 --- a/test/tint/builtins/gen/var/fract/eb38ce.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/fract/eb38ce.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn fract_eb38ce() { - var arg_0 = f16(); + var arg_0 = 1.0h; var res : f16 = fract(arg_0); } diff --git a/test/tint/builtins/gen/var/frexp/3dd21e.wgsl b/test/tint/builtins/gen/var/frexp/3dd21e.wgsl index 6b40118a1f..e04da8c107 100644 --- a/test/tint/builtins/gen/var/frexp/3dd21e.wgsl +++ b/test/tint/builtins/gen/var/frexp/3dd21e.wgsl @@ -25,7 +25,7 @@ enable f16; // fn frexp(vec<4, f16>) -> __frexp_result_vec<4, f16> fn frexp_3dd21e() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.h); var res = frexp(arg_0); } diff --git a/test/tint/builtins/gen/var/frexp/3dd21e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/frexp/3dd21e.wgsl.expected.dxc.hlsl index 557bac1ec8..56c6bb11e3 100644 --- a/test/tint/builtins/gen/var/frexp/3dd21e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/frexp/3dd21e.wgsl.expected.dxc.hlsl @@ -10,7 +10,7 @@ frexp_result_vec4_f16 tint_frexp(vector param_0) { } void frexp_3dd21e() { - vector arg_0 = (float16_t(0.0h)).xxxx; + vector arg_0 = (float16_t(1.0h)).xxxx; frexp_result_vec4_f16 res = tint_frexp(arg_0); } diff --git a/test/tint/builtins/gen/var/frexp/3dd21e.wgsl.expected.glsl b/test/tint/builtins/gen/var/frexp/3dd21e.wgsl.expected.glsl index a1dc1665bf..a29b54bd8e 100644 --- a/test/tint/builtins/gen/var/frexp/3dd21e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/frexp/3dd21e.wgsl.expected.glsl @@ -14,7 +14,7 @@ frexp_result_vec4_f16 tint_frexp(f16vec4 param_0) { void frexp_3dd21e() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); frexp_result_vec4_f16 res = tint_frexp(arg_0); } @@ -48,7 +48,7 @@ frexp_result_vec4_f16 tint_frexp(f16vec4 param_0) { void frexp_3dd21e() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); frexp_result_vec4_f16 res = tint_frexp(arg_0); } @@ -76,7 +76,7 @@ frexp_result_vec4_f16 tint_frexp(f16vec4 param_0) { void frexp_3dd21e() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); frexp_result_vec4_f16 res = tint_frexp(arg_0); } diff --git a/test/tint/builtins/gen/var/frexp/3dd21e.wgsl.expected.msl b/test/tint/builtins/gen/var/frexp/3dd21e.wgsl.expected.msl index 7ca5bd7611..37ac339299 100644 --- a/test/tint/builtins/gen/var/frexp/3dd21e.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/frexp/3dd21e.wgsl.expected.msl @@ -13,7 +13,7 @@ frexp_result_vec4_f16 tint_frexp(half4 param_0) { } void frexp_3dd21e() { - half4 arg_0 = half4(0.0h); + half4 arg_0 = half4(1.0h); frexp_result_vec4_f16 res = tint_frexp(arg_0); } diff --git a/test/tint/builtins/gen/var/frexp/3dd21e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/frexp/3dd21e.wgsl.expected.spvasm index 70eddba230..2a5ac341a2 100644 --- a/test/tint/builtins/gen/var/frexp/3dd21e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/frexp/3dd21e.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 43 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %22 = OpExtInstImport "GLSL.std.450" + %24 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -43,44 +43,46 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half + %19 = OpConstantNull %v4half %int = OpTypeInt 32 1 %v4int = OpTypeVector %int 4 %__frexp_result_vec4_f16 = OpTypeStruct %v4half %v4int %_ptr_Function___frexp_result_vec4_f16 = OpTypePointer Function %__frexp_result_vec4_f16 - %26 = OpConstantNull %__frexp_result_vec4_f16 - %27 = OpTypeFunction %v4float + %28 = OpConstantNull %__frexp_result_vec4_f16 + %29 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %frexp_3dd21e = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4half Function %15 - %res = OpVariable %_ptr_Function___frexp_result_vec4_f16 Function %26 - OpStore %arg_0 %15 - %23 = OpLoad %v4half %arg_0 - %18 = OpExtInst %__frexp_result_vec4_f16 %22 FrexpStruct %23 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v4half Function %19 + %res = OpVariable %_ptr_Function___frexp_result_vec4_f16 Function %28 + OpStore %arg_0 %16 + %25 = OpLoad %v4half %arg_0 + %20 = OpExtInst %__frexp_result_vec4_f16 %24 FrexpStruct %25 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %frexp_3dd21e +%vertex_main_inner = OpFunction %v4float None %29 + %31 = OpLabel + %32 = OpFunctionCall %void %frexp_3dd21e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %34 = OpLabel + %35 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %35 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %frexp_3dd21e + %38 = OpLabel + %39 = OpFunctionCall %void %frexp_3dd21e OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %39 = OpLabel - %40 = OpFunctionCall %void %frexp_3dd21e + %41 = OpLabel + %42 = OpFunctionCall %void %frexp_3dd21e OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/frexp/3dd21e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/frexp/3dd21e.wgsl.expected.wgsl index 557f702e52..0e0a4aecc4 100644 --- a/test/tint/builtins/gen/var/frexp/3dd21e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/frexp/3dd21e.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn frexp_3dd21e() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.0h); var res = frexp(arg_0); } diff --git a/test/tint/builtins/gen/var/frexp/5257dd.wgsl b/test/tint/builtins/gen/var/frexp/5257dd.wgsl index 9451324f73..f917f1fa30 100644 --- a/test/tint/builtins/gen/var/frexp/5257dd.wgsl +++ b/test/tint/builtins/gen/var/frexp/5257dd.wgsl @@ -25,7 +25,7 @@ enable f16; // fn frexp(f16) -> __frexp_result fn frexp_5257dd() { - var arg_0 = f16(); + var arg_0 = 1.h; var res = frexp(arg_0); } diff --git a/test/tint/builtins/gen/var/frexp/5257dd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/frexp/5257dd.wgsl.expected.dxc.hlsl index b52f6d8b82..0cf72fbc7f 100644 --- a/test/tint/builtins/gen/var/frexp/5257dd.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/frexp/5257dd.wgsl.expected.dxc.hlsl @@ -10,7 +10,7 @@ frexp_result_f16 tint_frexp(float16_t param_0) { } void frexp_5257dd() { - float16_t arg_0 = float16_t(0.0h); + float16_t arg_0 = float16_t(1.0h); frexp_result_f16 res = tint_frexp(arg_0); } diff --git a/test/tint/builtins/gen/var/frexp/5257dd.wgsl.expected.glsl b/test/tint/builtins/gen/var/frexp/5257dd.wgsl.expected.glsl index 0d7e39fc58..21efd92322 100644 --- a/test/tint/builtins/gen/var/frexp/5257dd.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/frexp/5257dd.wgsl.expected.glsl @@ -14,7 +14,7 @@ frexp_result_f16 tint_frexp(float16_t param_0) { void frexp_5257dd() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; frexp_result_f16 res = tint_frexp(arg_0); } @@ -48,7 +48,7 @@ frexp_result_f16 tint_frexp(float16_t param_0) { void frexp_5257dd() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; frexp_result_f16 res = tint_frexp(arg_0); } @@ -76,7 +76,7 @@ frexp_result_f16 tint_frexp(float16_t param_0) { void frexp_5257dd() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; frexp_result_f16 res = tint_frexp(arg_0); } diff --git a/test/tint/builtins/gen/var/frexp/5257dd.wgsl.expected.msl b/test/tint/builtins/gen/var/frexp/5257dd.wgsl.expected.msl index 9d0edc3971..d945eb6683 100644 --- a/test/tint/builtins/gen/var/frexp/5257dd.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/frexp/5257dd.wgsl.expected.msl @@ -13,7 +13,7 @@ frexp_result_f16 tint_frexp(half param_0) { } void frexp_5257dd() { - half arg_0 = 0.0h; + half arg_0 = 1.0h; frexp_result_f16 res = tint_frexp(arg_0); } diff --git a/test/tint/builtins/gen/var/frexp/5257dd.wgsl.expected.spvasm b/test/tint/builtins/gen/var/frexp/5257dd.wgsl.expected.spvasm index b0008a83b7..4c281461d4 100644 --- a/test/tint/builtins/gen/var/frexp/5257dd.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/frexp/5257dd.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 40 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %20 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -42,43 +42,44 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half + %17 = OpConstantNull %half %int = OpTypeInt 32 1 %__frexp_result_f16 = OpTypeStruct %half %int %_ptr_Function___frexp_result_f16 = OpTypePointer Function %__frexp_result_f16 - %24 = OpConstantNull %__frexp_result_f16 - %25 = OpTypeFunction %v4float + %25 = OpConstantNull %__frexp_result_f16 + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %frexp_5257dd = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_half Function %14 - %res = OpVariable %_ptr_Function___frexp_result_f16 Function %24 - OpStore %arg_0 %14 - %21 = OpLoad %half %arg_0 - %17 = OpExtInst %__frexp_result_f16 %20 FrexpStruct %21 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_half Function %17 + %res = OpVariable %_ptr_Function___frexp_result_f16 Function %25 + OpStore %arg_0 %half_0x1p_0 + %22 = OpLoad %half %arg_0 + %18 = OpExtInst %__frexp_result_f16 %21 FrexpStruct %22 + OpStore %res %18 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %frexp_5257dd +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %frexp_5257dd OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %frexp_5257dd + %35 = OpLabel + %36 = OpFunctionCall %void %frexp_5257dd OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %37 = OpLabel - %38 = OpFunctionCall %void %frexp_5257dd + %38 = OpLabel + %39 = OpFunctionCall %void %frexp_5257dd OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/frexp/5257dd.wgsl.expected.wgsl b/test/tint/builtins/gen/var/frexp/5257dd.wgsl.expected.wgsl index 664e19ab35..171fbc68ca 100644 --- a/test/tint/builtins/gen/var/frexp/5257dd.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/frexp/5257dd.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn frexp_5257dd() { - var arg_0 = f16(); + var arg_0 = 1.0h; var res = frexp(arg_0); } diff --git a/test/tint/builtins/gen/var/frexp/5f47bf.wgsl b/test/tint/builtins/gen/var/frexp/5f47bf.wgsl index 8d43e800bd..b2b653470d 100644 --- a/test/tint/builtins/gen/var/frexp/5f47bf.wgsl +++ b/test/tint/builtins/gen/var/frexp/5f47bf.wgsl @@ -25,7 +25,7 @@ enable f16; // fn frexp(vec<2, f16>) -> __frexp_result_vec<2, f16> fn frexp_5f47bf() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.h); var res = frexp(arg_0); } diff --git a/test/tint/builtins/gen/var/frexp/5f47bf.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/frexp/5f47bf.wgsl.expected.dxc.hlsl index 478ced8cc2..f20f1c2194 100644 --- a/test/tint/builtins/gen/var/frexp/5f47bf.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/frexp/5f47bf.wgsl.expected.dxc.hlsl @@ -10,7 +10,7 @@ frexp_result_vec2_f16 tint_frexp(vector param_0) { } void frexp_5f47bf() { - vector arg_0 = (float16_t(0.0h)).xx; + vector arg_0 = (float16_t(1.0h)).xx; frexp_result_vec2_f16 res = tint_frexp(arg_0); } diff --git a/test/tint/builtins/gen/var/frexp/5f47bf.wgsl.expected.glsl b/test/tint/builtins/gen/var/frexp/5f47bf.wgsl.expected.glsl index 2864a81f1d..9a2f9f62a1 100644 --- a/test/tint/builtins/gen/var/frexp/5f47bf.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/frexp/5f47bf.wgsl.expected.glsl @@ -14,7 +14,7 @@ frexp_result_vec2_f16 tint_frexp(f16vec2 param_0) { void frexp_5f47bf() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); frexp_result_vec2_f16 res = tint_frexp(arg_0); } @@ -48,7 +48,7 @@ frexp_result_vec2_f16 tint_frexp(f16vec2 param_0) { void frexp_5f47bf() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); frexp_result_vec2_f16 res = tint_frexp(arg_0); } @@ -76,7 +76,7 @@ frexp_result_vec2_f16 tint_frexp(f16vec2 param_0) { void frexp_5f47bf() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); frexp_result_vec2_f16 res = tint_frexp(arg_0); } diff --git a/test/tint/builtins/gen/var/frexp/5f47bf.wgsl.expected.msl b/test/tint/builtins/gen/var/frexp/5f47bf.wgsl.expected.msl index dfdef716a0..69016e4159 100644 --- a/test/tint/builtins/gen/var/frexp/5f47bf.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/frexp/5f47bf.wgsl.expected.msl @@ -13,7 +13,7 @@ frexp_result_vec2_f16 tint_frexp(half2 param_0) { } void frexp_5f47bf() { - half2 arg_0 = half2(0.0h); + half2 arg_0 = half2(1.0h); frexp_result_vec2_f16 res = tint_frexp(arg_0); } diff --git a/test/tint/builtins/gen/var/frexp/5f47bf.wgsl.expected.spvasm b/test/tint/builtins/gen/var/frexp/5f47bf.wgsl.expected.spvasm index c9c41906a9..5a903d444b 100644 --- a/test/tint/builtins/gen/var/frexp/5f47bf.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/frexp/5f47bf.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 43 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %22 = OpExtInstImport "GLSL.std.450" + %24 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -43,44 +43,46 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half + %19 = OpConstantNull %v2half %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 %__frexp_result_vec2_f16 = OpTypeStruct %v2half %v2int %_ptr_Function___frexp_result_vec2_f16 = OpTypePointer Function %__frexp_result_vec2_f16 - %26 = OpConstantNull %__frexp_result_vec2_f16 - %27 = OpTypeFunction %v4float + %28 = OpConstantNull %__frexp_result_vec2_f16 + %29 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %frexp_5f47bf = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2half Function %15 - %res = OpVariable %_ptr_Function___frexp_result_vec2_f16 Function %26 - OpStore %arg_0 %15 - %23 = OpLoad %v2half %arg_0 - %18 = OpExtInst %__frexp_result_vec2_f16 %22 FrexpStruct %23 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v2half Function %19 + %res = OpVariable %_ptr_Function___frexp_result_vec2_f16 Function %28 + OpStore %arg_0 %16 + %25 = OpLoad %v2half %arg_0 + %20 = OpExtInst %__frexp_result_vec2_f16 %24 FrexpStruct %25 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %frexp_5f47bf +%vertex_main_inner = OpFunction %v4float None %29 + %31 = OpLabel + %32 = OpFunctionCall %void %frexp_5f47bf OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %34 = OpLabel + %35 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %35 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %frexp_5f47bf + %38 = OpLabel + %39 = OpFunctionCall %void %frexp_5f47bf OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %39 = OpLabel - %40 = OpFunctionCall %void %frexp_5f47bf + %41 = OpLabel + %42 = OpFunctionCall %void %frexp_5f47bf OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/frexp/5f47bf.wgsl.expected.wgsl b/test/tint/builtins/gen/var/frexp/5f47bf.wgsl.expected.wgsl index 63fce21c8c..2729282bcf 100644 --- a/test/tint/builtins/gen/var/frexp/5f47bf.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/frexp/5f47bf.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn frexp_5f47bf() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.0h); var res = frexp(arg_0); } diff --git a/test/tint/builtins/gen/var/frexp/ae4a66.wgsl b/test/tint/builtins/gen/var/frexp/ae4a66.wgsl index e5aad680cc..f31850af0c 100644 --- a/test/tint/builtins/gen/var/frexp/ae4a66.wgsl +++ b/test/tint/builtins/gen/var/frexp/ae4a66.wgsl @@ -25,7 +25,7 @@ enable f16; // fn frexp(vec<3, f16>) -> __frexp_result_vec<3, f16> fn frexp_ae4a66() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.h); var res = frexp(arg_0); } diff --git a/test/tint/builtins/gen/var/frexp/ae4a66.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/frexp/ae4a66.wgsl.expected.dxc.hlsl index 633a556ae8..d6d7ef51ce 100644 --- a/test/tint/builtins/gen/var/frexp/ae4a66.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/frexp/ae4a66.wgsl.expected.dxc.hlsl @@ -10,7 +10,7 @@ frexp_result_vec3_f16 tint_frexp(vector param_0) { } void frexp_ae4a66() { - vector arg_0 = (float16_t(0.0h)).xxx; + vector arg_0 = (float16_t(1.0h)).xxx; frexp_result_vec3_f16 res = tint_frexp(arg_0); } diff --git a/test/tint/builtins/gen/var/frexp/ae4a66.wgsl.expected.glsl b/test/tint/builtins/gen/var/frexp/ae4a66.wgsl.expected.glsl index 36a46283c2..8cdfc7cb0a 100644 --- a/test/tint/builtins/gen/var/frexp/ae4a66.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/frexp/ae4a66.wgsl.expected.glsl @@ -14,7 +14,7 @@ frexp_result_vec3_f16 tint_frexp(f16vec3 param_0) { void frexp_ae4a66() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); frexp_result_vec3_f16 res = tint_frexp(arg_0); } @@ -48,7 +48,7 @@ frexp_result_vec3_f16 tint_frexp(f16vec3 param_0) { void frexp_ae4a66() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); frexp_result_vec3_f16 res = tint_frexp(arg_0); } @@ -76,7 +76,7 @@ frexp_result_vec3_f16 tint_frexp(f16vec3 param_0) { void frexp_ae4a66() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); frexp_result_vec3_f16 res = tint_frexp(arg_0); } diff --git a/test/tint/builtins/gen/var/frexp/ae4a66.wgsl.expected.msl b/test/tint/builtins/gen/var/frexp/ae4a66.wgsl.expected.msl index 670a53486e..80493420ef 100644 --- a/test/tint/builtins/gen/var/frexp/ae4a66.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/frexp/ae4a66.wgsl.expected.msl @@ -13,7 +13,7 @@ frexp_result_vec3_f16 tint_frexp(half3 param_0) { } void frexp_ae4a66() { - half3 arg_0 = half3(0.0h); + half3 arg_0 = half3(1.0h); frexp_result_vec3_f16 res = tint_frexp(arg_0); } diff --git a/test/tint/builtins/gen/var/frexp/ae4a66.wgsl.expected.spvasm b/test/tint/builtins/gen/var/frexp/ae4a66.wgsl.expected.spvasm index e71e3524d4..e52e6704b1 100644 --- a/test/tint/builtins/gen/var/frexp/ae4a66.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/frexp/ae4a66.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 43 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %22 = OpExtInstImport "GLSL.std.450" + %24 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -43,44 +43,46 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half + %19 = OpConstantNull %v3half %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 %__frexp_result_vec3_f16 = OpTypeStruct %v3half %v3int %_ptr_Function___frexp_result_vec3_f16 = OpTypePointer Function %__frexp_result_vec3_f16 - %26 = OpConstantNull %__frexp_result_vec3_f16 - %27 = OpTypeFunction %v4float + %28 = OpConstantNull %__frexp_result_vec3_f16 + %29 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %frexp_ae4a66 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3half Function %15 - %res = OpVariable %_ptr_Function___frexp_result_vec3_f16 Function %26 - OpStore %arg_0 %15 - %23 = OpLoad %v3half %arg_0 - %18 = OpExtInst %__frexp_result_vec3_f16 %22 FrexpStruct %23 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v3half Function %19 + %res = OpVariable %_ptr_Function___frexp_result_vec3_f16 Function %28 + OpStore %arg_0 %16 + %25 = OpLoad %v3half %arg_0 + %20 = OpExtInst %__frexp_result_vec3_f16 %24 FrexpStruct %25 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %frexp_ae4a66 +%vertex_main_inner = OpFunction %v4float None %29 + %31 = OpLabel + %32 = OpFunctionCall %void %frexp_ae4a66 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %34 = OpLabel + %35 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %35 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %frexp_ae4a66 + %38 = OpLabel + %39 = OpFunctionCall %void %frexp_ae4a66 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %39 = OpLabel - %40 = OpFunctionCall %void %frexp_ae4a66 + %41 = OpLabel + %42 = OpFunctionCall %void %frexp_ae4a66 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/frexp/ae4a66.wgsl.expected.wgsl b/test/tint/builtins/gen/var/frexp/ae4a66.wgsl.expected.wgsl index cdbd561c76..d4c3cb54ea 100644 --- a/test/tint/builtins/gen/var/frexp/ae4a66.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/frexp/ae4a66.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn frexp_ae4a66() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.0h); var res = frexp(arg_0); } diff --git a/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl b/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl index 246419557f..7263f4e9eb 100644 --- a/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl +++ b/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl @@ -25,7 +25,7 @@ enable f16; // fn inverseSqrt(f16) -> f16 fn inverseSqrt_440300() { - var arg_0 = f16(); + var arg_0 = 1.h; var res: f16 = inverseSqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl.expected.dxc.hlsl index fe2cbec09a..806ebb435f 100644 --- a/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void inverseSqrt_440300() { - float16_t arg_0 = float16_t(0.0h); + float16_t arg_0 = float16_t(1.0h); float16_t res = rsqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl.expected.glsl b/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl.expected.glsl index d673b30861..432932b10e 100644 --- a/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void inverseSqrt_440300() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = inversesqrt(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void inverseSqrt_440300() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = inversesqrt(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void inverseSqrt_440300() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = inversesqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl.expected.msl b/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl.expected.msl index f8cd8539be..a0a16e0fbb 100644 --- a/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void inverseSqrt_440300() { - half arg_0 = 0.0h; + half arg_0 = 1.0h; half res = rsqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl.expected.spvasm b/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl.expected.spvasm index d53e1d78b1..15e331c1e3 100644 --- a/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %18 = OpExtInstImport "GLSL.std.450" + %19 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -37,39 +37,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %21 = OpTypeFunction %v4float + %17 = OpConstantNull %half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %inverseSqrt_440300 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_half Function %14 - %res = OpVariable %_ptr_Function_half Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %half %arg_0 - %17 = OpExtInst %half %18 InverseSqrt %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_half Function %17 + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %arg_0 %half_0x1p_0 + %20 = OpLoad %half %arg_0 + %18 = OpExtInst %half %19 InverseSqrt %20 + OpStore %res %18 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %inverseSqrt_440300 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %inverseSqrt_440300 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %inverseSqrt_440300 + %31 = OpLabel + %32 = OpFunctionCall %void %inverseSqrt_440300 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %inverseSqrt_440300 + %34 = OpLabel + %35 = OpFunctionCall %void %inverseSqrt_440300 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl.expected.wgsl b/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl.expected.wgsl index f0c832a9b5..76191286c5 100644 --- a/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn inverseSqrt_440300() { - var arg_0 = f16(); + var arg_0 = 1.0h; var res : f16 = inverseSqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl b/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl index e7e70aa188..e098e5a7d8 100644 --- a/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl +++ b/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl @@ -25,7 +25,7 @@ enable f16; // fn inverseSqrt(vec<2, f16>) -> vec<2, f16> fn inverseSqrt_5f51f8() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.h); var res: vec2 = inverseSqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl.expected.dxc.hlsl index 5ed334a92c..d8dc6a89fe 100644 --- a/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void inverseSqrt_5f51f8() { - vector arg_0 = (float16_t(0.0h)).xx; + vector arg_0 = (float16_t(1.0h)).xx; vector res = rsqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl.expected.glsl b/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl.expected.glsl index 4117f6a4ba..727f37d6e4 100644 --- a/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void inverseSqrt_5f51f8() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = inversesqrt(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void inverseSqrt_5f51f8() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = inversesqrt(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void inverseSqrt_5f51f8() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = inversesqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl.expected.msl b/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl.expected.msl index 58cd62850e..7b5a0fbf57 100644 --- a/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void inverseSqrt_5f51f8() { - half2 arg_0 = half2(0.0h); + half2 arg_0 = half2(1.0h); half2 res = rsqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl.expected.spvasm index 3d428891b2..363b7d5db2 100644 --- a/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v2half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %inverseSqrt_5f51f8 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2half Function %15 - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v2half %arg_0 - %18 = OpExtInst %v2half %19 InverseSqrt %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v2half Function %19 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v2half %arg_0 + %20 = OpExtInst %v2half %21 InverseSqrt %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %inverseSqrt_5f51f8 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %inverseSqrt_5f51f8 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %inverseSqrt_5f51f8 + %33 = OpLabel + %34 = OpFunctionCall %void %inverseSqrt_5f51f8 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %inverseSqrt_5f51f8 + %36 = OpLabel + %37 = OpFunctionCall %void %inverseSqrt_5f51f8 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl.expected.wgsl index edabbfce51..a2c5b72c48 100644 --- a/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn inverseSqrt_5f51f8() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.0h); var res : vec2 = inverseSqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl b/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl index 4a9369f80c..36a3110bc8 100644 --- a/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl +++ b/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl @@ -25,7 +25,7 @@ enable f16; // fn inverseSqrt(vec<3, f16>) -> vec<3, f16> fn inverseSqrt_b85ebd() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.h); var res: vec3 = inverseSqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl.expected.dxc.hlsl index fdeb4e86d9..1b3025f33c 100644 --- a/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void inverseSqrt_b85ebd() { - vector arg_0 = (float16_t(0.0h)).xxx; + vector arg_0 = (float16_t(1.0h)).xxx; vector res = rsqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl.expected.glsl b/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl.expected.glsl index bf3927205f..89c20fffd0 100644 --- a/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void inverseSqrt_b85ebd() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = inversesqrt(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void inverseSqrt_b85ebd() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = inversesqrt(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void inverseSqrt_b85ebd() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = inversesqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl.expected.msl b/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl.expected.msl index a7f7be195c..533aa98a9a 100644 --- a/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void inverseSqrt_b85ebd() { - half3 arg_0 = half3(0.0h); + half3 arg_0 = half3(1.0h); half3 res = rsqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl.expected.spvasm b/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl.expected.spvasm index a43efc81ab..f5e33118ee 100644 --- a/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %inverseSqrt_b85ebd = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3half Function %15 - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v3half %arg_0 - %18 = OpExtInst %v3half %19 InverseSqrt %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v3half Function %19 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v3half %arg_0 + %20 = OpExtInst %v3half %21 InverseSqrt %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %inverseSqrt_b85ebd +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %inverseSqrt_b85ebd OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %inverseSqrt_b85ebd + %33 = OpLabel + %34 = OpFunctionCall %void %inverseSqrt_b85ebd OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %inverseSqrt_b85ebd + %36 = OpLabel + %37 = OpFunctionCall %void %inverseSqrt_b85ebd OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl.expected.wgsl b/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl.expected.wgsl index b53c8ee421..c338e18c0c 100644 --- a/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn inverseSqrt_b85ebd() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.0h); var res : vec3 = inverseSqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl b/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl index fdb5f64849..f22ebe8e87 100644 --- a/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl +++ b/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl @@ -25,7 +25,7 @@ enable f16; // fn inverseSqrt(vec<4, f16>) -> vec<4, f16> fn inverseSqrt_cbdc70() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.h); var res: vec4 = inverseSqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl.expected.dxc.hlsl index ae31e2e3bf..1cb9c9fbd2 100644 --- a/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void inverseSqrt_cbdc70() { - vector arg_0 = (float16_t(0.0h)).xxxx; + vector arg_0 = (float16_t(1.0h)).xxxx; vector res = rsqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl.expected.glsl b/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl.expected.glsl index 5d41267e07..e78264c585 100644 --- a/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void inverseSqrt_cbdc70() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = inversesqrt(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void inverseSqrt_cbdc70() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = inversesqrt(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void inverseSqrt_cbdc70() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = inversesqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl.expected.msl b/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl.expected.msl index 0dc51ef684..4563666fe9 100644 --- a/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void inverseSqrt_cbdc70() { - half4 arg_0 = half4(0.0h); + half4 arg_0 = half4(1.0h); half4 res = rsqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl.expected.spvasm b/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl.expected.spvasm index e476973fac..a3948a0b54 100644 --- a/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v4half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %inverseSqrt_cbdc70 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4half Function %15 - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v4half %arg_0 - %18 = OpExtInst %v4half %19 InverseSqrt %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v4half Function %19 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v4half %arg_0 + %20 = OpExtInst %v4half %21 InverseSqrt %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %inverseSqrt_cbdc70 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %inverseSqrt_cbdc70 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %inverseSqrt_cbdc70 + %33 = OpLabel + %34 = OpFunctionCall %void %inverseSqrt_cbdc70 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %inverseSqrt_cbdc70 + %36 = OpLabel + %37 = OpFunctionCall %void %inverseSqrt_cbdc70 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl.expected.wgsl b/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl.expected.wgsl index f4e10cf477..66a78b7d9d 100644 --- a/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn inverseSqrt_cbdc70() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.0h); var res : vec4 = inverseSqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl b/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl index 86b59d2823..080f54e927 100644 --- a/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl +++ b/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl @@ -25,7 +25,7 @@ enable f16; // fn ldexp(vec<2, f16>, vec<2, i32>) -> vec<2, f16> fn ldexp_3d90b4() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.h); var arg_1 = vec2(1i); var res: vec2 = ldexp(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl.expected.dxc.hlsl index 876fcb1a34..5cd3e0d2ce 100644 --- a/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void ldexp_3d90b4() { - vector arg_0 = (float16_t(0.0h)).xx; + vector arg_0 = (float16_t(1.0h)).xx; int2 arg_1 = (1).xx; vector res = ldexp(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl.expected.glsl b/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl.expected.glsl index 13d5b8901e..a9ee48b0b0 100644 --- a/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void ldexp_3d90b4() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); ivec2 arg_1 = ivec2(1); f16vec2 res = ldexp(arg_0, arg_1); } @@ -25,7 +25,7 @@ void main() { precision mediump float; void ldexp_3d90b4() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); ivec2 arg_1 = ivec2(1); f16vec2 res = ldexp(arg_0, arg_1); } @@ -42,7 +42,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void ldexp_3d90b4() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); ivec2 arg_1 = ivec2(1); f16vec2 res = ldexp(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl.expected.msl b/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl.expected.msl index 317c875f17..460fbd8fc8 100644 --- a/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void ldexp_3d90b4() { - half2 arg_0 = half2(0.0h); + half2 arg_0 = half2(1.0h); int2 arg_1 = int2(1); half2 res = ldexp(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl.expected.spvasm index 61326bd8b9..bddcfa64e8 100644 --- a/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 44 +; Bound: 46 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %26 = OpExtInstImport "GLSL.std.450" + %28 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -39,48 +39,50 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half + %19 = OpConstantNull %v2half %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 %int_1 = OpConstant %int 1 - %21 = OpConstantComposite %v2int %int_1 %int_1 + %23 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int - %24 = OpConstantNull %v2int - %30 = OpTypeFunction %v4float + %26 = OpConstantNull %v2int + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %ldexp_3d90b4 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2half Function %15 - %arg_1 = OpVariable %_ptr_Function_v2int Function %24 - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %21 - %27 = OpLoad %v2half %arg_0 - %28 = OpLoad %v2int %arg_1 - %25 = OpExtInst %v2half %26 Ldexp %27 %28 - OpStore %res %25 + %arg_0 = OpVariable %_ptr_Function_v2half Function %19 + %arg_1 = OpVariable %_ptr_Function_v2int Function %26 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %23 + %29 = OpLoad %v2half %arg_0 + %30 = OpLoad %v2int %arg_1 + %27 = OpExtInst %v2half %28 Ldexp %29 %30 + OpStore %res %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %ldexp_3d90b4 +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %ldexp_3d90b4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %36 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %39 = OpLabel - %40 = OpFunctionCall %void %ldexp_3d90b4 + %41 = OpLabel + %42 = OpFunctionCall %void %ldexp_3d90b4 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %42 = OpLabel - %43 = OpFunctionCall %void %ldexp_3d90b4 + %44 = OpLabel + %45 = OpFunctionCall %void %ldexp_3d90b4 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl.expected.wgsl index 5d9c5f864e..6c02f1720a 100644 --- a/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn ldexp_3d90b4() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.0h); var arg_1 = vec2(1i); var res : vec2 = ldexp(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/ldexp/624e0c.wgsl b/test/tint/builtins/gen/var/ldexp/624e0c.wgsl index 6e4c0bff32..e1fb3be5e7 100644 --- a/test/tint/builtins/gen/var/ldexp/624e0c.wgsl +++ b/test/tint/builtins/gen/var/ldexp/624e0c.wgsl @@ -25,7 +25,7 @@ enable f16; // fn ldexp(f16, i32) -> f16 fn ldexp_624e0c() { - var arg_0 = f16(); + var arg_0 = 1.h; var arg_1 = 1i; var res: f16 = ldexp(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/ldexp/624e0c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/ldexp/624e0c.wgsl.expected.dxc.hlsl index 6c7e796f95..c5fc864a38 100644 --- a/test/tint/builtins/gen/var/ldexp/624e0c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/ldexp/624e0c.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void ldexp_624e0c() { - float16_t arg_0 = float16_t(0.0h); + float16_t arg_0 = float16_t(1.0h); int arg_1 = 1; float16_t res = ldexp(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/ldexp/624e0c.wgsl.expected.glsl b/test/tint/builtins/gen/var/ldexp/624e0c.wgsl.expected.glsl index f978069f59..6ab61d2c2a 100644 --- a/test/tint/builtins/gen/var/ldexp/624e0c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/ldexp/624e0c.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void ldexp_624e0c() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; int arg_1 = 1; float16_t res = ldexp(arg_0, arg_1); } @@ -25,7 +25,7 @@ void main() { precision mediump float; void ldexp_624e0c() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; int arg_1 = 1; float16_t res = ldexp(arg_0, arg_1); } @@ -42,7 +42,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void ldexp_624e0c() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; int arg_1 = 1; float16_t res = ldexp(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/ldexp/624e0c.wgsl.expected.msl b/test/tint/builtins/gen/var/ldexp/624e0c.wgsl.expected.msl index f0bc88f5de..2fd7f64fa4 100644 --- a/test/tint/builtins/gen/var/ldexp/624e0c.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/ldexp/624e0c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void ldexp_624e0c() { - half arg_0 = 0.0h; + half arg_0 = 1.0h; int arg_1 = 1; half res = ldexp(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/ldexp/624e0c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/ldexp/624e0c.wgsl.expected.spvasm index 7fead306b3..d63c6af2e7 100644 --- a/test/tint/builtins/gen/var/ldexp/624e0c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/ldexp/624e0c.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 42 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %23 = OpExtInstImport "GLSL.std.450" + %24 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,46 +38,47 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half + %17 = OpConstantNull %half %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %21 = OpConstantNull %int - %27 = OpTypeFunction %v4float + %22 = OpConstantNull %int + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %ldexp_624e0c = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_half Function %14 - %arg_1 = OpVariable %_ptr_Function_int Function %21 - %res = OpVariable %_ptr_Function_half Function %14 - OpStore %arg_0 %14 + %arg_0 = OpVariable %_ptr_Function_half Function %17 + %arg_1 = OpVariable %_ptr_Function_int Function %22 + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %arg_0 %half_0x1p_0 OpStore %arg_1 %int_1 - %24 = OpLoad %half %arg_0 - %25 = OpLoad %int %arg_1 - %22 = OpExtInst %half %23 Ldexp %24 %25 - OpStore %res %22 + %25 = OpLoad %half %arg_0 + %26 = OpLoad %int %arg_1 + %23 = OpExtInst %half %24 Ldexp %25 %26 + OpStore %res %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %ldexp_624e0c +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %ldexp_624e0c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %ldexp_624e0c + %37 = OpLabel + %38 = OpFunctionCall %void %ldexp_624e0c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %39 = OpLabel - %40 = OpFunctionCall %void %ldexp_624e0c + %40 = OpLabel + %41 = OpFunctionCall %void %ldexp_624e0c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/ldexp/624e0c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/ldexp/624e0c.wgsl.expected.wgsl index 65e6d4f954..d9430d88bb 100644 --- a/test/tint/builtins/gen/var/ldexp/624e0c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/ldexp/624e0c.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn ldexp_624e0c() { - var arg_0 = f16(); + var arg_0 = 1.0h; var arg_1 = 1i; var res : f16 = ldexp(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/ldexp/7485ce.wgsl b/test/tint/builtins/gen/var/ldexp/7485ce.wgsl index 8e7be9782c..977dba8d19 100644 --- a/test/tint/builtins/gen/var/ldexp/7485ce.wgsl +++ b/test/tint/builtins/gen/var/ldexp/7485ce.wgsl @@ -25,7 +25,7 @@ enable f16; // fn ldexp(vec<3, f16>, vec<3, i32>) -> vec<3, f16> fn ldexp_7485ce() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.h); var arg_1 = vec3(1i); var res: vec3 = ldexp(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/ldexp/7485ce.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/ldexp/7485ce.wgsl.expected.dxc.hlsl index ca8bf2bcac..86c72078fb 100644 --- a/test/tint/builtins/gen/var/ldexp/7485ce.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/ldexp/7485ce.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void ldexp_7485ce() { - vector arg_0 = (float16_t(0.0h)).xxx; + vector arg_0 = (float16_t(1.0h)).xxx; int3 arg_1 = (1).xxx; vector res = ldexp(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/ldexp/7485ce.wgsl.expected.glsl b/test/tint/builtins/gen/var/ldexp/7485ce.wgsl.expected.glsl index 39204f5ac8..e28e17c4c3 100644 --- a/test/tint/builtins/gen/var/ldexp/7485ce.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/ldexp/7485ce.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void ldexp_7485ce() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); ivec3 arg_1 = ivec3(1); f16vec3 res = ldexp(arg_0, arg_1); } @@ -25,7 +25,7 @@ void main() { precision mediump float; void ldexp_7485ce() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); ivec3 arg_1 = ivec3(1); f16vec3 res = ldexp(arg_0, arg_1); } @@ -42,7 +42,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void ldexp_7485ce() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); ivec3 arg_1 = ivec3(1); f16vec3 res = ldexp(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/ldexp/7485ce.wgsl.expected.msl b/test/tint/builtins/gen/var/ldexp/7485ce.wgsl.expected.msl index 3475cb2467..8802d29179 100644 --- a/test/tint/builtins/gen/var/ldexp/7485ce.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/ldexp/7485ce.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void ldexp_7485ce() { - half3 arg_0 = half3(0.0h); + half3 arg_0 = half3(1.0h); int3 arg_1 = int3(1); half3 res = ldexp(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/ldexp/7485ce.wgsl.expected.spvasm b/test/tint/builtins/gen/var/ldexp/7485ce.wgsl.expected.spvasm index 046509c282..7dc0f6692e 100644 --- a/test/tint/builtins/gen/var/ldexp/7485ce.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/ldexp/7485ce.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 44 +; Bound: 46 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %26 = OpExtInstImport "GLSL.std.450" + %28 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -39,48 +39,50 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half + %19 = OpConstantNull %v3half %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 %int_1 = OpConstant %int 1 - %21 = OpConstantComposite %v3int %int_1 %int_1 %int_1 + %23 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v3int = OpTypePointer Function %v3int - %24 = OpConstantNull %v3int - %30 = OpTypeFunction %v4float + %26 = OpConstantNull %v3int + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %ldexp_7485ce = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3half Function %15 - %arg_1 = OpVariable %_ptr_Function_v3int Function %24 - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %21 - %27 = OpLoad %v3half %arg_0 - %28 = OpLoad %v3int %arg_1 - %25 = OpExtInst %v3half %26 Ldexp %27 %28 - OpStore %res %25 + %arg_0 = OpVariable %_ptr_Function_v3half Function %19 + %arg_1 = OpVariable %_ptr_Function_v3int Function %26 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %23 + %29 = OpLoad %v3half %arg_0 + %30 = OpLoad %v3int %arg_1 + %27 = OpExtInst %v3half %28 Ldexp %29 %30 + OpStore %res %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %ldexp_7485ce +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %ldexp_7485ce OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %36 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %39 = OpLabel - %40 = OpFunctionCall %void %ldexp_7485ce + %41 = OpLabel + %42 = OpFunctionCall %void %ldexp_7485ce OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %42 = OpLabel - %43 = OpFunctionCall %void %ldexp_7485ce + %44 = OpLabel + %45 = OpFunctionCall %void %ldexp_7485ce OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/ldexp/7485ce.wgsl.expected.wgsl b/test/tint/builtins/gen/var/ldexp/7485ce.wgsl.expected.wgsl index 2671e2a07b..7b824e2bb0 100644 --- a/test/tint/builtins/gen/var/ldexp/7485ce.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/ldexp/7485ce.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn ldexp_7485ce() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.0h); var arg_1 = vec3(1i); var res : vec3 = ldexp(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl b/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl index 13ddb24572..7d2dafb8fe 100644 --- a/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl +++ b/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl @@ -25,7 +25,7 @@ enable f16; // fn ldexp(vec<4, f16>, vec<4, i32>) -> vec<4, f16> fn ldexp_7fa13c() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.h); var arg_1 = vec4(1i); var res: vec4 = ldexp(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl.expected.dxc.hlsl index cd28414385..461a1aa9e6 100644 --- a/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void ldexp_7fa13c() { - vector arg_0 = (float16_t(0.0h)).xxxx; + vector arg_0 = (float16_t(1.0h)).xxxx; int4 arg_1 = (1).xxxx; vector res = ldexp(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl.expected.glsl b/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl.expected.glsl index d447a14634..8259b6176b 100644 --- a/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void ldexp_7fa13c() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); ivec4 arg_1 = ivec4(1); f16vec4 res = ldexp(arg_0, arg_1); } @@ -25,7 +25,7 @@ void main() { precision mediump float; void ldexp_7fa13c() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); ivec4 arg_1 = ivec4(1); f16vec4 res = ldexp(arg_0, arg_1); } @@ -42,7 +42,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void ldexp_7fa13c() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); ivec4 arg_1 = ivec4(1); f16vec4 res = ldexp(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl.expected.msl b/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl.expected.msl index b4089fb7ad..4df9a39aad 100644 --- a/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void ldexp_7fa13c() { - half4 arg_0 = half4(0.0h); + half4 arg_0 = half4(1.0h); int4 arg_1 = int4(1); half4 res = ldexp(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl.expected.spvasm index 1b6c20a73a..ce3a3d9564 100644 --- a/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 44 +; Bound: 46 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %26 = OpExtInstImport "GLSL.std.450" + %28 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -39,48 +39,50 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half + %19 = OpConstantNull %v4half %int = OpTypeInt 32 1 %v4int = OpTypeVector %int 4 %int_1 = OpConstant %int 1 - %21 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %23 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %24 = OpConstantNull %v4int - %30 = OpTypeFunction %v4float + %26 = OpConstantNull %v4int + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %ldexp_7fa13c = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4half Function %15 - %arg_1 = OpVariable %_ptr_Function_v4int Function %24 - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %21 - %27 = OpLoad %v4half %arg_0 - %28 = OpLoad %v4int %arg_1 - %25 = OpExtInst %v4half %26 Ldexp %27 %28 - OpStore %res %25 + %arg_0 = OpVariable %_ptr_Function_v4half Function %19 + %arg_1 = OpVariable %_ptr_Function_v4int Function %26 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %23 + %29 = OpLoad %v4half %arg_0 + %30 = OpLoad %v4int %arg_1 + %27 = OpExtInst %v4half %28 Ldexp %29 %30 + OpStore %res %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %ldexp_7fa13c +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %ldexp_7fa13c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %36 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %39 = OpLabel - %40 = OpFunctionCall %void %ldexp_7fa13c + %41 = OpLabel + %42 = OpFunctionCall %void %ldexp_7fa13c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %42 = OpLabel - %43 = OpFunctionCall %void %ldexp_7fa13c + %44 = OpLabel + %45 = OpFunctionCall %void %ldexp_7fa13c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl.expected.wgsl index 910f8ea237..527ff3fb31 100644 --- a/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn ldexp_7fa13c() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.0h); var arg_1 = vec4(1i); var res : vec4 = ldexp(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/length/3f0e13.wgsl b/test/tint/builtins/gen/var/length/3f0e13.wgsl index 6aa251cab7..cc5f92f29f 100644 --- a/test/tint/builtins/gen/var/length/3f0e13.wgsl +++ b/test/tint/builtins/gen/var/length/3f0e13.wgsl @@ -25,7 +25,7 @@ enable f16; // fn length(vec<2, f16>) -> f16 fn length_3f0e13() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.h); var res: f16 = length(arg_0); } diff --git a/test/tint/builtins/gen/var/length/3f0e13.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/length/3f0e13.wgsl.expected.dxc.hlsl index ef03b061f5..59d94931db 100644 --- a/test/tint/builtins/gen/var/length/3f0e13.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/length/3f0e13.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void length_3f0e13() { - vector arg_0 = (float16_t(0.0h)).xx; + vector arg_0 = (float16_t(1.0h)).xx; float16_t res = length(arg_0); } diff --git a/test/tint/builtins/gen/var/length/3f0e13.wgsl.expected.glsl b/test/tint/builtins/gen/var/length/3f0e13.wgsl.expected.glsl index a5f2471c6d..30425e5020 100644 --- a/test/tint/builtins/gen/var/length/3f0e13.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/length/3f0e13.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void length_3f0e13() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); float16_t res = length(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void length_3f0e13() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); float16_t res = length(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void length_3f0e13() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); float16_t res = length(arg_0); } diff --git a/test/tint/builtins/gen/var/length/3f0e13.wgsl.expected.msl b/test/tint/builtins/gen/var/length/3f0e13.wgsl.expected.msl index 797b6fbc4f..403f07981f 100644 --- a/test/tint/builtins/gen/var/length/3f0e13.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/length/3f0e13.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void length_3f0e13() { - half2 arg_0 = half2(0.0h); + half2 arg_0 = half2(1.0h); half res = length(arg_0); } diff --git a/test/tint/builtins/gen/var/length/3f0e13.wgsl.expected.spvasm b/test/tint/builtins/gen/var/length/3f0e13.wgsl.expected.spvasm index a92c3f18b1..bcc5e63857 100644 --- a/test/tint/builtins/gen/var/length/3f0e13.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/length/3f0e13.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,41 +38,43 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half + %19 = OpConstantNull %v2half %_ptr_Function_half = OpTypePointer Function %half - %23 = OpConstantNull %half - %24 = OpTypeFunction %v4float + %25 = OpConstantNull %half + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %length_3f0e13 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2half Function %15 - %res = OpVariable %_ptr_Function_half Function %23 - OpStore %arg_0 %15 - %20 = OpLoad %v2half %arg_0 - %18 = OpExtInst %half %19 Length %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v2half Function %19 + %res = OpVariable %_ptr_Function_half Function %25 + OpStore %arg_0 %16 + %22 = OpLoad %v2half %arg_0 + %20 = OpExtInst %half %21 Length %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %length_3f0e13 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %length_3f0e13 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %length_3f0e13 + %35 = OpLabel + %36 = OpFunctionCall %void %length_3f0e13 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %length_3f0e13 + %38 = OpLabel + %39 = OpFunctionCall %void %length_3f0e13 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/length/3f0e13.wgsl.expected.wgsl b/test/tint/builtins/gen/var/length/3f0e13.wgsl.expected.wgsl index 317830d360..aa47114987 100644 --- a/test/tint/builtins/gen/var/length/3f0e13.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/length/3f0e13.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn length_3f0e13() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.0h); var res : f16 = length(arg_0); } diff --git a/test/tint/builtins/gen/var/length/5b1a9b.wgsl b/test/tint/builtins/gen/var/length/5b1a9b.wgsl index 9c495a7755..629e9ced68 100644 --- a/test/tint/builtins/gen/var/length/5b1a9b.wgsl +++ b/test/tint/builtins/gen/var/length/5b1a9b.wgsl @@ -25,7 +25,7 @@ enable f16; // fn length(vec<4, f16>) -> f16 fn length_5b1a9b() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.h); var res: f16 = length(arg_0); } diff --git a/test/tint/builtins/gen/var/length/5b1a9b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/length/5b1a9b.wgsl.expected.dxc.hlsl index 4865222bf3..ff848f8d0a 100644 --- a/test/tint/builtins/gen/var/length/5b1a9b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/length/5b1a9b.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void length_5b1a9b() { - vector arg_0 = (float16_t(0.0h)).xxxx; + vector arg_0 = (float16_t(1.0h)).xxxx; float16_t res = length(arg_0); } diff --git a/test/tint/builtins/gen/var/length/5b1a9b.wgsl.expected.glsl b/test/tint/builtins/gen/var/length/5b1a9b.wgsl.expected.glsl index 75b0701773..0d546259be 100644 --- a/test/tint/builtins/gen/var/length/5b1a9b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/length/5b1a9b.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void length_5b1a9b() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); float16_t res = length(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void length_5b1a9b() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); float16_t res = length(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void length_5b1a9b() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); float16_t res = length(arg_0); } diff --git a/test/tint/builtins/gen/var/length/5b1a9b.wgsl.expected.msl b/test/tint/builtins/gen/var/length/5b1a9b.wgsl.expected.msl index 885dd6662e..2b9aa9f47a 100644 --- a/test/tint/builtins/gen/var/length/5b1a9b.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/length/5b1a9b.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void length_5b1a9b() { - half4 arg_0 = half4(0.0h); + half4 arg_0 = half4(1.0h); half res = length(arg_0); } diff --git a/test/tint/builtins/gen/var/length/5b1a9b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/length/5b1a9b.wgsl.expected.spvasm index 0d97afeb8d..b880106de5 100644 --- a/test/tint/builtins/gen/var/length/5b1a9b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/length/5b1a9b.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,41 +38,43 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half + %19 = OpConstantNull %v4half %_ptr_Function_half = OpTypePointer Function %half - %23 = OpConstantNull %half - %24 = OpTypeFunction %v4float + %25 = OpConstantNull %half + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %length_5b1a9b = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4half Function %15 - %res = OpVariable %_ptr_Function_half Function %23 - OpStore %arg_0 %15 - %20 = OpLoad %v4half %arg_0 - %18 = OpExtInst %half %19 Length %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v4half Function %19 + %res = OpVariable %_ptr_Function_half Function %25 + OpStore %arg_0 %16 + %22 = OpLoad %v4half %arg_0 + %20 = OpExtInst %half %21 Length %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %length_5b1a9b +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %length_5b1a9b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %length_5b1a9b + %35 = OpLabel + %36 = OpFunctionCall %void %length_5b1a9b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %length_5b1a9b + %38 = OpLabel + %39 = OpFunctionCall %void %length_5b1a9b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/length/5b1a9b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/length/5b1a9b.wgsl.expected.wgsl index 6e0095b9b4..c008e07131 100644 --- a/test/tint/builtins/gen/var/length/5b1a9b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/length/5b1a9b.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn length_5b1a9b() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.0h); var res : f16 = length(arg_0); } diff --git a/test/tint/builtins/gen/var/length/ba16d6.wgsl b/test/tint/builtins/gen/var/length/ba16d6.wgsl index c45837edff..7c69210b5c 100644 --- a/test/tint/builtins/gen/var/length/ba16d6.wgsl +++ b/test/tint/builtins/gen/var/length/ba16d6.wgsl @@ -25,7 +25,7 @@ enable f16; // fn length(vec<3, f16>) -> f16 fn length_ba16d6() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.h); var res: f16 = length(arg_0); } diff --git a/test/tint/builtins/gen/var/length/ba16d6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/length/ba16d6.wgsl.expected.dxc.hlsl index 7480de09db..a69b52931a 100644 --- a/test/tint/builtins/gen/var/length/ba16d6.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/length/ba16d6.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void length_ba16d6() { - vector arg_0 = (float16_t(0.0h)).xxx; + vector arg_0 = (float16_t(1.0h)).xxx; float16_t res = length(arg_0); } diff --git a/test/tint/builtins/gen/var/length/ba16d6.wgsl.expected.glsl b/test/tint/builtins/gen/var/length/ba16d6.wgsl.expected.glsl index ea04f30ef6..f73d6806fa 100644 --- a/test/tint/builtins/gen/var/length/ba16d6.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/length/ba16d6.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void length_ba16d6() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); float16_t res = length(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void length_ba16d6() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); float16_t res = length(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void length_ba16d6() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); float16_t res = length(arg_0); } diff --git a/test/tint/builtins/gen/var/length/ba16d6.wgsl.expected.msl b/test/tint/builtins/gen/var/length/ba16d6.wgsl.expected.msl index 54123fcd29..bb585a0a5d 100644 --- a/test/tint/builtins/gen/var/length/ba16d6.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/length/ba16d6.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void length_ba16d6() { - half3 arg_0 = half3(0.0h); + half3 arg_0 = half3(1.0h); half res = length(arg_0); } diff --git a/test/tint/builtins/gen/var/length/ba16d6.wgsl.expected.spvasm b/test/tint/builtins/gen/var/length/ba16d6.wgsl.expected.spvasm index 4ec76a0a73..60a8f8be18 100644 --- a/test/tint/builtins/gen/var/length/ba16d6.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/length/ba16d6.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,41 +38,43 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half + %19 = OpConstantNull %v3half %_ptr_Function_half = OpTypePointer Function %half - %23 = OpConstantNull %half - %24 = OpTypeFunction %v4float + %25 = OpConstantNull %half + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %length_ba16d6 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3half Function %15 - %res = OpVariable %_ptr_Function_half Function %23 - OpStore %arg_0 %15 - %20 = OpLoad %v3half %arg_0 - %18 = OpExtInst %half %19 Length %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v3half Function %19 + %res = OpVariable %_ptr_Function_half Function %25 + OpStore %arg_0 %16 + %22 = OpLoad %v3half %arg_0 + %20 = OpExtInst %half %21 Length %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %length_ba16d6 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %length_ba16d6 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %length_ba16d6 + %35 = OpLabel + %36 = OpFunctionCall %void %length_ba16d6 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %length_ba16d6 + %38 = OpLabel + %39 = OpFunctionCall %void %length_ba16d6 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/length/ba16d6.wgsl.expected.wgsl b/test/tint/builtins/gen/var/length/ba16d6.wgsl.expected.wgsl index 9ad37a931d..a3dcd56e58 100644 --- a/test/tint/builtins/gen/var/length/ba16d6.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/length/ba16d6.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn length_ba16d6() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.0h); var res : f16 = length(arg_0); } diff --git a/test/tint/builtins/gen/var/length/c158da.wgsl b/test/tint/builtins/gen/var/length/c158da.wgsl index ce3f91f59f..9c175dc01b 100644 --- a/test/tint/builtins/gen/var/length/c158da.wgsl +++ b/test/tint/builtins/gen/var/length/c158da.wgsl @@ -25,7 +25,7 @@ enable f16; // fn length(f16) -> f16 fn length_c158da() { - var arg_0 = f16(); + var arg_0 = 1.h; var res: f16 = length(arg_0); } diff --git a/test/tint/builtins/gen/var/length/c158da.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/length/c158da.wgsl.expected.dxc.hlsl index e8ad9f71a0..b3b16c3a9d 100644 --- a/test/tint/builtins/gen/var/length/c158da.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/length/c158da.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void length_c158da() { - float16_t arg_0 = float16_t(0.0h); + float16_t arg_0 = float16_t(1.0h); float16_t res = length(arg_0); } diff --git a/test/tint/builtins/gen/var/length/c158da.wgsl.expected.glsl b/test/tint/builtins/gen/var/length/c158da.wgsl.expected.glsl index 023690cb16..64a00e117b 100644 --- a/test/tint/builtins/gen/var/length/c158da.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/length/c158da.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void length_c158da() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = length(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void length_c158da() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = length(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void length_c158da() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = length(arg_0); } diff --git a/test/tint/builtins/gen/var/length/c158da.wgsl.expected.msl b/test/tint/builtins/gen/var/length/c158da.wgsl.expected.msl index ea75d99360..9854ae1c15 100644 --- a/test/tint/builtins/gen/var/length/c158da.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/length/c158da.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void length_c158da() { - half arg_0 = 0.0h; + half arg_0 = 1.0h; half res = fabs(arg_0); } diff --git a/test/tint/builtins/gen/var/length/c158da.wgsl.expected.spvasm b/test/tint/builtins/gen/var/length/c158da.wgsl.expected.spvasm index 5b14574943..5c55dc8fe5 100644 --- a/test/tint/builtins/gen/var/length/c158da.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/length/c158da.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %18 = OpExtInstImport "GLSL.std.450" + %19 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -37,39 +37,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %21 = OpTypeFunction %v4float + %17 = OpConstantNull %half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %length_c158da = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_half Function %14 - %res = OpVariable %_ptr_Function_half Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %half %arg_0 - %17 = OpExtInst %half %18 Length %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_half Function %17 + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %arg_0 %half_0x1p_0 + %20 = OpLoad %half %arg_0 + %18 = OpExtInst %half %19 Length %20 + OpStore %res %18 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %length_c158da +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %length_c158da OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %length_c158da + %31 = OpLabel + %32 = OpFunctionCall %void %length_c158da OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %length_c158da + %34 = OpLabel + %35 = OpFunctionCall %void %length_c158da OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/length/c158da.wgsl.expected.wgsl b/test/tint/builtins/gen/var/length/c158da.wgsl.expected.wgsl index c86993b985..2017cded3c 100644 --- a/test/tint/builtins/gen/var/length/c158da.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/length/c158da.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn length_c158da() { - var arg_0 = f16(); + var arg_0 = 1.0h; var res : f16 = length(arg_0); } diff --git a/test/tint/builtins/gen/var/log/6ff86f.wgsl b/test/tint/builtins/gen/var/log/6ff86f.wgsl index c99e55d5ca..c4eb176c72 100644 --- a/test/tint/builtins/gen/var/log/6ff86f.wgsl +++ b/test/tint/builtins/gen/var/log/6ff86f.wgsl @@ -25,7 +25,7 @@ enable f16; // fn log(vec<3, f16>) -> vec<3, f16> fn log_6ff86f() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.h); var res: vec3 = log(arg_0); } diff --git a/test/tint/builtins/gen/var/log/6ff86f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/log/6ff86f.wgsl.expected.dxc.hlsl index 992df89e07..2ced859c6d 100644 --- a/test/tint/builtins/gen/var/log/6ff86f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/log/6ff86f.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void log_6ff86f() { - vector arg_0 = (float16_t(0.0h)).xxx; + vector arg_0 = (float16_t(1.0h)).xxx; vector res = log(arg_0); } diff --git a/test/tint/builtins/gen/var/log/6ff86f.wgsl.expected.glsl b/test/tint/builtins/gen/var/log/6ff86f.wgsl.expected.glsl index f4c8306889..0431e5b200 100644 --- a/test/tint/builtins/gen/var/log/6ff86f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/log/6ff86f.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void log_6ff86f() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = log(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void log_6ff86f() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = log(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void log_6ff86f() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = log(arg_0); } diff --git a/test/tint/builtins/gen/var/log/6ff86f.wgsl.expected.msl b/test/tint/builtins/gen/var/log/6ff86f.wgsl.expected.msl index 941fcd6799..3fa752c21c 100644 --- a/test/tint/builtins/gen/var/log/6ff86f.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/log/6ff86f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void log_6ff86f() { - half3 arg_0 = half3(0.0h); + half3 arg_0 = half3(1.0h); half3 res = log(arg_0); } diff --git a/test/tint/builtins/gen/var/log/6ff86f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/log/6ff86f.wgsl.expected.spvasm index bc7f7de9a5..8acde47726 100644 --- a/test/tint/builtins/gen/var/log/6ff86f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/log/6ff86f.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %log_6ff86f = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3half Function %15 - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v3half %arg_0 - %18 = OpExtInst %v3half %19 Log %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v3half Function %19 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v3half %arg_0 + %20 = OpExtInst %v3half %21 Log %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %log_6ff86f +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %log_6ff86f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %log_6ff86f + %33 = OpLabel + %34 = OpFunctionCall %void %log_6ff86f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %log_6ff86f + %36 = OpLabel + %37 = OpFunctionCall %void %log_6ff86f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/log/6ff86f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/log/6ff86f.wgsl.expected.wgsl index 0f1a204fa2..7a24128a03 100644 --- a/test/tint/builtins/gen/var/log/6ff86f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/log/6ff86f.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn log_6ff86f() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.0h); var res : vec3 = log(arg_0); } diff --git a/test/tint/builtins/gen/var/log/8f0e32.wgsl b/test/tint/builtins/gen/var/log/8f0e32.wgsl index 02a6f23118..b7aa49d04b 100644 --- a/test/tint/builtins/gen/var/log/8f0e32.wgsl +++ b/test/tint/builtins/gen/var/log/8f0e32.wgsl @@ -25,7 +25,7 @@ enable f16; // fn log(vec<2, f16>) -> vec<2, f16> fn log_8f0e32() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.h); var res: vec2 = log(arg_0); } diff --git a/test/tint/builtins/gen/var/log/8f0e32.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/log/8f0e32.wgsl.expected.dxc.hlsl index f17ddd1ff7..f04a6f5434 100644 --- a/test/tint/builtins/gen/var/log/8f0e32.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/log/8f0e32.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void log_8f0e32() { - vector arg_0 = (float16_t(0.0h)).xx; + vector arg_0 = (float16_t(1.0h)).xx; vector res = log(arg_0); } diff --git a/test/tint/builtins/gen/var/log/8f0e32.wgsl.expected.glsl b/test/tint/builtins/gen/var/log/8f0e32.wgsl.expected.glsl index 5ed7deb5c9..6f6b1aaa7a 100644 --- a/test/tint/builtins/gen/var/log/8f0e32.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/log/8f0e32.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void log_8f0e32() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = log(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void log_8f0e32() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = log(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void log_8f0e32() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = log(arg_0); } diff --git a/test/tint/builtins/gen/var/log/8f0e32.wgsl.expected.msl b/test/tint/builtins/gen/var/log/8f0e32.wgsl.expected.msl index 975ed6d159..0e25caaf1d 100644 --- a/test/tint/builtins/gen/var/log/8f0e32.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/log/8f0e32.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void log_8f0e32() { - half2 arg_0 = half2(0.0h); + half2 arg_0 = half2(1.0h); half2 res = log(arg_0); } diff --git a/test/tint/builtins/gen/var/log/8f0e32.wgsl.expected.spvasm b/test/tint/builtins/gen/var/log/8f0e32.wgsl.expected.spvasm index 06d9a8af7e..ac6fe38c58 100644 --- a/test/tint/builtins/gen/var/log/8f0e32.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/log/8f0e32.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v2half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %log_8f0e32 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2half Function %15 - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v2half %arg_0 - %18 = OpExtInst %v2half %19 Log %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v2half Function %19 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v2half %arg_0 + %20 = OpExtInst %v2half %21 Log %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %log_8f0e32 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %log_8f0e32 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %log_8f0e32 + %33 = OpLabel + %34 = OpFunctionCall %void %log_8f0e32 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %log_8f0e32 + %36 = OpLabel + %37 = OpFunctionCall %void %log_8f0e32 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/log/8f0e32.wgsl.expected.wgsl b/test/tint/builtins/gen/var/log/8f0e32.wgsl.expected.wgsl index 3e83d31132..fe96b0e9db 100644 --- a/test/tint/builtins/gen/var/log/8f0e32.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/log/8f0e32.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn log_8f0e32() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.0h); var res : vec2 = log(arg_0); } diff --git a/test/tint/builtins/gen/var/log/c9f489.wgsl b/test/tint/builtins/gen/var/log/c9f489.wgsl index cc94795d46..ed3404bd92 100644 --- a/test/tint/builtins/gen/var/log/c9f489.wgsl +++ b/test/tint/builtins/gen/var/log/c9f489.wgsl @@ -25,7 +25,7 @@ enable f16; // fn log(f16) -> f16 fn log_c9f489() { - var arg_0 = f16(); + var arg_0 = 1.h; var res: f16 = log(arg_0); } diff --git a/test/tint/builtins/gen/var/log/c9f489.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/log/c9f489.wgsl.expected.dxc.hlsl index f56a6b956f..b65744fba4 100644 --- a/test/tint/builtins/gen/var/log/c9f489.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/log/c9f489.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void log_c9f489() { - float16_t arg_0 = float16_t(0.0h); + float16_t arg_0 = float16_t(1.0h); float16_t res = log(arg_0); } diff --git a/test/tint/builtins/gen/var/log/c9f489.wgsl.expected.glsl b/test/tint/builtins/gen/var/log/c9f489.wgsl.expected.glsl index ab6cf71b76..94e8d4bcf3 100644 --- a/test/tint/builtins/gen/var/log/c9f489.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/log/c9f489.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void log_c9f489() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = log(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void log_c9f489() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = log(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void log_c9f489() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = log(arg_0); } diff --git a/test/tint/builtins/gen/var/log/c9f489.wgsl.expected.msl b/test/tint/builtins/gen/var/log/c9f489.wgsl.expected.msl index 2f4c5434b2..b2588e408c 100644 --- a/test/tint/builtins/gen/var/log/c9f489.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/log/c9f489.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void log_c9f489() { - half arg_0 = 0.0h; + half arg_0 = 1.0h; half res = log(arg_0); } diff --git a/test/tint/builtins/gen/var/log/c9f489.wgsl.expected.spvasm b/test/tint/builtins/gen/var/log/c9f489.wgsl.expected.spvasm index c2f50ce482..76e0a15ec5 100644 --- a/test/tint/builtins/gen/var/log/c9f489.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/log/c9f489.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %18 = OpExtInstImport "GLSL.std.450" + %19 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -37,39 +37,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %21 = OpTypeFunction %v4float + %17 = OpConstantNull %half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %log_c9f489 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_half Function %14 - %res = OpVariable %_ptr_Function_half Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %half %arg_0 - %17 = OpExtInst %half %18 Log %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_half Function %17 + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %arg_0 %half_0x1p_0 + %20 = OpLoad %half %arg_0 + %18 = OpExtInst %half %19 Log %20 + OpStore %res %18 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %log_c9f489 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %log_c9f489 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %log_c9f489 + %31 = OpLabel + %32 = OpFunctionCall %void %log_c9f489 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %log_c9f489 + %34 = OpLabel + %35 = OpFunctionCall %void %log_c9f489 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/log/c9f489.wgsl.expected.wgsl b/test/tint/builtins/gen/var/log/c9f489.wgsl.expected.wgsl index b4e30a39be..4f9373c87e 100644 --- a/test/tint/builtins/gen/var/log/c9f489.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/log/c9f489.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn log_c9f489() { - var arg_0 = f16(); + var arg_0 = 1.0h; var res : f16 = log(arg_0); } diff --git a/test/tint/builtins/gen/var/log/cdbdc1.wgsl b/test/tint/builtins/gen/var/log/cdbdc1.wgsl index 18c4837e1f..55be4838d4 100644 --- a/test/tint/builtins/gen/var/log/cdbdc1.wgsl +++ b/test/tint/builtins/gen/var/log/cdbdc1.wgsl @@ -25,7 +25,7 @@ enable f16; // fn log(vec<4, f16>) -> vec<4, f16> fn log_cdbdc1() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.h); var res: vec4 = log(arg_0); } diff --git a/test/tint/builtins/gen/var/log/cdbdc1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/log/cdbdc1.wgsl.expected.dxc.hlsl index 4416f3e944..07574a683d 100644 --- a/test/tint/builtins/gen/var/log/cdbdc1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/log/cdbdc1.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void log_cdbdc1() { - vector arg_0 = (float16_t(0.0h)).xxxx; + vector arg_0 = (float16_t(1.0h)).xxxx; vector res = log(arg_0); } diff --git a/test/tint/builtins/gen/var/log/cdbdc1.wgsl.expected.glsl b/test/tint/builtins/gen/var/log/cdbdc1.wgsl.expected.glsl index 8f49855ec3..d278e670e4 100644 --- a/test/tint/builtins/gen/var/log/cdbdc1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/log/cdbdc1.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void log_cdbdc1() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = log(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void log_cdbdc1() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = log(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void log_cdbdc1() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = log(arg_0); } diff --git a/test/tint/builtins/gen/var/log/cdbdc1.wgsl.expected.msl b/test/tint/builtins/gen/var/log/cdbdc1.wgsl.expected.msl index e2e669ee3a..346354859e 100644 --- a/test/tint/builtins/gen/var/log/cdbdc1.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/log/cdbdc1.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void log_cdbdc1() { - half4 arg_0 = half4(0.0h); + half4 arg_0 = half4(1.0h); half4 res = log(arg_0); } diff --git a/test/tint/builtins/gen/var/log/cdbdc1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/log/cdbdc1.wgsl.expected.spvasm index aebc066dab..017227c396 100644 --- a/test/tint/builtins/gen/var/log/cdbdc1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/log/cdbdc1.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v4half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %log_cdbdc1 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4half Function %15 - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v4half %arg_0 - %18 = OpExtInst %v4half %19 Log %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v4half Function %19 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v4half %arg_0 + %20 = OpExtInst %v4half %21 Log %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %log_cdbdc1 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %log_cdbdc1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %log_cdbdc1 + %33 = OpLabel + %34 = OpFunctionCall %void %log_cdbdc1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %log_cdbdc1 + %36 = OpLabel + %37 = OpFunctionCall %void %log_cdbdc1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/log/cdbdc1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/log/cdbdc1.wgsl.expected.wgsl index 0ded9287ea..c9f7a70ddc 100644 --- a/test/tint/builtins/gen/var/log/cdbdc1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/log/cdbdc1.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn log_cdbdc1() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.0h); var res : vec4 = log(arg_0); } diff --git a/test/tint/builtins/gen/var/log2/38b478.wgsl b/test/tint/builtins/gen/var/log2/38b478.wgsl index 9be143857b..f07d42f42e 100644 --- a/test/tint/builtins/gen/var/log2/38b478.wgsl +++ b/test/tint/builtins/gen/var/log2/38b478.wgsl @@ -25,7 +25,7 @@ enable f16; // fn log2(vec<3, f16>) -> vec<3, f16> fn log2_38b478() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.h); var res: vec3 = log2(arg_0); } diff --git a/test/tint/builtins/gen/var/log2/38b478.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/log2/38b478.wgsl.expected.dxc.hlsl index 78a5e05291..798fd2f02a 100644 --- a/test/tint/builtins/gen/var/log2/38b478.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/log2/38b478.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void log2_38b478() { - vector arg_0 = (float16_t(0.0h)).xxx; + vector arg_0 = (float16_t(1.0h)).xxx; vector res = log2(arg_0); } diff --git a/test/tint/builtins/gen/var/log2/38b478.wgsl.expected.glsl b/test/tint/builtins/gen/var/log2/38b478.wgsl.expected.glsl index 3b440c8085..fbf3bbf214 100644 --- a/test/tint/builtins/gen/var/log2/38b478.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/log2/38b478.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void log2_38b478() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = log2(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void log2_38b478() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = log2(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void log2_38b478() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = log2(arg_0); } diff --git a/test/tint/builtins/gen/var/log2/38b478.wgsl.expected.msl b/test/tint/builtins/gen/var/log2/38b478.wgsl.expected.msl index 86941bfb1f..71d7c90f71 100644 --- a/test/tint/builtins/gen/var/log2/38b478.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/log2/38b478.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void log2_38b478() { - half3 arg_0 = half3(0.0h); + half3 arg_0 = half3(1.0h); half3 res = log2(arg_0); } diff --git a/test/tint/builtins/gen/var/log2/38b478.wgsl.expected.spvasm b/test/tint/builtins/gen/var/log2/38b478.wgsl.expected.spvasm index f44bd997c1..1de3931b22 100644 --- a/test/tint/builtins/gen/var/log2/38b478.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/log2/38b478.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %log2_38b478 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3half Function %15 - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v3half %arg_0 - %18 = OpExtInst %v3half %19 Log2 %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v3half Function %19 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v3half %arg_0 + %20 = OpExtInst %v3half %21 Log2 %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %log2_38b478 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %log2_38b478 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %log2_38b478 + %33 = OpLabel + %34 = OpFunctionCall %void %log2_38b478 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %log2_38b478 + %36 = OpLabel + %37 = OpFunctionCall %void %log2_38b478 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/log2/38b478.wgsl.expected.wgsl b/test/tint/builtins/gen/var/log2/38b478.wgsl.expected.wgsl index 5564f08cb1..875fe4dd46 100644 --- a/test/tint/builtins/gen/var/log2/38b478.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/log2/38b478.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn log2_38b478() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.0h); var res : vec3 = log2(arg_0); } diff --git a/test/tint/builtins/gen/var/log2/776088.wgsl b/test/tint/builtins/gen/var/log2/776088.wgsl index cff82b7344..03d3efcf1e 100644 --- a/test/tint/builtins/gen/var/log2/776088.wgsl +++ b/test/tint/builtins/gen/var/log2/776088.wgsl @@ -25,7 +25,7 @@ enable f16; // fn log2(vec<4, f16>) -> vec<4, f16> fn log2_776088() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.h); var res: vec4 = log2(arg_0); } diff --git a/test/tint/builtins/gen/var/log2/776088.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/log2/776088.wgsl.expected.dxc.hlsl index ddbb999d45..82cdfb42d7 100644 --- a/test/tint/builtins/gen/var/log2/776088.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/log2/776088.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void log2_776088() { - vector arg_0 = (float16_t(0.0h)).xxxx; + vector arg_0 = (float16_t(1.0h)).xxxx; vector res = log2(arg_0); } diff --git a/test/tint/builtins/gen/var/log2/776088.wgsl.expected.glsl b/test/tint/builtins/gen/var/log2/776088.wgsl.expected.glsl index a4c554489e..c431053819 100644 --- a/test/tint/builtins/gen/var/log2/776088.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/log2/776088.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void log2_776088() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = log2(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void log2_776088() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = log2(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void log2_776088() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = log2(arg_0); } diff --git a/test/tint/builtins/gen/var/log2/776088.wgsl.expected.msl b/test/tint/builtins/gen/var/log2/776088.wgsl.expected.msl index 856c87bf55..748be7080b 100644 --- a/test/tint/builtins/gen/var/log2/776088.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/log2/776088.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void log2_776088() { - half4 arg_0 = half4(0.0h); + half4 arg_0 = half4(1.0h); half4 res = log2(arg_0); } diff --git a/test/tint/builtins/gen/var/log2/776088.wgsl.expected.spvasm b/test/tint/builtins/gen/var/log2/776088.wgsl.expected.spvasm index 0ed06cd53e..01c8096543 100644 --- a/test/tint/builtins/gen/var/log2/776088.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/log2/776088.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v4half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %log2_776088 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4half Function %15 - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v4half %arg_0 - %18 = OpExtInst %v4half %19 Log2 %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v4half Function %19 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v4half %arg_0 + %20 = OpExtInst %v4half %21 Log2 %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %log2_776088 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %log2_776088 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %log2_776088 + %33 = OpLabel + %34 = OpFunctionCall %void %log2_776088 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %log2_776088 + %36 = OpLabel + %37 = OpFunctionCall %void %log2_776088 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/log2/776088.wgsl.expected.wgsl b/test/tint/builtins/gen/var/log2/776088.wgsl.expected.wgsl index 63b699d474..616e82a3d1 100644 --- a/test/tint/builtins/gen/var/log2/776088.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/log2/776088.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn log2_776088() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.0h); var res : vec4 = log2(arg_0); } diff --git a/test/tint/builtins/gen/var/log2/8c10b3.wgsl b/test/tint/builtins/gen/var/log2/8c10b3.wgsl index 7a838bdb98..1ce9f7c330 100644 --- a/test/tint/builtins/gen/var/log2/8c10b3.wgsl +++ b/test/tint/builtins/gen/var/log2/8c10b3.wgsl @@ -25,7 +25,7 @@ enable f16; // fn log2(f16) -> f16 fn log2_8c10b3() { - var arg_0 = f16(); + var arg_0 = 1.h; var res: f16 = log2(arg_0); } diff --git a/test/tint/builtins/gen/var/log2/8c10b3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/log2/8c10b3.wgsl.expected.dxc.hlsl index 538dbfcdfd..43eb1d198d 100644 --- a/test/tint/builtins/gen/var/log2/8c10b3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/log2/8c10b3.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void log2_8c10b3() { - float16_t arg_0 = float16_t(0.0h); + float16_t arg_0 = float16_t(1.0h); float16_t res = log2(arg_0); } diff --git a/test/tint/builtins/gen/var/log2/8c10b3.wgsl.expected.glsl b/test/tint/builtins/gen/var/log2/8c10b3.wgsl.expected.glsl index dc3f0f7a38..f05214f467 100644 --- a/test/tint/builtins/gen/var/log2/8c10b3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/log2/8c10b3.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void log2_8c10b3() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = log2(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void log2_8c10b3() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = log2(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void log2_8c10b3() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = log2(arg_0); } diff --git a/test/tint/builtins/gen/var/log2/8c10b3.wgsl.expected.msl b/test/tint/builtins/gen/var/log2/8c10b3.wgsl.expected.msl index 4f7aa2e066..9637f0fa75 100644 --- a/test/tint/builtins/gen/var/log2/8c10b3.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/log2/8c10b3.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void log2_8c10b3() { - half arg_0 = 0.0h; + half arg_0 = 1.0h; half res = log2(arg_0); } diff --git a/test/tint/builtins/gen/var/log2/8c10b3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/log2/8c10b3.wgsl.expected.spvasm index f280c63a73..ca79600798 100644 --- a/test/tint/builtins/gen/var/log2/8c10b3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/log2/8c10b3.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %18 = OpExtInstImport "GLSL.std.450" + %19 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -37,39 +37,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %21 = OpTypeFunction %v4float + %17 = OpConstantNull %half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %log2_8c10b3 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_half Function %14 - %res = OpVariable %_ptr_Function_half Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %half %arg_0 - %17 = OpExtInst %half %18 Log2 %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_half Function %17 + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %arg_0 %half_0x1p_0 + %20 = OpLoad %half %arg_0 + %18 = OpExtInst %half %19 Log2 %20 + OpStore %res %18 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %log2_8c10b3 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %log2_8c10b3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %log2_8c10b3 + %31 = OpLabel + %32 = OpFunctionCall %void %log2_8c10b3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %log2_8c10b3 + %34 = OpLabel + %35 = OpFunctionCall %void %log2_8c10b3 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/log2/8c10b3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/log2/8c10b3.wgsl.expected.wgsl index 8deaff1a00..fab4228585 100644 --- a/test/tint/builtins/gen/var/log2/8c10b3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/log2/8c10b3.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn log2_8c10b3() { - var arg_0 = f16(); + var arg_0 = 1.0h; var res : f16 = log2(arg_0); } diff --git a/test/tint/builtins/gen/var/log2/fb9f0b.wgsl b/test/tint/builtins/gen/var/log2/fb9f0b.wgsl index 48d01f651f..27b6ac1574 100644 --- a/test/tint/builtins/gen/var/log2/fb9f0b.wgsl +++ b/test/tint/builtins/gen/var/log2/fb9f0b.wgsl @@ -25,7 +25,7 @@ enable f16; // fn log2(vec<2, f16>) -> vec<2, f16> fn log2_fb9f0b() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.h); var res: vec2 = log2(arg_0); } diff --git a/test/tint/builtins/gen/var/log2/fb9f0b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/log2/fb9f0b.wgsl.expected.dxc.hlsl index f99f7bfaaf..14995350a6 100644 --- a/test/tint/builtins/gen/var/log2/fb9f0b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/log2/fb9f0b.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void log2_fb9f0b() { - vector arg_0 = (float16_t(0.0h)).xx; + vector arg_0 = (float16_t(1.0h)).xx; vector res = log2(arg_0); } diff --git a/test/tint/builtins/gen/var/log2/fb9f0b.wgsl.expected.glsl b/test/tint/builtins/gen/var/log2/fb9f0b.wgsl.expected.glsl index 0676b9f646..aac760b3a0 100644 --- a/test/tint/builtins/gen/var/log2/fb9f0b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/log2/fb9f0b.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void log2_fb9f0b() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = log2(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void log2_fb9f0b() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = log2(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void log2_fb9f0b() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = log2(arg_0); } diff --git a/test/tint/builtins/gen/var/log2/fb9f0b.wgsl.expected.msl b/test/tint/builtins/gen/var/log2/fb9f0b.wgsl.expected.msl index dc1c78f701..4fdf2a3b11 100644 --- a/test/tint/builtins/gen/var/log2/fb9f0b.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/log2/fb9f0b.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void log2_fb9f0b() { - half2 arg_0 = half2(0.0h); + half2 arg_0 = half2(1.0h); half2 res = log2(arg_0); } diff --git a/test/tint/builtins/gen/var/log2/fb9f0b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/log2/fb9f0b.wgsl.expected.spvasm index 35cba68846..e1d6d910fc 100644 --- a/test/tint/builtins/gen/var/log2/fb9f0b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/log2/fb9f0b.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v2half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %log2_fb9f0b = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2half Function %15 - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v2half %arg_0 - %18 = OpExtInst %v2half %19 Log2 %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v2half Function %19 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v2half %arg_0 + %20 = OpExtInst %v2half %21 Log2 %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %log2_fb9f0b +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %log2_fb9f0b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %log2_fb9f0b + %33 = OpLabel + %34 = OpFunctionCall %void %log2_fb9f0b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %log2_fb9f0b + %36 = OpLabel + %37 = OpFunctionCall %void %log2_fb9f0b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/log2/fb9f0b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/log2/fb9f0b.wgsl.expected.wgsl index fe9342f278..1a44c5c44a 100644 --- a/test/tint/builtins/gen/var/log2/fb9f0b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/log2/fb9f0b.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn log2_fb9f0b() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.0h); var res : vec2 = log2(arg_0); } diff --git a/test/tint/builtins/gen/var/max/111ac0.wgsl b/test/tint/builtins/gen/var/max/111ac0.wgsl index 95fe46e5b4..58eccedf09 100644 --- a/test/tint/builtins/gen/var/max/111ac0.wgsl +++ b/test/tint/builtins/gen/var/max/111ac0.wgsl @@ -25,8 +25,8 @@ enable f16; // fn max(f16, f16) -> f16 fn max_111ac0() { - var arg_0 = f16(); - var arg_1 = f16(); + var arg_0 = 1.h; + var arg_1 = 1.h; var res: f16 = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/111ac0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/max/111ac0.wgsl.expected.dxc.hlsl index 96099f3b67..9307bc9fcd 100644 --- a/test/tint/builtins/gen/var/max/111ac0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/max/111ac0.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void max_111ac0() { - float16_t arg_0 = float16_t(0.0h); - float16_t arg_1 = float16_t(0.0h); + float16_t arg_0 = float16_t(1.0h); + float16_t arg_1 = float16_t(1.0h); float16_t res = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/111ac0.wgsl.expected.glsl b/test/tint/builtins/gen/var/max/111ac0.wgsl.expected.glsl index e765053e29..826f121c81 100644 --- a/test/tint/builtins/gen/var/max/111ac0.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/max/111ac0.wgsl.expected.glsl @@ -2,8 +2,8 @@ #extension GL_AMD_gpu_shader_half_float : require void max_111ac0() { - float16_t arg_0 = 0.0hf; - float16_t arg_1 = 0.0hf; + float16_t arg_0 = 1.0hf; + float16_t arg_1 = 1.0hf; float16_t res = max(arg_0, arg_1); } @@ -25,8 +25,8 @@ void main() { precision mediump float; void max_111ac0() { - float16_t arg_0 = 0.0hf; - float16_t arg_1 = 0.0hf; + float16_t arg_0 = 1.0hf; + float16_t arg_1 = 1.0hf; float16_t res = max(arg_0, arg_1); } @@ -42,8 +42,8 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void max_111ac0() { - float16_t arg_0 = 0.0hf; - float16_t arg_1 = 0.0hf; + float16_t arg_0 = 1.0hf; + float16_t arg_1 = 1.0hf; float16_t res = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/111ac0.wgsl.expected.msl b/test/tint/builtins/gen/var/max/111ac0.wgsl.expected.msl index 429db67325..8e3b8c3100 100644 --- a/test/tint/builtins/gen/var/max/111ac0.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/max/111ac0.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void max_111ac0() { - half arg_0 = 0.0h; - half arg_1 = 0.0h; + half arg_0 = 1.0h; + half arg_1 = 1.0h; half res = fmax(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/111ac0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/max/111ac0.wgsl.expected.spvasm index 379f8c7c33..234a5e0dd5 100644 --- a/test/tint/builtins/gen/var/max/111ac0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/max/111ac0.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,42 +38,43 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %23 = OpTypeFunction %v4float + %17 = OpConstantNull %half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %max_111ac0 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_half Function %14 - %arg_1 = OpVariable %_ptr_Function_half Function %14 - %res = OpVariable %_ptr_Function_half Function %14 - OpStore %arg_0 %14 - OpStore %arg_1 %14 - %20 = OpLoad %half %arg_0 - %21 = OpLoad %half %arg_1 - %18 = OpExtInst %half %19 NMax %20 %21 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_half Function %17 + %arg_1 = OpVariable %_ptr_Function_half Function %17 + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %arg_0 %half_0x1p_0 + OpStore %arg_1 %half_0x1p_0 + %21 = OpLoad %half %arg_0 + %22 = OpLoad %half %arg_1 + %19 = OpExtInst %half %20 NMax %21 %22 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %max_111ac0 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %max_111ac0 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %max_111ac0 + %33 = OpLabel + %34 = OpFunctionCall %void %max_111ac0 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %max_111ac0 + %36 = OpLabel + %37 = OpFunctionCall %void %max_111ac0 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/max/111ac0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/max/111ac0.wgsl.expected.wgsl index b91b325904..db1a126c70 100644 --- a/test/tint/builtins/gen/var/max/111ac0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/max/111ac0.wgsl.expected.wgsl @@ -1,8 +1,8 @@ enable f16; fn max_111ac0() { - var arg_0 = f16(); - var arg_1 = f16(); + var arg_0 = 1.0h; + var arg_1 = 1.0h; var res : f16 = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/34956e.wgsl b/test/tint/builtins/gen/var/max/34956e.wgsl index 600a3eb34a..ce58c357e3 100644 --- a/test/tint/builtins/gen/var/max/34956e.wgsl +++ b/test/tint/builtins/gen/var/max/34956e.wgsl @@ -25,8 +25,8 @@ enable f16; // fn max(vec<2, f16>, vec<2, f16>) -> vec<2, f16> fn max_34956e() { - var arg_0 = vec2(f16()); - var arg_1 = vec2(f16()); + var arg_0 = vec2(1.h); + var arg_1 = vec2(1.h); var res: vec2 = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/34956e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/max/34956e.wgsl.expected.dxc.hlsl index 60c2e2f19f..b634c6639c 100644 --- a/test/tint/builtins/gen/var/max/34956e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/max/34956e.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void max_34956e() { - vector arg_0 = (float16_t(0.0h)).xx; - vector arg_1 = (float16_t(0.0h)).xx; + vector arg_0 = (float16_t(1.0h)).xx; + vector arg_1 = (float16_t(1.0h)).xx; vector res = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/34956e.wgsl.expected.glsl b/test/tint/builtins/gen/var/max/34956e.wgsl.expected.glsl index 93be2e6c61..dfad11cfb2 100644 --- a/test/tint/builtins/gen/var/max/34956e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/max/34956e.wgsl.expected.glsl @@ -2,8 +2,8 @@ #extension GL_AMD_gpu_shader_half_float : require void max_34956e() { - f16vec2 arg_0 = f16vec2(0.0hf); - f16vec2 arg_1 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_1 = f16vec2(1.0hf); f16vec2 res = max(arg_0, arg_1); } @@ -25,8 +25,8 @@ void main() { precision mediump float; void max_34956e() { - f16vec2 arg_0 = f16vec2(0.0hf); - f16vec2 arg_1 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_1 = f16vec2(1.0hf); f16vec2 res = max(arg_0, arg_1); } @@ -42,8 +42,8 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void max_34956e() { - f16vec2 arg_0 = f16vec2(0.0hf); - f16vec2 arg_1 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_1 = f16vec2(1.0hf); f16vec2 res = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/34956e.wgsl.expected.msl b/test/tint/builtins/gen/var/max/34956e.wgsl.expected.msl index c90bfebda7..506f094922 100644 --- a/test/tint/builtins/gen/var/max/34956e.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/max/34956e.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void max_34956e() { - half2 arg_0 = half2(0.0h); - half2 arg_1 = half2(0.0h); + half2 arg_0 = half2(1.0h); + half2 arg_1 = half2(1.0h); half2 res = fmax(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/34956e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/max/34956e.wgsl.expected.spvasm index f63b8cd689..3702f75fc4 100644 --- a/test/tint/builtins/gen/var/max/34956e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/max/34956e.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %20 = OpExtInstImport "GLSL.std.450" + %22 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -39,42 +39,44 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %24 = OpTypeFunction %v4float + %19 = OpConstantNull %v2half + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %max_34956e = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2half Function %15 - %arg_1 = OpVariable %_ptr_Function_v2half Function %15 - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - %21 = OpLoad %v2half %arg_0 - %22 = OpLoad %v2half %arg_1 - %19 = OpExtInst %v2half %20 NMax %21 %22 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v2half Function %19 + %arg_1 = OpVariable %_ptr_Function_v2half Function %19 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + %23 = OpLoad %v2half %arg_0 + %24 = OpLoad %v2half %arg_1 + %21 = OpExtInst %v2half %22 NMax %23 %24 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %max_34956e +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %max_34956e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %max_34956e + %35 = OpLabel + %36 = OpFunctionCall %void %max_34956e OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %max_34956e + %38 = OpLabel + %39 = OpFunctionCall %void %max_34956e OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/max/34956e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/max/34956e.wgsl.expected.wgsl index 69327a8f55..3499673543 100644 --- a/test/tint/builtins/gen/var/max/34956e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/max/34956e.wgsl.expected.wgsl @@ -1,8 +1,8 @@ enable f16; fn max_34956e() { - var arg_0 = vec2(f16()); - var arg_1 = vec2(f16()); + var arg_0 = vec2(1.0h); + var arg_1 = vec2(1.0h); var res : vec2 = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/445169.wgsl b/test/tint/builtins/gen/var/max/445169.wgsl index 24aad6114a..34b6472a47 100644 --- a/test/tint/builtins/gen/var/max/445169.wgsl +++ b/test/tint/builtins/gen/var/max/445169.wgsl @@ -25,8 +25,8 @@ enable f16; // fn max(vec<3, f16>, vec<3, f16>) -> vec<3, f16> fn max_445169() { - var arg_0 = vec3(f16()); - var arg_1 = vec3(f16()); + var arg_0 = vec3(1.h); + var arg_1 = vec3(1.h); var res: vec3 = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/445169.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/max/445169.wgsl.expected.dxc.hlsl index 4b65af3400..ca512f452a 100644 --- a/test/tint/builtins/gen/var/max/445169.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/max/445169.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void max_445169() { - vector arg_0 = (float16_t(0.0h)).xxx; - vector arg_1 = (float16_t(0.0h)).xxx; + vector arg_0 = (float16_t(1.0h)).xxx; + vector arg_1 = (float16_t(1.0h)).xxx; vector res = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/445169.wgsl.expected.glsl b/test/tint/builtins/gen/var/max/445169.wgsl.expected.glsl index a524e0f279..58502c4f83 100644 --- a/test/tint/builtins/gen/var/max/445169.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/max/445169.wgsl.expected.glsl @@ -2,8 +2,8 @@ #extension GL_AMD_gpu_shader_half_float : require void max_445169() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); f16vec3 res = max(arg_0, arg_1); } @@ -25,8 +25,8 @@ void main() { precision mediump float; void max_445169() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); f16vec3 res = max(arg_0, arg_1); } @@ -42,8 +42,8 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void max_445169() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); f16vec3 res = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/445169.wgsl.expected.msl b/test/tint/builtins/gen/var/max/445169.wgsl.expected.msl index 3f2fe1ea2a..2f8144d4c0 100644 --- a/test/tint/builtins/gen/var/max/445169.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/max/445169.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void max_445169() { - half3 arg_0 = half3(0.0h); - half3 arg_1 = half3(0.0h); + half3 arg_0 = half3(1.0h); + half3 arg_1 = half3(1.0h); half3 res = fmax(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/445169.wgsl.expected.spvasm b/test/tint/builtins/gen/var/max/445169.wgsl.expected.spvasm index 5a3366ef32..6c31171914 100644 --- a/test/tint/builtins/gen/var/max/445169.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/max/445169.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %20 = OpExtInstImport "GLSL.std.450" + %22 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -39,42 +39,44 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %24 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %max_445169 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3half Function %15 - %arg_1 = OpVariable %_ptr_Function_v3half Function %15 - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - %21 = OpLoad %v3half %arg_0 - %22 = OpLoad %v3half %arg_1 - %19 = OpExtInst %v3half %20 NMax %21 %22 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v3half Function %19 + %arg_1 = OpVariable %_ptr_Function_v3half Function %19 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + %23 = OpLoad %v3half %arg_0 + %24 = OpLoad %v3half %arg_1 + %21 = OpExtInst %v3half %22 NMax %23 %24 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %max_445169 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %max_445169 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %max_445169 + %35 = OpLabel + %36 = OpFunctionCall %void %max_445169 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %max_445169 + %38 = OpLabel + %39 = OpFunctionCall %void %max_445169 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/max/445169.wgsl.expected.wgsl b/test/tint/builtins/gen/var/max/445169.wgsl.expected.wgsl index e21636f485..56f7d93cb9 100644 --- a/test/tint/builtins/gen/var/max/445169.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/max/445169.wgsl.expected.wgsl @@ -1,8 +1,8 @@ enable f16; fn max_445169() { - var arg_0 = vec3(f16()); - var arg_1 = vec3(f16()); + var arg_0 = vec3(1.0h); + var arg_1 = vec3(1.0h); var res : vec3 = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/e14f2b.wgsl b/test/tint/builtins/gen/var/max/e14f2b.wgsl index 12fd3d9a48..c714541ac3 100644 --- a/test/tint/builtins/gen/var/max/e14f2b.wgsl +++ b/test/tint/builtins/gen/var/max/e14f2b.wgsl @@ -25,8 +25,8 @@ enable f16; // fn max(vec<4, f16>, vec<4, f16>) -> vec<4, f16> fn max_e14f2b() { - var arg_0 = vec4(f16()); - var arg_1 = vec4(f16()); + var arg_0 = vec4(1.h); + var arg_1 = vec4(1.h); var res: vec4 = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/e14f2b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/max/e14f2b.wgsl.expected.dxc.hlsl index c0f6659fd2..f2e6da2090 100644 --- a/test/tint/builtins/gen/var/max/e14f2b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/max/e14f2b.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void max_e14f2b() { - vector arg_0 = (float16_t(0.0h)).xxxx; - vector arg_1 = (float16_t(0.0h)).xxxx; + vector arg_0 = (float16_t(1.0h)).xxxx; + vector arg_1 = (float16_t(1.0h)).xxxx; vector res = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/e14f2b.wgsl.expected.glsl b/test/tint/builtins/gen/var/max/e14f2b.wgsl.expected.glsl index 9c13143714..36d4e0683c 100644 --- a/test/tint/builtins/gen/var/max/e14f2b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/max/e14f2b.wgsl.expected.glsl @@ -2,8 +2,8 @@ #extension GL_AMD_gpu_shader_half_float : require void max_e14f2b() { - f16vec4 arg_0 = f16vec4(0.0hf); - f16vec4 arg_1 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_1 = f16vec4(1.0hf); f16vec4 res = max(arg_0, arg_1); } @@ -25,8 +25,8 @@ void main() { precision mediump float; void max_e14f2b() { - f16vec4 arg_0 = f16vec4(0.0hf); - f16vec4 arg_1 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_1 = f16vec4(1.0hf); f16vec4 res = max(arg_0, arg_1); } @@ -42,8 +42,8 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void max_e14f2b() { - f16vec4 arg_0 = f16vec4(0.0hf); - f16vec4 arg_1 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_1 = f16vec4(1.0hf); f16vec4 res = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/e14f2b.wgsl.expected.msl b/test/tint/builtins/gen/var/max/e14f2b.wgsl.expected.msl index 4410e6fff5..919b3f9aa9 100644 --- a/test/tint/builtins/gen/var/max/e14f2b.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/max/e14f2b.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void max_e14f2b() { - half4 arg_0 = half4(0.0h); - half4 arg_1 = half4(0.0h); + half4 arg_0 = half4(1.0h); + half4 arg_1 = half4(1.0h); half4 res = fmax(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/e14f2b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/max/e14f2b.wgsl.expected.spvasm index 99fc971989..11eb17178d 100644 --- a/test/tint/builtins/gen/var/max/e14f2b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/max/e14f2b.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %20 = OpExtInstImport "GLSL.std.450" + %22 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -39,42 +39,44 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %24 = OpTypeFunction %v4float + %19 = OpConstantNull %v4half + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %max_e14f2b = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4half Function %15 - %arg_1 = OpVariable %_ptr_Function_v4half Function %15 - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - %21 = OpLoad %v4half %arg_0 - %22 = OpLoad %v4half %arg_1 - %19 = OpExtInst %v4half %20 NMax %21 %22 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v4half Function %19 + %arg_1 = OpVariable %_ptr_Function_v4half Function %19 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + %23 = OpLoad %v4half %arg_0 + %24 = OpLoad %v4half %arg_1 + %21 = OpExtInst %v4half %22 NMax %23 %24 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %max_e14f2b +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %max_e14f2b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %max_e14f2b + %35 = OpLabel + %36 = OpFunctionCall %void %max_e14f2b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %max_e14f2b + %38 = OpLabel + %39 = OpFunctionCall %void %max_e14f2b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/max/e14f2b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/max/e14f2b.wgsl.expected.wgsl index 446f509ff3..7473f10222 100644 --- a/test/tint/builtins/gen/var/max/e14f2b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/max/e14f2b.wgsl.expected.wgsl @@ -1,8 +1,8 @@ enable f16; fn max_e14f2b() { - var arg_0 = vec4(f16()); - var arg_1 = vec4(f16()); + var arg_0 = vec4(1.0h); + var arg_1 = vec4(1.0h); var res : vec4 = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/7c710a.wgsl b/test/tint/builtins/gen/var/min/7c710a.wgsl index 1ccd54e62c..b99bb84cd0 100644 --- a/test/tint/builtins/gen/var/min/7c710a.wgsl +++ b/test/tint/builtins/gen/var/min/7c710a.wgsl @@ -25,8 +25,8 @@ enable f16; // fn min(vec<4, f16>, vec<4, f16>) -> vec<4, f16> fn min_7c710a() { - var arg_0 = vec4(f16()); - var arg_1 = vec4(f16()); + var arg_0 = vec4(1.h); + var arg_1 = vec4(1.h); var res: vec4 = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/7c710a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/min/7c710a.wgsl.expected.dxc.hlsl index c47899a2ae..e47cb4333e 100644 --- a/test/tint/builtins/gen/var/min/7c710a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/min/7c710a.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void min_7c710a() { - vector arg_0 = (float16_t(0.0h)).xxxx; - vector arg_1 = (float16_t(0.0h)).xxxx; + vector arg_0 = (float16_t(1.0h)).xxxx; + vector arg_1 = (float16_t(1.0h)).xxxx; vector res = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/7c710a.wgsl.expected.glsl b/test/tint/builtins/gen/var/min/7c710a.wgsl.expected.glsl index e7acfb3b56..16d0a5016c 100644 --- a/test/tint/builtins/gen/var/min/7c710a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/min/7c710a.wgsl.expected.glsl @@ -2,8 +2,8 @@ #extension GL_AMD_gpu_shader_half_float : require void min_7c710a() { - f16vec4 arg_0 = f16vec4(0.0hf); - f16vec4 arg_1 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_1 = f16vec4(1.0hf); f16vec4 res = min(arg_0, arg_1); } @@ -25,8 +25,8 @@ void main() { precision mediump float; void min_7c710a() { - f16vec4 arg_0 = f16vec4(0.0hf); - f16vec4 arg_1 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_1 = f16vec4(1.0hf); f16vec4 res = min(arg_0, arg_1); } @@ -42,8 +42,8 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void min_7c710a() { - f16vec4 arg_0 = f16vec4(0.0hf); - f16vec4 arg_1 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_1 = f16vec4(1.0hf); f16vec4 res = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/7c710a.wgsl.expected.msl b/test/tint/builtins/gen/var/min/7c710a.wgsl.expected.msl index c3ccbdc0af..ccf9f901f7 100644 --- a/test/tint/builtins/gen/var/min/7c710a.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/min/7c710a.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void min_7c710a() { - half4 arg_0 = half4(0.0h); - half4 arg_1 = half4(0.0h); + half4 arg_0 = half4(1.0h); + half4 arg_1 = half4(1.0h); half4 res = fmin(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/7c710a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/min/7c710a.wgsl.expected.spvasm index d8aff45213..e17e61a1e1 100644 --- a/test/tint/builtins/gen/var/min/7c710a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/min/7c710a.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %20 = OpExtInstImport "GLSL.std.450" + %22 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -39,42 +39,44 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %24 = OpTypeFunction %v4float + %19 = OpConstantNull %v4half + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %min_7c710a = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4half Function %15 - %arg_1 = OpVariable %_ptr_Function_v4half Function %15 - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - %21 = OpLoad %v4half %arg_0 - %22 = OpLoad %v4half %arg_1 - %19 = OpExtInst %v4half %20 NMin %21 %22 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v4half Function %19 + %arg_1 = OpVariable %_ptr_Function_v4half Function %19 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + %23 = OpLoad %v4half %arg_0 + %24 = OpLoad %v4half %arg_1 + %21 = OpExtInst %v4half %22 NMin %23 %24 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %min_7c710a +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %min_7c710a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %min_7c710a + %35 = OpLabel + %36 = OpFunctionCall %void %min_7c710a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %min_7c710a + %38 = OpLabel + %39 = OpFunctionCall %void %min_7c710a OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/min/7c710a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/min/7c710a.wgsl.expected.wgsl index 24aba2c2e4..4250314aee 100644 --- a/test/tint/builtins/gen/var/min/7c710a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/min/7c710a.wgsl.expected.wgsl @@ -1,8 +1,8 @@ enable f16; fn min_7c710a() { - var arg_0 = vec4(f16()); - var arg_1 = vec4(f16()); + var arg_0 = vec4(1.0h); + var arg_1 = vec4(1.0h); var res : vec4 = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/ab0acd.wgsl b/test/tint/builtins/gen/var/min/ab0acd.wgsl index ea0e29c650..9c0c694d7b 100644 --- a/test/tint/builtins/gen/var/min/ab0acd.wgsl +++ b/test/tint/builtins/gen/var/min/ab0acd.wgsl @@ -25,8 +25,8 @@ enable f16; // fn min(vec<3, f16>, vec<3, f16>) -> vec<3, f16> fn min_ab0acd() { - var arg_0 = vec3(f16()); - var arg_1 = vec3(f16()); + var arg_0 = vec3(1.h); + var arg_1 = vec3(1.h); var res: vec3 = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/ab0acd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/min/ab0acd.wgsl.expected.dxc.hlsl index 10c5fadb0c..75b3365c13 100644 --- a/test/tint/builtins/gen/var/min/ab0acd.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/min/ab0acd.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void min_ab0acd() { - vector arg_0 = (float16_t(0.0h)).xxx; - vector arg_1 = (float16_t(0.0h)).xxx; + vector arg_0 = (float16_t(1.0h)).xxx; + vector arg_1 = (float16_t(1.0h)).xxx; vector res = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/ab0acd.wgsl.expected.glsl b/test/tint/builtins/gen/var/min/ab0acd.wgsl.expected.glsl index a8dfcfc241..98f76501f0 100644 --- a/test/tint/builtins/gen/var/min/ab0acd.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/min/ab0acd.wgsl.expected.glsl @@ -2,8 +2,8 @@ #extension GL_AMD_gpu_shader_half_float : require void min_ab0acd() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); f16vec3 res = min(arg_0, arg_1); } @@ -25,8 +25,8 @@ void main() { precision mediump float; void min_ab0acd() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); f16vec3 res = min(arg_0, arg_1); } @@ -42,8 +42,8 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void min_ab0acd() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); f16vec3 res = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/ab0acd.wgsl.expected.msl b/test/tint/builtins/gen/var/min/ab0acd.wgsl.expected.msl index ecf13e6f4b..970eb0f347 100644 --- a/test/tint/builtins/gen/var/min/ab0acd.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/min/ab0acd.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void min_ab0acd() { - half3 arg_0 = half3(0.0h); - half3 arg_1 = half3(0.0h); + half3 arg_0 = half3(1.0h); + half3 arg_1 = half3(1.0h); half3 res = fmin(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/ab0acd.wgsl.expected.spvasm b/test/tint/builtins/gen/var/min/ab0acd.wgsl.expected.spvasm index c3695bc6c4..497f91714a 100644 --- a/test/tint/builtins/gen/var/min/ab0acd.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/min/ab0acd.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %20 = OpExtInstImport "GLSL.std.450" + %22 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -39,42 +39,44 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %24 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %min_ab0acd = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3half Function %15 - %arg_1 = OpVariable %_ptr_Function_v3half Function %15 - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - %21 = OpLoad %v3half %arg_0 - %22 = OpLoad %v3half %arg_1 - %19 = OpExtInst %v3half %20 NMin %21 %22 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v3half Function %19 + %arg_1 = OpVariable %_ptr_Function_v3half Function %19 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + %23 = OpLoad %v3half %arg_0 + %24 = OpLoad %v3half %arg_1 + %21 = OpExtInst %v3half %22 NMin %23 %24 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %min_ab0acd +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %min_ab0acd OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %min_ab0acd + %35 = OpLabel + %36 = OpFunctionCall %void %min_ab0acd OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %min_ab0acd + %38 = OpLabel + %39 = OpFunctionCall %void %min_ab0acd OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/min/ab0acd.wgsl.expected.wgsl b/test/tint/builtins/gen/var/min/ab0acd.wgsl.expected.wgsl index 2c941443dc..b0fb3b2fd7 100644 --- a/test/tint/builtins/gen/var/min/ab0acd.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/min/ab0acd.wgsl.expected.wgsl @@ -1,8 +1,8 @@ enable f16; fn min_ab0acd() { - var arg_0 = vec3(f16()); - var arg_1 = vec3(f16()); + var arg_0 = vec3(1.0h); + var arg_1 = vec3(1.0h); var res : vec3 = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/ac84d6.wgsl b/test/tint/builtins/gen/var/min/ac84d6.wgsl index 8166c17b83..a81afe6a83 100644 --- a/test/tint/builtins/gen/var/min/ac84d6.wgsl +++ b/test/tint/builtins/gen/var/min/ac84d6.wgsl @@ -25,8 +25,8 @@ enable f16; // fn min(f16, f16) -> f16 fn min_ac84d6() { - var arg_0 = f16(); - var arg_1 = f16(); + var arg_0 = 1.h; + var arg_1 = 1.h; var res: f16 = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/ac84d6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/min/ac84d6.wgsl.expected.dxc.hlsl index 62864ef558..6d00fc369c 100644 --- a/test/tint/builtins/gen/var/min/ac84d6.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/min/ac84d6.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void min_ac84d6() { - float16_t arg_0 = float16_t(0.0h); - float16_t arg_1 = float16_t(0.0h); + float16_t arg_0 = float16_t(1.0h); + float16_t arg_1 = float16_t(1.0h); float16_t res = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/ac84d6.wgsl.expected.glsl b/test/tint/builtins/gen/var/min/ac84d6.wgsl.expected.glsl index e0ca81b8c2..4b92b8cd40 100644 --- a/test/tint/builtins/gen/var/min/ac84d6.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/min/ac84d6.wgsl.expected.glsl @@ -2,8 +2,8 @@ #extension GL_AMD_gpu_shader_half_float : require void min_ac84d6() { - float16_t arg_0 = 0.0hf; - float16_t arg_1 = 0.0hf; + float16_t arg_0 = 1.0hf; + float16_t arg_1 = 1.0hf; float16_t res = min(arg_0, arg_1); } @@ -25,8 +25,8 @@ void main() { precision mediump float; void min_ac84d6() { - float16_t arg_0 = 0.0hf; - float16_t arg_1 = 0.0hf; + float16_t arg_0 = 1.0hf; + float16_t arg_1 = 1.0hf; float16_t res = min(arg_0, arg_1); } @@ -42,8 +42,8 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void min_ac84d6() { - float16_t arg_0 = 0.0hf; - float16_t arg_1 = 0.0hf; + float16_t arg_0 = 1.0hf; + float16_t arg_1 = 1.0hf; float16_t res = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/ac84d6.wgsl.expected.msl b/test/tint/builtins/gen/var/min/ac84d6.wgsl.expected.msl index c8f31e2327..264a5073d3 100644 --- a/test/tint/builtins/gen/var/min/ac84d6.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/min/ac84d6.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void min_ac84d6() { - half arg_0 = 0.0h; - half arg_1 = 0.0h; + half arg_0 = 1.0h; + half arg_1 = 1.0h; half res = fmin(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/ac84d6.wgsl.expected.spvasm b/test/tint/builtins/gen/var/min/ac84d6.wgsl.expected.spvasm index 3f048ea8c7..6d286e3f19 100644 --- a/test/tint/builtins/gen/var/min/ac84d6.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/min/ac84d6.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,42 +38,43 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %23 = OpTypeFunction %v4float + %17 = OpConstantNull %half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %min_ac84d6 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_half Function %14 - %arg_1 = OpVariable %_ptr_Function_half Function %14 - %res = OpVariable %_ptr_Function_half Function %14 - OpStore %arg_0 %14 - OpStore %arg_1 %14 - %20 = OpLoad %half %arg_0 - %21 = OpLoad %half %arg_1 - %18 = OpExtInst %half %19 NMin %20 %21 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_half Function %17 + %arg_1 = OpVariable %_ptr_Function_half Function %17 + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %arg_0 %half_0x1p_0 + OpStore %arg_1 %half_0x1p_0 + %21 = OpLoad %half %arg_0 + %22 = OpLoad %half %arg_1 + %19 = OpExtInst %half %20 NMin %21 %22 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %min_ac84d6 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %min_ac84d6 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %min_ac84d6 + %33 = OpLabel + %34 = OpFunctionCall %void %min_ac84d6 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %min_ac84d6 + %36 = OpLabel + %37 = OpFunctionCall %void %min_ac84d6 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/min/ac84d6.wgsl.expected.wgsl b/test/tint/builtins/gen/var/min/ac84d6.wgsl.expected.wgsl index 508794c237..9654ad33d8 100644 --- a/test/tint/builtins/gen/var/min/ac84d6.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/min/ac84d6.wgsl.expected.wgsl @@ -1,8 +1,8 @@ enable f16; fn min_ac84d6() { - var arg_0 = f16(); - var arg_1 = f16(); + var arg_0 = 1.0h; + var arg_1 = 1.0h; var res : f16 = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/e780f9.wgsl b/test/tint/builtins/gen/var/min/e780f9.wgsl index 58e70eb280..9e11b5ac36 100644 --- a/test/tint/builtins/gen/var/min/e780f9.wgsl +++ b/test/tint/builtins/gen/var/min/e780f9.wgsl @@ -25,8 +25,8 @@ enable f16; // fn min(vec<2, f16>, vec<2, f16>) -> vec<2, f16> fn min_e780f9() { - var arg_0 = vec2(f16()); - var arg_1 = vec2(f16()); + var arg_0 = vec2(1.h); + var arg_1 = vec2(1.h); var res: vec2 = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/e780f9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/min/e780f9.wgsl.expected.dxc.hlsl index b2b207d346..b072226ace 100644 --- a/test/tint/builtins/gen/var/min/e780f9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/min/e780f9.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void min_e780f9() { - vector arg_0 = (float16_t(0.0h)).xx; - vector arg_1 = (float16_t(0.0h)).xx; + vector arg_0 = (float16_t(1.0h)).xx; + vector arg_1 = (float16_t(1.0h)).xx; vector res = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/e780f9.wgsl.expected.glsl b/test/tint/builtins/gen/var/min/e780f9.wgsl.expected.glsl index 7942c5eae6..9ffa9febaa 100644 --- a/test/tint/builtins/gen/var/min/e780f9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/min/e780f9.wgsl.expected.glsl @@ -2,8 +2,8 @@ #extension GL_AMD_gpu_shader_half_float : require void min_e780f9() { - f16vec2 arg_0 = f16vec2(0.0hf); - f16vec2 arg_1 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_1 = f16vec2(1.0hf); f16vec2 res = min(arg_0, arg_1); } @@ -25,8 +25,8 @@ void main() { precision mediump float; void min_e780f9() { - f16vec2 arg_0 = f16vec2(0.0hf); - f16vec2 arg_1 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_1 = f16vec2(1.0hf); f16vec2 res = min(arg_0, arg_1); } @@ -42,8 +42,8 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void min_e780f9() { - f16vec2 arg_0 = f16vec2(0.0hf); - f16vec2 arg_1 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_1 = f16vec2(1.0hf); f16vec2 res = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/e780f9.wgsl.expected.msl b/test/tint/builtins/gen/var/min/e780f9.wgsl.expected.msl index 49649a3c4f..11a0d62d17 100644 --- a/test/tint/builtins/gen/var/min/e780f9.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/min/e780f9.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void min_e780f9() { - half2 arg_0 = half2(0.0h); - half2 arg_1 = half2(0.0h); + half2 arg_0 = half2(1.0h); + half2 arg_1 = half2(1.0h); half2 res = fmin(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/e780f9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/min/e780f9.wgsl.expected.spvasm index aac4bd1ecc..6119fe179e 100644 --- a/test/tint/builtins/gen/var/min/e780f9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/min/e780f9.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %20 = OpExtInstImport "GLSL.std.450" + %22 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -39,42 +39,44 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %24 = OpTypeFunction %v4float + %19 = OpConstantNull %v2half + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %min_e780f9 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2half Function %15 - %arg_1 = OpVariable %_ptr_Function_v2half Function %15 - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - %21 = OpLoad %v2half %arg_0 - %22 = OpLoad %v2half %arg_1 - %19 = OpExtInst %v2half %20 NMin %21 %22 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v2half Function %19 + %arg_1 = OpVariable %_ptr_Function_v2half Function %19 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + %23 = OpLoad %v2half %arg_0 + %24 = OpLoad %v2half %arg_1 + %21 = OpExtInst %v2half %22 NMin %23 %24 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %min_e780f9 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %min_e780f9 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %min_e780f9 + %35 = OpLabel + %36 = OpFunctionCall %void %min_e780f9 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %min_e780f9 + %38 = OpLabel + %39 = OpFunctionCall %void %min_e780f9 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/min/e780f9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/min/e780f9.wgsl.expected.wgsl index ce1ac48788..7d43618ee7 100644 --- a/test/tint/builtins/gen/var/min/e780f9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/min/e780f9.wgsl.expected.wgsl @@ -1,8 +1,8 @@ enable f16; fn min_e780f9() { - var arg_0 = vec2(f16()); - var arg_1 = vec2(f16()); + var arg_0 = vec2(1.0h); + var arg_1 = vec2(1.0h); var res : vec2 = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/mix/38cbbb.wgsl b/test/tint/builtins/gen/var/mix/38cbbb.wgsl index c319eeae80..0a36f243e0 100644 --- a/test/tint/builtins/gen/var/mix/38cbbb.wgsl +++ b/test/tint/builtins/gen/var/mix/38cbbb.wgsl @@ -25,9 +25,9 @@ enable f16; // fn mix(f16, f16, f16) -> f16 fn mix_38cbbb() { - var arg_0 = f16(); - var arg_1 = f16(); - var arg_2 = f16(); + var arg_0 = 1.h; + var arg_1 = 1.h; + var arg_2 = 1.h; var res: f16 = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/38cbbb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/mix/38cbbb.wgsl.expected.dxc.hlsl index a0edd4a44c..167fb8887e 100644 --- a/test/tint/builtins/gen/var/mix/38cbbb.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/mix/38cbbb.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void mix_38cbbb() { - float16_t arg_0 = float16_t(0.0h); - float16_t arg_1 = float16_t(0.0h); - float16_t arg_2 = float16_t(0.0h); + float16_t arg_0 = float16_t(1.0h); + float16_t arg_1 = float16_t(1.0h); + float16_t arg_2 = float16_t(1.0h); float16_t res = lerp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/38cbbb.wgsl.expected.glsl b/test/tint/builtins/gen/var/mix/38cbbb.wgsl.expected.glsl index c5da8564ad..a4b6259a16 100644 --- a/test/tint/builtins/gen/var/mix/38cbbb.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/mix/38cbbb.wgsl.expected.glsl @@ -2,9 +2,9 @@ #extension GL_AMD_gpu_shader_half_float : require void mix_38cbbb() { - float16_t arg_0 = 0.0hf; - float16_t arg_1 = 0.0hf; - float16_t arg_2 = 0.0hf; + float16_t arg_0 = 1.0hf; + float16_t arg_1 = 1.0hf; + float16_t arg_2 = 1.0hf; float16_t res = mix(arg_0, arg_1, arg_2); } @@ -26,9 +26,9 @@ void main() { precision mediump float; void mix_38cbbb() { - float16_t arg_0 = 0.0hf; - float16_t arg_1 = 0.0hf; - float16_t arg_2 = 0.0hf; + float16_t arg_0 = 1.0hf; + float16_t arg_1 = 1.0hf; + float16_t arg_2 = 1.0hf; float16_t res = mix(arg_0, arg_1, arg_2); } @@ -44,9 +44,9 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void mix_38cbbb() { - float16_t arg_0 = 0.0hf; - float16_t arg_1 = 0.0hf; - float16_t arg_2 = 0.0hf; + float16_t arg_0 = 1.0hf; + float16_t arg_1 = 1.0hf; + float16_t arg_2 = 1.0hf; float16_t res = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/38cbbb.wgsl.expected.msl b/test/tint/builtins/gen/var/mix/38cbbb.wgsl.expected.msl index 45b6845d57..98dc09d094 100644 --- a/test/tint/builtins/gen/var/mix/38cbbb.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/mix/38cbbb.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void mix_38cbbb() { - half arg_0 = 0.0h; - half arg_1 = 0.0h; - half arg_2 = 0.0h; + half arg_0 = 1.0h; + half arg_1 = 1.0h; + half arg_2 = 1.0h; half res = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/38cbbb.wgsl.expected.spvasm b/test/tint/builtins/gen/var/mix/38cbbb.wgsl.expected.spvasm index 601a4f8eab..eac22c3e97 100644 --- a/test/tint/builtins/gen/var/mix/38cbbb.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/mix/38cbbb.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 40 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %20 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -39,45 +39,46 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %25 = OpTypeFunction %v4float + %17 = OpConstantNull %half + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %mix_38cbbb = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_half Function %14 - %arg_1 = OpVariable %_ptr_Function_half Function %14 - %arg_2 = OpVariable %_ptr_Function_half Function %14 - %res = OpVariable %_ptr_Function_half Function %14 - OpStore %arg_0 %14 - OpStore %arg_1 %14 - OpStore %arg_2 %14 - %21 = OpLoad %half %arg_0 - %22 = OpLoad %half %arg_1 - %23 = OpLoad %half %arg_2 - %19 = OpExtInst %half %20 FMix %21 %22 %23 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_half Function %17 + %arg_1 = OpVariable %_ptr_Function_half Function %17 + %arg_2 = OpVariable %_ptr_Function_half Function %17 + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %arg_0 %half_0x1p_0 + OpStore %arg_1 %half_0x1p_0 + OpStore %arg_2 %half_0x1p_0 + %22 = OpLoad %half %arg_0 + %23 = OpLoad %half %arg_1 + %24 = OpLoad %half %arg_2 + %20 = OpExtInst %half %21 FMix %22 %23 %24 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %mix_38cbbb +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %mix_38cbbb OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %mix_38cbbb + %35 = OpLabel + %36 = OpFunctionCall %void %mix_38cbbb OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %37 = OpLabel - %38 = OpFunctionCall %void %mix_38cbbb + %38 = OpLabel + %39 = OpFunctionCall %void %mix_38cbbb OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/mix/38cbbb.wgsl.expected.wgsl b/test/tint/builtins/gen/var/mix/38cbbb.wgsl.expected.wgsl index 89050575f2..1da8d88516 100644 --- a/test/tint/builtins/gen/var/mix/38cbbb.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/mix/38cbbb.wgsl.expected.wgsl @@ -1,9 +1,9 @@ enable f16; fn mix_38cbbb() { - var arg_0 = f16(); - var arg_1 = f16(); - var arg_2 = f16(); + var arg_0 = 1.0h; + var arg_1 = 1.0h; + var arg_2 = 1.0h; var res : f16 = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/63f2fd.wgsl b/test/tint/builtins/gen/var/mix/63f2fd.wgsl index b68ae29f2a..58392163c3 100644 --- a/test/tint/builtins/gen/var/mix/63f2fd.wgsl +++ b/test/tint/builtins/gen/var/mix/63f2fd.wgsl @@ -25,9 +25,9 @@ enable f16; // fn mix(vec<3, f16>, vec<3, f16>, vec<3, f16>) -> vec<3, f16> fn mix_63f2fd() { - var arg_0 = vec3(f16()); - var arg_1 = vec3(f16()); - var arg_2 = vec3(f16()); + var arg_0 = vec3(1.h); + var arg_1 = vec3(1.h); + var arg_2 = vec3(1.h); var res: vec3 = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/63f2fd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/mix/63f2fd.wgsl.expected.dxc.hlsl index 64200d6d08..8bbc511a18 100644 --- a/test/tint/builtins/gen/var/mix/63f2fd.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/mix/63f2fd.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void mix_63f2fd() { - vector arg_0 = (float16_t(0.0h)).xxx; - vector arg_1 = (float16_t(0.0h)).xxx; - vector arg_2 = (float16_t(0.0h)).xxx; + vector arg_0 = (float16_t(1.0h)).xxx; + vector arg_1 = (float16_t(1.0h)).xxx; + vector arg_2 = (float16_t(1.0h)).xxx; vector res = lerp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/63f2fd.wgsl.expected.glsl b/test/tint/builtins/gen/var/mix/63f2fd.wgsl.expected.glsl index 21b513d39b..9651c99889 100644 --- a/test/tint/builtins/gen/var/mix/63f2fd.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/mix/63f2fd.wgsl.expected.glsl @@ -2,9 +2,9 @@ #extension GL_AMD_gpu_shader_half_float : require void mix_63f2fd() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); - f16vec3 arg_2 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); + f16vec3 arg_2 = f16vec3(1.0hf); f16vec3 res = mix(arg_0, arg_1, arg_2); } @@ -26,9 +26,9 @@ void main() { precision mediump float; void mix_63f2fd() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); - f16vec3 arg_2 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); + f16vec3 arg_2 = f16vec3(1.0hf); f16vec3 res = mix(arg_0, arg_1, arg_2); } @@ -44,9 +44,9 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void mix_63f2fd() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); - f16vec3 arg_2 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); + f16vec3 arg_2 = f16vec3(1.0hf); f16vec3 res = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/63f2fd.wgsl.expected.msl b/test/tint/builtins/gen/var/mix/63f2fd.wgsl.expected.msl index 434d37abf8..e738ae55fb 100644 --- a/test/tint/builtins/gen/var/mix/63f2fd.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/mix/63f2fd.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void mix_63f2fd() { - half3 arg_0 = half3(0.0h); - half3 arg_1 = half3(0.0h); - half3 arg_2 = half3(0.0h); + half3 arg_0 = half3(1.0h); + half3 arg_1 = half3(1.0h); + half3 arg_2 = half3(1.0h); half3 res = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/63f2fd.wgsl.expected.spvasm b/test/tint/builtins/gen/var/mix/63f2fd.wgsl.expected.spvasm index 44f6f950c1..e02acfa653 100644 --- a/test/tint/builtins/gen/var/mix/63f2fd.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/mix/63f2fd.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 42 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %21 = OpExtInstImport "GLSL.std.450" + %23 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -40,45 +40,47 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %26 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %mix_63f2fd = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3half Function %15 - %arg_1 = OpVariable %_ptr_Function_v3half Function %15 - %arg_2 = OpVariable %_ptr_Function_v3half Function %15 - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - OpStore %arg_2 %15 - %22 = OpLoad %v3half %arg_0 - %23 = OpLoad %v3half %arg_1 - %24 = OpLoad %v3half %arg_2 - %20 = OpExtInst %v3half %21 FMix %22 %23 %24 - OpStore %res %20 + %arg_0 = OpVariable %_ptr_Function_v3half Function %19 + %arg_1 = OpVariable %_ptr_Function_v3half Function %19 + %arg_2 = OpVariable %_ptr_Function_v3half Function %19 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + OpStore %arg_2 %16 + %24 = OpLoad %v3half %arg_0 + %25 = OpLoad %v3half %arg_1 + %26 = OpLoad %v3half %arg_2 + %22 = OpExtInst %v3half %23 FMix %24 %25 %26 + OpStore %res %22 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %mix_63f2fd +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %mix_63f2fd OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %mix_63f2fd + %37 = OpLabel + %38 = OpFunctionCall %void %mix_63f2fd OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %void %mix_63f2fd + %40 = OpLabel + %41 = OpFunctionCall %void %mix_63f2fd OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/mix/63f2fd.wgsl.expected.wgsl b/test/tint/builtins/gen/var/mix/63f2fd.wgsl.expected.wgsl index 803966f310..9475f3d383 100644 --- a/test/tint/builtins/gen/var/mix/63f2fd.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/mix/63f2fd.wgsl.expected.wgsl @@ -1,9 +1,9 @@ enable f16; fn mix_63f2fd() { - var arg_0 = vec3(f16()); - var arg_1 = vec3(f16()); - var arg_2 = vec3(f16()); + var arg_0 = vec3(1.0h); + var arg_1 = vec3(1.0h); + var arg_2 = vec3(1.0h); var res : vec3 = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/98ee3e.wgsl b/test/tint/builtins/gen/var/mix/98ee3e.wgsl index 4ad0e03b51..969f6963f3 100644 --- a/test/tint/builtins/gen/var/mix/98ee3e.wgsl +++ b/test/tint/builtins/gen/var/mix/98ee3e.wgsl @@ -25,9 +25,9 @@ enable f16; // fn mix(vec<2, f16>, vec<2, f16>, vec<2, f16>) -> vec<2, f16> fn mix_98ee3e() { - var arg_0 = vec2(f16()); - var arg_1 = vec2(f16()); - var arg_2 = vec2(f16()); + var arg_0 = vec2(1.h); + var arg_1 = vec2(1.h); + var arg_2 = vec2(1.h); var res: vec2 = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/98ee3e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/mix/98ee3e.wgsl.expected.dxc.hlsl index 4c9b6cd1a9..77c92aa003 100644 --- a/test/tint/builtins/gen/var/mix/98ee3e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/mix/98ee3e.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void mix_98ee3e() { - vector arg_0 = (float16_t(0.0h)).xx; - vector arg_1 = (float16_t(0.0h)).xx; - vector arg_2 = (float16_t(0.0h)).xx; + vector arg_0 = (float16_t(1.0h)).xx; + vector arg_1 = (float16_t(1.0h)).xx; + vector arg_2 = (float16_t(1.0h)).xx; vector res = lerp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/98ee3e.wgsl.expected.glsl b/test/tint/builtins/gen/var/mix/98ee3e.wgsl.expected.glsl index 4fe64a06d4..19a996c0a0 100644 --- a/test/tint/builtins/gen/var/mix/98ee3e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/mix/98ee3e.wgsl.expected.glsl @@ -2,9 +2,9 @@ #extension GL_AMD_gpu_shader_half_float : require void mix_98ee3e() { - f16vec2 arg_0 = f16vec2(0.0hf); - f16vec2 arg_1 = f16vec2(0.0hf); - f16vec2 arg_2 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_1 = f16vec2(1.0hf); + f16vec2 arg_2 = f16vec2(1.0hf); f16vec2 res = mix(arg_0, arg_1, arg_2); } @@ -26,9 +26,9 @@ void main() { precision mediump float; void mix_98ee3e() { - f16vec2 arg_0 = f16vec2(0.0hf); - f16vec2 arg_1 = f16vec2(0.0hf); - f16vec2 arg_2 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_1 = f16vec2(1.0hf); + f16vec2 arg_2 = f16vec2(1.0hf); f16vec2 res = mix(arg_0, arg_1, arg_2); } @@ -44,9 +44,9 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void mix_98ee3e() { - f16vec2 arg_0 = f16vec2(0.0hf); - f16vec2 arg_1 = f16vec2(0.0hf); - f16vec2 arg_2 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_1 = f16vec2(1.0hf); + f16vec2 arg_2 = f16vec2(1.0hf); f16vec2 res = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/98ee3e.wgsl.expected.msl b/test/tint/builtins/gen/var/mix/98ee3e.wgsl.expected.msl index 6dab70bbfe..1a2c97a68f 100644 --- a/test/tint/builtins/gen/var/mix/98ee3e.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/mix/98ee3e.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void mix_98ee3e() { - half2 arg_0 = half2(0.0h); - half2 arg_1 = half2(0.0h); - half2 arg_2 = half2(0.0h); + half2 arg_0 = half2(1.0h); + half2 arg_1 = half2(1.0h); + half2 arg_2 = half2(1.0h); half2 res = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/98ee3e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/mix/98ee3e.wgsl.expected.spvasm index 94ac72eb65..368245f319 100644 --- a/test/tint/builtins/gen/var/mix/98ee3e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/mix/98ee3e.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 42 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %21 = OpExtInstImport "GLSL.std.450" + %23 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -40,45 +40,47 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %26 = OpTypeFunction %v4float + %19 = OpConstantNull %v2half + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %mix_98ee3e = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2half Function %15 - %arg_1 = OpVariable %_ptr_Function_v2half Function %15 - %arg_2 = OpVariable %_ptr_Function_v2half Function %15 - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - OpStore %arg_2 %15 - %22 = OpLoad %v2half %arg_0 - %23 = OpLoad %v2half %arg_1 - %24 = OpLoad %v2half %arg_2 - %20 = OpExtInst %v2half %21 FMix %22 %23 %24 - OpStore %res %20 + %arg_0 = OpVariable %_ptr_Function_v2half Function %19 + %arg_1 = OpVariable %_ptr_Function_v2half Function %19 + %arg_2 = OpVariable %_ptr_Function_v2half Function %19 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + OpStore %arg_2 %16 + %24 = OpLoad %v2half %arg_0 + %25 = OpLoad %v2half %arg_1 + %26 = OpLoad %v2half %arg_2 + %22 = OpExtInst %v2half %23 FMix %24 %25 %26 + OpStore %res %22 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %mix_98ee3e +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %mix_98ee3e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %mix_98ee3e + %37 = OpLabel + %38 = OpFunctionCall %void %mix_98ee3e OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %void %mix_98ee3e + %40 = OpLabel + %41 = OpFunctionCall %void %mix_98ee3e OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/mix/98ee3e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/mix/98ee3e.wgsl.expected.wgsl index 28738df928..3209439985 100644 --- a/test/tint/builtins/gen/var/mix/98ee3e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/mix/98ee3e.wgsl.expected.wgsl @@ -1,9 +1,9 @@ enable f16; fn mix_98ee3e() { - var arg_0 = vec2(f16()); - var arg_1 = vec2(f16()); - var arg_2 = vec2(f16()); + var arg_0 = vec2(1.0h); + var arg_1 = vec2(1.0h); + var arg_2 = vec2(1.0h); var res : vec2 = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/c1aec6.wgsl b/test/tint/builtins/gen/var/mix/c1aec6.wgsl index 6eabaff9fa..b90bd7a175 100644 --- a/test/tint/builtins/gen/var/mix/c1aec6.wgsl +++ b/test/tint/builtins/gen/var/mix/c1aec6.wgsl @@ -25,9 +25,9 @@ enable f16; // fn mix(vec<3, f16>, vec<3, f16>, f16) -> vec<3, f16> fn mix_c1aec6() { - var arg_0 = vec3(f16()); - var arg_1 = vec3(f16()); - var arg_2 = f16(); + var arg_0 = vec3(1.h); + var arg_1 = vec3(1.h); + var arg_2 = 1.h; var res: vec3 = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/c1aec6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/mix/c1aec6.wgsl.expected.dxc.hlsl index fae485c639..f0543f9586 100644 --- a/test/tint/builtins/gen/var/mix/c1aec6.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/mix/c1aec6.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void mix_c1aec6() { - vector arg_0 = (float16_t(0.0h)).xxx; - vector arg_1 = (float16_t(0.0h)).xxx; - float16_t arg_2 = float16_t(0.0h); + vector arg_0 = (float16_t(1.0h)).xxx; + vector arg_1 = (float16_t(1.0h)).xxx; + float16_t arg_2 = float16_t(1.0h); vector res = lerp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/c1aec6.wgsl.expected.glsl b/test/tint/builtins/gen/var/mix/c1aec6.wgsl.expected.glsl index 8eba39093f..f8f3e7c422 100644 --- a/test/tint/builtins/gen/var/mix/c1aec6.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/mix/c1aec6.wgsl.expected.glsl @@ -2,9 +2,9 @@ #extension GL_AMD_gpu_shader_half_float : require void mix_c1aec6() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); - float16_t arg_2 = 0.0hf; + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); + float16_t arg_2 = 1.0hf; f16vec3 res = mix(arg_0, arg_1, arg_2); } @@ -26,9 +26,9 @@ void main() { precision mediump float; void mix_c1aec6() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); - float16_t arg_2 = 0.0hf; + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); + float16_t arg_2 = 1.0hf; f16vec3 res = mix(arg_0, arg_1, arg_2); } @@ -44,9 +44,9 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void mix_c1aec6() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); - float16_t arg_2 = 0.0hf; + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); + float16_t arg_2 = 1.0hf; f16vec3 res = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/c1aec6.wgsl.expected.msl b/test/tint/builtins/gen/var/mix/c1aec6.wgsl.expected.msl index c8161a6c39..20866727ac 100644 --- a/test/tint/builtins/gen/var/mix/c1aec6.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/mix/c1aec6.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void mix_c1aec6() { - half3 arg_0 = half3(0.0h); - half3 arg_1 = half3(0.0h); - half arg_2 = 0.0h; + half3 arg_0 = half3(1.0h); + half3 arg_1 = half3(1.0h); + half arg_2 = 1.0h; half3 res = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/c1aec6.wgsl.expected.spvasm b/test/tint/builtins/gen/var/mix/c1aec6.wgsl.expected.spvasm index e20acfdde2..3498a35094 100644 --- a/test/tint/builtins/gen/var/mix/c1aec6.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/mix/c1aec6.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 44 +; Bound: 46 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %23 = OpExtInstImport "GLSL.std.450" + %25 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -40,49 +40,51 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %19 = OpConstantNull %half + %19 = OpConstantNull %v3half %_ptr_Function_half = OpTypePointer Function %half - %30 = OpTypeFunction %v4float + %23 = OpConstantNull %half + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %mix_c1aec6 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3half Function %15 - %arg_1 = OpVariable %_ptr_Function_v3half Function %15 - %arg_2 = OpVariable %_ptr_Function_half Function %19 - %27 = OpVariable %_ptr_Function_v3half Function %15 - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - OpStore %arg_2 %19 - %24 = OpLoad %v3half %arg_0 - %25 = OpLoad %v3half %arg_1 - %26 = OpLoad %half %arg_2 - %28 = OpCompositeConstruct %v3half %26 %26 %26 - %22 = OpExtInst %v3half %23 FMix %24 %25 %28 - OpStore %res %22 + %arg_0 = OpVariable %_ptr_Function_v3half Function %19 + %arg_1 = OpVariable %_ptr_Function_v3half Function %19 + %arg_2 = OpVariable %_ptr_Function_half Function %23 + %29 = OpVariable %_ptr_Function_v3half Function %19 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + OpStore %arg_2 %half_0x1p_0 + %26 = OpLoad %v3half %arg_0 + %27 = OpLoad %v3half %arg_1 + %28 = OpLoad %half %arg_2 + %30 = OpCompositeConstruct %v3half %28 %28 %28 + %24 = OpExtInst %v3half %25 FMix %26 %27 %30 + OpStore %res %24 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %mix_c1aec6 +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %mix_c1aec6 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %36 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %39 = OpLabel - %40 = OpFunctionCall %void %mix_c1aec6 + %41 = OpLabel + %42 = OpFunctionCall %void %mix_c1aec6 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %42 = OpLabel - %43 = OpFunctionCall %void %mix_c1aec6 + %44 = OpLabel + %45 = OpFunctionCall %void %mix_c1aec6 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/mix/c1aec6.wgsl.expected.wgsl b/test/tint/builtins/gen/var/mix/c1aec6.wgsl.expected.wgsl index a66c0bc6b2..d6ceef5b64 100644 --- a/test/tint/builtins/gen/var/mix/c1aec6.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/mix/c1aec6.wgsl.expected.wgsl @@ -1,9 +1,9 @@ enable f16; fn mix_c1aec6() { - var arg_0 = vec3(f16()); - var arg_1 = vec3(f16()); - var arg_2 = f16(); + var arg_0 = vec3(1.0h); + var arg_1 = vec3(1.0h); + var arg_2 = 1.0h; var res : vec3 = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/e46a83.wgsl b/test/tint/builtins/gen/var/mix/e46a83.wgsl index 2dc7e65c5f..76a4327e57 100644 --- a/test/tint/builtins/gen/var/mix/e46a83.wgsl +++ b/test/tint/builtins/gen/var/mix/e46a83.wgsl @@ -25,9 +25,9 @@ enable f16; // fn mix(vec<2, f16>, vec<2, f16>, f16) -> vec<2, f16> fn mix_e46a83() { - var arg_0 = vec2(f16()); - var arg_1 = vec2(f16()); - var arg_2 = f16(); + var arg_0 = vec2(1.h); + var arg_1 = vec2(1.h); + var arg_2 = 1.h; var res: vec2 = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/e46a83.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/mix/e46a83.wgsl.expected.dxc.hlsl index f857864601..8f931602bd 100644 --- a/test/tint/builtins/gen/var/mix/e46a83.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/mix/e46a83.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void mix_e46a83() { - vector arg_0 = (float16_t(0.0h)).xx; - vector arg_1 = (float16_t(0.0h)).xx; - float16_t arg_2 = float16_t(0.0h); + vector arg_0 = (float16_t(1.0h)).xx; + vector arg_1 = (float16_t(1.0h)).xx; + float16_t arg_2 = float16_t(1.0h); vector res = lerp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/e46a83.wgsl.expected.glsl b/test/tint/builtins/gen/var/mix/e46a83.wgsl.expected.glsl index 63c9a84d04..5669373540 100644 --- a/test/tint/builtins/gen/var/mix/e46a83.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/mix/e46a83.wgsl.expected.glsl @@ -2,9 +2,9 @@ #extension GL_AMD_gpu_shader_half_float : require void mix_e46a83() { - f16vec2 arg_0 = f16vec2(0.0hf); - f16vec2 arg_1 = f16vec2(0.0hf); - float16_t arg_2 = 0.0hf; + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_1 = f16vec2(1.0hf); + float16_t arg_2 = 1.0hf; f16vec2 res = mix(arg_0, arg_1, arg_2); } @@ -26,9 +26,9 @@ void main() { precision mediump float; void mix_e46a83() { - f16vec2 arg_0 = f16vec2(0.0hf); - f16vec2 arg_1 = f16vec2(0.0hf); - float16_t arg_2 = 0.0hf; + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_1 = f16vec2(1.0hf); + float16_t arg_2 = 1.0hf; f16vec2 res = mix(arg_0, arg_1, arg_2); } @@ -44,9 +44,9 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void mix_e46a83() { - f16vec2 arg_0 = f16vec2(0.0hf); - f16vec2 arg_1 = f16vec2(0.0hf); - float16_t arg_2 = 0.0hf; + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_1 = f16vec2(1.0hf); + float16_t arg_2 = 1.0hf; f16vec2 res = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/e46a83.wgsl.expected.msl b/test/tint/builtins/gen/var/mix/e46a83.wgsl.expected.msl index 8fdd8f3869..1909e9e569 100644 --- a/test/tint/builtins/gen/var/mix/e46a83.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/mix/e46a83.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void mix_e46a83() { - half2 arg_0 = half2(0.0h); - half2 arg_1 = half2(0.0h); - half arg_2 = 0.0h; + half2 arg_0 = half2(1.0h); + half2 arg_1 = half2(1.0h); + half arg_2 = 1.0h; half2 res = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/e46a83.wgsl.expected.spvasm b/test/tint/builtins/gen/var/mix/e46a83.wgsl.expected.spvasm index 228e018447..ef4c8f3051 100644 --- a/test/tint/builtins/gen/var/mix/e46a83.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/mix/e46a83.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 44 +; Bound: 46 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %23 = OpExtInstImport "GLSL.std.450" + %25 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -40,49 +40,51 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %19 = OpConstantNull %half + %19 = OpConstantNull %v2half %_ptr_Function_half = OpTypePointer Function %half - %30 = OpTypeFunction %v4float + %23 = OpConstantNull %half + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %mix_e46a83 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2half Function %15 - %arg_1 = OpVariable %_ptr_Function_v2half Function %15 - %arg_2 = OpVariable %_ptr_Function_half Function %19 - %27 = OpVariable %_ptr_Function_v2half Function %15 - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - OpStore %arg_2 %19 - %24 = OpLoad %v2half %arg_0 - %25 = OpLoad %v2half %arg_1 - %26 = OpLoad %half %arg_2 - %28 = OpCompositeConstruct %v2half %26 %26 - %22 = OpExtInst %v2half %23 FMix %24 %25 %28 - OpStore %res %22 + %arg_0 = OpVariable %_ptr_Function_v2half Function %19 + %arg_1 = OpVariable %_ptr_Function_v2half Function %19 + %arg_2 = OpVariable %_ptr_Function_half Function %23 + %29 = OpVariable %_ptr_Function_v2half Function %19 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + OpStore %arg_2 %half_0x1p_0 + %26 = OpLoad %v2half %arg_0 + %27 = OpLoad %v2half %arg_1 + %28 = OpLoad %half %arg_2 + %30 = OpCompositeConstruct %v2half %28 %28 + %24 = OpExtInst %v2half %25 FMix %26 %27 %30 + OpStore %res %24 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %mix_e46a83 +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %mix_e46a83 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %36 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %39 = OpLabel - %40 = OpFunctionCall %void %mix_e46a83 + %41 = OpLabel + %42 = OpFunctionCall %void %mix_e46a83 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %42 = OpLabel - %43 = OpFunctionCall %void %mix_e46a83 + %44 = OpLabel + %45 = OpFunctionCall %void %mix_e46a83 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/mix/e46a83.wgsl.expected.wgsl b/test/tint/builtins/gen/var/mix/e46a83.wgsl.expected.wgsl index f08146ccc2..19cdcbf59f 100644 --- a/test/tint/builtins/gen/var/mix/e46a83.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/mix/e46a83.wgsl.expected.wgsl @@ -1,9 +1,9 @@ enable f16; fn mix_e46a83() { - var arg_0 = vec2(f16()); - var arg_1 = vec2(f16()); - var arg_2 = f16(); + var arg_0 = vec2(1.0h); + var arg_1 = vec2(1.0h); + var arg_2 = 1.0h; var res : vec2 = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/ee2468.wgsl b/test/tint/builtins/gen/var/mix/ee2468.wgsl index 63a60750a9..deb974144f 100644 --- a/test/tint/builtins/gen/var/mix/ee2468.wgsl +++ b/test/tint/builtins/gen/var/mix/ee2468.wgsl @@ -25,9 +25,9 @@ enable f16; // fn mix(vec<4, f16>, vec<4, f16>, vec<4, f16>) -> vec<4, f16> fn mix_ee2468() { - var arg_0 = vec4(f16()); - var arg_1 = vec4(f16()); - var arg_2 = vec4(f16()); + var arg_0 = vec4(1.h); + var arg_1 = vec4(1.h); + var arg_2 = vec4(1.h); var res: vec4 = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/ee2468.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/mix/ee2468.wgsl.expected.dxc.hlsl index 7ddd927daa..e5575822a8 100644 --- a/test/tint/builtins/gen/var/mix/ee2468.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/mix/ee2468.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void mix_ee2468() { - vector arg_0 = (float16_t(0.0h)).xxxx; - vector arg_1 = (float16_t(0.0h)).xxxx; - vector arg_2 = (float16_t(0.0h)).xxxx; + vector arg_0 = (float16_t(1.0h)).xxxx; + vector arg_1 = (float16_t(1.0h)).xxxx; + vector arg_2 = (float16_t(1.0h)).xxxx; vector res = lerp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/ee2468.wgsl.expected.glsl b/test/tint/builtins/gen/var/mix/ee2468.wgsl.expected.glsl index 7ca5dd01b4..8663a0b4c7 100644 --- a/test/tint/builtins/gen/var/mix/ee2468.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/mix/ee2468.wgsl.expected.glsl @@ -2,9 +2,9 @@ #extension GL_AMD_gpu_shader_half_float : require void mix_ee2468() { - f16vec4 arg_0 = f16vec4(0.0hf); - f16vec4 arg_1 = f16vec4(0.0hf); - f16vec4 arg_2 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_1 = f16vec4(1.0hf); + f16vec4 arg_2 = f16vec4(1.0hf); f16vec4 res = mix(arg_0, arg_1, arg_2); } @@ -26,9 +26,9 @@ void main() { precision mediump float; void mix_ee2468() { - f16vec4 arg_0 = f16vec4(0.0hf); - f16vec4 arg_1 = f16vec4(0.0hf); - f16vec4 arg_2 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_1 = f16vec4(1.0hf); + f16vec4 arg_2 = f16vec4(1.0hf); f16vec4 res = mix(arg_0, arg_1, arg_2); } @@ -44,9 +44,9 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void mix_ee2468() { - f16vec4 arg_0 = f16vec4(0.0hf); - f16vec4 arg_1 = f16vec4(0.0hf); - f16vec4 arg_2 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_1 = f16vec4(1.0hf); + f16vec4 arg_2 = f16vec4(1.0hf); f16vec4 res = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/ee2468.wgsl.expected.msl b/test/tint/builtins/gen/var/mix/ee2468.wgsl.expected.msl index f08697a96b..5f8350d11a 100644 --- a/test/tint/builtins/gen/var/mix/ee2468.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/mix/ee2468.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void mix_ee2468() { - half4 arg_0 = half4(0.0h); - half4 arg_1 = half4(0.0h); - half4 arg_2 = half4(0.0h); + half4 arg_0 = half4(1.0h); + half4 arg_1 = half4(1.0h); + half4 arg_2 = half4(1.0h); half4 res = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/ee2468.wgsl.expected.spvasm b/test/tint/builtins/gen/var/mix/ee2468.wgsl.expected.spvasm index 57a262cddd..ba10aef940 100644 --- a/test/tint/builtins/gen/var/mix/ee2468.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/mix/ee2468.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 42 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %21 = OpExtInstImport "GLSL.std.450" + %23 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -40,45 +40,47 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %26 = OpTypeFunction %v4float + %19 = OpConstantNull %v4half + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %mix_ee2468 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4half Function %15 - %arg_1 = OpVariable %_ptr_Function_v4half Function %15 - %arg_2 = OpVariable %_ptr_Function_v4half Function %15 - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - OpStore %arg_2 %15 - %22 = OpLoad %v4half %arg_0 - %23 = OpLoad %v4half %arg_1 - %24 = OpLoad %v4half %arg_2 - %20 = OpExtInst %v4half %21 FMix %22 %23 %24 - OpStore %res %20 + %arg_0 = OpVariable %_ptr_Function_v4half Function %19 + %arg_1 = OpVariable %_ptr_Function_v4half Function %19 + %arg_2 = OpVariable %_ptr_Function_v4half Function %19 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + OpStore %arg_2 %16 + %24 = OpLoad %v4half %arg_0 + %25 = OpLoad %v4half %arg_1 + %26 = OpLoad %v4half %arg_2 + %22 = OpExtInst %v4half %23 FMix %24 %25 %26 + OpStore %res %22 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %mix_ee2468 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %mix_ee2468 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %mix_ee2468 + %37 = OpLabel + %38 = OpFunctionCall %void %mix_ee2468 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %void %mix_ee2468 + %40 = OpLabel + %41 = OpFunctionCall %void %mix_ee2468 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/mix/ee2468.wgsl.expected.wgsl b/test/tint/builtins/gen/var/mix/ee2468.wgsl.expected.wgsl index 1ab03948ba..dce3429f86 100644 --- a/test/tint/builtins/gen/var/mix/ee2468.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/mix/ee2468.wgsl.expected.wgsl @@ -1,9 +1,9 @@ enable f16; fn mix_ee2468() { - var arg_0 = vec4(f16()); - var arg_1 = vec4(f16()); - var arg_2 = vec4(f16()); + var arg_0 = vec4(1.0h); + var arg_1 = vec4(1.0h); + var arg_2 = vec4(1.0h); var res : vec4 = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/f1a543.wgsl b/test/tint/builtins/gen/var/mix/f1a543.wgsl index fc47f42d8d..bb1271bc6c 100644 --- a/test/tint/builtins/gen/var/mix/f1a543.wgsl +++ b/test/tint/builtins/gen/var/mix/f1a543.wgsl @@ -25,9 +25,9 @@ enable f16; // fn mix(vec<4, f16>, vec<4, f16>, f16) -> vec<4, f16> fn mix_f1a543() { - var arg_0 = vec4(f16()); - var arg_1 = vec4(f16()); - var arg_2 = f16(); + var arg_0 = vec4(1.h); + var arg_1 = vec4(1.h); + var arg_2 = 1.h; var res: vec4 = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/f1a543.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/mix/f1a543.wgsl.expected.dxc.hlsl index e21963a103..7eca8530b5 100644 --- a/test/tint/builtins/gen/var/mix/f1a543.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/mix/f1a543.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void mix_f1a543() { - vector arg_0 = (float16_t(0.0h)).xxxx; - vector arg_1 = (float16_t(0.0h)).xxxx; - float16_t arg_2 = float16_t(0.0h); + vector arg_0 = (float16_t(1.0h)).xxxx; + vector arg_1 = (float16_t(1.0h)).xxxx; + float16_t arg_2 = float16_t(1.0h); vector res = lerp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/f1a543.wgsl.expected.glsl b/test/tint/builtins/gen/var/mix/f1a543.wgsl.expected.glsl index 4b023e5eb9..85904ca77d 100644 --- a/test/tint/builtins/gen/var/mix/f1a543.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/mix/f1a543.wgsl.expected.glsl @@ -2,9 +2,9 @@ #extension GL_AMD_gpu_shader_half_float : require void mix_f1a543() { - f16vec4 arg_0 = f16vec4(0.0hf); - f16vec4 arg_1 = f16vec4(0.0hf); - float16_t arg_2 = 0.0hf; + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_1 = f16vec4(1.0hf); + float16_t arg_2 = 1.0hf; f16vec4 res = mix(arg_0, arg_1, arg_2); } @@ -26,9 +26,9 @@ void main() { precision mediump float; void mix_f1a543() { - f16vec4 arg_0 = f16vec4(0.0hf); - f16vec4 arg_1 = f16vec4(0.0hf); - float16_t arg_2 = 0.0hf; + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_1 = f16vec4(1.0hf); + float16_t arg_2 = 1.0hf; f16vec4 res = mix(arg_0, arg_1, arg_2); } @@ -44,9 +44,9 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void mix_f1a543() { - f16vec4 arg_0 = f16vec4(0.0hf); - f16vec4 arg_1 = f16vec4(0.0hf); - float16_t arg_2 = 0.0hf; + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_1 = f16vec4(1.0hf); + float16_t arg_2 = 1.0hf; f16vec4 res = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/f1a543.wgsl.expected.msl b/test/tint/builtins/gen/var/mix/f1a543.wgsl.expected.msl index 2f8163dacc..bc6f44d188 100644 --- a/test/tint/builtins/gen/var/mix/f1a543.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/mix/f1a543.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void mix_f1a543() { - half4 arg_0 = half4(0.0h); - half4 arg_1 = half4(0.0h); - half arg_2 = 0.0h; + half4 arg_0 = half4(1.0h); + half4 arg_1 = half4(1.0h); + half arg_2 = 1.0h; half4 res = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/f1a543.wgsl.expected.spvasm b/test/tint/builtins/gen/var/mix/f1a543.wgsl.expected.spvasm index cd6d0099ca..ea36681e07 100644 --- a/test/tint/builtins/gen/var/mix/f1a543.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/mix/f1a543.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 44 +; Bound: 46 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %23 = OpExtInstImport "GLSL.std.450" + %25 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -40,49 +40,51 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %19 = OpConstantNull %half + %19 = OpConstantNull %v4half %_ptr_Function_half = OpTypePointer Function %half - %30 = OpTypeFunction %v4float + %23 = OpConstantNull %half + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %mix_f1a543 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4half Function %15 - %arg_1 = OpVariable %_ptr_Function_v4half Function %15 - %arg_2 = OpVariable %_ptr_Function_half Function %19 - %27 = OpVariable %_ptr_Function_v4half Function %15 - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - OpStore %arg_2 %19 - %24 = OpLoad %v4half %arg_0 - %25 = OpLoad %v4half %arg_1 - %26 = OpLoad %half %arg_2 - %28 = OpCompositeConstruct %v4half %26 %26 %26 %26 - %22 = OpExtInst %v4half %23 FMix %24 %25 %28 - OpStore %res %22 + %arg_0 = OpVariable %_ptr_Function_v4half Function %19 + %arg_1 = OpVariable %_ptr_Function_v4half Function %19 + %arg_2 = OpVariable %_ptr_Function_half Function %23 + %29 = OpVariable %_ptr_Function_v4half Function %19 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + OpStore %arg_2 %half_0x1p_0 + %26 = OpLoad %v4half %arg_0 + %27 = OpLoad %v4half %arg_1 + %28 = OpLoad %half %arg_2 + %30 = OpCompositeConstruct %v4half %28 %28 %28 %28 + %24 = OpExtInst %v4half %25 FMix %26 %27 %30 + OpStore %res %24 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %mix_f1a543 +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %mix_f1a543 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %36 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %39 = OpLabel - %40 = OpFunctionCall %void %mix_f1a543 + %41 = OpLabel + %42 = OpFunctionCall %void %mix_f1a543 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %42 = OpLabel - %43 = OpFunctionCall %void %mix_f1a543 + %44 = OpLabel + %45 = OpFunctionCall %void %mix_f1a543 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/mix/f1a543.wgsl.expected.wgsl b/test/tint/builtins/gen/var/mix/f1a543.wgsl.expected.wgsl index ee4f14c8bd..87c061de07 100644 --- a/test/tint/builtins/gen/var/mix/f1a543.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/mix/f1a543.wgsl.expected.wgsl @@ -1,9 +1,9 @@ enable f16; fn mix_f1a543() { - var arg_0 = vec4(f16()); - var arg_1 = vec4(f16()); - var arg_2 = f16(); + var arg_0 = vec4(1.0h); + var arg_1 = vec4(1.0h); + var arg_2 = 1.0h; var res : vec4 = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/modf/45005f.wgsl b/test/tint/builtins/gen/var/modf/45005f.wgsl index 7576567658..37647095ae 100644 --- a/test/tint/builtins/gen/var/modf/45005f.wgsl +++ b/test/tint/builtins/gen/var/modf/45005f.wgsl @@ -25,7 +25,7 @@ enable f16; // fn modf(vec<3, f16>) -> __modf_result_vec<3, f16> fn modf_45005f() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.h); var res = modf(arg_0); } diff --git a/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.dxc.hlsl index e6631d340d..f9a9e8d0eb 100644 --- a/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.dxc.hlsl @@ -9,7 +9,7 @@ modf_result_vec3_f16 tint_modf(vector param_0) { } void modf_45005f() { - vector arg_0 = (float16_t(0.0h)).xxx; + vector arg_0 = (float16_t(1.0h)).xxx; modf_result_vec3_f16 res = tint_modf(arg_0); } diff --git a/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.glsl b/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.glsl index 238c3c2682..0c6aad6456 100644 --- a/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.glsl @@ -14,7 +14,7 @@ modf_result_vec3_f16 tint_modf(f16vec3 param_0) { void modf_45005f() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); modf_result_vec3_f16 res = tint_modf(arg_0); } @@ -48,7 +48,7 @@ modf_result_vec3_f16 tint_modf(f16vec3 param_0) { void modf_45005f() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); modf_result_vec3_f16 res = tint_modf(arg_0); } @@ -76,7 +76,7 @@ modf_result_vec3_f16 tint_modf(f16vec3 param_0) { void modf_45005f() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); modf_result_vec3_f16 res = tint_modf(arg_0); } diff --git a/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.msl b/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.msl index 736c945edb..106d1b673d 100644 --- a/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.msl @@ -13,7 +13,7 @@ modf_result_vec3_f16 tint_modf(half3 param_0) { } void modf_45005f() { - half3 arg_0 = half3(0.0h); + half3 arg_0 = half3(1.0h); modf_result_vec3_f16 res = tint_modf(arg_0); } diff --git a/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.spvasm index ff3de45e07..7c7b81375d 100644 --- a/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 41 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %20 = OpExtInstImport "GLSL.std.450" + %22 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -43,42 +43,44 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half + %19 = OpConstantNull %v3half %__modf_result_vec3_f16 = OpTypeStruct %v3half %v3half %_ptr_Function___modf_result_vec3_f16 = OpTypePointer Function %__modf_result_vec3_f16 - %24 = OpConstantNull %__modf_result_vec3_f16 - %25 = OpTypeFunction %v4float + %26 = OpConstantNull %__modf_result_vec3_f16 + %27 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %modf_45005f = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3half Function %15 - %res = OpVariable %_ptr_Function___modf_result_vec3_f16 Function %24 - OpStore %arg_0 %15 - %21 = OpLoad %v3half %arg_0 - %18 = OpExtInst %__modf_result_vec3_f16 %20 ModfStruct %21 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v3half Function %19 + %res = OpVariable %_ptr_Function___modf_result_vec3_f16 Function %26 + OpStore %arg_0 %16 + %23 = OpLoad %v3half %arg_0 + %20 = OpExtInst %__modf_result_vec3_f16 %22 ModfStruct %23 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %modf_45005f +%vertex_main_inner = OpFunction %v4float None %27 + %29 = OpLabel + %30 = OpFunctionCall %void %modf_45005f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %32 = OpLabel + %33 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %33 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %modf_45005f + %36 = OpLabel + %37 = OpFunctionCall %void %modf_45005f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %37 = OpLabel - %38 = OpFunctionCall %void %modf_45005f + %39 = OpLabel + %40 = OpFunctionCall %void %modf_45005f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.wgsl index 987ba8ad11..f9e08f3e48 100644 --- a/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn modf_45005f() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.0h); var res = modf(arg_0); } diff --git a/test/tint/builtins/gen/var/modf/8dbbbf.wgsl b/test/tint/builtins/gen/var/modf/8dbbbf.wgsl index 057c908b43..f3dea08ec9 100644 --- a/test/tint/builtins/gen/var/modf/8dbbbf.wgsl +++ b/test/tint/builtins/gen/var/modf/8dbbbf.wgsl @@ -25,7 +25,7 @@ enable f16; // fn modf(f16) -> __modf_result fn modf_8dbbbf() { - var arg_0 = f16(); + var arg_0 = 1.h; var res = modf(arg_0); } diff --git a/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.dxc.hlsl index 53bf292be9..04d940bfde 100644 --- a/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.dxc.hlsl @@ -9,7 +9,7 @@ modf_result_f16 tint_modf(float16_t param_0) { } void modf_8dbbbf() { - float16_t arg_0 = float16_t(0.0h); + float16_t arg_0 = float16_t(1.0h); modf_result_f16 res = tint_modf(arg_0); } diff --git a/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.glsl b/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.glsl index 38e8cf6fbc..d6b89764a4 100644 --- a/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.glsl @@ -14,7 +14,7 @@ modf_result_f16 tint_modf(float16_t param_0) { void modf_8dbbbf() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; modf_result_f16 res = tint_modf(arg_0); } @@ -48,7 +48,7 @@ modf_result_f16 tint_modf(float16_t param_0) { void modf_8dbbbf() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; modf_result_f16 res = tint_modf(arg_0); } @@ -76,7 +76,7 @@ modf_result_f16 tint_modf(float16_t param_0) { void modf_8dbbbf() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; modf_result_f16 res = tint_modf(arg_0); } diff --git a/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.msl b/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.msl index feb162130f..58a30cade0 100644 --- a/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.msl @@ -13,7 +13,7 @@ modf_result_f16 tint_modf(half param_0) { } void modf_8dbbbf() { - half arg_0 = 0.0h; + half arg_0 = 1.0h; modf_result_f16 res = tint_modf(arg_0); } diff --git a/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.spvasm b/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.spvasm index d4ab1c8367..28b19b092d 100644 --- a/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 39 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -42,42 +42,43 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half + %17 = OpConstantNull %half %__modf_result_f16 = OpTypeStruct %half %half %_ptr_Function___modf_result_f16 = OpTypePointer Function %__modf_result_f16 - %23 = OpConstantNull %__modf_result_f16 - %24 = OpTypeFunction %v4float + %24 = OpConstantNull %__modf_result_f16 + %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %modf_8dbbbf = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_half Function %14 - %res = OpVariable %_ptr_Function___modf_result_f16 Function %23 - OpStore %arg_0 %14 - %20 = OpLoad %half %arg_0 - %17 = OpExtInst %__modf_result_f16 %19 ModfStruct %20 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_half Function %17 + %res = OpVariable %_ptr_Function___modf_result_f16 Function %24 + OpStore %arg_0 %half_0x1p_0 + %21 = OpLoad %half %arg_0 + %18 = OpExtInst %__modf_result_f16 %20 ModfStruct %21 + OpStore %res %18 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %modf_8dbbbf +%vertex_main_inner = OpFunction %v4float None %25 + %27 = OpLabel + %28 = OpFunctionCall %void %modf_8dbbbf OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %30 = OpLabel + %31 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %31 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %modf_8dbbbf + %34 = OpLabel + %35 = OpFunctionCall %void %modf_8dbbbf OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %modf_8dbbbf + %37 = OpLabel + %38 = OpFunctionCall %void %modf_8dbbbf OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.wgsl b/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.wgsl index 5e076874c4..d0815e7d1f 100644 --- a/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn modf_8dbbbf() { - var arg_0 = f16(); + var arg_0 = 1.0h; var res = modf(arg_0); } diff --git a/test/tint/builtins/gen/var/modf/995934.wgsl b/test/tint/builtins/gen/var/modf/995934.wgsl index b981c28d1f..463335efcc 100644 --- a/test/tint/builtins/gen/var/modf/995934.wgsl +++ b/test/tint/builtins/gen/var/modf/995934.wgsl @@ -25,7 +25,7 @@ enable f16; // fn modf(vec<4, f16>) -> __modf_result_vec<4, f16> fn modf_995934() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.h); var res = modf(arg_0); } diff --git a/test/tint/builtins/gen/var/modf/995934.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/modf/995934.wgsl.expected.dxc.hlsl index ee6f076b6a..26c46db522 100644 --- a/test/tint/builtins/gen/var/modf/995934.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/modf/995934.wgsl.expected.dxc.hlsl @@ -9,7 +9,7 @@ modf_result_vec4_f16 tint_modf(vector param_0) { } void modf_995934() { - vector arg_0 = (float16_t(0.0h)).xxxx; + vector arg_0 = (float16_t(1.0h)).xxxx; modf_result_vec4_f16 res = tint_modf(arg_0); } diff --git a/test/tint/builtins/gen/var/modf/995934.wgsl.expected.glsl b/test/tint/builtins/gen/var/modf/995934.wgsl.expected.glsl index 8bef4a7846..71659e8717 100644 --- a/test/tint/builtins/gen/var/modf/995934.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/modf/995934.wgsl.expected.glsl @@ -14,7 +14,7 @@ modf_result_vec4_f16 tint_modf(f16vec4 param_0) { void modf_995934() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); modf_result_vec4_f16 res = tint_modf(arg_0); } @@ -48,7 +48,7 @@ modf_result_vec4_f16 tint_modf(f16vec4 param_0) { void modf_995934() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); modf_result_vec4_f16 res = tint_modf(arg_0); } @@ -76,7 +76,7 @@ modf_result_vec4_f16 tint_modf(f16vec4 param_0) { void modf_995934() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); modf_result_vec4_f16 res = tint_modf(arg_0); } diff --git a/test/tint/builtins/gen/var/modf/995934.wgsl.expected.msl b/test/tint/builtins/gen/var/modf/995934.wgsl.expected.msl index 8f32c42606..1b5ebe731f 100644 --- a/test/tint/builtins/gen/var/modf/995934.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/modf/995934.wgsl.expected.msl @@ -13,7 +13,7 @@ modf_result_vec4_f16 tint_modf(half4 param_0) { } void modf_995934() { - half4 arg_0 = half4(0.0h); + half4 arg_0 = half4(1.0h); modf_result_vec4_f16 res = tint_modf(arg_0); } diff --git a/test/tint/builtins/gen/var/modf/995934.wgsl.expected.spvasm b/test/tint/builtins/gen/var/modf/995934.wgsl.expected.spvasm index ddb7405322..94260c897a 100644 --- a/test/tint/builtins/gen/var/modf/995934.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/modf/995934.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 41 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %20 = OpExtInstImport "GLSL.std.450" + %22 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -43,42 +43,44 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half + %19 = OpConstantNull %v4half %__modf_result_vec4_f16 = OpTypeStruct %v4half %v4half %_ptr_Function___modf_result_vec4_f16 = OpTypePointer Function %__modf_result_vec4_f16 - %24 = OpConstantNull %__modf_result_vec4_f16 - %25 = OpTypeFunction %v4float + %26 = OpConstantNull %__modf_result_vec4_f16 + %27 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %modf_995934 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4half Function %15 - %res = OpVariable %_ptr_Function___modf_result_vec4_f16 Function %24 - OpStore %arg_0 %15 - %21 = OpLoad %v4half %arg_0 - %18 = OpExtInst %__modf_result_vec4_f16 %20 ModfStruct %21 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v4half Function %19 + %res = OpVariable %_ptr_Function___modf_result_vec4_f16 Function %26 + OpStore %arg_0 %16 + %23 = OpLoad %v4half %arg_0 + %20 = OpExtInst %__modf_result_vec4_f16 %22 ModfStruct %23 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %modf_995934 +%vertex_main_inner = OpFunction %v4float None %27 + %29 = OpLabel + %30 = OpFunctionCall %void %modf_995934 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %32 = OpLabel + %33 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %33 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %modf_995934 + %36 = OpLabel + %37 = OpFunctionCall %void %modf_995934 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %37 = OpLabel - %38 = OpFunctionCall %void %modf_995934 + %39 = OpLabel + %40 = OpFunctionCall %void %modf_995934 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/modf/995934.wgsl.expected.wgsl b/test/tint/builtins/gen/var/modf/995934.wgsl.expected.wgsl index a1ed549b10..317ae858e1 100644 --- a/test/tint/builtins/gen/var/modf/995934.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/modf/995934.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn modf_995934() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.0h); var res = modf(arg_0); } diff --git a/test/tint/builtins/gen/var/modf/a545b9.wgsl b/test/tint/builtins/gen/var/modf/a545b9.wgsl index 891108626c..51895fd8a1 100644 --- a/test/tint/builtins/gen/var/modf/a545b9.wgsl +++ b/test/tint/builtins/gen/var/modf/a545b9.wgsl @@ -25,7 +25,7 @@ enable f16; // fn modf(vec<2, f16>) -> __modf_result_vec<2, f16> fn modf_a545b9() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.h); var res = modf(arg_0); } diff --git a/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.dxc.hlsl index 66e40ec11d..47cc509cc5 100644 --- a/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.dxc.hlsl @@ -9,7 +9,7 @@ modf_result_vec2_f16 tint_modf(vector param_0) { } void modf_a545b9() { - vector arg_0 = (float16_t(0.0h)).xx; + vector arg_0 = (float16_t(1.0h)).xx; modf_result_vec2_f16 res = tint_modf(arg_0); } diff --git a/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.glsl b/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.glsl index 3d59c415ec..86f166d4c9 100644 --- a/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.glsl @@ -14,7 +14,7 @@ modf_result_vec2_f16 tint_modf(f16vec2 param_0) { void modf_a545b9() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); modf_result_vec2_f16 res = tint_modf(arg_0); } @@ -48,7 +48,7 @@ modf_result_vec2_f16 tint_modf(f16vec2 param_0) { void modf_a545b9() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); modf_result_vec2_f16 res = tint_modf(arg_0); } @@ -76,7 +76,7 @@ modf_result_vec2_f16 tint_modf(f16vec2 param_0) { void modf_a545b9() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); modf_result_vec2_f16 res = tint_modf(arg_0); } diff --git a/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.msl b/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.msl index 7330f6bd03..1cf4d62063 100644 --- a/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.msl @@ -13,7 +13,7 @@ modf_result_vec2_f16 tint_modf(half2 param_0) { } void modf_a545b9() { - half2 arg_0 = half2(0.0h); + half2 arg_0 = half2(1.0h); modf_result_vec2_f16 res = tint_modf(arg_0); } diff --git a/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.spvasm index a862a6cdab..da154baf2c 100644 --- a/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 41 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %20 = OpExtInstImport "GLSL.std.450" + %22 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -43,42 +43,44 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half + %19 = OpConstantNull %v2half %__modf_result_vec2_f16 = OpTypeStruct %v2half %v2half %_ptr_Function___modf_result_vec2_f16 = OpTypePointer Function %__modf_result_vec2_f16 - %24 = OpConstantNull %__modf_result_vec2_f16 - %25 = OpTypeFunction %v4float + %26 = OpConstantNull %__modf_result_vec2_f16 + %27 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %modf_a545b9 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2half Function %15 - %res = OpVariable %_ptr_Function___modf_result_vec2_f16 Function %24 - OpStore %arg_0 %15 - %21 = OpLoad %v2half %arg_0 - %18 = OpExtInst %__modf_result_vec2_f16 %20 ModfStruct %21 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v2half Function %19 + %res = OpVariable %_ptr_Function___modf_result_vec2_f16 Function %26 + OpStore %arg_0 %16 + %23 = OpLoad %v2half %arg_0 + %20 = OpExtInst %__modf_result_vec2_f16 %22 ModfStruct %23 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %modf_a545b9 +%vertex_main_inner = OpFunction %v4float None %27 + %29 = OpLabel + %30 = OpFunctionCall %void %modf_a545b9 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %32 = OpLabel + %33 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %33 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %modf_a545b9 + %36 = OpLabel + %37 = OpFunctionCall %void %modf_a545b9 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %37 = OpLabel - %38 = OpFunctionCall %void %modf_a545b9 + %39 = OpLabel + %40 = OpFunctionCall %void %modf_a545b9 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.wgsl index 9016659d56..dfb8c476e9 100644 --- a/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn modf_a545b9() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.0h); var res = modf(arg_0); } diff --git a/test/tint/builtins/gen/var/normalize/39d5ec.wgsl b/test/tint/builtins/gen/var/normalize/39d5ec.wgsl index 9d4465ddfe..35c06bff1a 100644 --- a/test/tint/builtins/gen/var/normalize/39d5ec.wgsl +++ b/test/tint/builtins/gen/var/normalize/39d5ec.wgsl @@ -25,7 +25,7 @@ enable f16; // fn normalize(vec<3, f16>) -> vec<3, f16> fn normalize_39d5ec() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.h); var res: vec3 = normalize(arg_0); } diff --git a/test/tint/builtins/gen/var/normalize/39d5ec.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/normalize/39d5ec.wgsl.expected.dxc.hlsl index 27279be055..e6710824fd 100644 --- a/test/tint/builtins/gen/var/normalize/39d5ec.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/normalize/39d5ec.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void normalize_39d5ec() { - vector arg_0 = (float16_t(0.0h)).xxx; + vector arg_0 = (float16_t(1.0h)).xxx; vector res = normalize(arg_0); } diff --git a/test/tint/builtins/gen/var/normalize/39d5ec.wgsl.expected.glsl b/test/tint/builtins/gen/var/normalize/39d5ec.wgsl.expected.glsl index cac08b0b15..0934cc3de1 100644 --- a/test/tint/builtins/gen/var/normalize/39d5ec.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/normalize/39d5ec.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void normalize_39d5ec() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = normalize(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void normalize_39d5ec() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = normalize(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void normalize_39d5ec() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = normalize(arg_0); } diff --git a/test/tint/builtins/gen/var/normalize/39d5ec.wgsl.expected.msl b/test/tint/builtins/gen/var/normalize/39d5ec.wgsl.expected.msl index b39c9b3b05..3c34456a92 100644 --- a/test/tint/builtins/gen/var/normalize/39d5ec.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/normalize/39d5ec.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void normalize_39d5ec() { - half3 arg_0 = half3(0.0h); + half3 arg_0 = half3(1.0h); half3 res = normalize(arg_0); } diff --git a/test/tint/builtins/gen/var/normalize/39d5ec.wgsl.expected.spvasm b/test/tint/builtins/gen/var/normalize/39d5ec.wgsl.expected.spvasm index 7ee6ac0a7d..0ad6accc22 100644 --- a/test/tint/builtins/gen/var/normalize/39d5ec.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/normalize/39d5ec.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %normalize_39d5ec = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3half Function %15 - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v3half %arg_0 - %18 = OpExtInst %v3half %19 Normalize %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v3half Function %19 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v3half %arg_0 + %20 = OpExtInst %v3half %21 Normalize %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %normalize_39d5ec +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %normalize_39d5ec OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %normalize_39d5ec + %33 = OpLabel + %34 = OpFunctionCall %void %normalize_39d5ec OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %normalize_39d5ec + %36 = OpLabel + %37 = OpFunctionCall %void %normalize_39d5ec OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/normalize/39d5ec.wgsl.expected.wgsl b/test/tint/builtins/gen/var/normalize/39d5ec.wgsl.expected.wgsl index a1dddf10b0..ef253e8146 100644 --- a/test/tint/builtins/gen/var/normalize/39d5ec.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/normalize/39d5ec.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn normalize_39d5ec() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.0h); var res : vec3 = normalize(arg_0); } diff --git a/test/tint/builtins/gen/var/normalize/7990f3.wgsl b/test/tint/builtins/gen/var/normalize/7990f3.wgsl index 46bb41b667..907a64fc13 100644 --- a/test/tint/builtins/gen/var/normalize/7990f3.wgsl +++ b/test/tint/builtins/gen/var/normalize/7990f3.wgsl @@ -25,7 +25,7 @@ enable f16; // fn normalize(vec<2, f16>) -> vec<2, f16> fn normalize_7990f3() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.h); var res: vec2 = normalize(arg_0); } diff --git a/test/tint/builtins/gen/var/normalize/7990f3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/normalize/7990f3.wgsl.expected.dxc.hlsl index 5609e8b8e1..4d33c76183 100644 --- a/test/tint/builtins/gen/var/normalize/7990f3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/normalize/7990f3.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void normalize_7990f3() { - vector arg_0 = (float16_t(0.0h)).xx; + vector arg_0 = (float16_t(1.0h)).xx; vector res = normalize(arg_0); } diff --git a/test/tint/builtins/gen/var/normalize/7990f3.wgsl.expected.glsl b/test/tint/builtins/gen/var/normalize/7990f3.wgsl.expected.glsl index f5baf36837..f5b526415c 100644 --- a/test/tint/builtins/gen/var/normalize/7990f3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/normalize/7990f3.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void normalize_7990f3() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = normalize(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void normalize_7990f3() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = normalize(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void normalize_7990f3() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = normalize(arg_0); } diff --git a/test/tint/builtins/gen/var/normalize/7990f3.wgsl.expected.msl b/test/tint/builtins/gen/var/normalize/7990f3.wgsl.expected.msl index 92d318abe5..db2d01b4f5 100644 --- a/test/tint/builtins/gen/var/normalize/7990f3.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/normalize/7990f3.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void normalize_7990f3() { - half2 arg_0 = half2(0.0h); + half2 arg_0 = half2(1.0h); half2 res = normalize(arg_0); } diff --git a/test/tint/builtins/gen/var/normalize/7990f3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/normalize/7990f3.wgsl.expected.spvasm index 1df719a285..225a26ea00 100644 --- a/test/tint/builtins/gen/var/normalize/7990f3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/normalize/7990f3.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v2half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %normalize_7990f3 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2half Function %15 - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v2half %arg_0 - %18 = OpExtInst %v2half %19 Normalize %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v2half Function %19 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v2half %arg_0 + %20 = OpExtInst %v2half %21 Normalize %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %normalize_7990f3 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %normalize_7990f3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %normalize_7990f3 + %33 = OpLabel + %34 = OpFunctionCall %void %normalize_7990f3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %normalize_7990f3 + %36 = OpLabel + %37 = OpFunctionCall %void %normalize_7990f3 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/normalize/7990f3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/normalize/7990f3.wgsl.expected.wgsl index 3629918c89..1d9e11539a 100644 --- a/test/tint/builtins/gen/var/normalize/7990f3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/normalize/7990f3.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn normalize_7990f3() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.0h); var res : vec2 = normalize(arg_0); } diff --git a/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl b/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl index ef4811dbed..72b994f9e2 100644 --- a/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl +++ b/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl @@ -25,7 +25,7 @@ enable f16; // fn normalize(vec<4, f16>) -> vec<4, f16> fn normalize_b8cb8d() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.h); var res: vec4 = normalize(arg_0); } diff --git a/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl.expected.dxc.hlsl index 7a7baeadf1..026a5229ad 100644 --- a/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void normalize_b8cb8d() { - vector arg_0 = (float16_t(0.0h)).xxxx; + vector arg_0 = (float16_t(1.0h)).xxxx; vector res = normalize(arg_0); } diff --git a/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl.expected.glsl b/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl.expected.glsl index d578fb1db0..03c0cd7362 100644 --- a/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void normalize_b8cb8d() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = normalize(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void normalize_b8cb8d() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = normalize(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void normalize_b8cb8d() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = normalize(arg_0); } diff --git a/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl.expected.msl b/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl.expected.msl index 0534833030..fdcce05bfd 100644 --- a/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void normalize_b8cb8d() { - half4 arg_0 = half4(0.0h); + half4 arg_0 = half4(1.0h); half4 res = normalize(arg_0); } diff --git a/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl.expected.spvasm index f904ec0486..c8024918bc 100644 --- a/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v4half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %normalize_b8cb8d = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4half Function %15 - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v4half %arg_0 - %18 = OpExtInst %v4half %19 Normalize %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v4half Function %19 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v4half %arg_0 + %20 = OpExtInst %v4half %21 Normalize %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %normalize_b8cb8d +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %normalize_b8cb8d OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %normalize_b8cb8d + %33 = OpLabel + %34 = OpFunctionCall %void %normalize_b8cb8d OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %normalize_b8cb8d + %36 = OpLabel + %37 = OpFunctionCall %void %normalize_b8cb8d OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl.expected.wgsl index b4793ae29c..a2e6bb9f45 100644 --- a/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn normalize_b8cb8d() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.0h); var res : vec4 = normalize(arg_0); } diff --git a/test/tint/builtins/gen/var/pow/4f33b2.wgsl b/test/tint/builtins/gen/var/pow/4f33b2.wgsl index 86f18ee4f4..208361a97a 100644 --- a/test/tint/builtins/gen/var/pow/4f33b2.wgsl +++ b/test/tint/builtins/gen/var/pow/4f33b2.wgsl @@ -25,8 +25,8 @@ enable f16; // fn pow(vec<4, f16>, vec<4, f16>) -> vec<4, f16> fn pow_4f33b2() { - var arg_0 = vec4(f16()); - var arg_1 = vec4(f16()); + var arg_0 = vec4(1.h); + var arg_1 = vec4(1.h); var res: vec4 = pow(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/pow/4f33b2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/pow/4f33b2.wgsl.expected.dxc.hlsl index 227638c329..64928913c3 100644 --- a/test/tint/builtins/gen/var/pow/4f33b2.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/pow/4f33b2.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void pow_4f33b2() { - vector arg_0 = (float16_t(0.0h)).xxxx; - vector arg_1 = (float16_t(0.0h)).xxxx; + vector arg_0 = (float16_t(1.0h)).xxxx; + vector arg_1 = (float16_t(1.0h)).xxxx; vector res = pow(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/pow/4f33b2.wgsl.expected.glsl b/test/tint/builtins/gen/var/pow/4f33b2.wgsl.expected.glsl index 5986ecac24..5bc4a1526f 100644 --- a/test/tint/builtins/gen/var/pow/4f33b2.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/pow/4f33b2.wgsl.expected.glsl @@ -2,8 +2,8 @@ #extension GL_AMD_gpu_shader_half_float : require void pow_4f33b2() { - f16vec4 arg_0 = f16vec4(0.0hf); - f16vec4 arg_1 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_1 = f16vec4(1.0hf); f16vec4 res = pow(arg_0, arg_1); } @@ -25,8 +25,8 @@ void main() { precision mediump float; void pow_4f33b2() { - f16vec4 arg_0 = f16vec4(0.0hf); - f16vec4 arg_1 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_1 = f16vec4(1.0hf); f16vec4 res = pow(arg_0, arg_1); } @@ -42,8 +42,8 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void pow_4f33b2() { - f16vec4 arg_0 = f16vec4(0.0hf); - f16vec4 arg_1 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_1 = f16vec4(1.0hf); f16vec4 res = pow(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/pow/4f33b2.wgsl.expected.msl b/test/tint/builtins/gen/var/pow/4f33b2.wgsl.expected.msl index c9055df449..18b7935dd0 100644 --- a/test/tint/builtins/gen/var/pow/4f33b2.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/pow/4f33b2.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void pow_4f33b2() { - half4 arg_0 = half4(0.0h); - half4 arg_1 = half4(0.0h); + half4 arg_0 = half4(1.0h); + half4 arg_1 = half4(1.0h); half4 res = pow(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/pow/4f33b2.wgsl.expected.spvasm b/test/tint/builtins/gen/var/pow/4f33b2.wgsl.expected.spvasm index ab794c7609..33e18d8e84 100644 --- a/test/tint/builtins/gen/var/pow/4f33b2.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/pow/4f33b2.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %20 = OpExtInstImport "GLSL.std.450" + %22 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -39,42 +39,44 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %24 = OpTypeFunction %v4float + %19 = OpConstantNull %v4half + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %pow_4f33b2 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4half Function %15 - %arg_1 = OpVariable %_ptr_Function_v4half Function %15 - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - %21 = OpLoad %v4half %arg_0 - %22 = OpLoad %v4half %arg_1 - %19 = OpExtInst %v4half %20 Pow %21 %22 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v4half Function %19 + %arg_1 = OpVariable %_ptr_Function_v4half Function %19 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + %23 = OpLoad %v4half %arg_0 + %24 = OpLoad %v4half %arg_1 + %21 = OpExtInst %v4half %22 Pow %23 %24 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %pow_4f33b2 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %pow_4f33b2 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %pow_4f33b2 + %35 = OpLabel + %36 = OpFunctionCall %void %pow_4f33b2 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %pow_4f33b2 + %38 = OpLabel + %39 = OpFunctionCall %void %pow_4f33b2 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/pow/4f33b2.wgsl.expected.wgsl b/test/tint/builtins/gen/var/pow/4f33b2.wgsl.expected.wgsl index 3ae3aa1407..8b19afe6a5 100644 --- a/test/tint/builtins/gen/var/pow/4f33b2.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/pow/4f33b2.wgsl.expected.wgsl @@ -1,8 +1,8 @@ enable f16; fn pow_4f33b2() { - var arg_0 = vec4(f16()); - var arg_1 = vec4(f16()); + var arg_0 = vec4(1.0h); + var arg_1 = vec4(1.0h); var res : vec4 = pow(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/pow/ce9ef5.wgsl b/test/tint/builtins/gen/var/pow/ce9ef5.wgsl index 8ce27eb070..9cdae13258 100644 --- a/test/tint/builtins/gen/var/pow/ce9ef5.wgsl +++ b/test/tint/builtins/gen/var/pow/ce9ef5.wgsl @@ -25,8 +25,8 @@ enable f16; // fn pow(f16, f16) -> f16 fn pow_ce9ef5() { - var arg_0 = f16(); - var arg_1 = f16(); + var arg_0 = 1.h; + var arg_1 = 1.h; var res: f16 = pow(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/pow/ce9ef5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/pow/ce9ef5.wgsl.expected.dxc.hlsl index 648dc41a6a..6cab79150d 100644 --- a/test/tint/builtins/gen/var/pow/ce9ef5.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/pow/ce9ef5.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void pow_ce9ef5() { - float16_t arg_0 = float16_t(0.0h); - float16_t arg_1 = float16_t(0.0h); + float16_t arg_0 = float16_t(1.0h); + float16_t arg_1 = float16_t(1.0h); float16_t res = pow(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/pow/ce9ef5.wgsl.expected.glsl b/test/tint/builtins/gen/var/pow/ce9ef5.wgsl.expected.glsl index 204e570aed..7a314b40e5 100644 --- a/test/tint/builtins/gen/var/pow/ce9ef5.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/pow/ce9ef5.wgsl.expected.glsl @@ -2,8 +2,8 @@ #extension GL_AMD_gpu_shader_half_float : require void pow_ce9ef5() { - float16_t arg_0 = 0.0hf; - float16_t arg_1 = 0.0hf; + float16_t arg_0 = 1.0hf; + float16_t arg_1 = 1.0hf; float16_t res = pow(arg_0, arg_1); } @@ -25,8 +25,8 @@ void main() { precision mediump float; void pow_ce9ef5() { - float16_t arg_0 = 0.0hf; - float16_t arg_1 = 0.0hf; + float16_t arg_0 = 1.0hf; + float16_t arg_1 = 1.0hf; float16_t res = pow(arg_0, arg_1); } @@ -42,8 +42,8 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void pow_ce9ef5() { - float16_t arg_0 = 0.0hf; - float16_t arg_1 = 0.0hf; + float16_t arg_0 = 1.0hf; + float16_t arg_1 = 1.0hf; float16_t res = pow(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/pow/ce9ef5.wgsl.expected.msl b/test/tint/builtins/gen/var/pow/ce9ef5.wgsl.expected.msl index 53588ac847..6554112dd3 100644 --- a/test/tint/builtins/gen/var/pow/ce9ef5.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/pow/ce9ef5.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void pow_ce9ef5() { - half arg_0 = 0.0h; - half arg_1 = 0.0h; + half arg_0 = 1.0h; + half arg_1 = 1.0h; half res = pow(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/pow/ce9ef5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/pow/ce9ef5.wgsl.expected.spvasm index 740fe21306..f2625b170a 100644 --- a/test/tint/builtins/gen/var/pow/ce9ef5.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/pow/ce9ef5.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,42 +38,43 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %23 = OpTypeFunction %v4float + %17 = OpConstantNull %half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %pow_ce9ef5 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_half Function %14 - %arg_1 = OpVariable %_ptr_Function_half Function %14 - %res = OpVariable %_ptr_Function_half Function %14 - OpStore %arg_0 %14 - OpStore %arg_1 %14 - %20 = OpLoad %half %arg_0 - %21 = OpLoad %half %arg_1 - %18 = OpExtInst %half %19 Pow %20 %21 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_half Function %17 + %arg_1 = OpVariable %_ptr_Function_half Function %17 + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %arg_0 %half_0x1p_0 + OpStore %arg_1 %half_0x1p_0 + %21 = OpLoad %half %arg_0 + %22 = OpLoad %half %arg_1 + %19 = OpExtInst %half %20 Pow %21 %22 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %pow_ce9ef5 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %pow_ce9ef5 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %pow_ce9ef5 + %33 = OpLabel + %34 = OpFunctionCall %void %pow_ce9ef5 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %pow_ce9ef5 + %36 = OpLabel + %37 = OpFunctionCall %void %pow_ce9ef5 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/pow/ce9ef5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/pow/ce9ef5.wgsl.expected.wgsl index da1a0f3c8c..0030fdef3d 100644 --- a/test/tint/builtins/gen/var/pow/ce9ef5.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/pow/ce9ef5.wgsl.expected.wgsl @@ -1,8 +1,8 @@ enable f16; fn pow_ce9ef5() { - var arg_0 = f16(); - var arg_1 = f16(); + var arg_0 = 1.0h; + var arg_1 = 1.0h; var res : f16 = pow(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/pow/f37b25.wgsl b/test/tint/builtins/gen/var/pow/f37b25.wgsl index cdaa364b20..6658892f4f 100644 --- a/test/tint/builtins/gen/var/pow/f37b25.wgsl +++ b/test/tint/builtins/gen/var/pow/f37b25.wgsl @@ -25,8 +25,8 @@ enable f16; // fn pow(vec<2, f16>, vec<2, f16>) -> vec<2, f16> fn pow_f37b25() { - var arg_0 = vec2(f16()); - var arg_1 = vec2(f16()); + var arg_0 = vec2(1.h); + var arg_1 = vec2(1.h); var res: vec2 = pow(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/pow/f37b25.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/pow/f37b25.wgsl.expected.dxc.hlsl index 1656a090d9..1b67444fdf 100644 --- a/test/tint/builtins/gen/var/pow/f37b25.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/pow/f37b25.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void pow_f37b25() { - vector arg_0 = (float16_t(0.0h)).xx; - vector arg_1 = (float16_t(0.0h)).xx; + vector arg_0 = (float16_t(1.0h)).xx; + vector arg_1 = (float16_t(1.0h)).xx; vector res = pow(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/pow/f37b25.wgsl.expected.glsl b/test/tint/builtins/gen/var/pow/f37b25.wgsl.expected.glsl index c6667068da..bd5e74c670 100644 --- a/test/tint/builtins/gen/var/pow/f37b25.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/pow/f37b25.wgsl.expected.glsl @@ -2,8 +2,8 @@ #extension GL_AMD_gpu_shader_half_float : require void pow_f37b25() { - f16vec2 arg_0 = f16vec2(0.0hf); - f16vec2 arg_1 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_1 = f16vec2(1.0hf); f16vec2 res = pow(arg_0, arg_1); } @@ -25,8 +25,8 @@ void main() { precision mediump float; void pow_f37b25() { - f16vec2 arg_0 = f16vec2(0.0hf); - f16vec2 arg_1 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_1 = f16vec2(1.0hf); f16vec2 res = pow(arg_0, arg_1); } @@ -42,8 +42,8 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void pow_f37b25() { - f16vec2 arg_0 = f16vec2(0.0hf); - f16vec2 arg_1 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_1 = f16vec2(1.0hf); f16vec2 res = pow(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/pow/f37b25.wgsl.expected.msl b/test/tint/builtins/gen/var/pow/f37b25.wgsl.expected.msl index d608b91740..7fbe58a156 100644 --- a/test/tint/builtins/gen/var/pow/f37b25.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/pow/f37b25.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void pow_f37b25() { - half2 arg_0 = half2(0.0h); - half2 arg_1 = half2(0.0h); + half2 arg_0 = half2(1.0h); + half2 arg_1 = half2(1.0h); half2 res = pow(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/pow/f37b25.wgsl.expected.spvasm b/test/tint/builtins/gen/var/pow/f37b25.wgsl.expected.spvasm index 34746c576c..b83fd05cde 100644 --- a/test/tint/builtins/gen/var/pow/f37b25.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/pow/f37b25.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %20 = OpExtInstImport "GLSL.std.450" + %22 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -39,42 +39,44 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %24 = OpTypeFunction %v4float + %19 = OpConstantNull %v2half + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %pow_f37b25 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2half Function %15 - %arg_1 = OpVariable %_ptr_Function_v2half Function %15 - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - %21 = OpLoad %v2half %arg_0 - %22 = OpLoad %v2half %arg_1 - %19 = OpExtInst %v2half %20 Pow %21 %22 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v2half Function %19 + %arg_1 = OpVariable %_ptr_Function_v2half Function %19 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + %23 = OpLoad %v2half %arg_0 + %24 = OpLoad %v2half %arg_1 + %21 = OpExtInst %v2half %22 Pow %23 %24 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %pow_f37b25 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %pow_f37b25 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %pow_f37b25 + %35 = OpLabel + %36 = OpFunctionCall %void %pow_f37b25 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %pow_f37b25 + %38 = OpLabel + %39 = OpFunctionCall %void %pow_f37b25 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/pow/f37b25.wgsl.expected.wgsl b/test/tint/builtins/gen/var/pow/f37b25.wgsl.expected.wgsl index 9c2e6fc210..f8aa5e7b76 100644 --- a/test/tint/builtins/gen/var/pow/f37b25.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/pow/f37b25.wgsl.expected.wgsl @@ -1,8 +1,8 @@ enable f16; fn pow_f37b25() { - var arg_0 = vec2(f16()); - var arg_1 = vec2(f16()); + var arg_0 = vec2(1.0h); + var arg_1 = vec2(1.0h); var res : vec2 = pow(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/pow/fa5429.wgsl b/test/tint/builtins/gen/var/pow/fa5429.wgsl index 2a6ad1191c..7258f4325b 100644 --- a/test/tint/builtins/gen/var/pow/fa5429.wgsl +++ b/test/tint/builtins/gen/var/pow/fa5429.wgsl @@ -25,8 +25,8 @@ enable f16; // fn pow(vec<3, f16>, vec<3, f16>) -> vec<3, f16> fn pow_fa5429() { - var arg_0 = vec3(f16()); - var arg_1 = vec3(f16()); + var arg_0 = vec3(1.h); + var arg_1 = vec3(1.h); var res: vec3 = pow(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/pow/fa5429.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/pow/fa5429.wgsl.expected.dxc.hlsl index fd9cab2337..884d1f5920 100644 --- a/test/tint/builtins/gen/var/pow/fa5429.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/pow/fa5429.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void pow_fa5429() { - vector arg_0 = (float16_t(0.0h)).xxx; - vector arg_1 = (float16_t(0.0h)).xxx; + vector arg_0 = (float16_t(1.0h)).xxx; + vector arg_1 = (float16_t(1.0h)).xxx; vector res = pow(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/pow/fa5429.wgsl.expected.glsl b/test/tint/builtins/gen/var/pow/fa5429.wgsl.expected.glsl index c57ea280bb..c704188641 100644 --- a/test/tint/builtins/gen/var/pow/fa5429.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/pow/fa5429.wgsl.expected.glsl @@ -2,8 +2,8 @@ #extension GL_AMD_gpu_shader_half_float : require void pow_fa5429() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); f16vec3 res = pow(arg_0, arg_1); } @@ -25,8 +25,8 @@ void main() { precision mediump float; void pow_fa5429() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); f16vec3 res = pow(arg_0, arg_1); } @@ -42,8 +42,8 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void pow_fa5429() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); f16vec3 res = pow(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/pow/fa5429.wgsl.expected.msl b/test/tint/builtins/gen/var/pow/fa5429.wgsl.expected.msl index 34042bc3a3..9b5c0fa11e 100644 --- a/test/tint/builtins/gen/var/pow/fa5429.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/pow/fa5429.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void pow_fa5429() { - half3 arg_0 = half3(0.0h); - half3 arg_1 = half3(0.0h); + half3 arg_0 = half3(1.0h); + half3 arg_1 = half3(1.0h); half3 res = pow(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/pow/fa5429.wgsl.expected.spvasm b/test/tint/builtins/gen/var/pow/fa5429.wgsl.expected.spvasm index 88b8df2dc7..7896da3e2d 100644 --- a/test/tint/builtins/gen/var/pow/fa5429.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/pow/fa5429.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %20 = OpExtInstImport "GLSL.std.450" + %22 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -39,42 +39,44 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %24 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %pow_fa5429 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3half Function %15 - %arg_1 = OpVariable %_ptr_Function_v3half Function %15 - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - %21 = OpLoad %v3half %arg_0 - %22 = OpLoad %v3half %arg_1 - %19 = OpExtInst %v3half %20 Pow %21 %22 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v3half Function %19 + %arg_1 = OpVariable %_ptr_Function_v3half Function %19 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + %23 = OpLoad %v3half %arg_0 + %24 = OpLoad %v3half %arg_1 + %21 = OpExtInst %v3half %22 Pow %23 %24 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %pow_fa5429 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %pow_fa5429 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %pow_fa5429 + %35 = OpLabel + %36 = OpFunctionCall %void %pow_fa5429 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %pow_fa5429 + %38 = OpLabel + %39 = OpFunctionCall %void %pow_fa5429 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/pow/fa5429.wgsl.expected.wgsl b/test/tint/builtins/gen/var/pow/fa5429.wgsl.expected.wgsl index 41114c9302..0b3b9ded01 100644 --- a/test/tint/builtins/gen/var/pow/fa5429.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/pow/fa5429.wgsl.expected.wgsl @@ -1,8 +1,8 @@ enable f16; fn pow_fa5429() { - var arg_0 = vec3(f16()); - var arg_1 = vec3(f16()); + var arg_0 = vec3(1.0h); + var arg_1 = vec3(1.0h); var res : vec3 = pow(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/radians/208fd9.wgsl b/test/tint/builtins/gen/var/radians/208fd9.wgsl index 5bf9902339..fef9085a68 100644 --- a/test/tint/builtins/gen/var/radians/208fd9.wgsl +++ b/test/tint/builtins/gen/var/radians/208fd9.wgsl @@ -25,7 +25,7 @@ enable f16; // fn radians(f16) -> f16 fn radians_208fd9() { - var arg_0 = f16(); + var arg_0 = 1.h; var res: f16 = radians(arg_0); } diff --git a/test/tint/builtins/gen/var/radians/208fd9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/radians/208fd9.wgsl.expected.dxc.hlsl index 627ac2c15c..62ae57ae68 100644 --- a/test/tint/builtins/gen/var/radians/208fd9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/radians/208fd9.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ float16_t tint_radians(float16_t param_0) { } void radians_208fd9() { - float16_t arg_0 = float16_t(0.0h); + float16_t arg_0 = float16_t(1.0h); float16_t res = tint_radians(arg_0); } diff --git a/test/tint/builtins/gen/var/radians/208fd9.wgsl.expected.glsl b/test/tint/builtins/gen/var/radians/208fd9.wgsl.expected.glsl index d22a648619..ad613e20bf 100644 --- a/test/tint/builtins/gen/var/radians/208fd9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/radians/208fd9.wgsl.expected.glsl @@ -7,7 +7,7 @@ float16_t tint_radians(float16_t param_0) { void radians_208fd9() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = tint_radians(arg_0); } @@ -34,7 +34,7 @@ float16_t tint_radians(float16_t param_0) { void radians_208fd9() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = tint_radians(arg_0); } @@ -55,7 +55,7 @@ float16_t tint_radians(float16_t param_0) { void radians_208fd9() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = tint_radians(arg_0); } diff --git a/test/tint/builtins/gen/var/radians/208fd9.wgsl.expected.msl b/test/tint/builtins/gen/var/radians/208fd9.wgsl.expected.msl index 936220398c..7684ab3031 100644 --- a/test/tint/builtins/gen/var/radians/208fd9.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/radians/208fd9.wgsl.expected.msl @@ -7,7 +7,7 @@ half tint_radians(half param_0) { } void radians_208fd9() { - half arg_0 = 0.0h; + half arg_0 = 1.0h; half res = tint_radians(arg_0); } diff --git a/test/tint/builtins/gen/var/radians/208fd9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/radians/208fd9.wgsl.expected.spvasm index 40920c5a43..abf0521a14 100644 --- a/test/tint/builtins/gen/var/radians/208fd9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/radians/208fd9.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %18 = OpExtInstImport "GLSL.std.450" + %19 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -37,39 +37,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %21 = OpTypeFunction %v4float + %17 = OpConstantNull %half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %radians_208fd9 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_half Function %14 - %res = OpVariable %_ptr_Function_half Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %half %arg_0 - %17 = OpExtInst %half %18 Radians %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_half Function %17 + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %arg_0 %half_0x1p_0 + %20 = OpLoad %half %arg_0 + %18 = OpExtInst %half %19 Radians %20 + OpStore %res %18 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %radians_208fd9 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %radians_208fd9 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %radians_208fd9 + %31 = OpLabel + %32 = OpFunctionCall %void %radians_208fd9 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %radians_208fd9 + %34 = OpLabel + %35 = OpFunctionCall %void %radians_208fd9 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/radians/208fd9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/radians/208fd9.wgsl.expected.wgsl index 9c78c61300..15a8933276 100644 --- a/test/tint/builtins/gen/var/radians/208fd9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/radians/208fd9.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn radians_208fd9() { - var arg_0 = f16(); + var arg_0 = 1.0h; var res : f16 = radians(arg_0); } diff --git a/test/tint/builtins/gen/var/radians/44f20b.wgsl b/test/tint/builtins/gen/var/radians/44f20b.wgsl index 0cfd5005cf..fdf2d52ad9 100644 --- a/test/tint/builtins/gen/var/radians/44f20b.wgsl +++ b/test/tint/builtins/gen/var/radians/44f20b.wgsl @@ -25,7 +25,7 @@ enable f16; // fn radians(vec<4, f16>) -> vec<4, f16> fn radians_44f20b() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.h); var res: vec4 = radians(arg_0); } diff --git a/test/tint/builtins/gen/var/radians/44f20b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/radians/44f20b.wgsl.expected.dxc.hlsl index 81c50d08b6..10ccec133b 100644 --- a/test/tint/builtins/gen/var/radians/44f20b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/radians/44f20b.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ vector tint_radians(vector param_0) { } void radians_44f20b() { - vector arg_0 = (float16_t(0.0h)).xxxx; + vector arg_0 = (float16_t(1.0h)).xxxx; vector res = tint_radians(arg_0); } diff --git a/test/tint/builtins/gen/var/radians/44f20b.wgsl.expected.glsl b/test/tint/builtins/gen/var/radians/44f20b.wgsl.expected.glsl index ef2074733e..74c7c9eccd 100644 --- a/test/tint/builtins/gen/var/radians/44f20b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/radians/44f20b.wgsl.expected.glsl @@ -7,7 +7,7 @@ f16vec4 tint_radians(f16vec4 param_0) { void radians_44f20b() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = tint_radians(arg_0); } @@ -34,7 +34,7 @@ f16vec4 tint_radians(f16vec4 param_0) { void radians_44f20b() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = tint_radians(arg_0); } @@ -55,7 +55,7 @@ f16vec4 tint_radians(f16vec4 param_0) { void radians_44f20b() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = tint_radians(arg_0); } diff --git a/test/tint/builtins/gen/var/radians/44f20b.wgsl.expected.msl b/test/tint/builtins/gen/var/radians/44f20b.wgsl.expected.msl index d2f6566e91..058c38eb0b 100644 --- a/test/tint/builtins/gen/var/radians/44f20b.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/radians/44f20b.wgsl.expected.msl @@ -7,7 +7,7 @@ half4 tint_radians(half4 param_0) { } void radians_44f20b() { - half4 arg_0 = half4(0.0h); + half4 arg_0 = half4(1.0h); half4 res = tint_radians(arg_0); } diff --git a/test/tint/builtins/gen/var/radians/44f20b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/radians/44f20b.wgsl.expected.spvasm index f11ab7a5cc..7c4cd8fe99 100644 --- a/test/tint/builtins/gen/var/radians/44f20b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/radians/44f20b.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v4half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %radians_44f20b = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4half Function %15 - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v4half %arg_0 - %18 = OpExtInst %v4half %19 Radians %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v4half Function %19 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v4half %arg_0 + %20 = OpExtInst %v4half %21 Radians %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %radians_44f20b +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %radians_44f20b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %radians_44f20b + %33 = OpLabel + %34 = OpFunctionCall %void %radians_44f20b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %radians_44f20b + %36 = OpLabel + %37 = OpFunctionCall %void %radians_44f20b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/radians/44f20b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/radians/44f20b.wgsl.expected.wgsl index 96830d7379..c0de07dd5f 100644 --- a/test/tint/builtins/gen/var/radians/44f20b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/radians/44f20b.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn radians_44f20b() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.0h); var res : vec4 = radians(arg_0); } diff --git a/test/tint/builtins/gen/var/radians/7ea4c7.wgsl b/test/tint/builtins/gen/var/radians/7ea4c7.wgsl index 693ec90dd9..cce0ce02ed 100644 --- a/test/tint/builtins/gen/var/radians/7ea4c7.wgsl +++ b/test/tint/builtins/gen/var/radians/7ea4c7.wgsl @@ -25,7 +25,7 @@ enable f16; // fn radians(vec<3, f16>) -> vec<3, f16> fn radians_7ea4c7() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.h); var res: vec3 = radians(arg_0); } diff --git a/test/tint/builtins/gen/var/radians/7ea4c7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/radians/7ea4c7.wgsl.expected.dxc.hlsl index 3367a757c5..f2a40ae8f4 100644 --- a/test/tint/builtins/gen/var/radians/7ea4c7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/radians/7ea4c7.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ vector tint_radians(vector param_0) { } void radians_7ea4c7() { - vector arg_0 = (float16_t(0.0h)).xxx; + vector arg_0 = (float16_t(1.0h)).xxx; vector res = tint_radians(arg_0); } diff --git a/test/tint/builtins/gen/var/radians/7ea4c7.wgsl.expected.glsl b/test/tint/builtins/gen/var/radians/7ea4c7.wgsl.expected.glsl index 8d3f103373..4faaa115bb 100644 --- a/test/tint/builtins/gen/var/radians/7ea4c7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/radians/7ea4c7.wgsl.expected.glsl @@ -7,7 +7,7 @@ f16vec3 tint_radians(f16vec3 param_0) { void radians_7ea4c7() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = tint_radians(arg_0); } @@ -34,7 +34,7 @@ f16vec3 tint_radians(f16vec3 param_0) { void radians_7ea4c7() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = tint_radians(arg_0); } @@ -55,7 +55,7 @@ f16vec3 tint_radians(f16vec3 param_0) { void radians_7ea4c7() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = tint_radians(arg_0); } diff --git a/test/tint/builtins/gen/var/radians/7ea4c7.wgsl.expected.msl b/test/tint/builtins/gen/var/radians/7ea4c7.wgsl.expected.msl index a77294f448..08af0d805f 100644 --- a/test/tint/builtins/gen/var/radians/7ea4c7.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/radians/7ea4c7.wgsl.expected.msl @@ -7,7 +7,7 @@ half3 tint_radians(half3 param_0) { } void radians_7ea4c7() { - half3 arg_0 = half3(0.0h); + half3 arg_0 = half3(1.0h); half3 res = tint_radians(arg_0); } diff --git a/test/tint/builtins/gen/var/radians/7ea4c7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/radians/7ea4c7.wgsl.expected.spvasm index 51771841af..5348b4801a 100644 --- a/test/tint/builtins/gen/var/radians/7ea4c7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/radians/7ea4c7.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %radians_7ea4c7 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3half Function %15 - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v3half %arg_0 - %18 = OpExtInst %v3half %19 Radians %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v3half Function %19 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v3half %arg_0 + %20 = OpExtInst %v3half %21 Radians %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %radians_7ea4c7 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %radians_7ea4c7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %radians_7ea4c7 + %33 = OpLabel + %34 = OpFunctionCall %void %radians_7ea4c7 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %radians_7ea4c7 + %36 = OpLabel + %37 = OpFunctionCall %void %radians_7ea4c7 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/radians/7ea4c7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/radians/7ea4c7.wgsl.expected.wgsl index 2107e43ab2..2c5ac74559 100644 --- a/test/tint/builtins/gen/var/radians/7ea4c7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/radians/7ea4c7.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn radians_7ea4c7() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.0h); var res : vec3 = radians(arg_0); } diff --git a/test/tint/builtins/gen/var/radians/fbacf0.wgsl b/test/tint/builtins/gen/var/radians/fbacf0.wgsl index 87814c0bd6..da67ac4599 100644 --- a/test/tint/builtins/gen/var/radians/fbacf0.wgsl +++ b/test/tint/builtins/gen/var/radians/fbacf0.wgsl @@ -25,7 +25,7 @@ enable f16; // fn radians(vec<2, f16>) -> vec<2, f16> fn radians_fbacf0() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.h); var res: vec2 = radians(arg_0); } diff --git a/test/tint/builtins/gen/var/radians/fbacf0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/radians/fbacf0.wgsl.expected.dxc.hlsl index 8316865280..02162ec9db 100644 --- a/test/tint/builtins/gen/var/radians/fbacf0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/radians/fbacf0.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ vector tint_radians(vector param_0) { } void radians_fbacf0() { - vector arg_0 = (float16_t(0.0h)).xx; + vector arg_0 = (float16_t(1.0h)).xx; vector res = tint_radians(arg_0); } diff --git a/test/tint/builtins/gen/var/radians/fbacf0.wgsl.expected.glsl b/test/tint/builtins/gen/var/radians/fbacf0.wgsl.expected.glsl index f53a087d9c..47b268d0d9 100644 --- a/test/tint/builtins/gen/var/radians/fbacf0.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/radians/fbacf0.wgsl.expected.glsl @@ -7,7 +7,7 @@ f16vec2 tint_radians(f16vec2 param_0) { void radians_fbacf0() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = tint_radians(arg_0); } @@ -34,7 +34,7 @@ f16vec2 tint_radians(f16vec2 param_0) { void radians_fbacf0() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = tint_radians(arg_0); } @@ -55,7 +55,7 @@ f16vec2 tint_radians(f16vec2 param_0) { void radians_fbacf0() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = tint_radians(arg_0); } diff --git a/test/tint/builtins/gen/var/radians/fbacf0.wgsl.expected.msl b/test/tint/builtins/gen/var/radians/fbacf0.wgsl.expected.msl index 6dcfa5b572..65e09d5e95 100644 --- a/test/tint/builtins/gen/var/radians/fbacf0.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/radians/fbacf0.wgsl.expected.msl @@ -7,7 +7,7 @@ half2 tint_radians(half2 param_0) { } void radians_fbacf0() { - half2 arg_0 = half2(0.0h); + half2 arg_0 = half2(1.0h); half2 res = tint_radians(arg_0); } diff --git a/test/tint/builtins/gen/var/radians/fbacf0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/radians/fbacf0.wgsl.expected.spvasm index aa11ee5a6e..76e0fb0d72 100644 --- a/test/tint/builtins/gen/var/radians/fbacf0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/radians/fbacf0.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v2half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %radians_fbacf0 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2half Function %15 - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v2half %arg_0 - %18 = OpExtInst %v2half %19 Radians %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v2half Function %19 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v2half %arg_0 + %20 = OpExtInst %v2half %21 Radians %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %radians_fbacf0 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %radians_fbacf0 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %radians_fbacf0 + %33 = OpLabel + %34 = OpFunctionCall %void %radians_fbacf0 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %radians_fbacf0 + %36 = OpLabel + %37 = OpFunctionCall %void %radians_fbacf0 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/radians/fbacf0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/radians/fbacf0.wgsl.expected.wgsl index d463eb9224..d155eb7ae8 100644 --- a/test/tint/builtins/gen/var/radians/fbacf0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/radians/fbacf0.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn radians_fbacf0() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.0h); var res : vec2 = radians(arg_0); } diff --git a/test/tint/builtins/gen/var/reflect/310de5.wgsl b/test/tint/builtins/gen/var/reflect/310de5.wgsl index 6fd29f5a4e..a354db4f92 100644 --- a/test/tint/builtins/gen/var/reflect/310de5.wgsl +++ b/test/tint/builtins/gen/var/reflect/310de5.wgsl @@ -25,8 +25,8 @@ enable f16; // fn reflect(vec<4, f16>, vec<4, f16>) -> vec<4, f16> fn reflect_310de5() { - var arg_0 = vec4(f16()); - var arg_1 = vec4(f16()); + var arg_0 = vec4(1.h); + var arg_1 = vec4(1.h); var res: vec4 = reflect(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/reflect/310de5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/reflect/310de5.wgsl.expected.dxc.hlsl index 42cc8e6fb4..e43742ca8f 100644 --- a/test/tint/builtins/gen/var/reflect/310de5.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/reflect/310de5.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void reflect_310de5() { - vector arg_0 = (float16_t(0.0h)).xxxx; - vector arg_1 = (float16_t(0.0h)).xxxx; + vector arg_0 = (float16_t(1.0h)).xxxx; + vector arg_1 = (float16_t(1.0h)).xxxx; vector res = reflect(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/reflect/310de5.wgsl.expected.glsl b/test/tint/builtins/gen/var/reflect/310de5.wgsl.expected.glsl index 1b9cab0bfa..92460b0d80 100644 --- a/test/tint/builtins/gen/var/reflect/310de5.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/reflect/310de5.wgsl.expected.glsl @@ -2,8 +2,8 @@ #extension GL_AMD_gpu_shader_half_float : require void reflect_310de5() { - f16vec4 arg_0 = f16vec4(0.0hf); - f16vec4 arg_1 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_1 = f16vec4(1.0hf); f16vec4 res = reflect(arg_0, arg_1); } @@ -25,8 +25,8 @@ void main() { precision mediump float; void reflect_310de5() { - f16vec4 arg_0 = f16vec4(0.0hf); - f16vec4 arg_1 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_1 = f16vec4(1.0hf); f16vec4 res = reflect(arg_0, arg_1); } @@ -42,8 +42,8 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void reflect_310de5() { - f16vec4 arg_0 = f16vec4(0.0hf); - f16vec4 arg_1 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_1 = f16vec4(1.0hf); f16vec4 res = reflect(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/reflect/310de5.wgsl.expected.msl b/test/tint/builtins/gen/var/reflect/310de5.wgsl.expected.msl index bc73148543..682016ae19 100644 --- a/test/tint/builtins/gen/var/reflect/310de5.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/reflect/310de5.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void reflect_310de5() { - half4 arg_0 = half4(0.0h); - half4 arg_1 = half4(0.0h); + half4 arg_0 = half4(1.0h); + half4 arg_1 = half4(1.0h); half4 res = reflect(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/reflect/310de5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/reflect/310de5.wgsl.expected.spvasm index bcace4f63c..e73d061081 100644 --- a/test/tint/builtins/gen/var/reflect/310de5.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/reflect/310de5.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %20 = OpExtInstImport "GLSL.std.450" + %22 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -39,42 +39,44 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %24 = OpTypeFunction %v4float + %19 = OpConstantNull %v4half + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %reflect_310de5 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4half Function %15 - %arg_1 = OpVariable %_ptr_Function_v4half Function %15 - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - %21 = OpLoad %v4half %arg_0 - %22 = OpLoad %v4half %arg_1 - %19 = OpExtInst %v4half %20 Reflect %21 %22 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v4half Function %19 + %arg_1 = OpVariable %_ptr_Function_v4half Function %19 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + %23 = OpLoad %v4half %arg_0 + %24 = OpLoad %v4half %arg_1 + %21 = OpExtInst %v4half %22 Reflect %23 %24 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %reflect_310de5 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %reflect_310de5 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %reflect_310de5 + %35 = OpLabel + %36 = OpFunctionCall %void %reflect_310de5 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %reflect_310de5 + %38 = OpLabel + %39 = OpFunctionCall %void %reflect_310de5 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/reflect/310de5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/reflect/310de5.wgsl.expected.wgsl index 09432f5762..eacdcf513e 100644 --- a/test/tint/builtins/gen/var/reflect/310de5.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/reflect/310de5.wgsl.expected.wgsl @@ -1,8 +1,8 @@ enable f16; fn reflect_310de5() { - var arg_0 = vec4(f16()); - var arg_1 = vec4(f16()); + var arg_0 = vec4(1.0h); + var arg_1 = vec4(1.0h); var res : vec4 = reflect(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/reflect/61ca21.wgsl b/test/tint/builtins/gen/var/reflect/61ca21.wgsl index f7ae376437..8db93dcbb6 100644 --- a/test/tint/builtins/gen/var/reflect/61ca21.wgsl +++ b/test/tint/builtins/gen/var/reflect/61ca21.wgsl @@ -25,8 +25,8 @@ enable f16; // fn reflect(vec<3, f16>, vec<3, f16>) -> vec<3, f16> fn reflect_61ca21() { - var arg_0 = vec3(f16()); - var arg_1 = vec3(f16()); + var arg_0 = vec3(1.h); + var arg_1 = vec3(1.h); var res: vec3 = reflect(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/reflect/61ca21.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/reflect/61ca21.wgsl.expected.dxc.hlsl index 75d40079a0..83cb3d741c 100644 --- a/test/tint/builtins/gen/var/reflect/61ca21.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/reflect/61ca21.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void reflect_61ca21() { - vector arg_0 = (float16_t(0.0h)).xxx; - vector arg_1 = (float16_t(0.0h)).xxx; + vector arg_0 = (float16_t(1.0h)).xxx; + vector arg_1 = (float16_t(1.0h)).xxx; vector res = reflect(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/reflect/61ca21.wgsl.expected.glsl b/test/tint/builtins/gen/var/reflect/61ca21.wgsl.expected.glsl index ab22f2d094..c7865a3415 100644 --- a/test/tint/builtins/gen/var/reflect/61ca21.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/reflect/61ca21.wgsl.expected.glsl @@ -2,8 +2,8 @@ #extension GL_AMD_gpu_shader_half_float : require void reflect_61ca21() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); f16vec3 res = reflect(arg_0, arg_1); } @@ -25,8 +25,8 @@ void main() { precision mediump float; void reflect_61ca21() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); f16vec3 res = reflect(arg_0, arg_1); } @@ -42,8 +42,8 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void reflect_61ca21() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); f16vec3 res = reflect(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/reflect/61ca21.wgsl.expected.msl b/test/tint/builtins/gen/var/reflect/61ca21.wgsl.expected.msl index 7ffb26a1a6..630d7d8fdc 100644 --- a/test/tint/builtins/gen/var/reflect/61ca21.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/reflect/61ca21.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void reflect_61ca21() { - half3 arg_0 = half3(0.0h); - half3 arg_1 = half3(0.0h); + half3 arg_0 = half3(1.0h); + half3 arg_1 = half3(1.0h); half3 res = reflect(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/reflect/61ca21.wgsl.expected.spvasm b/test/tint/builtins/gen/var/reflect/61ca21.wgsl.expected.spvasm index ad8f002a5d..c44d3194ca 100644 --- a/test/tint/builtins/gen/var/reflect/61ca21.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/reflect/61ca21.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %20 = OpExtInstImport "GLSL.std.450" + %22 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -39,42 +39,44 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %24 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %reflect_61ca21 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3half Function %15 - %arg_1 = OpVariable %_ptr_Function_v3half Function %15 - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - %21 = OpLoad %v3half %arg_0 - %22 = OpLoad %v3half %arg_1 - %19 = OpExtInst %v3half %20 Reflect %21 %22 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v3half Function %19 + %arg_1 = OpVariable %_ptr_Function_v3half Function %19 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + %23 = OpLoad %v3half %arg_0 + %24 = OpLoad %v3half %arg_1 + %21 = OpExtInst %v3half %22 Reflect %23 %24 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %reflect_61ca21 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %reflect_61ca21 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %reflect_61ca21 + %35 = OpLabel + %36 = OpFunctionCall %void %reflect_61ca21 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %reflect_61ca21 + %38 = OpLabel + %39 = OpFunctionCall %void %reflect_61ca21 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/reflect/61ca21.wgsl.expected.wgsl b/test/tint/builtins/gen/var/reflect/61ca21.wgsl.expected.wgsl index c7e04a80ad..312bd7843f 100644 --- a/test/tint/builtins/gen/var/reflect/61ca21.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/reflect/61ca21.wgsl.expected.wgsl @@ -1,8 +1,8 @@ enable f16; fn reflect_61ca21() { - var arg_0 = vec3(f16()); - var arg_1 = vec3(f16()); + var arg_0 = vec3(1.0h); + var arg_1 = vec3(1.0h); var res : vec3 = reflect(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/reflect/bb15ac.wgsl b/test/tint/builtins/gen/var/reflect/bb15ac.wgsl index ae704f43b3..530f7e3658 100644 --- a/test/tint/builtins/gen/var/reflect/bb15ac.wgsl +++ b/test/tint/builtins/gen/var/reflect/bb15ac.wgsl @@ -25,8 +25,8 @@ enable f16; // fn reflect(vec<2, f16>, vec<2, f16>) -> vec<2, f16> fn reflect_bb15ac() { - var arg_0 = vec2(f16()); - var arg_1 = vec2(f16()); + var arg_0 = vec2(1.h); + var arg_1 = vec2(1.h); var res: vec2 = reflect(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/reflect/bb15ac.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/reflect/bb15ac.wgsl.expected.dxc.hlsl index 445e4f2b99..af87c6f57c 100644 --- a/test/tint/builtins/gen/var/reflect/bb15ac.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/reflect/bb15ac.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void reflect_bb15ac() { - vector arg_0 = (float16_t(0.0h)).xx; - vector arg_1 = (float16_t(0.0h)).xx; + vector arg_0 = (float16_t(1.0h)).xx; + vector arg_1 = (float16_t(1.0h)).xx; vector res = reflect(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/reflect/bb15ac.wgsl.expected.glsl b/test/tint/builtins/gen/var/reflect/bb15ac.wgsl.expected.glsl index a52e6db055..6c0db69a64 100644 --- a/test/tint/builtins/gen/var/reflect/bb15ac.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/reflect/bb15ac.wgsl.expected.glsl @@ -2,8 +2,8 @@ #extension GL_AMD_gpu_shader_half_float : require void reflect_bb15ac() { - f16vec2 arg_0 = f16vec2(0.0hf); - f16vec2 arg_1 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_1 = f16vec2(1.0hf); f16vec2 res = reflect(arg_0, arg_1); } @@ -25,8 +25,8 @@ void main() { precision mediump float; void reflect_bb15ac() { - f16vec2 arg_0 = f16vec2(0.0hf); - f16vec2 arg_1 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_1 = f16vec2(1.0hf); f16vec2 res = reflect(arg_0, arg_1); } @@ -42,8 +42,8 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void reflect_bb15ac() { - f16vec2 arg_0 = f16vec2(0.0hf); - f16vec2 arg_1 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_1 = f16vec2(1.0hf); f16vec2 res = reflect(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/reflect/bb15ac.wgsl.expected.msl b/test/tint/builtins/gen/var/reflect/bb15ac.wgsl.expected.msl index bee45f3640..ea9a2f4293 100644 --- a/test/tint/builtins/gen/var/reflect/bb15ac.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/reflect/bb15ac.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void reflect_bb15ac() { - half2 arg_0 = half2(0.0h); - half2 arg_1 = half2(0.0h); + half2 arg_0 = half2(1.0h); + half2 arg_1 = half2(1.0h); half2 res = reflect(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/reflect/bb15ac.wgsl.expected.spvasm b/test/tint/builtins/gen/var/reflect/bb15ac.wgsl.expected.spvasm index 9af402ba42..3cd3744993 100644 --- a/test/tint/builtins/gen/var/reflect/bb15ac.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/reflect/bb15ac.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %20 = OpExtInstImport "GLSL.std.450" + %22 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -39,42 +39,44 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %24 = OpTypeFunction %v4float + %19 = OpConstantNull %v2half + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %reflect_bb15ac = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2half Function %15 - %arg_1 = OpVariable %_ptr_Function_v2half Function %15 - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - %21 = OpLoad %v2half %arg_0 - %22 = OpLoad %v2half %arg_1 - %19 = OpExtInst %v2half %20 Reflect %21 %22 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v2half Function %19 + %arg_1 = OpVariable %_ptr_Function_v2half Function %19 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + %23 = OpLoad %v2half %arg_0 + %24 = OpLoad %v2half %arg_1 + %21 = OpExtInst %v2half %22 Reflect %23 %24 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %reflect_bb15ac +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %reflect_bb15ac OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %reflect_bb15ac + %35 = OpLabel + %36 = OpFunctionCall %void %reflect_bb15ac OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %reflect_bb15ac + %38 = OpLabel + %39 = OpFunctionCall %void %reflect_bb15ac OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/reflect/bb15ac.wgsl.expected.wgsl b/test/tint/builtins/gen/var/reflect/bb15ac.wgsl.expected.wgsl index 68a49b217f..a92b1de5d1 100644 --- a/test/tint/builtins/gen/var/reflect/bb15ac.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/reflect/bb15ac.wgsl.expected.wgsl @@ -1,8 +1,8 @@ enable f16; fn reflect_bb15ac() { - var arg_0 = vec2(f16()); - var arg_1 = vec2(f16()); + var arg_0 = vec2(1.0h); + var arg_1 = vec2(1.0h); var res : vec2 = reflect(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/refract/0594ba.wgsl b/test/tint/builtins/gen/var/refract/0594ba.wgsl index f6833015fd..b78b564e98 100644 --- a/test/tint/builtins/gen/var/refract/0594ba.wgsl +++ b/test/tint/builtins/gen/var/refract/0594ba.wgsl @@ -25,9 +25,9 @@ enable f16; // fn refract(vec<4, f16>, vec<4, f16>, f16) -> vec<4, f16> fn refract_0594ba() { - var arg_0 = vec4(f16()); - var arg_1 = vec4(f16()); - var arg_2 = f16(); + var arg_0 = vec4(1.h); + var arg_1 = vec4(1.h); + var arg_2 = 1.h; var res: vec4 = refract(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/refract/0594ba.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/refract/0594ba.wgsl.expected.dxc.hlsl index 463d65f125..3d07673821 100644 --- a/test/tint/builtins/gen/var/refract/0594ba.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/refract/0594ba.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void refract_0594ba() { - vector arg_0 = (float16_t(0.0h)).xxxx; - vector arg_1 = (float16_t(0.0h)).xxxx; - float16_t arg_2 = float16_t(0.0h); + vector arg_0 = (float16_t(1.0h)).xxxx; + vector arg_1 = (float16_t(1.0h)).xxxx; + float16_t arg_2 = float16_t(1.0h); vector res = refract(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/refract/0594ba.wgsl.expected.glsl b/test/tint/builtins/gen/var/refract/0594ba.wgsl.expected.glsl index cd98e8619a..149be20cc4 100644 --- a/test/tint/builtins/gen/var/refract/0594ba.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/refract/0594ba.wgsl.expected.glsl @@ -2,9 +2,9 @@ #extension GL_AMD_gpu_shader_half_float : require void refract_0594ba() { - f16vec4 arg_0 = f16vec4(0.0hf); - f16vec4 arg_1 = f16vec4(0.0hf); - float16_t arg_2 = 0.0hf; + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_1 = f16vec4(1.0hf); + float16_t arg_2 = 1.0hf; f16vec4 res = refract(arg_0, arg_1, arg_2); } @@ -26,9 +26,9 @@ void main() { precision mediump float; void refract_0594ba() { - f16vec4 arg_0 = f16vec4(0.0hf); - f16vec4 arg_1 = f16vec4(0.0hf); - float16_t arg_2 = 0.0hf; + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_1 = f16vec4(1.0hf); + float16_t arg_2 = 1.0hf; f16vec4 res = refract(arg_0, arg_1, arg_2); } @@ -44,9 +44,9 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void refract_0594ba() { - f16vec4 arg_0 = f16vec4(0.0hf); - f16vec4 arg_1 = f16vec4(0.0hf); - float16_t arg_2 = 0.0hf; + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_1 = f16vec4(1.0hf); + float16_t arg_2 = 1.0hf; f16vec4 res = refract(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/refract/0594ba.wgsl.expected.msl b/test/tint/builtins/gen/var/refract/0594ba.wgsl.expected.msl index d0cb126000..19e502d387 100644 --- a/test/tint/builtins/gen/var/refract/0594ba.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/refract/0594ba.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void refract_0594ba() { - half4 arg_0 = half4(0.0h); - half4 arg_1 = half4(0.0h); - half arg_2 = 0.0h; + half4 arg_0 = half4(1.0h); + half4 arg_1 = half4(1.0h); + half arg_2 = 1.0h; half4 res = refract(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/refract/0594ba.wgsl.expected.spvasm b/test/tint/builtins/gen/var/refract/0594ba.wgsl.expected.spvasm index c8b16c60e2..e55d03f3a1 100644 --- a/test/tint/builtins/gen/var/refract/0594ba.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/refract/0594ba.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 42 +; Bound: 44 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %23 = OpExtInstImport "GLSL.std.450" + %25 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -40,47 +40,49 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %19 = OpConstantNull %half + %19 = OpConstantNull %v4half %_ptr_Function_half = OpTypePointer Function %half - %28 = OpTypeFunction %v4float + %23 = OpConstantNull %half + %30 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %refract_0594ba = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4half Function %15 - %arg_1 = OpVariable %_ptr_Function_v4half Function %15 - %arg_2 = OpVariable %_ptr_Function_half Function %19 - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - OpStore %arg_2 %19 - %24 = OpLoad %v4half %arg_0 - %25 = OpLoad %v4half %arg_1 - %26 = OpLoad %half %arg_2 - %22 = OpExtInst %v4half %23 Refract %24 %25 %26 - OpStore %res %22 + %arg_0 = OpVariable %_ptr_Function_v4half Function %19 + %arg_1 = OpVariable %_ptr_Function_v4half Function %19 + %arg_2 = OpVariable %_ptr_Function_half Function %23 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + OpStore %arg_2 %half_0x1p_0 + %26 = OpLoad %v4half %arg_0 + %27 = OpLoad %v4half %arg_1 + %28 = OpLoad %half %arg_2 + %24 = OpExtInst %v4half %25 Refract %26 %27 %28 + OpStore %res %24 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %28 - %30 = OpLabel - %31 = OpFunctionCall %void %refract_0594ba +%vertex_main_inner = OpFunction %v4float None %30 + %32 = OpLabel + %33 = OpFunctionCall %void %refract_0594ba OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %34 + %35 = OpLabel + %36 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %36 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %37 = OpLabel - %38 = OpFunctionCall %void %refract_0594ba + %39 = OpLabel + %40 = OpFunctionCall %void %refract_0594ba OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %40 = OpLabel - %41 = OpFunctionCall %void %refract_0594ba + %42 = OpLabel + %43 = OpFunctionCall %void %refract_0594ba OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/refract/0594ba.wgsl.expected.wgsl b/test/tint/builtins/gen/var/refract/0594ba.wgsl.expected.wgsl index d015c26289..71253e218d 100644 --- a/test/tint/builtins/gen/var/refract/0594ba.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/refract/0594ba.wgsl.expected.wgsl @@ -1,9 +1,9 @@ enable f16; fn refract_0594ba() { - var arg_0 = vec4(f16()); - var arg_1 = vec4(f16()); - var arg_2 = f16(); + var arg_0 = vec4(1.0h); + var arg_1 = vec4(1.0h); + var arg_2 = 1.0h; var res : vec4 = refract(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/refract/570cb3.wgsl b/test/tint/builtins/gen/var/refract/570cb3.wgsl index 1c5b9539d3..258400f143 100644 --- a/test/tint/builtins/gen/var/refract/570cb3.wgsl +++ b/test/tint/builtins/gen/var/refract/570cb3.wgsl @@ -25,9 +25,9 @@ enable f16; // fn refract(vec<2, f16>, vec<2, f16>, f16) -> vec<2, f16> fn refract_570cb3() { - var arg_0 = vec2(f16()); - var arg_1 = vec2(f16()); - var arg_2 = f16(); + var arg_0 = vec2(1.h); + var arg_1 = vec2(1.h); + var arg_2 = 1.h; var res: vec2 = refract(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/refract/570cb3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/refract/570cb3.wgsl.expected.dxc.hlsl index 63ce95b63c..baacca5c68 100644 --- a/test/tint/builtins/gen/var/refract/570cb3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/refract/570cb3.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void refract_570cb3() { - vector arg_0 = (float16_t(0.0h)).xx; - vector arg_1 = (float16_t(0.0h)).xx; - float16_t arg_2 = float16_t(0.0h); + vector arg_0 = (float16_t(1.0h)).xx; + vector arg_1 = (float16_t(1.0h)).xx; + float16_t arg_2 = float16_t(1.0h); vector res = refract(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/refract/570cb3.wgsl.expected.glsl b/test/tint/builtins/gen/var/refract/570cb3.wgsl.expected.glsl index 16ff162f9a..500142c033 100644 --- a/test/tint/builtins/gen/var/refract/570cb3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/refract/570cb3.wgsl.expected.glsl @@ -2,9 +2,9 @@ #extension GL_AMD_gpu_shader_half_float : require void refract_570cb3() { - f16vec2 arg_0 = f16vec2(0.0hf); - f16vec2 arg_1 = f16vec2(0.0hf); - float16_t arg_2 = 0.0hf; + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_1 = f16vec2(1.0hf); + float16_t arg_2 = 1.0hf; f16vec2 res = refract(arg_0, arg_1, arg_2); } @@ -26,9 +26,9 @@ void main() { precision mediump float; void refract_570cb3() { - f16vec2 arg_0 = f16vec2(0.0hf); - f16vec2 arg_1 = f16vec2(0.0hf); - float16_t arg_2 = 0.0hf; + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_1 = f16vec2(1.0hf); + float16_t arg_2 = 1.0hf; f16vec2 res = refract(arg_0, arg_1, arg_2); } @@ -44,9 +44,9 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void refract_570cb3() { - f16vec2 arg_0 = f16vec2(0.0hf); - f16vec2 arg_1 = f16vec2(0.0hf); - float16_t arg_2 = 0.0hf; + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_1 = f16vec2(1.0hf); + float16_t arg_2 = 1.0hf; f16vec2 res = refract(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/refract/570cb3.wgsl.expected.msl b/test/tint/builtins/gen/var/refract/570cb3.wgsl.expected.msl index 2051a9cffe..c0c6968c73 100644 --- a/test/tint/builtins/gen/var/refract/570cb3.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/refract/570cb3.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void refract_570cb3() { - half2 arg_0 = half2(0.0h); - half2 arg_1 = half2(0.0h); - half arg_2 = 0.0h; + half2 arg_0 = half2(1.0h); + half2 arg_1 = half2(1.0h); + half arg_2 = 1.0h; half2 res = refract(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/refract/570cb3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/refract/570cb3.wgsl.expected.spvasm index d7c52d7933..41b402fd40 100644 --- a/test/tint/builtins/gen/var/refract/570cb3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/refract/570cb3.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 42 +; Bound: 44 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %23 = OpExtInstImport "GLSL.std.450" + %25 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -40,47 +40,49 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %19 = OpConstantNull %half + %19 = OpConstantNull %v2half %_ptr_Function_half = OpTypePointer Function %half - %28 = OpTypeFunction %v4float + %23 = OpConstantNull %half + %30 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %refract_570cb3 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2half Function %15 - %arg_1 = OpVariable %_ptr_Function_v2half Function %15 - %arg_2 = OpVariable %_ptr_Function_half Function %19 - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - OpStore %arg_2 %19 - %24 = OpLoad %v2half %arg_0 - %25 = OpLoad %v2half %arg_1 - %26 = OpLoad %half %arg_2 - %22 = OpExtInst %v2half %23 Refract %24 %25 %26 - OpStore %res %22 + %arg_0 = OpVariable %_ptr_Function_v2half Function %19 + %arg_1 = OpVariable %_ptr_Function_v2half Function %19 + %arg_2 = OpVariable %_ptr_Function_half Function %23 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + OpStore %arg_2 %half_0x1p_0 + %26 = OpLoad %v2half %arg_0 + %27 = OpLoad %v2half %arg_1 + %28 = OpLoad %half %arg_2 + %24 = OpExtInst %v2half %25 Refract %26 %27 %28 + OpStore %res %24 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %28 - %30 = OpLabel - %31 = OpFunctionCall %void %refract_570cb3 +%vertex_main_inner = OpFunction %v4float None %30 + %32 = OpLabel + %33 = OpFunctionCall %void %refract_570cb3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %34 + %35 = OpLabel + %36 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %36 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %37 = OpLabel - %38 = OpFunctionCall %void %refract_570cb3 + %39 = OpLabel + %40 = OpFunctionCall %void %refract_570cb3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %40 = OpLabel - %41 = OpFunctionCall %void %refract_570cb3 + %42 = OpLabel + %43 = OpFunctionCall %void %refract_570cb3 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/refract/570cb3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/refract/570cb3.wgsl.expected.wgsl index 8e2895ca7f..8d799629d0 100644 --- a/test/tint/builtins/gen/var/refract/570cb3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/refract/570cb3.wgsl.expected.wgsl @@ -1,9 +1,9 @@ enable f16; fn refract_570cb3() { - var arg_0 = vec2(f16()); - var arg_1 = vec2(f16()); - var arg_2 = f16(); + var arg_0 = vec2(1.0h); + var arg_1 = vec2(1.0h); + var arg_2 = 1.0h; var res : vec2 = refract(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/refract/8984af.wgsl b/test/tint/builtins/gen/var/refract/8984af.wgsl index 1aa6ded8b3..00be9d5400 100644 --- a/test/tint/builtins/gen/var/refract/8984af.wgsl +++ b/test/tint/builtins/gen/var/refract/8984af.wgsl @@ -25,9 +25,9 @@ enable f16; // fn refract(vec<3, f16>, vec<3, f16>, f16) -> vec<3, f16> fn refract_8984af() { - var arg_0 = vec3(f16()); - var arg_1 = vec3(f16()); - var arg_2 = f16(); + var arg_0 = vec3(1.h); + var arg_1 = vec3(1.h); + var arg_2 = 1.h; var res: vec3 = refract(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/refract/8984af.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/refract/8984af.wgsl.expected.dxc.hlsl index 4c8b3e40a8..c8cf77a9dd 100644 --- a/test/tint/builtins/gen/var/refract/8984af.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/refract/8984af.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void refract_8984af() { - vector arg_0 = (float16_t(0.0h)).xxx; - vector arg_1 = (float16_t(0.0h)).xxx; - float16_t arg_2 = float16_t(0.0h); + vector arg_0 = (float16_t(1.0h)).xxx; + vector arg_1 = (float16_t(1.0h)).xxx; + float16_t arg_2 = float16_t(1.0h); vector res = refract(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/refract/8984af.wgsl.expected.glsl b/test/tint/builtins/gen/var/refract/8984af.wgsl.expected.glsl index c44741ede1..7a086c480e 100644 --- a/test/tint/builtins/gen/var/refract/8984af.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/refract/8984af.wgsl.expected.glsl @@ -2,9 +2,9 @@ #extension GL_AMD_gpu_shader_half_float : require void refract_8984af() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); - float16_t arg_2 = 0.0hf; + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); + float16_t arg_2 = 1.0hf; f16vec3 res = refract(arg_0, arg_1, arg_2); } @@ -26,9 +26,9 @@ void main() { precision mediump float; void refract_8984af() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); - float16_t arg_2 = 0.0hf; + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); + float16_t arg_2 = 1.0hf; f16vec3 res = refract(arg_0, arg_1, arg_2); } @@ -44,9 +44,9 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void refract_8984af() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); - float16_t arg_2 = 0.0hf; + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); + float16_t arg_2 = 1.0hf; f16vec3 res = refract(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/refract/8984af.wgsl.expected.msl b/test/tint/builtins/gen/var/refract/8984af.wgsl.expected.msl index 8394944213..c5919df988 100644 --- a/test/tint/builtins/gen/var/refract/8984af.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/refract/8984af.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void refract_8984af() { - half3 arg_0 = half3(0.0h); - half3 arg_1 = half3(0.0h); - half arg_2 = 0.0h; + half3 arg_0 = half3(1.0h); + half3 arg_1 = half3(1.0h); + half arg_2 = 1.0h; half3 res = refract(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/refract/8984af.wgsl.expected.spvasm b/test/tint/builtins/gen/var/refract/8984af.wgsl.expected.spvasm index 4fd9ba81bb..a85e642fe4 100644 --- a/test/tint/builtins/gen/var/refract/8984af.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/refract/8984af.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 42 +; Bound: 44 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %23 = OpExtInstImport "GLSL.std.450" + %25 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -40,47 +40,49 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %19 = OpConstantNull %half + %19 = OpConstantNull %v3half %_ptr_Function_half = OpTypePointer Function %half - %28 = OpTypeFunction %v4float + %23 = OpConstantNull %half + %30 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %refract_8984af = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3half Function %15 - %arg_1 = OpVariable %_ptr_Function_v3half Function %15 - %arg_2 = OpVariable %_ptr_Function_half Function %19 - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - OpStore %arg_2 %19 - %24 = OpLoad %v3half %arg_0 - %25 = OpLoad %v3half %arg_1 - %26 = OpLoad %half %arg_2 - %22 = OpExtInst %v3half %23 Refract %24 %25 %26 - OpStore %res %22 + %arg_0 = OpVariable %_ptr_Function_v3half Function %19 + %arg_1 = OpVariable %_ptr_Function_v3half Function %19 + %arg_2 = OpVariable %_ptr_Function_half Function %23 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + OpStore %arg_2 %half_0x1p_0 + %26 = OpLoad %v3half %arg_0 + %27 = OpLoad %v3half %arg_1 + %28 = OpLoad %half %arg_2 + %24 = OpExtInst %v3half %25 Refract %26 %27 %28 + OpStore %res %24 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %28 - %30 = OpLabel - %31 = OpFunctionCall %void %refract_8984af +%vertex_main_inner = OpFunction %v4float None %30 + %32 = OpLabel + %33 = OpFunctionCall %void %refract_8984af OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %34 + %35 = OpLabel + %36 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %36 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %37 = OpLabel - %38 = OpFunctionCall %void %refract_8984af + %39 = OpLabel + %40 = OpFunctionCall %void %refract_8984af OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %40 = OpLabel - %41 = OpFunctionCall %void %refract_8984af + %42 = OpLabel + %43 = OpFunctionCall %void %refract_8984af OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/refract/8984af.wgsl.expected.wgsl b/test/tint/builtins/gen/var/refract/8984af.wgsl.expected.wgsl index 69d2b2f9ab..66bd307a11 100644 --- a/test/tint/builtins/gen/var/refract/8984af.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/refract/8984af.wgsl.expected.wgsl @@ -1,9 +1,9 @@ enable f16; fn refract_8984af() { - var arg_0 = vec3(f16()); - var arg_1 = vec3(f16()); - var arg_2 = f16(); + var arg_0 = vec3(1.0h); + var arg_1 = vec3(1.0h); + var arg_2 = 1.0h; var res : vec3 = refract(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/round/9078ef.wgsl b/test/tint/builtins/gen/var/round/9078ef.wgsl index e52a222781..4ae932dca1 100644 --- a/test/tint/builtins/gen/var/round/9078ef.wgsl +++ b/test/tint/builtins/gen/var/round/9078ef.wgsl @@ -25,7 +25,7 @@ enable f16; // fn round(f16) -> f16 fn round_9078ef() { - var arg_0 = f16(); + var arg_0 = 1.h; var res: f16 = round(arg_0); } diff --git a/test/tint/builtins/gen/var/round/9078ef.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/round/9078ef.wgsl.expected.dxc.hlsl index cc87dbb813..8f39c8326c 100644 --- a/test/tint/builtins/gen/var/round/9078ef.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/round/9078ef.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void round_9078ef() { - float16_t arg_0 = float16_t(0.0h); + float16_t arg_0 = float16_t(1.0h); float16_t res = round(arg_0); } diff --git a/test/tint/builtins/gen/var/round/9078ef.wgsl.expected.glsl b/test/tint/builtins/gen/var/round/9078ef.wgsl.expected.glsl index 0c0cd16e3c..ac20d8b96d 100644 --- a/test/tint/builtins/gen/var/round/9078ef.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/round/9078ef.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void round_9078ef() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = round(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void round_9078ef() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = round(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void round_9078ef() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = round(arg_0); } diff --git a/test/tint/builtins/gen/var/round/9078ef.wgsl.expected.msl b/test/tint/builtins/gen/var/round/9078ef.wgsl.expected.msl index c7e44da66f..f4e67a5476 100644 --- a/test/tint/builtins/gen/var/round/9078ef.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/round/9078ef.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void round_9078ef() { - half arg_0 = 0.0h; + half arg_0 = 1.0h; half res = rint(arg_0); } diff --git a/test/tint/builtins/gen/var/round/9078ef.wgsl.expected.spvasm b/test/tint/builtins/gen/var/round/9078ef.wgsl.expected.spvasm index a5304a4466..87ef5e0fa4 100644 --- a/test/tint/builtins/gen/var/round/9078ef.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/round/9078ef.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %18 = OpExtInstImport "GLSL.std.450" + %19 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -37,39 +37,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %21 = OpTypeFunction %v4float + %17 = OpConstantNull %half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %round_9078ef = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_half Function %14 - %res = OpVariable %_ptr_Function_half Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %half %arg_0 - %17 = OpExtInst %half %18 RoundEven %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_half Function %17 + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %arg_0 %half_0x1p_0 + %20 = OpLoad %half %arg_0 + %18 = OpExtInst %half %19 RoundEven %20 + OpStore %res %18 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %round_9078ef +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %round_9078ef OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %round_9078ef + %31 = OpLabel + %32 = OpFunctionCall %void %round_9078ef OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %round_9078ef + %34 = OpLabel + %35 = OpFunctionCall %void %round_9078ef OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/round/9078ef.wgsl.expected.wgsl b/test/tint/builtins/gen/var/round/9078ef.wgsl.expected.wgsl index 9a6439d3d8..15ed50ad4c 100644 --- a/test/tint/builtins/gen/var/round/9078ef.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/round/9078ef.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn round_9078ef() { - var arg_0 = f16(); + var arg_0 = 1.0h; var res : f16 = round(arg_0); } diff --git a/test/tint/builtins/gen/var/round/d87e84.wgsl b/test/tint/builtins/gen/var/round/d87e84.wgsl index d130d9568d..6222d319d1 100644 --- a/test/tint/builtins/gen/var/round/d87e84.wgsl +++ b/test/tint/builtins/gen/var/round/d87e84.wgsl @@ -25,7 +25,7 @@ enable f16; // fn round(vec<2, f16>) -> vec<2, f16> fn round_d87e84() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.h); var res: vec2 = round(arg_0); } diff --git a/test/tint/builtins/gen/var/round/d87e84.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/round/d87e84.wgsl.expected.dxc.hlsl index 0c4ec1d073..e72f501c69 100644 --- a/test/tint/builtins/gen/var/round/d87e84.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/round/d87e84.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void round_d87e84() { - vector arg_0 = (float16_t(0.0h)).xx; + vector arg_0 = (float16_t(1.0h)).xx; vector res = round(arg_0); } diff --git a/test/tint/builtins/gen/var/round/d87e84.wgsl.expected.glsl b/test/tint/builtins/gen/var/round/d87e84.wgsl.expected.glsl index bb031c30e3..d6b52fb4fd 100644 --- a/test/tint/builtins/gen/var/round/d87e84.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/round/d87e84.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void round_d87e84() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = round(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void round_d87e84() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = round(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void round_d87e84() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = round(arg_0); } diff --git a/test/tint/builtins/gen/var/round/d87e84.wgsl.expected.msl b/test/tint/builtins/gen/var/round/d87e84.wgsl.expected.msl index 70a4f41b19..9fb5419c68 100644 --- a/test/tint/builtins/gen/var/round/d87e84.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/round/d87e84.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void round_d87e84() { - half2 arg_0 = half2(0.0h); + half2 arg_0 = half2(1.0h); half2 res = rint(arg_0); } diff --git a/test/tint/builtins/gen/var/round/d87e84.wgsl.expected.spvasm b/test/tint/builtins/gen/var/round/d87e84.wgsl.expected.spvasm index a6956ed787..ff7f5974d3 100644 --- a/test/tint/builtins/gen/var/round/d87e84.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/round/d87e84.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v2half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %round_d87e84 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2half Function %15 - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v2half %arg_0 - %18 = OpExtInst %v2half %19 RoundEven %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v2half Function %19 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v2half %arg_0 + %20 = OpExtInst %v2half %21 RoundEven %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %round_d87e84 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %round_d87e84 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %round_d87e84 + %33 = OpLabel + %34 = OpFunctionCall %void %round_d87e84 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %round_d87e84 + %36 = OpLabel + %37 = OpFunctionCall %void %round_d87e84 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/round/d87e84.wgsl.expected.wgsl b/test/tint/builtins/gen/var/round/d87e84.wgsl.expected.wgsl index 8911fc3586..b656f4b0b2 100644 --- a/test/tint/builtins/gen/var/round/d87e84.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/round/d87e84.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn round_d87e84() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.0h); var res : vec2 = round(arg_0); } diff --git a/test/tint/builtins/gen/var/round/e1bba2.wgsl b/test/tint/builtins/gen/var/round/e1bba2.wgsl index a4494e276b..acf1e62b53 100644 --- a/test/tint/builtins/gen/var/round/e1bba2.wgsl +++ b/test/tint/builtins/gen/var/round/e1bba2.wgsl @@ -25,7 +25,7 @@ enable f16; // fn round(vec<3, f16>) -> vec<3, f16> fn round_e1bba2() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.h); var res: vec3 = round(arg_0); } diff --git a/test/tint/builtins/gen/var/round/e1bba2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/round/e1bba2.wgsl.expected.dxc.hlsl index 073bbfd68f..09aae22ced 100644 --- a/test/tint/builtins/gen/var/round/e1bba2.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/round/e1bba2.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void round_e1bba2() { - vector arg_0 = (float16_t(0.0h)).xxx; + vector arg_0 = (float16_t(1.0h)).xxx; vector res = round(arg_0); } diff --git a/test/tint/builtins/gen/var/round/e1bba2.wgsl.expected.glsl b/test/tint/builtins/gen/var/round/e1bba2.wgsl.expected.glsl index 421df9b05b..069276946a 100644 --- a/test/tint/builtins/gen/var/round/e1bba2.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/round/e1bba2.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void round_e1bba2() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = round(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void round_e1bba2() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = round(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void round_e1bba2() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = round(arg_0); } diff --git a/test/tint/builtins/gen/var/round/e1bba2.wgsl.expected.msl b/test/tint/builtins/gen/var/round/e1bba2.wgsl.expected.msl index 06bb618516..e16a5432e9 100644 --- a/test/tint/builtins/gen/var/round/e1bba2.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/round/e1bba2.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void round_e1bba2() { - half3 arg_0 = half3(0.0h); + half3 arg_0 = half3(1.0h); half3 res = rint(arg_0); } diff --git a/test/tint/builtins/gen/var/round/e1bba2.wgsl.expected.spvasm b/test/tint/builtins/gen/var/round/e1bba2.wgsl.expected.spvasm index 31be1c9d9f..8e954d4467 100644 --- a/test/tint/builtins/gen/var/round/e1bba2.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/round/e1bba2.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %round_e1bba2 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3half Function %15 - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v3half %arg_0 - %18 = OpExtInst %v3half %19 RoundEven %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v3half Function %19 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v3half %arg_0 + %20 = OpExtInst %v3half %21 RoundEven %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %round_e1bba2 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %round_e1bba2 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %round_e1bba2 + %33 = OpLabel + %34 = OpFunctionCall %void %round_e1bba2 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %round_e1bba2 + %36 = OpLabel + %37 = OpFunctionCall %void %round_e1bba2 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/round/e1bba2.wgsl.expected.wgsl b/test/tint/builtins/gen/var/round/e1bba2.wgsl.expected.wgsl index bd41b19fa9..05487ef76d 100644 --- a/test/tint/builtins/gen/var/round/e1bba2.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/round/e1bba2.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn round_e1bba2() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.0h); var res : vec3 = round(arg_0); } diff --git a/test/tint/builtins/gen/var/round/f665b5.wgsl b/test/tint/builtins/gen/var/round/f665b5.wgsl index 8297439e87..317440fe2a 100644 --- a/test/tint/builtins/gen/var/round/f665b5.wgsl +++ b/test/tint/builtins/gen/var/round/f665b5.wgsl @@ -25,7 +25,7 @@ enable f16; // fn round(vec<4, f16>) -> vec<4, f16> fn round_f665b5() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.h); var res: vec4 = round(arg_0); } diff --git a/test/tint/builtins/gen/var/round/f665b5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/round/f665b5.wgsl.expected.dxc.hlsl index 360cf4ae09..169bed8688 100644 --- a/test/tint/builtins/gen/var/round/f665b5.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/round/f665b5.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void round_f665b5() { - vector arg_0 = (float16_t(0.0h)).xxxx; + vector arg_0 = (float16_t(1.0h)).xxxx; vector res = round(arg_0); } diff --git a/test/tint/builtins/gen/var/round/f665b5.wgsl.expected.glsl b/test/tint/builtins/gen/var/round/f665b5.wgsl.expected.glsl index d78cc6aae6..a9df115410 100644 --- a/test/tint/builtins/gen/var/round/f665b5.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/round/f665b5.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void round_f665b5() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = round(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void round_f665b5() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = round(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void round_f665b5() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = round(arg_0); } diff --git a/test/tint/builtins/gen/var/round/f665b5.wgsl.expected.msl b/test/tint/builtins/gen/var/round/f665b5.wgsl.expected.msl index fb7f28ae5e..0334eaec32 100644 --- a/test/tint/builtins/gen/var/round/f665b5.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/round/f665b5.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void round_f665b5() { - half4 arg_0 = half4(0.0h); + half4 arg_0 = half4(1.0h); half4 res = rint(arg_0); } diff --git a/test/tint/builtins/gen/var/round/f665b5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/round/f665b5.wgsl.expected.spvasm index 7eea88452a..225b5f2b74 100644 --- a/test/tint/builtins/gen/var/round/f665b5.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/round/f665b5.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v4half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %round_f665b5 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4half Function %15 - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v4half %arg_0 - %18 = OpExtInst %v4half %19 RoundEven %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v4half Function %19 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v4half %arg_0 + %20 = OpExtInst %v4half %21 RoundEven %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %round_f665b5 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %round_f665b5 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %round_f665b5 + %33 = OpLabel + %34 = OpFunctionCall %void %round_f665b5 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %round_f665b5 + %36 = OpLabel + %37 = OpFunctionCall %void %round_f665b5 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/round/f665b5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/round/f665b5.wgsl.expected.wgsl index b6afe2b58e..a4fd8538f9 100644 --- a/test/tint/builtins/gen/var/round/f665b5.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/round/f665b5.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn round_f665b5() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.0h); var res : vec4 = round(arg_0); } diff --git a/test/tint/builtins/gen/var/saturate/462535.wgsl b/test/tint/builtins/gen/var/saturate/462535.wgsl index 36b4dc6f6e..7ab447bec3 100644 --- a/test/tint/builtins/gen/var/saturate/462535.wgsl +++ b/test/tint/builtins/gen/var/saturate/462535.wgsl @@ -25,7 +25,7 @@ enable f16; // fn saturate(vec<3, f16>) -> vec<3, f16> fn saturate_462535() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(2.h); var res: vec3 = saturate(arg_0); } diff --git a/test/tint/builtins/gen/var/saturate/462535.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/saturate/462535.wgsl.expected.dxc.hlsl index c3fbeadc69..c7862dfe8c 100644 --- a/test/tint/builtins/gen/var/saturate/462535.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/saturate/462535.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void saturate_462535() { - vector arg_0 = (float16_t(0.0h)).xxx; + vector arg_0 = (float16_t(2.0h)).xxx; vector res = saturate(arg_0); } diff --git a/test/tint/builtins/gen/var/saturate/462535.wgsl.expected.glsl b/test/tint/builtins/gen/var/saturate/462535.wgsl.expected.glsl index 4573e5118f..411803d67b 100644 --- a/test/tint/builtins/gen/var/saturate/462535.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/saturate/462535.wgsl.expected.glsl @@ -6,7 +6,7 @@ f16vec3 tint_saturate(f16vec3 v) { } void saturate_462535() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(2.0hf); f16vec3 res = tint_saturate(arg_0); } @@ -32,7 +32,7 @@ f16vec3 tint_saturate(f16vec3 v) { } void saturate_462535() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(2.0hf); f16vec3 res = tint_saturate(arg_0); } @@ -52,7 +52,7 @@ f16vec3 tint_saturate(f16vec3 v) { } void saturate_462535() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(2.0hf); f16vec3 res = tint_saturate(arg_0); } diff --git a/test/tint/builtins/gen/var/saturate/462535.wgsl.expected.msl b/test/tint/builtins/gen/var/saturate/462535.wgsl.expected.msl index ed61aeecf7..d37a009d3f 100644 --- a/test/tint/builtins/gen/var/saturate/462535.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/saturate/462535.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void saturate_462535() { - half3 arg_0 = half3(0.0h); + half3 arg_0 = half3(2.0h); half3 res = saturate(arg_0); } diff --git a/test/tint/builtins/gen/var/saturate/462535.wgsl.expected.spvasm b/test/tint/builtins/gen/var/saturate/462535.wgsl.expected.spvasm index aca7740f21..02fb93dc1d 100644 --- a/test/tint/builtins/gen/var/saturate/462535.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/saturate/462535.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 45 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -44,8 +44,10 @@ %19 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %void = OpTypeVoid %20 = OpTypeFunction %void +%half_0x1p_1 = OpConstant %half 0x1p+1 + %25 = OpConstantComposite %v3half %half_0x1p_1 %half_0x1p_1 %half_0x1p_1 %_ptr_Function_v3half = OpTypePointer Function %v3half - %29 = OpTypeFunction %v4float + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_saturate = OpFunction %v3half None %9 %v = OpFunctionParameter %v3half @@ -57,31 +59,31 @@ %23 = OpLabel %arg_0 = OpVariable %_ptr_Function_v3half Function %17 %res = OpVariable %_ptr_Function_v3half Function %17 - OpStore %arg_0 %17 - %27 = OpLoad %v3half %arg_0 - %26 = OpFunctionCall %v3half %tint_saturate %27 - OpStore %res %26 + OpStore %arg_0 %25 + %29 = OpLoad %v3half %arg_0 + %28 = OpFunctionCall %v3half %tint_saturate %29 + OpStore %res %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %saturate_462535 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %saturate_462535 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %20 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %20 - %38 = OpLabel - %39 = OpFunctionCall %void %saturate_462535 + %40 = OpLabel + %41 = OpFunctionCall %void %saturate_462535 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %20 - %41 = OpLabel - %42 = OpFunctionCall %void %saturate_462535 + %43 = OpLabel + %44 = OpFunctionCall %void %saturate_462535 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/saturate/462535.wgsl.expected.wgsl b/test/tint/builtins/gen/var/saturate/462535.wgsl.expected.wgsl index daeef2cd6b..3b7c1e5ac6 100644 --- a/test/tint/builtins/gen/var/saturate/462535.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/saturate/462535.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn saturate_462535() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(2.0h); var res : vec3 = saturate(arg_0); } diff --git a/test/tint/builtins/gen/var/saturate/cd2028.wgsl b/test/tint/builtins/gen/var/saturate/cd2028.wgsl index 72126abe87..7fd2b6db7b 100644 --- a/test/tint/builtins/gen/var/saturate/cd2028.wgsl +++ b/test/tint/builtins/gen/var/saturate/cd2028.wgsl @@ -25,7 +25,7 @@ enable f16; // fn saturate(vec<2, f16>) -> vec<2, f16> fn saturate_cd2028() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(2.h); var res: vec2 = saturate(arg_0); } diff --git a/test/tint/builtins/gen/var/saturate/cd2028.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/saturate/cd2028.wgsl.expected.dxc.hlsl index 2af4bc5ef0..2aa5970103 100644 --- a/test/tint/builtins/gen/var/saturate/cd2028.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/saturate/cd2028.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void saturate_cd2028() { - vector arg_0 = (float16_t(0.0h)).xx; + vector arg_0 = (float16_t(2.0h)).xx; vector res = saturate(arg_0); } diff --git a/test/tint/builtins/gen/var/saturate/cd2028.wgsl.expected.glsl b/test/tint/builtins/gen/var/saturate/cd2028.wgsl.expected.glsl index eba552b166..3ccd12e2f6 100644 --- a/test/tint/builtins/gen/var/saturate/cd2028.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/saturate/cd2028.wgsl.expected.glsl @@ -6,7 +6,7 @@ f16vec2 tint_saturate(f16vec2 v) { } void saturate_cd2028() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(2.0hf); f16vec2 res = tint_saturate(arg_0); } @@ -32,7 +32,7 @@ f16vec2 tint_saturate(f16vec2 v) { } void saturate_cd2028() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(2.0hf); f16vec2 res = tint_saturate(arg_0); } @@ -52,7 +52,7 @@ f16vec2 tint_saturate(f16vec2 v) { } void saturate_cd2028() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(2.0hf); f16vec2 res = tint_saturate(arg_0); } diff --git a/test/tint/builtins/gen/var/saturate/cd2028.wgsl.expected.msl b/test/tint/builtins/gen/var/saturate/cd2028.wgsl.expected.msl index 688aede903..6e99b73cbf 100644 --- a/test/tint/builtins/gen/var/saturate/cd2028.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/saturate/cd2028.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void saturate_cd2028() { - half2 arg_0 = half2(0.0h); + half2 arg_0 = half2(2.0h); half2 res = saturate(arg_0); } diff --git a/test/tint/builtins/gen/var/saturate/cd2028.wgsl.expected.spvasm b/test/tint/builtins/gen/var/saturate/cd2028.wgsl.expected.spvasm index f37df71688..9f9cc1b0e4 100644 --- a/test/tint/builtins/gen/var/saturate/cd2028.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/saturate/cd2028.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 45 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -44,8 +44,10 @@ %19 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %void = OpTypeVoid %20 = OpTypeFunction %void +%half_0x1p_1 = OpConstant %half 0x1p+1 + %25 = OpConstantComposite %v2half %half_0x1p_1 %half_0x1p_1 %_ptr_Function_v2half = OpTypePointer Function %v2half - %29 = OpTypeFunction %v4float + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_saturate = OpFunction %v2half None %9 %v = OpFunctionParameter %v2half @@ -57,31 +59,31 @@ %23 = OpLabel %arg_0 = OpVariable %_ptr_Function_v2half Function %17 %res = OpVariable %_ptr_Function_v2half Function %17 - OpStore %arg_0 %17 - %27 = OpLoad %v2half %arg_0 - %26 = OpFunctionCall %v2half %tint_saturate %27 - OpStore %res %26 + OpStore %arg_0 %25 + %29 = OpLoad %v2half %arg_0 + %28 = OpFunctionCall %v2half %tint_saturate %29 + OpStore %res %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %saturate_cd2028 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %saturate_cd2028 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %20 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %20 - %38 = OpLabel - %39 = OpFunctionCall %void %saturate_cd2028 + %40 = OpLabel + %41 = OpFunctionCall %void %saturate_cd2028 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %20 - %41 = OpLabel - %42 = OpFunctionCall %void %saturate_cd2028 + %43 = OpLabel + %44 = OpFunctionCall %void %saturate_cd2028 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/saturate/cd2028.wgsl.expected.wgsl b/test/tint/builtins/gen/var/saturate/cd2028.wgsl.expected.wgsl index 70fa7d73f5..99c183ef53 100644 --- a/test/tint/builtins/gen/var/saturate/cd2028.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/saturate/cd2028.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn saturate_cd2028() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(2.0h); var res : vec2 = saturate(arg_0); } diff --git a/test/tint/builtins/gen/var/saturate/dcde71.wgsl b/test/tint/builtins/gen/var/saturate/dcde71.wgsl index 7e6b153dbb..3fce2f8fd0 100644 --- a/test/tint/builtins/gen/var/saturate/dcde71.wgsl +++ b/test/tint/builtins/gen/var/saturate/dcde71.wgsl @@ -25,7 +25,7 @@ enable f16; // fn saturate(vec<4, f16>) -> vec<4, f16> fn saturate_dcde71() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(2.h); var res: vec4 = saturate(arg_0); } diff --git a/test/tint/builtins/gen/var/saturate/dcde71.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/saturate/dcde71.wgsl.expected.dxc.hlsl index a21b7339c9..36d03015d0 100644 --- a/test/tint/builtins/gen/var/saturate/dcde71.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/saturate/dcde71.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void saturate_dcde71() { - vector arg_0 = (float16_t(0.0h)).xxxx; + vector arg_0 = (float16_t(2.0h)).xxxx; vector res = saturate(arg_0); } diff --git a/test/tint/builtins/gen/var/saturate/dcde71.wgsl.expected.glsl b/test/tint/builtins/gen/var/saturate/dcde71.wgsl.expected.glsl index db950e9213..e206c34b54 100644 --- a/test/tint/builtins/gen/var/saturate/dcde71.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/saturate/dcde71.wgsl.expected.glsl @@ -6,7 +6,7 @@ f16vec4 tint_saturate(f16vec4 v) { } void saturate_dcde71() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(2.0hf); f16vec4 res = tint_saturate(arg_0); } @@ -32,7 +32,7 @@ f16vec4 tint_saturate(f16vec4 v) { } void saturate_dcde71() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(2.0hf); f16vec4 res = tint_saturate(arg_0); } @@ -52,7 +52,7 @@ f16vec4 tint_saturate(f16vec4 v) { } void saturate_dcde71() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(2.0hf); f16vec4 res = tint_saturate(arg_0); } diff --git a/test/tint/builtins/gen/var/saturate/dcde71.wgsl.expected.msl b/test/tint/builtins/gen/var/saturate/dcde71.wgsl.expected.msl index 5be881e755..09a1cf90db 100644 --- a/test/tint/builtins/gen/var/saturate/dcde71.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/saturate/dcde71.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void saturate_dcde71() { - half4 arg_0 = half4(0.0h); + half4 arg_0 = half4(2.0h); half4 res = saturate(arg_0); } diff --git a/test/tint/builtins/gen/var/saturate/dcde71.wgsl.expected.spvasm b/test/tint/builtins/gen/var/saturate/dcde71.wgsl.expected.spvasm index 7b46458f76..d42693681e 100644 --- a/test/tint/builtins/gen/var/saturate/dcde71.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/saturate/dcde71.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 45 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -44,8 +44,10 @@ %19 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %void = OpTypeVoid %20 = OpTypeFunction %void +%half_0x1p_1 = OpConstant %half 0x1p+1 + %25 = OpConstantComposite %v4half %half_0x1p_1 %half_0x1p_1 %half_0x1p_1 %half_0x1p_1 %_ptr_Function_v4half = OpTypePointer Function %v4half - %29 = OpTypeFunction %v4float + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_saturate = OpFunction %v4half None %9 %v = OpFunctionParameter %v4half @@ -57,31 +59,31 @@ %23 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4half Function %17 %res = OpVariable %_ptr_Function_v4half Function %17 - OpStore %arg_0 %17 - %27 = OpLoad %v4half %arg_0 - %26 = OpFunctionCall %v4half %tint_saturate %27 - OpStore %res %26 + OpStore %arg_0 %25 + %29 = OpLoad %v4half %arg_0 + %28 = OpFunctionCall %v4half %tint_saturate %29 + OpStore %res %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %saturate_dcde71 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %saturate_dcde71 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %20 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %20 - %38 = OpLabel - %39 = OpFunctionCall %void %saturate_dcde71 + %40 = OpLabel + %41 = OpFunctionCall %void %saturate_dcde71 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %20 - %41 = OpLabel - %42 = OpFunctionCall %void %saturate_dcde71 + %43 = OpLabel + %44 = OpFunctionCall %void %saturate_dcde71 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/saturate/dcde71.wgsl.expected.wgsl b/test/tint/builtins/gen/var/saturate/dcde71.wgsl.expected.wgsl index 611b6b1b9d..ed3ba5dc00 100644 --- a/test/tint/builtins/gen/var/saturate/dcde71.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/saturate/dcde71.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn saturate_dcde71() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(2.0h); var res : vec4 = saturate(arg_0); } diff --git a/test/tint/builtins/gen/var/saturate/e8df56.wgsl b/test/tint/builtins/gen/var/saturate/e8df56.wgsl index 85784b5adc..7bbe65672b 100644 --- a/test/tint/builtins/gen/var/saturate/e8df56.wgsl +++ b/test/tint/builtins/gen/var/saturate/e8df56.wgsl @@ -25,7 +25,7 @@ enable f16; // fn saturate(f16) -> f16 fn saturate_e8df56() { - var arg_0 = f16(); + var arg_0 = 2.h; var res: f16 = saturate(arg_0); } diff --git a/test/tint/builtins/gen/var/saturate/e8df56.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/saturate/e8df56.wgsl.expected.dxc.hlsl index 5a621d1afc..6084be0628 100644 --- a/test/tint/builtins/gen/var/saturate/e8df56.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/saturate/e8df56.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void saturate_e8df56() { - float16_t arg_0 = float16_t(0.0h); + float16_t arg_0 = float16_t(2.0h); float16_t res = saturate(arg_0); } diff --git a/test/tint/builtins/gen/var/saturate/e8df56.wgsl.expected.glsl b/test/tint/builtins/gen/var/saturate/e8df56.wgsl.expected.glsl index 620eae5355..fb11511a4f 100644 --- a/test/tint/builtins/gen/var/saturate/e8df56.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/saturate/e8df56.wgsl.expected.glsl @@ -6,7 +6,7 @@ float16_t tint_saturate(float16_t v) { } void saturate_e8df56() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 2.0hf; float16_t res = tint_saturate(arg_0); } @@ -32,7 +32,7 @@ float16_t tint_saturate(float16_t v) { } void saturate_e8df56() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 2.0hf; float16_t res = tint_saturate(arg_0); } @@ -52,7 +52,7 @@ float16_t tint_saturate(float16_t v) { } void saturate_e8df56() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 2.0hf; float16_t res = tint_saturate(arg_0); } diff --git a/test/tint/builtins/gen/var/saturate/e8df56.wgsl.expected.msl b/test/tint/builtins/gen/var/saturate/e8df56.wgsl.expected.msl index 1455efd8fc..b3313d938a 100644 --- a/test/tint/builtins/gen/var/saturate/e8df56.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/saturate/e8df56.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void saturate_e8df56() { - half arg_0 = 0.0h; + half arg_0 = 2.0h; half res = saturate(arg_0); } diff --git a/test/tint/builtins/gen/var/saturate/e8df56.wgsl.expected.spvasm b/test/tint/builtins/gen/var/saturate/e8df56.wgsl.expected.spvasm index f31e398b1d..57db5b47e3 100644 --- a/test/tint/builtins/gen/var/saturate/e8df56.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/saturate/e8df56.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 42 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -42,8 +42,9 @@ %half_0x1p_0 = OpConstant %half 0x1p+0 %void = OpTypeVoid %18 = OpTypeFunction %void +%half_0x1p_1 = OpConstant %half 0x1p+1 %_ptr_Function_half = OpTypePointer Function %half - %27 = OpTypeFunction %v4float + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_saturate = OpFunction %half None %9 %v = OpFunctionParameter %half @@ -55,31 +56,31 @@ %21 = OpLabel %arg_0 = OpVariable %_ptr_Function_half Function %16 %res = OpVariable %_ptr_Function_half Function %16 - OpStore %arg_0 %16 - %25 = OpLoad %half %arg_0 - %24 = OpFunctionCall %half %tint_saturate %25 - OpStore %res %24 + OpStore %arg_0 %half_0x1p_1 + %26 = OpLoad %half %arg_0 + %25 = OpFunctionCall %half %tint_saturate %26 + OpStore %res %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %saturate_e8df56 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %saturate_e8df56 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %18 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %18 - %36 = OpLabel - %37 = OpFunctionCall %void %saturate_e8df56 + %37 = OpLabel + %38 = OpFunctionCall %void %saturate_e8df56 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %18 - %39 = OpLabel - %40 = OpFunctionCall %void %saturate_e8df56 + %40 = OpLabel + %41 = OpFunctionCall %void %saturate_e8df56 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/saturate/e8df56.wgsl.expected.wgsl b/test/tint/builtins/gen/var/saturate/e8df56.wgsl.expected.wgsl index 1c5effbf71..111db59df0 100644 --- a/test/tint/builtins/gen/var/saturate/e8df56.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/saturate/e8df56.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn saturate_e8df56() { - var arg_0 = f16(); + var arg_0 = 2.0h; var res : f16 = saturate(arg_0); } diff --git a/test/tint/builtins/gen/var/select/10e73b.wgsl b/test/tint/builtins/gen/var/select/10e73b.wgsl index 9362b80fbd..6f518520d9 100644 --- a/test/tint/builtins/gen/var/select/10e73b.wgsl +++ b/test/tint/builtins/gen/var/select/10e73b.wgsl @@ -25,8 +25,8 @@ enable f16; // fn select(f16, f16, bool) -> f16 fn select_10e73b() { - var arg_0 = f16(); - var arg_1 = f16(); + var arg_0 = 1.h; + var arg_1 = 1.h; var arg_2 = true; var res: f16 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/10e73b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/select/10e73b.wgsl.expected.dxc.hlsl index db83290038..8a7cabf92f 100644 --- a/test/tint/builtins/gen/var/select/10e73b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/select/10e73b.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void select_10e73b() { - float16_t arg_0 = float16_t(0.0h); - float16_t arg_1 = float16_t(0.0h); + float16_t arg_0 = float16_t(1.0h); + float16_t arg_1 = float16_t(1.0h); bool arg_2 = true; float16_t res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/10e73b.wgsl.expected.glsl b/test/tint/builtins/gen/var/select/10e73b.wgsl.expected.glsl index aa7382839d..4ceb10bb1d 100644 --- a/test/tint/builtins/gen/var/select/10e73b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/select/10e73b.wgsl.expected.glsl @@ -2,8 +2,8 @@ #extension GL_AMD_gpu_shader_half_float : require void select_10e73b() { - float16_t arg_0 = 0.0hf; - float16_t arg_1 = 0.0hf; + float16_t arg_0 = 1.0hf; + float16_t arg_1 = 1.0hf; bool arg_2 = true; float16_t res = (arg_2 ? arg_1 : arg_0); } @@ -26,8 +26,8 @@ void main() { precision mediump float; void select_10e73b() { - float16_t arg_0 = 0.0hf; - float16_t arg_1 = 0.0hf; + float16_t arg_0 = 1.0hf; + float16_t arg_1 = 1.0hf; bool arg_2 = true; float16_t res = (arg_2 ? arg_1 : arg_0); } @@ -44,8 +44,8 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void select_10e73b() { - float16_t arg_0 = 0.0hf; - float16_t arg_1 = 0.0hf; + float16_t arg_0 = 1.0hf; + float16_t arg_1 = 1.0hf; bool arg_2 = true; float16_t res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/10e73b.wgsl.expected.msl b/test/tint/builtins/gen/var/select/10e73b.wgsl.expected.msl index f643c290f0..a085f0888e 100644 --- a/test/tint/builtins/gen/var/select/10e73b.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/select/10e73b.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void select_10e73b() { - half arg_0 = 0.0h; - half arg_1 = 0.0h; + half arg_0 = 1.0h; + half arg_1 = 1.0h; bool arg_2 = true; half res = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/10e73b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/select/10e73b.wgsl.expected.spvasm index 6f8609b1d1..7ecaa7baab 100644 --- a/test/tint/builtins/gen/var/select/10e73b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/select/10e73b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 42 +; Bound: 43 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -38,49 +38,50 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half + %17 = OpConstantNull %half %bool = OpTypeBool %true = OpConstantTrue %bool %_ptr_Function_bool = OpTypePointer Function %bool - %22 = OpConstantNull %bool - %28 = OpTypeFunction %v4float + %23 = OpConstantNull %bool + %29 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_10e73b = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_half Function %14 - %arg_1 = OpVariable %_ptr_Function_half Function %14 - %arg_2 = OpVariable %_ptr_Function_bool Function %22 - %res = OpVariable %_ptr_Function_half Function %14 - OpStore %arg_0 %14 - OpStore %arg_1 %14 + %arg_0 = OpVariable %_ptr_Function_half Function %17 + %arg_1 = OpVariable %_ptr_Function_half Function %17 + %arg_2 = OpVariable %_ptr_Function_bool Function %23 + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %arg_0 %half_0x1p_0 + OpStore %arg_1 %half_0x1p_0 OpStore %arg_2 %true - %24 = OpLoad %bool %arg_2 - %25 = OpLoad %half %arg_1 - %26 = OpLoad %half %arg_0 - %23 = OpSelect %half %24 %25 %26 - OpStore %res %23 + %25 = OpLoad %bool %arg_2 + %26 = OpLoad %half %arg_1 + %27 = OpLoad %half %arg_0 + %24 = OpSelect %half %25 %26 %27 + OpStore %res %24 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %28 - %30 = OpLabel - %31 = OpFunctionCall %void %select_10e73b +%vertex_main_inner = OpFunction %v4float None %29 + %31 = OpLabel + %32 = OpFunctionCall %void %select_10e73b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %34 + %34 = OpLabel + %35 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %35 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %37 = OpLabel - %38 = OpFunctionCall %void %select_10e73b + %38 = OpLabel + %39 = OpFunctionCall %void %select_10e73b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %40 = OpLabel - %41 = OpFunctionCall %void %select_10e73b + %41 = OpLabel + %42 = OpFunctionCall %void %select_10e73b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/select/10e73b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/select/10e73b.wgsl.expected.wgsl index a4cd0fc411..aff79a1109 100644 --- a/test/tint/builtins/gen/var/select/10e73b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/select/10e73b.wgsl.expected.wgsl @@ -1,8 +1,8 @@ enable f16; fn select_10e73b() { - var arg_0 = f16(); - var arg_1 = f16(); + var arg_0 = 1.0h; + var arg_1 = 1.0h; var arg_2 = true; var res : f16 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/1ada2a.wgsl b/test/tint/builtins/gen/var/select/1ada2a.wgsl index 421c3ee35f..0af5544459 100644 --- a/test/tint/builtins/gen/var/select/1ada2a.wgsl +++ b/test/tint/builtins/gen/var/select/1ada2a.wgsl @@ -25,8 +25,8 @@ enable f16; // fn select(vec<3, f16>, vec<3, f16>, bool) -> vec<3, f16> fn select_1ada2a() { - var arg_0 = vec3(f16()); - var arg_1 = vec3(f16()); + var arg_0 = vec3(1.h); + var arg_1 = vec3(1.h); var arg_2 = true; var res: vec3 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/1ada2a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/select/1ada2a.wgsl.expected.dxc.hlsl index cdb717ce6a..58add5fbb0 100644 --- a/test/tint/builtins/gen/var/select/1ada2a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/select/1ada2a.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void select_1ada2a() { - vector arg_0 = (float16_t(0.0h)).xxx; - vector arg_1 = (float16_t(0.0h)).xxx; + vector arg_0 = (float16_t(1.0h)).xxx; + vector arg_1 = (float16_t(1.0h)).xxx; bool arg_2 = true; vector res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/1ada2a.wgsl.expected.glsl b/test/tint/builtins/gen/var/select/1ada2a.wgsl.expected.glsl index 6111b1ee87..48d699f973 100644 --- a/test/tint/builtins/gen/var/select/1ada2a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/select/1ada2a.wgsl.expected.glsl @@ -2,8 +2,8 @@ #extension GL_AMD_gpu_shader_half_float : require void select_1ada2a() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); bool arg_2 = true; f16vec3 res = (arg_2 ? arg_1 : arg_0); } @@ -26,8 +26,8 @@ void main() { precision mediump float; void select_1ada2a() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); bool arg_2 = true; f16vec3 res = (arg_2 ? arg_1 : arg_0); } @@ -44,8 +44,8 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void select_1ada2a() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); bool arg_2 = true; f16vec3 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/1ada2a.wgsl.expected.msl b/test/tint/builtins/gen/var/select/1ada2a.wgsl.expected.msl index 3f236362ab..83e1b0fde2 100644 --- a/test/tint/builtins/gen/var/select/1ada2a.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/select/1ada2a.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void select_1ada2a() { - half3 arg_0 = half3(0.0h); - half3 arg_1 = half3(0.0h); + half3 arg_0 = half3(1.0h); + half3 arg_1 = half3(1.0h); bool arg_2 = true; half3 res = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/1ada2a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/select/1ada2a.wgsl.expected.spvasm index efd6a0aec8..7f9c734953 100644 --- a/test/tint/builtins/gen/var/select/1ada2a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/select/1ada2a.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 50 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -39,54 +39,56 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half + %19 = OpConstantNull %v3half %bool = OpTypeBool %true = OpConstantTrue %bool %_ptr_Function_bool = OpTypePointer Function %bool - %23 = OpConstantNull %bool + %25 = OpConstantNull %bool %v3bool = OpTypeVector %bool 3 %_ptr_Function_v3bool = OpTypePointer Function %v3bool - %31 = OpConstantNull %v3bool - %34 = OpTypeFunction %v4float + %33 = OpConstantNull %v3bool + %36 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_1ada2a = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3half Function %15 - %arg_1 = OpVariable %_ptr_Function_v3half Function %15 - %arg_2 = OpVariable %_ptr_Function_bool Function %23 - %29 = OpVariable %_ptr_Function_v3bool Function %31 - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 + %arg_0 = OpVariable %_ptr_Function_v3half Function %19 + %arg_1 = OpVariable %_ptr_Function_v3half Function %19 + %arg_2 = OpVariable %_ptr_Function_bool Function %25 + %31 = OpVariable %_ptr_Function_v3bool Function %33 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 OpStore %arg_2 %true - %25 = OpLoad %bool %arg_2 - %26 = OpLoad %v3half %arg_1 - %27 = OpLoad %v3half %arg_0 - %32 = OpCompositeConstruct %v3bool %25 %25 %25 - %24 = OpSelect %v3half %32 %26 %27 - OpStore %res %24 + %27 = OpLoad %bool %arg_2 + %28 = OpLoad %v3half %arg_1 + %29 = OpLoad %v3half %arg_0 + %34 = OpCompositeConstruct %v3bool %27 %27 %27 + %26 = OpSelect %v3half %34 %28 %29 + OpStore %res %26 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %select_1ada2a +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %select_1ada2a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %43 = OpLabel - %44 = OpFunctionCall %void %select_1ada2a + %45 = OpLabel + %46 = OpFunctionCall %void %select_1ada2a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %46 = OpLabel - %47 = OpFunctionCall %void %select_1ada2a + %48 = OpLabel + %49 = OpFunctionCall %void %select_1ada2a OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/select/1ada2a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/select/1ada2a.wgsl.expected.wgsl index 89e258ccff..59b0b8b6e0 100644 --- a/test/tint/builtins/gen/var/select/1ada2a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/select/1ada2a.wgsl.expected.wgsl @@ -1,8 +1,8 @@ enable f16; fn select_1ada2a() { - var arg_0 = vec3(f16()); - var arg_1 = vec3(f16()); + var arg_0 = vec3(1.0h); + var arg_1 = vec3(1.0h); var arg_2 = true; var res : vec3 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/53d518.wgsl b/test/tint/builtins/gen/var/select/53d518.wgsl index 9f43aa80b0..0c5bfc8f9c 100644 --- a/test/tint/builtins/gen/var/select/53d518.wgsl +++ b/test/tint/builtins/gen/var/select/53d518.wgsl @@ -25,8 +25,8 @@ enable f16; // fn select(vec<3, f16>, vec<3, f16>, vec<3, bool>) -> vec<3, f16> fn select_53d518() { - var arg_0 = vec3(f16()); - var arg_1 = vec3(f16()); + var arg_0 = vec3(1.h); + var arg_1 = vec3(1.h); var arg_2 = vec3(true); var res: vec3 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/53d518.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/select/53d518.wgsl.expected.dxc.hlsl index a04ba3952a..130b0ce951 100644 --- a/test/tint/builtins/gen/var/select/53d518.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/select/53d518.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void select_53d518() { - vector arg_0 = (float16_t(0.0h)).xxx; - vector arg_1 = (float16_t(0.0h)).xxx; + vector arg_0 = (float16_t(1.0h)).xxx; + vector arg_1 = (float16_t(1.0h)).xxx; bool3 arg_2 = (true).xxx; vector res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/53d518.wgsl.expected.glsl b/test/tint/builtins/gen/var/select/53d518.wgsl.expected.glsl index 496678a7d9..969204f2cf 100644 --- a/test/tint/builtins/gen/var/select/53d518.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/select/53d518.wgsl.expected.glsl @@ -2,8 +2,8 @@ #extension GL_AMD_gpu_shader_half_float : require void select_53d518() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); bvec3 arg_2 = bvec3(true); f16vec3 res = mix(arg_0, arg_1, arg_2); } @@ -26,8 +26,8 @@ void main() { precision mediump float; void select_53d518() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); bvec3 arg_2 = bvec3(true); f16vec3 res = mix(arg_0, arg_1, arg_2); } @@ -44,8 +44,8 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void select_53d518() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); bvec3 arg_2 = bvec3(true); f16vec3 res = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/53d518.wgsl.expected.msl b/test/tint/builtins/gen/var/select/53d518.wgsl.expected.msl index cc5db044d7..113cf6188f 100644 --- a/test/tint/builtins/gen/var/select/53d518.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/select/53d518.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void select_53d518() { - half3 arg_0 = half3(0.0h); - half3 arg_1 = half3(0.0h); + half3 arg_0 = half3(1.0h); + half3 arg_1 = half3(1.0h); bool3 arg_2 = bool3(true); half3 res = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/53d518.wgsl.expected.spvasm b/test/tint/builtins/gen/var/select/53d518.wgsl.expected.spvasm index e2bd1a5fee..11f9b70261 100644 --- a/test/tint/builtins/gen/var/select/53d518.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/select/53d518.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 45 +; Bound: 47 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -39,51 +39,53 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half + %19 = OpConstantNull %v3half %bool = OpTypeBool %v3bool = OpTypeVector %bool 3 %true = OpConstantTrue %bool - %22 = OpConstantComposite %v3bool %true %true %true + %24 = OpConstantComposite %v3bool %true %true %true %_ptr_Function_v3bool = OpTypePointer Function %v3bool - %25 = OpConstantNull %v3bool - %31 = OpTypeFunction %v4float + %27 = OpConstantNull %v3bool + %33 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_53d518 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3half Function %15 - %arg_1 = OpVariable %_ptr_Function_v3half Function %15 - %arg_2 = OpVariable %_ptr_Function_v3bool Function %25 - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - OpStore %arg_2 %22 - %27 = OpLoad %v3bool %arg_2 - %28 = OpLoad %v3half %arg_1 - %29 = OpLoad %v3half %arg_0 - %26 = OpSelect %v3half %27 %28 %29 - OpStore %res %26 + %arg_0 = OpVariable %_ptr_Function_v3half Function %19 + %arg_1 = OpVariable %_ptr_Function_v3half Function %19 + %arg_2 = OpVariable %_ptr_Function_v3bool Function %27 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + OpStore %arg_2 %24 + %29 = OpLoad %v3bool %arg_2 + %30 = OpLoad %v3half %arg_1 + %31 = OpLoad %v3half %arg_0 + %28 = OpSelect %v3half %29 %30 %31 + OpStore %res %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %31 - %33 = OpLabel - %34 = OpFunctionCall %void %select_53d518 +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %select_53d518 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %37 + %38 = OpLabel + %39 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %39 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %40 = OpLabel - %41 = OpFunctionCall %void %select_53d518 + %42 = OpLabel + %43 = OpFunctionCall %void %select_53d518 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %43 = OpLabel - %44 = OpFunctionCall %void %select_53d518 + %45 = OpLabel + %46 = OpFunctionCall %void %select_53d518 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/select/53d518.wgsl.expected.wgsl b/test/tint/builtins/gen/var/select/53d518.wgsl.expected.wgsl index 8c40bca363..ef25de8a69 100644 --- a/test/tint/builtins/gen/var/select/53d518.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/select/53d518.wgsl.expected.wgsl @@ -1,8 +1,8 @@ enable f16; fn select_53d518() { - var arg_0 = vec3(f16()); - var arg_1 = vec3(f16()); + var arg_0 = vec3(1.0h); + var arg_1 = vec3(1.0h); var arg_2 = vec3(true); var res : vec3 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/830dd9.wgsl b/test/tint/builtins/gen/var/select/830dd9.wgsl index 596c536839..9b0b560d9b 100644 --- a/test/tint/builtins/gen/var/select/830dd9.wgsl +++ b/test/tint/builtins/gen/var/select/830dd9.wgsl @@ -25,8 +25,8 @@ enable f16; // fn select(vec<4, f16>, vec<4, f16>, bool) -> vec<4, f16> fn select_830dd9() { - var arg_0 = vec4(f16()); - var arg_1 = vec4(f16()); + var arg_0 = vec4(1.h); + var arg_1 = vec4(1.h); var arg_2 = true; var res: vec4 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/830dd9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/select/830dd9.wgsl.expected.dxc.hlsl index 6cf31e5126..890f9b9f46 100644 --- a/test/tint/builtins/gen/var/select/830dd9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/select/830dd9.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void select_830dd9() { - vector arg_0 = (float16_t(0.0h)).xxxx; - vector arg_1 = (float16_t(0.0h)).xxxx; + vector arg_0 = (float16_t(1.0h)).xxxx; + vector arg_1 = (float16_t(1.0h)).xxxx; bool arg_2 = true; vector res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/830dd9.wgsl.expected.glsl b/test/tint/builtins/gen/var/select/830dd9.wgsl.expected.glsl index 76d5e54014..91f87b01dc 100644 --- a/test/tint/builtins/gen/var/select/830dd9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/select/830dd9.wgsl.expected.glsl @@ -2,8 +2,8 @@ #extension GL_AMD_gpu_shader_half_float : require void select_830dd9() { - f16vec4 arg_0 = f16vec4(0.0hf); - f16vec4 arg_1 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_1 = f16vec4(1.0hf); bool arg_2 = true; f16vec4 res = (arg_2 ? arg_1 : arg_0); } @@ -26,8 +26,8 @@ void main() { precision mediump float; void select_830dd9() { - f16vec4 arg_0 = f16vec4(0.0hf); - f16vec4 arg_1 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_1 = f16vec4(1.0hf); bool arg_2 = true; f16vec4 res = (arg_2 ? arg_1 : arg_0); } @@ -44,8 +44,8 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void select_830dd9() { - f16vec4 arg_0 = f16vec4(0.0hf); - f16vec4 arg_1 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_1 = f16vec4(1.0hf); bool arg_2 = true; f16vec4 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/830dd9.wgsl.expected.msl b/test/tint/builtins/gen/var/select/830dd9.wgsl.expected.msl index e9b5d67ba1..6c7ba53ac5 100644 --- a/test/tint/builtins/gen/var/select/830dd9.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/select/830dd9.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void select_830dd9() { - half4 arg_0 = half4(0.0h); - half4 arg_1 = half4(0.0h); + half4 arg_0 = half4(1.0h); + half4 arg_1 = half4(1.0h); bool arg_2 = true; half4 res = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/830dd9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/select/830dd9.wgsl.expected.spvasm index c099ce9b8c..c45ef5dca2 100644 --- a/test/tint/builtins/gen/var/select/830dd9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/select/830dd9.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 50 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -39,54 +39,56 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half + %19 = OpConstantNull %v4half %bool = OpTypeBool %true = OpConstantTrue %bool %_ptr_Function_bool = OpTypePointer Function %bool - %23 = OpConstantNull %bool + %25 = OpConstantNull %bool %v4bool = OpTypeVector %bool 4 %_ptr_Function_v4bool = OpTypePointer Function %v4bool - %31 = OpConstantNull %v4bool - %34 = OpTypeFunction %v4float + %33 = OpConstantNull %v4bool + %36 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_830dd9 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4half Function %15 - %arg_1 = OpVariable %_ptr_Function_v4half Function %15 - %arg_2 = OpVariable %_ptr_Function_bool Function %23 - %29 = OpVariable %_ptr_Function_v4bool Function %31 - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 + %arg_0 = OpVariable %_ptr_Function_v4half Function %19 + %arg_1 = OpVariable %_ptr_Function_v4half Function %19 + %arg_2 = OpVariable %_ptr_Function_bool Function %25 + %31 = OpVariable %_ptr_Function_v4bool Function %33 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 OpStore %arg_2 %true - %25 = OpLoad %bool %arg_2 - %26 = OpLoad %v4half %arg_1 - %27 = OpLoad %v4half %arg_0 - %32 = OpCompositeConstruct %v4bool %25 %25 %25 %25 - %24 = OpSelect %v4half %32 %26 %27 - OpStore %res %24 + %27 = OpLoad %bool %arg_2 + %28 = OpLoad %v4half %arg_1 + %29 = OpLoad %v4half %arg_0 + %34 = OpCompositeConstruct %v4bool %27 %27 %27 %27 + %26 = OpSelect %v4half %34 %28 %29 + OpStore %res %26 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %select_830dd9 +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %select_830dd9 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %43 = OpLabel - %44 = OpFunctionCall %void %select_830dd9 + %45 = OpLabel + %46 = OpFunctionCall %void %select_830dd9 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %46 = OpLabel - %47 = OpFunctionCall %void %select_830dd9 + %48 = OpLabel + %49 = OpFunctionCall %void %select_830dd9 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/select/830dd9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/select/830dd9.wgsl.expected.wgsl index d1a0be6bae..5f7afc7afa 100644 --- a/test/tint/builtins/gen/var/select/830dd9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/select/830dd9.wgsl.expected.wgsl @@ -1,8 +1,8 @@ enable f16; fn select_830dd9() { - var arg_0 = vec4(f16()); - var arg_1 = vec4(f16()); + var arg_0 = vec4(1.0h); + var arg_1 = vec4(1.0h); var arg_2 = true; var res : vec4 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/86f9bd.wgsl b/test/tint/builtins/gen/var/select/86f9bd.wgsl index fcf7755f5c..626b41561f 100644 --- a/test/tint/builtins/gen/var/select/86f9bd.wgsl +++ b/test/tint/builtins/gen/var/select/86f9bd.wgsl @@ -25,8 +25,8 @@ enable f16; // fn select(vec<2, f16>, vec<2, f16>, bool) -> vec<2, f16> fn select_86f9bd() { - var arg_0 = vec2(f16()); - var arg_1 = vec2(f16()); + var arg_0 = vec2(1.h); + var arg_1 = vec2(1.h); var arg_2 = true; var res: vec2 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/86f9bd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/select/86f9bd.wgsl.expected.dxc.hlsl index b0d16c2655..ce7f4ee95d 100644 --- a/test/tint/builtins/gen/var/select/86f9bd.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/select/86f9bd.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void select_86f9bd() { - vector arg_0 = (float16_t(0.0h)).xx; - vector arg_1 = (float16_t(0.0h)).xx; + vector arg_0 = (float16_t(1.0h)).xx; + vector arg_1 = (float16_t(1.0h)).xx; bool arg_2 = true; vector res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/86f9bd.wgsl.expected.glsl b/test/tint/builtins/gen/var/select/86f9bd.wgsl.expected.glsl index 6217049327..c39942a2e2 100644 --- a/test/tint/builtins/gen/var/select/86f9bd.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/select/86f9bd.wgsl.expected.glsl @@ -2,8 +2,8 @@ #extension GL_AMD_gpu_shader_half_float : require void select_86f9bd() { - f16vec2 arg_0 = f16vec2(0.0hf); - f16vec2 arg_1 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_1 = f16vec2(1.0hf); bool arg_2 = true; f16vec2 res = (arg_2 ? arg_1 : arg_0); } @@ -26,8 +26,8 @@ void main() { precision mediump float; void select_86f9bd() { - f16vec2 arg_0 = f16vec2(0.0hf); - f16vec2 arg_1 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_1 = f16vec2(1.0hf); bool arg_2 = true; f16vec2 res = (arg_2 ? arg_1 : arg_0); } @@ -44,8 +44,8 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void select_86f9bd() { - f16vec2 arg_0 = f16vec2(0.0hf); - f16vec2 arg_1 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_1 = f16vec2(1.0hf); bool arg_2 = true; f16vec2 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/86f9bd.wgsl.expected.msl b/test/tint/builtins/gen/var/select/86f9bd.wgsl.expected.msl index 1ff94774f4..8ba3008e72 100644 --- a/test/tint/builtins/gen/var/select/86f9bd.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/select/86f9bd.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void select_86f9bd() { - half2 arg_0 = half2(0.0h); - half2 arg_1 = half2(0.0h); + half2 arg_0 = half2(1.0h); + half2 arg_1 = half2(1.0h); bool arg_2 = true; half2 res = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/86f9bd.wgsl.expected.spvasm b/test/tint/builtins/gen/var/select/86f9bd.wgsl.expected.spvasm index cfb8b98ce1..697e75ca46 100644 --- a/test/tint/builtins/gen/var/select/86f9bd.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/select/86f9bd.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 50 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -39,54 +39,56 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half + %19 = OpConstantNull %v2half %bool = OpTypeBool %true = OpConstantTrue %bool %_ptr_Function_bool = OpTypePointer Function %bool - %23 = OpConstantNull %bool + %25 = OpConstantNull %bool %v2bool = OpTypeVector %bool 2 %_ptr_Function_v2bool = OpTypePointer Function %v2bool - %31 = OpConstantNull %v2bool - %34 = OpTypeFunction %v4float + %33 = OpConstantNull %v2bool + %36 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_86f9bd = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2half Function %15 - %arg_1 = OpVariable %_ptr_Function_v2half Function %15 - %arg_2 = OpVariable %_ptr_Function_bool Function %23 - %29 = OpVariable %_ptr_Function_v2bool Function %31 - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 + %arg_0 = OpVariable %_ptr_Function_v2half Function %19 + %arg_1 = OpVariable %_ptr_Function_v2half Function %19 + %arg_2 = OpVariable %_ptr_Function_bool Function %25 + %31 = OpVariable %_ptr_Function_v2bool Function %33 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 OpStore %arg_2 %true - %25 = OpLoad %bool %arg_2 - %26 = OpLoad %v2half %arg_1 - %27 = OpLoad %v2half %arg_0 - %32 = OpCompositeConstruct %v2bool %25 %25 - %24 = OpSelect %v2half %32 %26 %27 - OpStore %res %24 + %27 = OpLoad %bool %arg_2 + %28 = OpLoad %v2half %arg_1 + %29 = OpLoad %v2half %arg_0 + %34 = OpCompositeConstruct %v2bool %27 %27 + %26 = OpSelect %v2half %34 %28 %29 + OpStore %res %26 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %select_86f9bd +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %select_86f9bd OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %43 = OpLabel - %44 = OpFunctionCall %void %select_86f9bd + %45 = OpLabel + %46 = OpFunctionCall %void %select_86f9bd OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %46 = OpLabel - %47 = OpFunctionCall %void %select_86f9bd + %48 = OpLabel + %49 = OpFunctionCall %void %select_86f9bd OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/select/86f9bd.wgsl.expected.wgsl b/test/tint/builtins/gen/var/select/86f9bd.wgsl.expected.wgsl index bd73ed0e79..0dc3a0ea09 100644 --- a/test/tint/builtins/gen/var/select/86f9bd.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/select/86f9bd.wgsl.expected.wgsl @@ -1,8 +1,8 @@ enable f16; fn select_86f9bd() { - var arg_0 = vec2(f16()); - var arg_1 = vec2(f16()); + var arg_0 = vec2(1.0h); + var arg_1 = vec2(1.0h); var arg_2 = true; var res : vec2 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/a081f1.wgsl b/test/tint/builtins/gen/var/select/a081f1.wgsl index 713d3c73e7..3d10597b5d 100644 --- a/test/tint/builtins/gen/var/select/a081f1.wgsl +++ b/test/tint/builtins/gen/var/select/a081f1.wgsl @@ -25,8 +25,8 @@ enable f16; // fn select(vec<4, f16>, vec<4, f16>, vec<4, bool>) -> vec<4, f16> fn select_a081f1() { - var arg_0 = vec4(f16()); - var arg_1 = vec4(f16()); + var arg_0 = vec4(1.h); + var arg_1 = vec4(1.h); var arg_2 = vec4(true); var res: vec4 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/a081f1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/select/a081f1.wgsl.expected.dxc.hlsl index abae0c7cb7..cd9b433214 100644 --- a/test/tint/builtins/gen/var/select/a081f1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/select/a081f1.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void select_a081f1() { - vector arg_0 = (float16_t(0.0h)).xxxx; - vector arg_1 = (float16_t(0.0h)).xxxx; + vector arg_0 = (float16_t(1.0h)).xxxx; + vector arg_1 = (float16_t(1.0h)).xxxx; bool4 arg_2 = (true).xxxx; vector res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/a081f1.wgsl.expected.glsl b/test/tint/builtins/gen/var/select/a081f1.wgsl.expected.glsl index 4d8e8c3427..3d77f2d577 100644 --- a/test/tint/builtins/gen/var/select/a081f1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/select/a081f1.wgsl.expected.glsl @@ -2,8 +2,8 @@ #extension GL_AMD_gpu_shader_half_float : require void select_a081f1() { - f16vec4 arg_0 = f16vec4(0.0hf); - f16vec4 arg_1 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_1 = f16vec4(1.0hf); bvec4 arg_2 = bvec4(true); f16vec4 res = mix(arg_0, arg_1, arg_2); } @@ -26,8 +26,8 @@ void main() { precision mediump float; void select_a081f1() { - f16vec4 arg_0 = f16vec4(0.0hf); - f16vec4 arg_1 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_1 = f16vec4(1.0hf); bvec4 arg_2 = bvec4(true); f16vec4 res = mix(arg_0, arg_1, arg_2); } @@ -44,8 +44,8 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void select_a081f1() { - f16vec4 arg_0 = f16vec4(0.0hf); - f16vec4 arg_1 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_1 = f16vec4(1.0hf); bvec4 arg_2 = bvec4(true); f16vec4 res = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/a081f1.wgsl.expected.msl b/test/tint/builtins/gen/var/select/a081f1.wgsl.expected.msl index 4fcb8d9e91..bf3fe0280e 100644 --- a/test/tint/builtins/gen/var/select/a081f1.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/select/a081f1.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void select_a081f1() { - half4 arg_0 = half4(0.0h); - half4 arg_1 = half4(0.0h); + half4 arg_0 = half4(1.0h); + half4 arg_1 = half4(1.0h); bool4 arg_2 = bool4(true); half4 res = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/a081f1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/select/a081f1.wgsl.expected.spvasm index 35b71ba82f..81f19a7c4c 100644 --- a/test/tint/builtins/gen/var/select/a081f1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/select/a081f1.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 45 +; Bound: 47 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -39,51 +39,53 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half + %19 = OpConstantNull %v4half %bool = OpTypeBool %v4bool = OpTypeVector %bool 4 %true = OpConstantTrue %bool - %22 = OpConstantComposite %v4bool %true %true %true %true + %24 = OpConstantComposite %v4bool %true %true %true %true %_ptr_Function_v4bool = OpTypePointer Function %v4bool - %25 = OpConstantNull %v4bool - %31 = OpTypeFunction %v4float + %27 = OpConstantNull %v4bool + %33 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_a081f1 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4half Function %15 - %arg_1 = OpVariable %_ptr_Function_v4half Function %15 - %arg_2 = OpVariable %_ptr_Function_v4bool Function %25 - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - OpStore %arg_2 %22 - %27 = OpLoad %v4bool %arg_2 - %28 = OpLoad %v4half %arg_1 - %29 = OpLoad %v4half %arg_0 - %26 = OpSelect %v4half %27 %28 %29 - OpStore %res %26 + %arg_0 = OpVariable %_ptr_Function_v4half Function %19 + %arg_1 = OpVariable %_ptr_Function_v4half Function %19 + %arg_2 = OpVariable %_ptr_Function_v4bool Function %27 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + OpStore %arg_2 %24 + %29 = OpLoad %v4bool %arg_2 + %30 = OpLoad %v4half %arg_1 + %31 = OpLoad %v4half %arg_0 + %28 = OpSelect %v4half %29 %30 %31 + OpStore %res %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %31 - %33 = OpLabel - %34 = OpFunctionCall %void %select_a081f1 +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %select_a081f1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %37 + %38 = OpLabel + %39 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %39 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %40 = OpLabel - %41 = OpFunctionCall %void %select_a081f1 + %42 = OpLabel + %43 = OpFunctionCall %void %select_a081f1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %43 = OpLabel - %44 = OpFunctionCall %void %select_a081f1 + %45 = OpLabel + %46 = OpFunctionCall %void %select_a081f1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/select/a081f1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/select/a081f1.wgsl.expected.wgsl index 2e86702635..73b30df995 100644 --- a/test/tint/builtins/gen/var/select/a081f1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/select/a081f1.wgsl.expected.wgsl @@ -1,8 +1,8 @@ enable f16; fn select_a081f1() { - var arg_0 = vec4(f16()); - var arg_1 = vec4(f16()); + var arg_0 = vec4(1.0h); + var arg_1 = vec4(1.0h); var arg_2 = vec4(true); var res : vec4 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/ed7c13.wgsl b/test/tint/builtins/gen/var/select/ed7c13.wgsl index 43274f72ce..eb3330a072 100644 --- a/test/tint/builtins/gen/var/select/ed7c13.wgsl +++ b/test/tint/builtins/gen/var/select/ed7c13.wgsl @@ -25,8 +25,8 @@ enable f16; // fn select(vec<2, f16>, vec<2, f16>, vec<2, bool>) -> vec<2, f16> fn select_ed7c13() { - var arg_0 = vec2(f16()); - var arg_1 = vec2(f16()); + var arg_0 = vec2(1.h); + var arg_1 = vec2(1.h); var arg_2 = vec2(true); var res: vec2 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/ed7c13.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/select/ed7c13.wgsl.expected.dxc.hlsl index 636eebe094..3068de674d 100644 --- a/test/tint/builtins/gen/var/select/ed7c13.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/select/ed7c13.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void select_ed7c13() { - vector arg_0 = (float16_t(0.0h)).xx; - vector arg_1 = (float16_t(0.0h)).xx; + vector arg_0 = (float16_t(1.0h)).xx; + vector arg_1 = (float16_t(1.0h)).xx; bool2 arg_2 = (true).xx; vector res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/ed7c13.wgsl.expected.glsl b/test/tint/builtins/gen/var/select/ed7c13.wgsl.expected.glsl index 5dbf4afccf..f4541b5bc5 100644 --- a/test/tint/builtins/gen/var/select/ed7c13.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/select/ed7c13.wgsl.expected.glsl @@ -2,8 +2,8 @@ #extension GL_AMD_gpu_shader_half_float : require void select_ed7c13() { - f16vec2 arg_0 = f16vec2(0.0hf); - f16vec2 arg_1 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_1 = f16vec2(1.0hf); bvec2 arg_2 = bvec2(true); f16vec2 res = mix(arg_0, arg_1, arg_2); } @@ -26,8 +26,8 @@ void main() { precision mediump float; void select_ed7c13() { - f16vec2 arg_0 = f16vec2(0.0hf); - f16vec2 arg_1 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_1 = f16vec2(1.0hf); bvec2 arg_2 = bvec2(true); f16vec2 res = mix(arg_0, arg_1, arg_2); } @@ -44,8 +44,8 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void select_ed7c13() { - f16vec2 arg_0 = f16vec2(0.0hf); - f16vec2 arg_1 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_1 = f16vec2(1.0hf); bvec2 arg_2 = bvec2(true); f16vec2 res = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/ed7c13.wgsl.expected.msl b/test/tint/builtins/gen/var/select/ed7c13.wgsl.expected.msl index 415a0659d3..b48bdd8e41 100644 --- a/test/tint/builtins/gen/var/select/ed7c13.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/select/ed7c13.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void select_ed7c13() { - half2 arg_0 = half2(0.0h); - half2 arg_1 = half2(0.0h); + half2 arg_0 = half2(1.0h); + half2 arg_1 = half2(1.0h); bool2 arg_2 = bool2(true); half2 res = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/ed7c13.wgsl.expected.spvasm b/test/tint/builtins/gen/var/select/ed7c13.wgsl.expected.spvasm index bc159cf9e2..b69e849459 100644 --- a/test/tint/builtins/gen/var/select/ed7c13.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/select/ed7c13.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 45 +; Bound: 47 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -39,51 +39,53 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half + %19 = OpConstantNull %v2half %bool = OpTypeBool %v2bool = OpTypeVector %bool 2 %true = OpConstantTrue %bool - %22 = OpConstantComposite %v2bool %true %true + %24 = OpConstantComposite %v2bool %true %true %_ptr_Function_v2bool = OpTypePointer Function %v2bool - %25 = OpConstantNull %v2bool - %31 = OpTypeFunction %v4float + %27 = OpConstantNull %v2bool + %33 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_ed7c13 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2half Function %15 - %arg_1 = OpVariable %_ptr_Function_v2half Function %15 - %arg_2 = OpVariable %_ptr_Function_v2bool Function %25 - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - OpStore %arg_2 %22 - %27 = OpLoad %v2bool %arg_2 - %28 = OpLoad %v2half %arg_1 - %29 = OpLoad %v2half %arg_0 - %26 = OpSelect %v2half %27 %28 %29 - OpStore %res %26 + %arg_0 = OpVariable %_ptr_Function_v2half Function %19 + %arg_1 = OpVariable %_ptr_Function_v2half Function %19 + %arg_2 = OpVariable %_ptr_Function_v2bool Function %27 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + OpStore %arg_2 %24 + %29 = OpLoad %v2bool %arg_2 + %30 = OpLoad %v2half %arg_1 + %31 = OpLoad %v2half %arg_0 + %28 = OpSelect %v2half %29 %30 %31 + OpStore %res %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %31 - %33 = OpLabel - %34 = OpFunctionCall %void %select_ed7c13 +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %select_ed7c13 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %37 + %38 = OpLabel + %39 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %39 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %40 = OpLabel - %41 = OpFunctionCall %void %select_ed7c13 + %42 = OpLabel + %43 = OpFunctionCall %void %select_ed7c13 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %43 = OpLabel - %44 = OpFunctionCall %void %select_ed7c13 + %45 = OpLabel + %46 = OpFunctionCall %void %select_ed7c13 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/select/ed7c13.wgsl.expected.wgsl b/test/tint/builtins/gen/var/select/ed7c13.wgsl.expected.wgsl index 67b7d82bd4..06d7ad342d 100644 --- a/test/tint/builtins/gen/var/select/ed7c13.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/select/ed7c13.wgsl.expected.wgsl @@ -1,8 +1,8 @@ enable f16; fn select_ed7c13() { - var arg_0 = vec2(f16()); - var arg_1 = vec2(f16()); + var arg_0 = vec2(1.0h); + var arg_1 = vec2(1.0h); var arg_2 = vec2(true); var res : vec2 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/sign/160933.wgsl b/test/tint/builtins/gen/var/sign/160933.wgsl index 3bd21d2d34..c382af04be 100644 --- a/test/tint/builtins/gen/var/sign/160933.wgsl +++ b/test/tint/builtins/gen/var/sign/160933.wgsl @@ -25,7 +25,7 @@ enable f16; // fn sign(vec<4, f16>) -> vec<4, f16> fn sign_160933() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.h); var res: vec4 = sign(arg_0); } diff --git a/test/tint/builtins/gen/var/sign/160933.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sign/160933.wgsl.expected.dxc.hlsl index 5800ea0538..a7f7d6a4a0 100644 --- a/test/tint/builtins/gen/var/sign/160933.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/sign/160933.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sign_160933() { - vector arg_0 = (float16_t(0.0h)).xxxx; + vector arg_0 = (float16_t(1.0h)).xxxx; vector res = sign(arg_0); } diff --git a/test/tint/builtins/gen/var/sign/160933.wgsl.expected.glsl b/test/tint/builtins/gen/var/sign/160933.wgsl.expected.glsl index 34a15388a5..e31e264e6b 100644 --- a/test/tint/builtins/gen/var/sign/160933.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/sign/160933.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void sign_160933() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = sign(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void sign_160933() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = sign(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void sign_160933() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = sign(arg_0); } diff --git a/test/tint/builtins/gen/var/sign/160933.wgsl.expected.msl b/test/tint/builtins/gen/var/sign/160933.wgsl.expected.msl index 6e7de9c4c2..a8ae5d2fff 100644 --- a/test/tint/builtins/gen/var/sign/160933.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/sign/160933.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sign_160933() { - half4 arg_0 = half4(0.0h); + half4 arg_0 = half4(1.0h); half4 res = sign(arg_0); } diff --git a/test/tint/builtins/gen/var/sign/160933.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sign/160933.wgsl.expected.spvasm index b1d1b7e55e..5700e0d3b9 100644 --- a/test/tint/builtins/gen/var/sign/160933.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/sign/160933.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v4half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %sign_160933 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4half Function %15 - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v4half %arg_0 - %18 = OpExtInst %v4half %19 FSign %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v4half Function %19 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v4half %arg_0 + %20 = OpExtInst %v4half %21 FSign %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %sign_160933 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %sign_160933 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %sign_160933 + %33 = OpLabel + %34 = OpFunctionCall %void %sign_160933 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %sign_160933 + %36 = OpLabel + %37 = OpFunctionCall %void %sign_160933 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/sign/160933.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sign/160933.wgsl.expected.wgsl index 21ab9a5a47..625ce07fc9 100644 --- a/test/tint/builtins/gen/var/sign/160933.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/sign/160933.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn sign_160933() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.0h); var res : vec4 = sign(arg_0); } diff --git a/test/tint/builtins/gen/var/sign/5d283a.wgsl b/test/tint/builtins/gen/var/sign/5d283a.wgsl index 0855f7965e..b8b74872a3 100644 --- a/test/tint/builtins/gen/var/sign/5d283a.wgsl +++ b/test/tint/builtins/gen/var/sign/5d283a.wgsl @@ -25,7 +25,7 @@ enable f16; // fn sign(vec<3, f16>) -> vec<3, f16> fn sign_5d283a() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.h); var res: vec3 = sign(arg_0); } diff --git a/test/tint/builtins/gen/var/sign/5d283a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sign/5d283a.wgsl.expected.dxc.hlsl index 0f9a2c34af..ba4ea8efd8 100644 --- a/test/tint/builtins/gen/var/sign/5d283a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/sign/5d283a.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sign_5d283a() { - vector arg_0 = (float16_t(0.0h)).xxx; + vector arg_0 = (float16_t(1.0h)).xxx; vector res = sign(arg_0); } diff --git a/test/tint/builtins/gen/var/sign/5d283a.wgsl.expected.glsl b/test/tint/builtins/gen/var/sign/5d283a.wgsl.expected.glsl index bb557c08e2..6f2f92bcd0 100644 --- a/test/tint/builtins/gen/var/sign/5d283a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/sign/5d283a.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void sign_5d283a() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = sign(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void sign_5d283a() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = sign(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void sign_5d283a() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = sign(arg_0); } diff --git a/test/tint/builtins/gen/var/sign/5d283a.wgsl.expected.msl b/test/tint/builtins/gen/var/sign/5d283a.wgsl.expected.msl index 06a5e9e1b2..70bde15cf4 100644 --- a/test/tint/builtins/gen/var/sign/5d283a.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/sign/5d283a.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sign_5d283a() { - half3 arg_0 = half3(0.0h); + half3 arg_0 = half3(1.0h); half3 res = sign(arg_0); } diff --git a/test/tint/builtins/gen/var/sign/5d283a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sign/5d283a.wgsl.expected.spvasm index a65dfc15e2..76df64119e 100644 --- a/test/tint/builtins/gen/var/sign/5d283a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/sign/5d283a.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %sign_5d283a = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3half Function %15 - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v3half %arg_0 - %18 = OpExtInst %v3half %19 FSign %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v3half Function %19 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v3half %arg_0 + %20 = OpExtInst %v3half %21 FSign %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %sign_5d283a +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %sign_5d283a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %sign_5d283a + %33 = OpLabel + %34 = OpFunctionCall %void %sign_5d283a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %sign_5d283a + %36 = OpLabel + %37 = OpFunctionCall %void %sign_5d283a OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/sign/5d283a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sign/5d283a.wgsl.expected.wgsl index 78cd550cfb..c4f3b3757a 100644 --- a/test/tint/builtins/gen/var/sign/5d283a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/sign/5d283a.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn sign_5d283a() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.0h); var res : vec3 = sign(arg_0); } diff --git a/test/tint/builtins/gen/var/sign/7c85ea.wgsl b/test/tint/builtins/gen/var/sign/7c85ea.wgsl index 55bb282ae3..08bd054850 100644 --- a/test/tint/builtins/gen/var/sign/7c85ea.wgsl +++ b/test/tint/builtins/gen/var/sign/7c85ea.wgsl @@ -25,7 +25,7 @@ enable f16; // fn sign(f16) -> f16 fn sign_7c85ea() { - var arg_0 = f16(); + var arg_0 = 1.h; var res: f16 = sign(arg_0); } diff --git a/test/tint/builtins/gen/var/sign/7c85ea.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sign/7c85ea.wgsl.expected.dxc.hlsl index 159140c625..2a3c869578 100644 --- a/test/tint/builtins/gen/var/sign/7c85ea.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/sign/7c85ea.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sign_7c85ea() { - float16_t arg_0 = float16_t(0.0h); + float16_t arg_0 = float16_t(1.0h); float16_t res = sign(arg_0); } diff --git a/test/tint/builtins/gen/var/sign/7c85ea.wgsl.expected.glsl b/test/tint/builtins/gen/var/sign/7c85ea.wgsl.expected.glsl index 35b29e26ae..91cd452a52 100644 --- a/test/tint/builtins/gen/var/sign/7c85ea.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/sign/7c85ea.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void sign_7c85ea() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = sign(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void sign_7c85ea() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = sign(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void sign_7c85ea() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = sign(arg_0); } diff --git a/test/tint/builtins/gen/var/sign/7c85ea.wgsl.expected.msl b/test/tint/builtins/gen/var/sign/7c85ea.wgsl.expected.msl index 649103c28a..4915d786ed 100644 --- a/test/tint/builtins/gen/var/sign/7c85ea.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/sign/7c85ea.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sign_7c85ea() { - half arg_0 = 0.0h; + half arg_0 = 1.0h; half res = sign(arg_0); } diff --git a/test/tint/builtins/gen/var/sign/7c85ea.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sign/7c85ea.wgsl.expected.spvasm index 81d4f68f29..34b64787f1 100644 --- a/test/tint/builtins/gen/var/sign/7c85ea.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/sign/7c85ea.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %18 = OpExtInstImport "GLSL.std.450" + %19 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -37,39 +37,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %21 = OpTypeFunction %v4float + %17 = OpConstantNull %half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %sign_7c85ea = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_half Function %14 - %res = OpVariable %_ptr_Function_half Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %half %arg_0 - %17 = OpExtInst %half %18 FSign %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_half Function %17 + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %arg_0 %half_0x1p_0 + %20 = OpLoad %half %arg_0 + %18 = OpExtInst %half %19 FSign %20 + OpStore %res %18 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %sign_7c85ea +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %sign_7c85ea OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %sign_7c85ea + %31 = OpLabel + %32 = OpFunctionCall %void %sign_7c85ea OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %sign_7c85ea + %34 = OpLabel + %35 = OpFunctionCall %void %sign_7c85ea OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/sign/7c85ea.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sign/7c85ea.wgsl.expected.wgsl index 1d5dd3b8cc..76a4a97119 100644 --- a/test/tint/builtins/gen/var/sign/7c85ea.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/sign/7c85ea.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn sign_7c85ea() { - var arg_0 = f16(); + var arg_0 = 1.0h; var res : f16 = sign(arg_0); } diff --git a/test/tint/builtins/gen/var/sign/ccdb3c.wgsl b/test/tint/builtins/gen/var/sign/ccdb3c.wgsl index 9796e600b7..8849d7caed 100644 --- a/test/tint/builtins/gen/var/sign/ccdb3c.wgsl +++ b/test/tint/builtins/gen/var/sign/ccdb3c.wgsl @@ -25,7 +25,7 @@ enable f16; // fn sign(vec<2, f16>) -> vec<2, f16> fn sign_ccdb3c() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.h); var res: vec2 = sign(arg_0); } diff --git a/test/tint/builtins/gen/var/sign/ccdb3c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sign/ccdb3c.wgsl.expected.dxc.hlsl index 6968272ace..8ec5c58856 100644 --- a/test/tint/builtins/gen/var/sign/ccdb3c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/sign/ccdb3c.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sign_ccdb3c() { - vector arg_0 = (float16_t(0.0h)).xx; + vector arg_0 = (float16_t(1.0h)).xx; vector res = sign(arg_0); } diff --git a/test/tint/builtins/gen/var/sign/ccdb3c.wgsl.expected.glsl b/test/tint/builtins/gen/var/sign/ccdb3c.wgsl.expected.glsl index 7cd2e5c2f1..380c133c82 100644 --- a/test/tint/builtins/gen/var/sign/ccdb3c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/sign/ccdb3c.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void sign_ccdb3c() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = sign(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void sign_ccdb3c() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = sign(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void sign_ccdb3c() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = sign(arg_0); } diff --git a/test/tint/builtins/gen/var/sign/ccdb3c.wgsl.expected.msl b/test/tint/builtins/gen/var/sign/ccdb3c.wgsl.expected.msl index 479a00a2ac..4245527c81 100644 --- a/test/tint/builtins/gen/var/sign/ccdb3c.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/sign/ccdb3c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sign_ccdb3c() { - half2 arg_0 = half2(0.0h); + half2 arg_0 = half2(1.0h); half2 res = sign(arg_0); } diff --git a/test/tint/builtins/gen/var/sign/ccdb3c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sign/ccdb3c.wgsl.expected.spvasm index 3d7d8e8f7e..5bc4abb570 100644 --- a/test/tint/builtins/gen/var/sign/ccdb3c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/sign/ccdb3c.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v2half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %sign_ccdb3c = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2half Function %15 - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v2half %arg_0 - %18 = OpExtInst %v2half %19 FSign %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v2half Function %19 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v2half %arg_0 + %20 = OpExtInst %v2half %21 FSign %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %sign_ccdb3c +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %sign_ccdb3c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %sign_ccdb3c + %33 = OpLabel + %34 = OpFunctionCall %void %sign_ccdb3c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %sign_ccdb3c + %36 = OpLabel + %37 = OpFunctionCall %void %sign_ccdb3c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/sign/ccdb3c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sign/ccdb3c.wgsl.expected.wgsl index 71231ddbb6..38d2f95ea3 100644 --- a/test/tint/builtins/gen/var/sign/ccdb3c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/sign/ccdb3c.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn sign_ccdb3c() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.0h); var res : vec2 = sign(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/2c903b.wgsl b/test/tint/builtins/gen/var/sin/2c903b.wgsl index d639f9b030..5524188b00 100644 --- a/test/tint/builtins/gen/var/sin/2c903b.wgsl +++ b/test/tint/builtins/gen/var/sin/2c903b.wgsl @@ -25,7 +25,7 @@ enable f16; // fn sin(vec<3, f16>) -> vec<3, f16> fn sin_2c903b() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.h); var res: vec3 = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.dxc.hlsl index f4f1c6c931..7e377b06d5 100644 --- a/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sin_2c903b() { - vector arg_0 = (float16_t(0.0h)).xxx; + vector arg_0 = (float16_t(1.0h)).xxx; vector res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.glsl b/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.glsl index 8af8af092a..4e80fbf4d9 100644 --- a/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void sin_2c903b() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = sin(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void sin_2c903b() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = sin(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void sin_2c903b() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.msl b/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.msl index 726be54644..04bcb866ff 100644 --- a/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sin_2c903b() { - half3 arg_0 = half3(0.0h); + half3 arg_0 = half3(1.0h); half3 res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.spvasm index a6340ff0ad..696db23ab4 100644 --- a/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %sin_2c903b = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3half Function %15 - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v3half %arg_0 - %18 = OpExtInst %v3half %19 Sin %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v3half Function %19 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v3half %arg_0 + %20 = OpExtInst %v3half %21 Sin %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %sin_2c903b +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %sin_2c903b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %sin_2c903b + %33 = OpLabel + %34 = OpFunctionCall %void %sin_2c903b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %sin_2c903b + %36 = OpLabel + %37 = OpFunctionCall %void %sin_2c903b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.wgsl index 7e8f70afb7..381278f202 100644 --- a/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn sin_2c903b() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.0h); var res : vec3 = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/3cca11.wgsl b/test/tint/builtins/gen/var/sin/3cca11.wgsl index fcc4f9f192..80b7c53032 100644 --- a/test/tint/builtins/gen/var/sin/3cca11.wgsl +++ b/test/tint/builtins/gen/var/sin/3cca11.wgsl @@ -25,7 +25,7 @@ enable f16; // fn sin(vec<2, f16>) -> vec<2, f16> fn sin_3cca11() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.h); var res: vec2 = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.dxc.hlsl index 52c96edba9..d3d875a232 100644 --- a/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sin_3cca11() { - vector arg_0 = (float16_t(0.0h)).xx; + vector arg_0 = (float16_t(1.0h)).xx; vector res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.glsl b/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.glsl index 75cdcafa58..ab019e2cf3 100644 --- a/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void sin_3cca11() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = sin(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void sin_3cca11() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = sin(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void sin_3cca11() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.msl b/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.msl index 5dbd595150..afa9a3804a 100644 --- a/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sin_3cca11() { - half2 arg_0 = half2(0.0h); + half2 arg_0 = half2(1.0h); half2 res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.spvasm index 969ca211b2..b227acb9c1 100644 --- a/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v2half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %sin_3cca11 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2half Function %15 - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v2half %arg_0 - %18 = OpExtInst %v2half %19 Sin %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v2half Function %19 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v2half %arg_0 + %20 = OpExtInst %v2half %21 Sin %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %sin_3cca11 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %sin_3cca11 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %sin_3cca11 + %33 = OpLabel + %34 = OpFunctionCall %void %sin_3cca11 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %sin_3cca11 + %36 = OpLabel + %37 = OpFunctionCall %void %sin_3cca11 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.wgsl index 34f865d889..e5f5ea8e2e 100644 --- a/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn sin_3cca11() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.0h); var res : vec2 = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/5c0712.wgsl b/test/tint/builtins/gen/var/sin/5c0712.wgsl index e94e831656..8c273d45f6 100644 --- a/test/tint/builtins/gen/var/sin/5c0712.wgsl +++ b/test/tint/builtins/gen/var/sin/5c0712.wgsl @@ -25,7 +25,7 @@ enable f16; // fn sin(vec<4, f16>) -> vec<4, f16> fn sin_5c0712() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.h); var res: vec4 = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.dxc.hlsl index 38a4ccab15..2693475843 100644 --- a/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sin_5c0712() { - vector arg_0 = (float16_t(0.0h)).xxxx; + vector arg_0 = (float16_t(1.0h)).xxxx; vector res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.glsl b/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.glsl index 2260625806..1fc85ff05f 100644 --- a/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void sin_5c0712() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = sin(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void sin_5c0712() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = sin(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void sin_5c0712() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.msl b/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.msl index 87f6df62f9..aa6f22dd1a 100644 --- a/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sin_5c0712() { - half4 arg_0 = half4(0.0h); + half4 arg_0 = half4(1.0h); half4 res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.spvasm index 07ac80981a..9a01bfee08 100644 --- a/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v4half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %sin_5c0712 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4half Function %15 - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v4half %arg_0 - %18 = OpExtInst %v4half %19 Sin %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v4half Function %19 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v4half %arg_0 + %20 = OpExtInst %v4half %21 Sin %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %sin_5c0712 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %sin_5c0712 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %sin_5c0712 + %33 = OpLabel + %34 = OpFunctionCall %void %sin_5c0712 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %sin_5c0712 + %36 = OpLabel + %37 = OpFunctionCall %void %sin_5c0712 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.wgsl index d737c454f1..065cba4e03 100644 --- a/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn sin_5c0712() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.0h); var res : vec4 = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/66a59f.wgsl b/test/tint/builtins/gen/var/sin/66a59f.wgsl index d73f364e57..85c746694b 100644 --- a/test/tint/builtins/gen/var/sin/66a59f.wgsl +++ b/test/tint/builtins/gen/var/sin/66a59f.wgsl @@ -25,7 +25,7 @@ enable f16; // fn sin(f16) -> f16 fn sin_66a59f() { - var arg_0 = f16(); + var arg_0 = 1.h; var res: f16 = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.dxc.hlsl index 7b1237f82b..9de611f3d6 100644 --- a/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sin_66a59f() { - float16_t arg_0 = float16_t(0.0h); + float16_t arg_0 = float16_t(1.0h); float16_t res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.glsl b/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.glsl index 20ac57e5d7..4806e5fb32 100644 --- a/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void sin_66a59f() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = sin(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void sin_66a59f() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = sin(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void sin_66a59f() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.msl b/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.msl index 1a7188408e..b82b5599d1 100644 --- a/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sin_66a59f() { - half arg_0 = 0.0h; + half arg_0 = 1.0h; half res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.spvasm index f4689fb064..c3a5f15565 100644 --- a/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %18 = OpExtInstImport "GLSL.std.450" + %19 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -37,39 +37,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %21 = OpTypeFunction %v4float + %17 = OpConstantNull %half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %sin_66a59f = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_half Function %14 - %res = OpVariable %_ptr_Function_half Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %half %arg_0 - %17 = OpExtInst %half %18 Sin %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_half Function %17 + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %arg_0 %half_0x1p_0 + %20 = OpLoad %half %arg_0 + %18 = OpExtInst %half %19 Sin %20 + OpStore %res %18 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %sin_66a59f +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %sin_66a59f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %sin_66a59f + %31 = OpLabel + %32 = OpFunctionCall %void %sin_66a59f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %sin_66a59f + %34 = OpLabel + %35 = OpFunctionCall %void %sin_66a59f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.wgsl index 897e30dd9c..1a0c77e4b2 100644 --- a/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn sin_66a59f() { - var arg_0 = f16(); + var arg_0 = 1.0h; var res : f16 = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sinh/0908c1.wgsl b/test/tint/builtins/gen/var/sinh/0908c1.wgsl index 13e6f98aba..290d1a1f0f 100644 --- a/test/tint/builtins/gen/var/sinh/0908c1.wgsl +++ b/test/tint/builtins/gen/var/sinh/0908c1.wgsl @@ -25,7 +25,7 @@ enable f16; // fn sinh(vec<3, f16>) -> vec<3, f16> fn sinh_0908c1() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.h); var res: vec3 = sinh(arg_0); } diff --git a/test/tint/builtins/gen/var/sinh/0908c1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sinh/0908c1.wgsl.expected.dxc.hlsl index 80c43ed31b..7e501c8eee 100644 --- a/test/tint/builtins/gen/var/sinh/0908c1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/sinh/0908c1.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sinh_0908c1() { - vector arg_0 = (float16_t(0.0h)).xxx; + vector arg_0 = (float16_t(1.0h)).xxx; vector res = sinh(arg_0); } diff --git a/test/tint/builtins/gen/var/sinh/0908c1.wgsl.expected.glsl b/test/tint/builtins/gen/var/sinh/0908c1.wgsl.expected.glsl index 5d2c159340..df65835f72 100644 --- a/test/tint/builtins/gen/var/sinh/0908c1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/sinh/0908c1.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void sinh_0908c1() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = sinh(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void sinh_0908c1() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = sinh(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void sinh_0908c1() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = sinh(arg_0); } diff --git a/test/tint/builtins/gen/var/sinh/0908c1.wgsl.expected.msl b/test/tint/builtins/gen/var/sinh/0908c1.wgsl.expected.msl index a31c760e22..5a6a9db6ad 100644 --- a/test/tint/builtins/gen/var/sinh/0908c1.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/sinh/0908c1.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sinh_0908c1() { - half3 arg_0 = half3(0.0h); + half3 arg_0 = half3(1.0h); half3 res = sinh(arg_0); } diff --git a/test/tint/builtins/gen/var/sinh/0908c1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sinh/0908c1.wgsl.expected.spvasm index 5d347fe26d..aa9d933585 100644 --- a/test/tint/builtins/gen/var/sinh/0908c1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/sinh/0908c1.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %sinh_0908c1 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3half Function %15 - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v3half %arg_0 - %18 = OpExtInst %v3half %19 Sinh %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v3half Function %19 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v3half %arg_0 + %20 = OpExtInst %v3half %21 Sinh %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %sinh_0908c1 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %sinh_0908c1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %sinh_0908c1 + %33 = OpLabel + %34 = OpFunctionCall %void %sinh_0908c1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %sinh_0908c1 + %36 = OpLabel + %37 = OpFunctionCall %void %sinh_0908c1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/sinh/0908c1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sinh/0908c1.wgsl.expected.wgsl index e077d31f8b..17bd34afe1 100644 --- a/test/tint/builtins/gen/var/sinh/0908c1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/sinh/0908c1.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn sinh_0908c1() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.0h); var res : vec3 = sinh(arg_0); } diff --git a/test/tint/builtins/gen/var/sinh/69cce2.wgsl b/test/tint/builtins/gen/var/sinh/69cce2.wgsl index 77fa301c62..b807c69411 100644 --- a/test/tint/builtins/gen/var/sinh/69cce2.wgsl +++ b/test/tint/builtins/gen/var/sinh/69cce2.wgsl @@ -25,7 +25,7 @@ enable f16; // fn sinh(f16) -> f16 fn sinh_69cce2() { - var arg_0 = f16(); + var arg_0 = 1.h; var res: f16 = sinh(arg_0); } diff --git a/test/tint/builtins/gen/var/sinh/69cce2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sinh/69cce2.wgsl.expected.dxc.hlsl index 4a09bf562b..ff85a1f191 100644 --- a/test/tint/builtins/gen/var/sinh/69cce2.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/sinh/69cce2.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sinh_69cce2() { - float16_t arg_0 = float16_t(0.0h); + float16_t arg_0 = float16_t(1.0h); float16_t res = sinh(arg_0); } diff --git a/test/tint/builtins/gen/var/sinh/69cce2.wgsl.expected.glsl b/test/tint/builtins/gen/var/sinh/69cce2.wgsl.expected.glsl index 62e7689157..73ce0f558d 100644 --- a/test/tint/builtins/gen/var/sinh/69cce2.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/sinh/69cce2.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void sinh_69cce2() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = sinh(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void sinh_69cce2() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = sinh(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void sinh_69cce2() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = sinh(arg_0); } diff --git a/test/tint/builtins/gen/var/sinh/69cce2.wgsl.expected.msl b/test/tint/builtins/gen/var/sinh/69cce2.wgsl.expected.msl index 8c1085407d..d5d0f386ce 100644 --- a/test/tint/builtins/gen/var/sinh/69cce2.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/sinh/69cce2.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sinh_69cce2() { - half arg_0 = 0.0h; + half arg_0 = 1.0h; half res = sinh(arg_0); } diff --git a/test/tint/builtins/gen/var/sinh/69cce2.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sinh/69cce2.wgsl.expected.spvasm index b9a45acd2b..b953991bf5 100644 --- a/test/tint/builtins/gen/var/sinh/69cce2.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/sinh/69cce2.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %18 = OpExtInstImport "GLSL.std.450" + %19 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -37,39 +37,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %21 = OpTypeFunction %v4float + %17 = OpConstantNull %half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %sinh_69cce2 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_half Function %14 - %res = OpVariable %_ptr_Function_half Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %half %arg_0 - %17 = OpExtInst %half %18 Sinh %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_half Function %17 + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %arg_0 %half_0x1p_0 + %20 = OpLoad %half %arg_0 + %18 = OpExtInst %half %19 Sinh %20 + OpStore %res %18 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %sinh_69cce2 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %sinh_69cce2 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %sinh_69cce2 + %31 = OpLabel + %32 = OpFunctionCall %void %sinh_69cce2 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %sinh_69cce2 + %34 = OpLabel + %35 = OpFunctionCall %void %sinh_69cce2 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/sinh/69cce2.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sinh/69cce2.wgsl.expected.wgsl index bb651b8525..d8ef948fa3 100644 --- a/test/tint/builtins/gen/var/sinh/69cce2.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/sinh/69cce2.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn sinh_69cce2() { - var arg_0 = f16(); + var arg_0 = 1.0h; var res : f16 = sinh(arg_0); } diff --git a/test/tint/builtins/gen/var/sinh/924f19.wgsl b/test/tint/builtins/gen/var/sinh/924f19.wgsl index 5afb8cf721..fc53fc9a1f 100644 --- a/test/tint/builtins/gen/var/sinh/924f19.wgsl +++ b/test/tint/builtins/gen/var/sinh/924f19.wgsl @@ -25,7 +25,7 @@ enable f16; // fn sinh(vec<2, f16>) -> vec<2, f16> fn sinh_924f19() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.h); var res: vec2 = sinh(arg_0); } diff --git a/test/tint/builtins/gen/var/sinh/924f19.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sinh/924f19.wgsl.expected.dxc.hlsl index dd95c74357..e948a02ef3 100644 --- a/test/tint/builtins/gen/var/sinh/924f19.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/sinh/924f19.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sinh_924f19() { - vector arg_0 = (float16_t(0.0h)).xx; + vector arg_0 = (float16_t(1.0h)).xx; vector res = sinh(arg_0); } diff --git a/test/tint/builtins/gen/var/sinh/924f19.wgsl.expected.glsl b/test/tint/builtins/gen/var/sinh/924f19.wgsl.expected.glsl index 46efc04741..837cb8ca3e 100644 --- a/test/tint/builtins/gen/var/sinh/924f19.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/sinh/924f19.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void sinh_924f19() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = sinh(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void sinh_924f19() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = sinh(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void sinh_924f19() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = sinh(arg_0); } diff --git a/test/tint/builtins/gen/var/sinh/924f19.wgsl.expected.msl b/test/tint/builtins/gen/var/sinh/924f19.wgsl.expected.msl index eb99e968ad..1665954bba 100644 --- a/test/tint/builtins/gen/var/sinh/924f19.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/sinh/924f19.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sinh_924f19() { - half2 arg_0 = half2(0.0h); + half2 arg_0 = half2(1.0h); half2 res = sinh(arg_0); } diff --git a/test/tint/builtins/gen/var/sinh/924f19.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sinh/924f19.wgsl.expected.spvasm index c1a335dc32..3e671c03f8 100644 --- a/test/tint/builtins/gen/var/sinh/924f19.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/sinh/924f19.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v2half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %sinh_924f19 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2half Function %15 - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v2half %arg_0 - %18 = OpExtInst %v2half %19 Sinh %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v2half Function %19 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v2half %arg_0 + %20 = OpExtInst %v2half %21 Sinh %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %sinh_924f19 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %sinh_924f19 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %sinh_924f19 + %33 = OpLabel + %34 = OpFunctionCall %void %sinh_924f19 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %sinh_924f19 + %36 = OpLabel + %37 = OpFunctionCall %void %sinh_924f19 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/sinh/924f19.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sinh/924f19.wgsl.expected.wgsl index e6d1440bec..e03599a13e 100644 --- a/test/tint/builtins/gen/var/sinh/924f19.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/sinh/924f19.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn sinh_924f19() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.0h); var res : vec2 = sinh(arg_0); } diff --git a/test/tint/builtins/gen/var/sinh/ba7e25.wgsl b/test/tint/builtins/gen/var/sinh/ba7e25.wgsl index ea5e54c4fb..b30192a33f 100644 --- a/test/tint/builtins/gen/var/sinh/ba7e25.wgsl +++ b/test/tint/builtins/gen/var/sinh/ba7e25.wgsl @@ -25,7 +25,7 @@ enable f16; // fn sinh(vec<4, f16>) -> vec<4, f16> fn sinh_ba7e25() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.h); var res: vec4 = sinh(arg_0); } diff --git a/test/tint/builtins/gen/var/sinh/ba7e25.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sinh/ba7e25.wgsl.expected.dxc.hlsl index d40f72623e..de6afbe5df 100644 --- a/test/tint/builtins/gen/var/sinh/ba7e25.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/sinh/ba7e25.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sinh_ba7e25() { - vector arg_0 = (float16_t(0.0h)).xxxx; + vector arg_0 = (float16_t(1.0h)).xxxx; vector res = sinh(arg_0); } diff --git a/test/tint/builtins/gen/var/sinh/ba7e25.wgsl.expected.glsl b/test/tint/builtins/gen/var/sinh/ba7e25.wgsl.expected.glsl index c1e6fe6460..4f7b50fef5 100644 --- a/test/tint/builtins/gen/var/sinh/ba7e25.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/sinh/ba7e25.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void sinh_ba7e25() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = sinh(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void sinh_ba7e25() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = sinh(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void sinh_ba7e25() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = sinh(arg_0); } diff --git a/test/tint/builtins/gen/var/sinh/ba7e25.wgsl.expected.msl b/test/tint/builtins/gen/var/sinh/ba7e25.wgsl.expected.msl index c211bfd1a6..dbc759515a 100644 --- a/test/tint/builtins/gen/var/sinh/ba7e25.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/sinh/ba7e25.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sinh_ba7e25() { - half4 arg_0 = half4(0.0h); + half4 arg_0 = half4(1.0h); half4 res = sinh(arg_0); } diff --git a/test/tint/builtins/gen/var/sinh/ba7e25.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sinh/ba7e25.wgsl.expected.spvasm index d98c76f598..8d5a2d72ea 100644 --- a/test/tint/builtins/gen/var/sinh/ba7e25.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/sinh/ba7e25.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v4half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %sinh_ba7e25 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4half Function %15 - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v4half %arg_0 - %18 = OpExtInst %v4half %19 Sinh %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v4half Function %19 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v4half %arg_0 + %20 = OpExtInst %v4half %21 Sinh %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %sinh_ba7e25 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %sinh_ba7e25 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %sinh_ba7e25 + %33 = OpLabel + %34 = OpFunctionCall %void %sinh_ba7e25 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %sinh_ba7e25 + %36 = OpLabel + %37 = OpFunctionCall %void %sinh_ba7e25 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/sinh/ba7e25.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sinh/ba7e25.wgsl.expected.wgsl index 4fdc05007e..16b2c7edeb 100644 --- a/test/tint/builtins/gen/var/sinh/ba7e25.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/sinh/ba7e25.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn sinh_ba7e25() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.0h); var res : vec4 = sinh(arg_0); } diff --git a/test/tint/builtins/gen/var/smoothstep/12c031.wgsl b/test/tint/builtins/gen/var/smoothstep/12c031.wgsl index 630ba4fcce..2db4d35b29 100644 --- a/test/tint/builtins/gen/var/smoothstep/12c031.wgsl +++ b/test/tint/builtins/gen/var/smoothstep/12c031.wgsl @@ -25,9 +25,9 @@ enable f16; // fn smoothstep(vec<2, f16>, vec<2, f16>, vec<2, f16>) -> vec<2, f16> fn smoothstep_12c031() { - var arg_0 = vec2(f16()); - var arg_1 = vec2(f16()); - var arg_2 = vec2(f16()); + var arg_0 = vec2(1.h); + var arg_1 = vec2(1.h); + var arg_2 = vec2(1.h); var res: vec2 = smoothstep(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/smoothstep/12c031.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/smoothstep/12c031.wgsl.expected.dxc.hlsl index 9be0898b47..b9615c10ed 100644 --- a/test/tint/builtins/gen/var/smoothstep/12c031.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/smoothstep/12c031.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void smoothstep_12c031() { - vector arg_0 = (float16_t(0.0h)).xx; - vector arg_1 = (float16_t(0.0h)).xx; - vector arg_2 = (float16_t(0.0h)).xx; + vector arg_0 = (float16_t(1.0h)).xx; + vector arg_1 = (float16_t(1.0h)).xx; + vector arg_2 = (float16_t(1.0h)).xx; vector res = smoothstep(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/smoothstep/12c031.wgsl.expected.glsl b/test/tint/builtins/gen/var/smoothstep/12c031.wgsl.expected.glsl index c5453ff59b..c71c7b52a0 100644 --- a/test/tint/builtins/gen/var/smoothstep/12c031.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/smoothstep/12c031.wgsl.expected.glsl @@ -2,9 +2,9 @@ #extension GL_AMD_gpu_shader_half_float : require void smoothstep_12c031() { - f16vec2 arg_0 = f16vec2(0.0hf); - f16vec2 arg_1 = f16vec2(0.0hf); - f16vec2 arg_2 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_1 = f16vec2(1.0hf); + f16vec2 arg_2 = f16vec2(1.0hf); f16vec2 res = smoothstep(arg_0, arg_1, arg_2); } @@ -26,9 +26,9 @@ void main() { precision mediump float; void smoothstep_12c031() { - f16vec2 arg_0 = f16vec2(0.0hf); - f16vec2 arg_1 = f16vec2(0.0hf); - f16vec2 arg_2 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_1 = f16vec2(1.0hf); + f16vec2 arg_2 = f16vec2(1.0hf); f16vec2 res = smoothstep(arg_0, arg_1, arg_2); } @@ -44,9 +44,9 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void smoothstep_12c031() { - f16vec2 arg_0 = f16vec2(0.0hf); - f16vec2 arg_1 = f16vec2(0.0hf); - f16vec2 arg_2 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_1 = f16vec2(1.0hf); + f16vec2 arg_2 = f16vec2(1.0hf); f16vec2 res = smoothstep(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/smoothstep/12c031.wgsl.expected.msl b/test/tint/builtins/gen/var/smoothstep/12c031.wgsl.expected.msl index d21672c1e3..2bc622dcd8 100644 --- a/test/tint/builtins/gen/var/smoothstep/12c031.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/smoothstep/12c031.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void smoothstep_12c031() { - half2 arg_0 = half2(0.0h); - half2 arg_1 = half2(0.0h); - half2 arg_2 = half2(0.0h); + half2 arg_0 = half2(1.0h); + half2 arg_1 = half2(1.0h); + half2 arg_2 = half2(1.0h); half2 res = smoothstep(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/smoothstep/12c031.wgsl.expected.spvasm b/test/tint/builtins/gen/var/smoothstep/12c031.wgsl.expected.spvasm index 658663c77b..47cd7601ab 100644 --- a/test/tint/builtins/gen/var/smoothstep/12c031.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/smoothstep/12c031.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 42 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %21 = OpExtInstImport "GLSL.std.450" + %23 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -40,45 +40,47 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %26 = OpTypeFunction %v4float + %19 = OpConstantNull %v2half + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %smoothstep_12c031 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2half Function %15 - %arg_1 = OpVariable %_ptr_Function_v2half Function %15 - %arg_2 = OpVariable %_ptr_Function_v2half Function %15 - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - OpStore %arg_2 %15 - %22 = OpLoad %v2half %arg_0 - %23 = OpLoad %v2half %arg_1 - %24 = OpLoad %v2half %arg_2 - %20 = OpExtInst %v2half %21 SmoothStep %22 %23 %24 - OpStore %res %20 + %arg_0 = OpVariable %_ptr_Function_v2half Function %19 + %arg_1 = OpVariable %_ptr_Function_v2half Function %19 + %arg_2 = OpVariable %_ptr_Function_v2half Function %19 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + OpStore %arg_2 %16 + %24 = OpLoad %v2half %arg_0 + %25 = OpLoad %v2half %arg_1 + %26 = OpLoad %v2half %arg_2 + %22 = OpExtInst %v2half %23 SmoothStep %24 %25 %26 + OpStore %res %22 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %smoothstep_12c031 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %smoothstep_12c031 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %smoothstep_12c031 + %37 = OpLabel + %38 = OpFunctionCall %void %smoothstep_12c031 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %void %smoothstep_12c031 + %40 = OpLabel + %41 = OpFunctionCall %void %smoothstep_12c031 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/smoothstep/12c031.wgsl.expected.wgsl b/test/tint/builtins/gen/var/smoothstep/12c031.wgsl.expected.wgsl index 771f83c71d..3356cb53ee 100644 --- a/test/tint/builtins/gen/var/smoothstep/12c031.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/smoothstep/12c031.wgsl.expected.wgsl @@ -1,9 +1,9 @@ enable f16; fn smoothstep_12c031() { - var arg_0 = vec2(f16()); - var arg_1 = vec2(f16()); - var arg_2 = vec2(f16()); + var arg_0 = vec2(1.0h); + var arg_1 = vec2(1.0h); + var arg_2 = vec2(1.0h); var res : vec2 = smoothstep(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/smoothstep/586e12.wgsl b/test/tint/builtins/gen/var/smoothstep/586e12.wgsl index 55d79620a9..cbe6b56030 100644 --- a/test/tint/builtins/gen/var/smoothstep/586e12.wgsl +++ b/test/tint/builtins/gen/var/smoothstep/586e12.wgsl @@ -25,9 +25,9 @@ enable f16; // fn smoothstep(f16, f16, f16) -> f16 fn smoothstep_586e12() { - var arg_0 = f16(); - var arg_1 = f16(); - var arg_2 = f16(); + var arg_0 = 1.h; + var arg_1 = 1.h; + var arg_2 = 1.h; var res: f16 = smoothstep(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/smoothstep/586e12.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/smoothstep/586e12.wgsl.expected.dxc.hlsl index 3dd35eb690..c4e958dad7 100644 --- a/test/tint/builtins/gen/var/smoothstep/586e12.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/smoothstep/586e12.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void smoothstep_586e12() { - float16_t arg_0 = float16_t(0.0h); - float16_t arg_1 = float16_t(0.0h); - float16_t arg_2 = float16_t(0.0h); + float16_t arg_0 = float16_t(1.0h); + float16_t arg_1 = float16_t(1.0h); + float16_t arg_2 = float16_t(1.0h); float16_t res = smoothstep(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/smoothstep/586e12.wgsl.expected.glsl b/test/tint/builtins/gen/var/smoothstep/586e12.wgsl.expected.glsl index 4aca82eb30..9e3c4fb1ae 100644 --- a/test/tint/builtins/gen/var/smoothstep/586e12.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/smoothstep/586e12.wgsl.expected.glsl @@ -2,9 +2,9 @@ #extension GL_AMD_gpu_shader_half_float : require void smoothstep_586e12() { - float16_t arg_0 = 0.0hf; - float16_t arg_1 = 0.0hf; - float16_t arg_2 = 0.0hf; + float16_t arg_0 = 1.0hf; + float16_t arg_1 = 1.0hf; + float16_t arg_2 = 1.0hf; float16_t res = smoothstep(arg_0, arg_1, arg_2); } @@ -26,9 +26,9 @@ void main() { precision mediump float; void smoothstep_586e12() { - float16_t arg_0 = 0.0hf; - float16_t arg_1 = 0.0hf; - float16_t arg_2 = 0.0hf; + float16_t arg_0 = 1.0hf; + float16_t arg_1 = 1.0hf; + float16_t arg_2 = 1.0hf; float16_t res = smoothstep(arg_0, arg_1, arg_2); } @@ -44,9 +44,9 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void smoothstep_586e12() { - float16_t arg_0 = 0.0hf; - float16_t arg_1 = 0.0hf; - float16_t arg_2 = 0.0hf; + float16_t arg_0 = 1.0hf; + float16_t arg_1 = 1.0hf; + float16_t arg_2 = 1.0hf; float16_t res = smoothstep(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/smoothstep/586e12.wgsl.expected.msl b/test/tint/builtins/gen/var/smoothstep/586e12.wgsl.expected.msl index 5b62341cce..82d16f986e 100644 --- a/test/tint/builtins/gen/var/smoothstep/586e12.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/smoothstep/586e12.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void smoothstep_586e12() { - half arg_0 = 0.0h; - half arg_1 = 0.0h; - half arg_2 = 0.0h; + half arg_0 = 1.0h; + half arg_1 = 1.0h; + half arg_2 = 1.0h; half res = smoothstep(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/smoothstep/586e12.wgsl.expected.spvasm b/test/tint/builtins/gen/var/smoothstep/586e12.wgsl.expected.spvasm index dc12c4697a..c6a2fc2d17 100644 --- a/test/tint/builtins/gen/var/smoothstep/586e12.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/smoothstep/586e12.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 40 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %20 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -39,45 +39,46 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %25 = OpTypeFunction %v4float + %17 = OpConstantNull %half + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %smoothstep_586e12 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_half Function %14 - %arg_1 = OpVariable %_ptr_Function_half Function %14 - %arg_2 = OpVariable %_ptr_Function_half Function %14 - %res = OpVariable %_ptr_Function_half Function %14 - OpStore %arg_0 %14 - OpStore %arg_1 %14 - OpStore %arg_2 %14 - %21 = OpLoad %half %arg_0 - %22 = OpLoad %half %arg_1 - %23 = OpLoad %half %arg_2 - %19 = OpExtInst %half %20 SmoothStep %21 %22 %23 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_half Function %17 + %arg_1 = OpVariable %_ptr_Function_half Function %17 + %arg_2 = OpVariable %_ptr_Function_half Function %17 + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %arg_0 %half_0x1p_0 + OpStore %arg_1 %half_0x1p_0 + OpStore %arg_2 %half_0x1p_0 + %22 = OpLoad %half %arg_0 + %23 = OpLoad %half %arg_1 + %24 = OpLoad %half %arg_2 + %20 = OpExtInst %half %21 SmoothStep %22 %23 %24 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %smoothstep_586e12 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %smoothstep_586e12 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %smoothstep_586e12 + %35 = OpLabel + %36 = OpFunctionCall %void %smoothstep_586e12 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %37 = OpLabel - %38 = OpFunctionCall %void %smoothstep_586e12 + %38 = OpLabel + %39 = OpFunctionCall %void %smoothstep_586e12 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/smoothstep/586e12.wgsl.expected.wgsl b/test/tint/builtins/gen/var/smoothstep/586e12.wgsl.expected.wgsl index 9967bf6593..14a0ba783c 100644 --- a/test/tint/builtins/gen/var/smoothstep/586e12.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/smoothstep/586e12.wgsl.expected.wgsl @@ -1,9 +1,9 @@ enable f16; fn smoothstep_586e12() { - var arg_0 = f16(); - var arg_1 = f16(); - var arg_2 = f16(); + var arg_0 = 1.0h; + var arg_1 = 1.0h; + var arg_2 = 1.0h; var res : f16 = smoothstep(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl b/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl index fbade6cbff..95d86acaf9 100644 --- a/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl +++ b/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl @@ -25,9 +25,9 @@ enable f16; // fn smoothstep(vec<3, f16>, vec<3, f16>, vec<3, f16>) -> vec<3, f16> fn smoothstep_6e7a74() { - var arg_0 = vec3(f16()); - var arg_1 = vec3(f16()); - var arg_2 = vec3(f16()); + var arg_0 = vec3(1.h); + var arg_1 = vec3(1.h); + var arg_2 = vec3(1.h); var res: vec3 = smoothstep(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl.expected.dxc.hlsl index 710439ce57..6ef1676b0f 100644 --- a/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void smoothstep_6e7a74() { - vector arg_0 = (float16_t(0.0h)).xxx; - vector arg_1 = (float16_t(0.0h)).xxx; - vector arg_2 = (float16_t(0.0h)).xxx; + vector arg_0 = (float16_t(1.0h)).xxx; + vector arg_1 = (float16_t(1.0h)).xxx; + vector arg_2 = (float16_t(1.0h)).xxx; vector res = smoothstep(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl.expected.glsl b/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl.expected.glsl index f1ecbb7fa2..324c40ff7e 100644 --- a/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl.expected.glsl @@ -2,9 +2,9 @@ #extension GL_AMD_gpu_shader_half_float : require void smoothstep_6e7a74() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); - f16vec3 arg_2 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); + f16vec3 arg_2 = f16vec3(1.0hf); f16vec3 res = smoothstep(arg_0, arg_1, arg_2); } @@ -26,9 +26,9 @@ void main() { precision mediump float; void smoothstep_6e7a74() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); - f16vec3 arg_2 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); + f16vec3 arg_2 = f16vec3(1.0hf); f16vec3 res = smoothstep(arg_0, arg_1, arg_2); } @@ -44,9 +44,9 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void smoothstep_6e7a74() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); - f16vec3 arg_2 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); + f16vec3 arg_2 = f16vec3(1.0hf); f16vec3 res = smoothstep(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl.expected.msl b/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl.expected.msl index ac08ba83d3..07b3f831af 100644 --- a/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void smoothstep_6e7a74() { - half3 arg_0 = half3(0.0h); - half3 arg_1 = half3(0.0h); - half3 arg_2 = half3(0.0h); + half3 arg_0 = half3(1.0h); + half3 arg_1 = half3(1.0h); + half3 arg_2 = half3(1.0h); half3 res = smoothstep(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl.expected.spvasm b/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl.expected.spvasm index d4fa576d85..85d9d72190 100644 --- a/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 42 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %21 = OpExtInstImport "GLSL.std.450" + %23 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -40,45 +40,47 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %26 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %smoothstep_6e7a74 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3half Function %15 - %arg_1 = OpVariable %_ptr_Function_v3half Function %15 - %arg_2 = OpVariable %_ptr_Function_v3half Function %15 - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - OpStore %arg_2 %15 - %22 = OpLoad %v3half %arg_0 - %23 = OpLoad %v3half %arg_1 - %24 = OpLoad %v3half %arg_2 - %20 = OpExtInst %v3half %21 SmoothStep %22 %23 %24 - OpStore %res %20 + %arg_0 = OpVariable %_ptr_Function_v3half Function %19 + %arg_1 = OpVariable %_ptr_Function_v3half Function %19 + %arg_2 = OpVariable %_ptr_Function_v3half Function %19 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + OpStore %arg_2 %16 + %24 = OpLoad %v3half %arg_0 + %25 = OpLoad %v3half %arg_1 + %26 = OpLoad %v3half %arg_2 + %22 = OpExtInst %v3half %23 SmoothStep %24 %25 %26 + OpStore %res %22 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %smoothstep_6e7a74 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %smoothstep_6e7a74 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %smoothstep_6e7a74 + %37 = OpLabel + %38 = OpFunctionCall %void %smoothstep_6e7a74 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %void %smoothstep_6e7a74 + %40 = OpLabel + %41 = OpFunctionCall %void %smoothstep_6e7a74 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl.expected.wgsl b/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl.expected.wgsl index 7e668ebf74..f8b04866e9 100644 --- a/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl.expected.wgsl @@ -1,9 +1,9 @@ enable f16; fn smoothstep_6e7a74() { - var arg_0 = vec3(f16()); - var arg_1 = vec3(f16()); - var arg_2 = vec3(f16()); + var arg_0 = vec3(1.0h); + var arg_1 = vec3(1.0h); + var arg_2 = vec3(1.0h); var res : vec3 = smoothstep(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl b/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl index b9a0caf740..8d87efefac 100644 --- a/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl +++ b/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl @@ -25,9 +25,9 @@ enable f16; // fn smoothstep(vec<4, f16>, vec<4, f16>, vec<4, f16>) -> vec<4, f16> fn smoothstep_c43ebd() { - var arg_0 = vec4(f16()); - var arg_1 = vec4(f16()); - var arg_2 = vec4(f16()); + var arg_0 = vec4(1.h); + var arg_1 = vec4(1.h); + var arg_2 = vec4(1.h); var res: vec4 = smoothstep(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl.expected.dxc.hlsl index 3bd807dc2a..1b61019aff 100644 --- a/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void smoothstep_c43ebd() { - vector arg_0 = (float16_t(0.0h)).xxxx; - vector arg_1 = (float16_t(0.0h)).xxxx; - vector arg_2 = (float16_t(0.0h)).xxxx; + vector arg_0 = (float16_t(1.0h)).xxxx; + vector arg_1 = (float16_t(1.0h)).xxxx; + vector arg_2 = (float16_t(1.0h)).xxxx; vector res = smoothstep(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl.expected.glsl b/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl.expected.glsl index 66c3b74443..88829c6386 100644 --- a/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl.expected.glsl @@ -2,9 +2,9 @@ #extension GL_AMD_gpu_shader_half_float : require void smoothstep_c43ebd() { - f16vec4 arg_0 = f16vec4(0.0hf); - f16vec4 arg_1 = f16vec4(0.0hf); - f16vec4 arg_2 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_1 = f16vec4(1.0hf); + f16vec4 arg_2 = f16vec4(1.0hf); f16vec4 res = smoothstep(arg_0, arg_1, arg_2); } @@ -26,9 +26,9 @@ void main() { precision mediump float; void smoothstep_c43ebd() { - f16vec4 arg_0 = f16vec4(0.0hf); - f16vec4 arg_1 = f16vec4(0.0hf); - f16vec4 arg_2 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_1 = f16vec4(1.0hf); + f16vec4 arg_2 = f16vec4(1.0hf); f16vec4 res = smoothstep(arg_0, arg_1, arg_2); } @@ -44,9 +44,9 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void smoothstep_c43ebd() { - f16vec4 arg_0 = f16vec4(0.0hf); - f16vec4 arg_1 = f16vec4(0.0hf); - f16vec4 arg_2 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_1 = f16vec4(1.0hf); + f16vec4 arg_2 = f16vec4(1.0hf); f16vec4 res = smoothstep(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl.expected.msl b/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl.expected.msl index 317c0439c1..aea4c1e322 100644 --- a/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void smoothstep_c43ebd() { - half4 arg_0 = half4(0.0h); - half4 arg_1 = half4(0.0h); - half4 arg_2 = half4(0.0h); + half4 arg_0 = half4(1.0h); + half4 arg_1 = half4(1.0h); + half4 arg_2 = half4(1.0h); half4 res = smoothstep(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl.expected.spvasm b/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl.expected.spvasm index af5f1b0539..74c9c93a60 100644 --- a/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 42 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %21 = OpExtInstImport "GLSL.std.450" + %23 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -40,45 +40,47 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %26 = OpTypeFunction %v4float + %19 = OpConstantNull %v4half + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %smoothstep_c43ebd = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4half Function %15 - %arg_1 = OpVariable %_ptr_Function_v4half Function %15 - %arg_2 = OpVariable %_ptr_Function_v4half Function %15 - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - OpStore %arg_2 %15 - %22 = OpLoad %v4half %arg_0 - %23 = OpLoad %v4half %arg_1 - %24 = OpLoad %v4half %arg_2 - %20 = OpExtInst %v4half %21 SmoothStep %22 %23 %24 - OpStore %res %20 + %arg_0 = OpVariable %_ptr_Function_v4half Function %19 + %arg_1 = OpVariable %_ptr_Function_v4half Function %19 + %arg_2 = OpVariable %_ptr_Function_v4half Function %19 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + OpStore %arg_2 %16 + %24 = OpLoad %v4half %arg_0 + %25 = OpLoad %v4half %arg_1 + %26 = OpLoad %v4half %arg_2 + %22 = OpExtInst %v4half %23 SmoothStep %24 %25 %26 + OpStore %res %22 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %smoothstep_c43ebd +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %smoothstep_c43ebd OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %smoothstep_c43ebd + %37 = OpLabel + %38 = OpFunctionCall %void %smoothstep_c43ebd OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %void %smoothstep_c43ebd + %40 = OpLabel + %41 = OpFunctionCall %void %smoothstep_c43ebd OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl.expected.wgsl b/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl.expected.wgsl index bb68100f74..360a7792ec 100644 --- a/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl.expected.wgsl @@ -1,9 +1,9 @@ enable f16; fn smoothstep_c43ebd() { - var arg_0 = vec4(f16()); - var arg_1 = vec4(f16()); - var arg_2 = vec4(f16()); + var arg_0 = vec4(1.0h); + var arg_1 = vec4(1.0h); + var arg_2 = vec4(1.0h); var res : vec4 = smoothstep(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/sqrt/803d1c.wgsl b/test/tint/builtins/gen/var/sqrt/803d1c.wgsl index 39113939f6..bca3cc3f48 100644 --- a/test/tint/builtins/gen/var/sqrt/803d1c.wgsl +++ b/test/tint/builtins/gen/var/sqrt/803d1c.wgsl @@ -25,7 +25,7 @@ enable f16; // fn sqrt(vec<4, f16>) -> vec<4, f16> fn sqrt_803d1c() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.h); var res: vec4 = sqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/sqrt/803d1c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sqrt/803d1c.wgsl.expected.dxc.hlsl index 58428a6b01..abaebf1585 100644 --- a/test/tint/builtins/gen/var/sqrt/803d1c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/sqrt/803d1c.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sqrt_803d1c() { - vector arg_0 = (float16_t(0.0h)).xxxx; + vector arg_0 = (float16_t(1.0h)).xxxx; vector res = sqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/sqrt/803d1c.wgsl.expected.glsl b/test/tint/builtins/gen/var/sqrt/803d1c.wgsl.expected.glsl index fe15cf8bc8..6525d31624 100644 --- a/test/tint/builtins/gen/var/sqrt/803d1c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/sqrt/803d1c.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void sqrt_803d1c() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = sqrt(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void sqrt_803d1c() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = sqrt(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void sqrt_803d1c() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = sqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/sqrt/803d1c.wgsl.expected.msl b/test/tint/builtins/gen/var/sqrt/803d1c.wgsl.expected.msl index f05f55f350..b940b55851 100644 --- a/test/tint/builtins/gen/var/sqrt/803d1c.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/sqrt/803d1c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sqrt_803d1c() { - half4 arg_0 = half4(0.0h); + half4 arg_0 = half4(1.0h); half4 res = sqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/sqrt/803d1c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sqrt/803d1c.wgsl.expected.spvasm index 4424826e51..ead06287de 100644 --- a/test/tint/builtins/gen/var/sqrt/803d1c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/sqrt/803d1c.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v4half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %sqrt_803d1c = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4half Function %15 - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v4half %arg_0 - %18 = OpExtInst %v4half %19 Sqrt %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v4half Function %19 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v4half %arg_0 + %20 = OpExtInst %v4half %21 Sqrt %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %sqrt_803d1c +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %sqrt_803d1c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %sqrt_803d1c + %33 = OpLabel + %34 = OpFunctionCall %void %sqrt_803d1c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %sqrt_803d1c + %36 = OpLabel + %37 = OpFunctionCall %void %sqrt_803d1c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/sqrt/803d1c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sqrt/803d1c.wgsl.expected.wgsl index 0c835941e1..bf5e74b9fa 100644 --- a/test/tint/builtins/gen/var/sqrt/803d1c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/sqrt/803d1c.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn sqrt_803d1c() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.0h); var res : vec4 = sqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/sqrt/895a0c.wgsl b/test/tint/builtins/gen/var/sqrt/895a0c.wgsl index 9b4b318ddb..6ff8f4bc6c 100644 --- a/test/tint/builtins/gen/var/sqrt/895a0c.wgsl +++ b/test/tint/builtins/gen/var/sqrt/895a0c.wgsl @@ -25,7 +25,7 @@ enable f16; // fn sqrt(vec<3, f16>) -> vec<3, f16> fn sqrt_895a0c() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.h); var res: vec3 = sqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/sqrt/895a0c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sqrt/895a0c.wgsl.expected.dxc.hlsl index f22d812eea..bbad1996fc 100644 --- a/test/tint/builtins/gen/var/sqrt/895a0c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/sqrt/895a0c.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sqrt_895a0c() { - vector arg_0 = (float16_t(0.0h)).xxx; + vector arg_0 = (float16_t(1.0h)).xxx; vector res = sqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/sqrt/895a0c.wgsl.expected.glsl b/test/tint/builtins/gen/var/sqrt/895a0c.wgsl.expected.glsl index d8f2fbdb98..be0ef1fe63 100644 --- a/test/tint/builtins/gen/var/sqrt/895a0c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/sqrt/895a0c.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void sqrt_895a0c() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = sqrt(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void sqrt_895a0c() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = sqrt(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void sqrt_895a0c() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = sqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/sqrt/895a0c.wgsl.expected.msl b/test/tint/builtins/gen/var/sqrt/895a0c.wgsl.expected.msl index 5a04cb5f47..2f06dda579 100644 --- a/test/tint/builtins/gen/var/sqrt/895a0c.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/sqrt/895a0c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sqrt_895a0c() { - half3 arg_0 = half3(0.0h); + half3 arg_0 = half3(1.0h); half3 res = sqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/sqrt/895a0c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sqrt/895a0c.wgsl.expected.spvasm index e2fbf41669..658abf984f 100644 --- a/test/tint/builtins/gen/var/sqrt/895a0c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/sqrt/895a0c.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %sqrt_895a0c = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3half Function %15 - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v3half %arg_0 - %18 = OpExtInst %v3half %19 Sqrt %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v3half Function %19 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v3half %arg_0 + %20 = OpExtInst %v3half %21 Sqrt %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %sqrt_895a0c +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %sqrt_895a0c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %sqrt_895a0c + %33 = OpLabel + %34 = OpFunctionCall %void %sqrt_895a0c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %sqrt_895a0c + %36 = OpLabel + %37 = OpFunctionCall %void %sqrt_895a0c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/sqrt/895a0c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sqrt/895a0c.wgsl.expected.wgsl index 98a857eef2..7fe955fd57 100644 --- a/test/tint/builtins/gen/var/sqrt/895a0c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/sqrt/895a0c.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn sqrt_895a0c() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.0h); var res : vec3 = sqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl b/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl index 4be2cc6159..69a6b60ff1 100644 --- a/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl +++ b/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl @@ -25,7 +25,7 @@ enable f16; // fn sqrt(vec<2, f16>) -> vec<2, f16> fn sqrt_d9ab4d() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.h); var res: vec2 = sqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl.expected.dxc.hlsl index 472d31d5b0..75cbc988fb 100644 --- a/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sqrt_d9ab4d() { - vector arg_0 = (float16_t(0.0h)).xx; + vector arg_0 = (float16_t(1.0h)).xx; vector res = sqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl.expected.glsl b/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl.expected.glsl index 3cf2d1dfe3..b36f0ab26f 100644 --- a/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void sqrt_d9ab4d() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = sqrt(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void sqrt_d9ab4d() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = sqrt(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void sqrt_d9ab4d() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = sqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl.expected.msl b/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl.expected.msl index 39f7f69031..39cdb37632 100644 --- a/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sqrt_d9ab4d() { - half2 arg_0 = half2(0.0h); + half2 arg_0 = half2(1.0h); half2 res = sqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl.expected.spvasm index d02e8ccccf..0707402b29 100644 --- a/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v2half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %sqrt_d9ab4d = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2half Function %15 - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v2half %arg_0 - %18 = OpExtInst %v2half %19 Sqrt %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v2half Function %19 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v2half %arg_0 + %20 = OpExtInst %v2half %21 Sqrt %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %sqrt_d9ab4d +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %sqrt_d9ab4d OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %sqrt_d9ab4d + %33 = OpLabel + %34 = OpFunctionCall %void %sqrt_d9ab4d OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %sqrt_d9ab4d + %36 = OpLabel + %37 = OpFunctionCall %void %sqrt_d9ab4d OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl.expected.wgsl index cd6f05c191..3183b73df8 100644 --- a/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn sqrt_d9ab4d() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.0h); var res : vec2 = sqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl b/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl index 7a8254056f..ca640441e4 100644 --- a/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl +++ b/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl @@ -25,7 +25,7 @@ enable f16; // fn sqrt(f16) -> f16 fn sqrt_ec33e9() { - var arg_0 = f16(); + var arg_0 = 1.h; var res: f16 = sqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl.expected.dxc.hlsl index a0b3d5f96a..4e3ec4ed9a 100644 --- a/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sqrt_ec33e9() { - float16_t arg_0 = float16_t(0.0h); + float16_t arg_0 = float16_t(1.0h); float16_t res = sqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl.expected.glsl b/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl.expected.glsl index 5cb1a665d1..513a08f4af 100644 --- a/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void sqrt_ec33e9() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = sqrt(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void sqrt_ec33e9() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = sqrt(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void sqrt_ec33e9() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = sqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl.expected.msl b/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl.expected.msl index 8f4e72e4a6..03e7d8b88f 100644 --- a/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sqrt_ec33e9() { - half arg_0 = 0.0h; + half arg_0 = 1.0h; half res = sqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl.expected.spvasm index c593eced59..f4fea39d72 100644 --- a/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %18 = OpExtInstImport "GLSL.std.450" + %19 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -37,39 +37,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %21 = OpTypeFunction %v4float + %17 = OpConstantNull %half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %sqrt_ec33e9 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_half Function %14 - %res = OpVariable %_ptr_Function_half Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %half %arg_0 - %17 = OpExtInst %half %18 Sqrt %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_half Function %17 + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %arg_0 %half_0x1p_0 + %20 = OpLoad %half %arg_0 + %18 = OpExtInst %half %19 Sqrt %20 + OpStore %res %18 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %sqrt_ec33e9 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %sqrt_ec33e9 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %sqrt_ec33e9 + %31 = OpLabel + %32 = OpFunctionCall %void %sqrt_ec33e9 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %sqrt_ec33e9 + %34 = OpLabel + %35 = OpFunctionCall %void %sqrt_ec33e9 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl.expected.wgsl index af947c5c5e..103d857bb4 100644 --- a/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn sqrt_ec33e9() { - var arg_0 = f16(); + var arg_0 = 1.0h; var res : f16 = sqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/step/07cb06.wgsl b/test/tint/builtins/gen/var/step/07cb06.wgsl index a85442c490..f7b9249aa5 100644 --- a/test/tint/builtins/gen/var/step/07cb06.wgsl +++ b/test/tint/builtins/gen/var/step/07cb06.wgsl @@ -25,8 +25,8 @@ enable f16; // fn step(vec<2, f16>, vec<2, f16>) -> vec<2, f16> fn step_07cb06() { - var arg_0 = vec2(f16()); - var arg_1 = vec2(f16()); + var arg_0 = vec2(1.h); + var arg_1 = vec2(1.h); var res: vec2 = step(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/step/07cb06.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/step/07cb06.wgsl.expected.dxc.hlsl index 58b3876a6e..8bc21a510e 100644 --- a/test/tint/builtins/gen/var/step/07cb06.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/step/07cb06.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void step_07cb06() { - vector arg_0 = (float16_t(0.0h)).xx; - vector arg_1 = (float16_t(0.0h)).xx; + vector arg_0 = (float16_t(1.0h)).xx; + vector arg_1 = (float16_t(1.0h)).xx; vector res = step(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/step/07cb06.wgsl.expected.glsl b/test/tint/builtins/gen/var/step/07cb06.wgsl.expected.glsl index 028ea1c5aa..a46b61818f 100644 --- a/test/tint/builtins/gen/var/step/07cb06.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/step/07cb06.wgsl.expected.glsl @@ -2,8 +2,8 @@ #extension GL_AMD_gpu_shader_half_float : require void step_07cb06() { - f16vec2 arg_0 = f16vec2(0.0hf); - f16vec2 arg_1 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_1 = f16vec2(1.0hf); f16vec2 res = step(arg_0, arg_1); } @@ -25,8 +25,8 @@ void main() { precision mediump float; void step_07cb06() { - f16vec2 arg_0 = f16vec2(0.0hf); - f16vec2 arg_1 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_1 = f16vec2(1.0hf); f16vec2 res = step(arg_0, arg_1); } @@ -42,8 +42,8 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void step_07cb06() { - f16vec2 arg_0 = f16vec2(0.0hf); - f16vec2 arg_1 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_1 = f16vec2(1.0hf); f16vec2 res = step(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/step/07cb06.wgsl.expected.msl b/test/tint/builtins/gen/var/step/07cb06.wgsl.expected.msl index e831f9197e..af2403826a 100644 --- a/test/tint/builtins/gen/var/step/07cb06.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/step/07cb06.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void step_07cb06() { - half2 arg_0 = half2(0.0h); - half2 arg_1 = half2(0.0h); + half2 arg_0 = half2(1.0h); + half2 arg_1 = half2(1.0h); half2 res = step(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/step/07cb06.wgsl.expected.spvasm b/test/tint/builtins/gen/var/step/07cb06.wgsl.expected.spvasm index 17f336aa19..0e05e515a0 100644 --- a/test/tint/builtins/gen/var/step/07cb06.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/step/07cb06.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %20 = OpExtInstImport "GLSL.std.450" + %22 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -39,42 +39,44 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %24 = OpTypeFunction %v4float + %19 = OpConstantNull %v2half + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %step_07cb06 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2half Function %15 - %arg_1 = OpVariable %_ptr_Function_v2half Function %15 - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - %21 = OpLoad %v2half %arg_0 - %22 = OpLoad %v2half %arg_1 - %19 = OpExtInst %v2half %20 Step %21 %22 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v2half Function %19 + %arg_1 = OpVariable %_ptr_Function_v2half Function %19 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + %23 = OpLoad %v2half %arg_0 + %24 = OpLoad %v2half %arg_1 + %21 = OpExtInst %v2half %22 Step %23 %24 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %step_07cb06 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %step_07cb06 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %step_07cb06 + %35 = OpLabel + %36 = OpFunctionCall %void %step_07cb06 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %step_07cb06 + %38 = OpLabel + %39 = OpFunctionCall %void %step_07cb06 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/step/07cb06.wgsl.expected.wgsl b/test/tint/builtins/gen/var/step/07cb06.wgsl.expected.wgsl index 373395d8ea..a8b5b22814 100644 --- a/test/tint/builtins/gen/var/step/07cb06.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/step/07cb06.wgsl.expected.wgsl @@ -1,8 +1,8 @@ enable f16; fn step_07cb06() { - var arg_0 = vec2(f16()); - var arg_1 = vec2(f16()); + var arg_0 = vec2(1.0h); + var arg_1 = vec2(1.0h); var res : vec2 = step(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/step/630d07.wgsl b/test/tint/builtins/gen/var/step/630d07.wgsl index 7b19969d6b..bf439ebed5 100644 --- a/test/tint/builtins/gen/var/step/630d07.wgsl +++ b/test/tint/builtins/gen/var/step/630d07.wgsl @@ -25,8 +25,8 @@ enable f16; // fn step(f16, f16) -> f16 fn step_630d07() { - var arg_0 = f16(); - var arg_1 = f16(); + var arg_0 = 1.h; + var arg_1 = 1.h; var res: f16 = step(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/step/630d07.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/step/630d07.wgsl.expected.dxc.hlsl index 12473dfc9c..5faf39ae4b 100644 --- a/test/tint/builtins/gen/var/step/630d07.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/step/630d07.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void step_630d07() { - float16_t arg_0 = float16_t(0.0h); - float16_t arg_1 = float16_t(0.0h); + float16_t arg_0 = float16_t(1.0h); + float16_t arg_1 = float16_t(1.0h); float16_t res = step(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/step/630d07.wgsl.expected.glsl b/test/tint/builtins/gen/var/step/630d07.wgsl.expected.glsl index a937e6ce10..b76c1395cd 100644 --- a/test/tint/builtins/gen/var/step/630d07.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/step/630d07.wgsl.expected.glsl @@ -2,8 +2,8 @@ #extension GL_AMD_gpu_shader_half_float : require void step_630d07() { - float16_t arg_0 = 0.0hf; - float16_t arg_1 = 0.0hf; + float16_t arg_0 = 1.0hf; + float16_t arg_1 = 1.0hf; float16_t res = step(arg_0, arg_1); } @@ -25,8 +25,8 @@ void main() { precision mediump float; void step_630d07() { - float16_t arg_0 = 0.0hf; - float16_t arg_1 = 0.0hf; + float16_t arg_0 = 1.0hf; + float16_t arg_1 = 1.0hf; float16_t res = step(arg_0, arg_1); } @@ -42,8 +42,8 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void step_630d07() { - float16_t arg_0 = 0.0hf; - float16_t arg_1 = 0.0hf; + float16_t arg_0 = 1.0hf; + float16_t arg_1 = 1.0hf; float16_t res = step(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/step/630d07.wgsl.expected.msl b/test/tint/builtins/gen/var/step/630d07.wgsl.expected.msl index 7367608eb9..f7ea9c97e4 100644 --- a/test/tint/builtins/gen/var/step/630d07.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/step/630d07.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void step_630d07() { - half arg_0 = 0.0h; - half arg_1 = 0.0h; + half arg_0 = 1.0h; + half arg_1 = 1.0h; half res = step(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/step/630d07.wgsl.expected.spvasm b/test/tint/builtins/gen/var/step/630d07.wgsl.expected.spvasm index 4ec1055e0b..cdbdda6c18 100644 --- a/test/tint/builtins/gen/var/step/630d07.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/step/630d07.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,42 +38,43 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %23 = OpTypeFunction %v4float + %17 = OpConstantNull %half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %step_630d07 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_half Function %14 - %arg_1 = OpVariable %_ptr_Function_half Function %14 - %res = OpVariable %_ptr_Function_half Function %14 - OpStore %arg_0 %14 - OpStore %arg_1 %14 - %20 = OpLoad %half %arg_0 - %21 = OpLoad %half %arg_1 - %18 = OpExtInst %half %19 Step %20 %21 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_half Function %17 + %arg_1 = OpVariable %_ptr_Function_half Function %17 + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %arg_0 %half_0x1p_0 + OpStore %arg_1 %half_0x1p_0 + %21 = OpLoad %half %arg_0 + %22 = OpLoad %half %arg_1 + %19 = OpExtInst %half %20 Step %21 %22 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %step_630d07 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %step_630d07 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %step_630d07 + %33 = OpLabel + %34 = OpFunctionCall %void %step_630d07 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %step_630d07 + %36 = OpLabel + %37 = OpFunctionCall %void %step_630d07 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/step/630d07.wgsl.expected.wgsl b/test/tint/builtins/gen/var/step/630d07.wgsl.expected.wgsl index fb6884c9a2..93dbf44646 100644 --- a/test/tint/builtins/gen/var/step/630d07.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/step/630d07.wgsl.expected.wgsl @@ -1,8 +1,8 @@ enable f16; fn step_630d07() { - var arg_0 = f16(); - var arg_1 = f16(); + var arg_0 = 1.0h; + var arg_1 = 1.0h; var res : f16 = step(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/step/baa320.wgsl b/test/tint/builtins/gen/var/step/baa320.wgsl index 48a8fe6f58..97682d29e8 100644 --- a/test/tint/builtins/gen/var/step/baa320.wgsl +++ b/test/tint/builtins/gen/var/step/baa320.wgsl @@ -25,8 +25,8 @@ enable f16; // fn step(vec<4, f16>, vec<4, f16>) -> vec<4, f16> fn step_baa320() { - var arg_0 = vec4(f16()); - var arg_1 = vec4(f16()); + var arg_0 = vec4(1.h); + var arg_1 = vec4(1.h); var res: vec4 = step(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/step/baa320.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/step/baa320.wgsl.expected.dxc.hlsl index 11ad9989a1..a6dfc2b0c6 100644 --- a/test/tint/builtins/gen/var/step/baa320.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/step/baa320.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void step_baa320() { - vector arg_0 = (float16_t(0.0h)).xxxx; - vector arg_1 = (float16_t(0.0h)).xxxx; + vector arg_0 = (float16_t(1.0h)).xxxx; + vector arg_1 = (float16_t(1.0h)).xxxx; vector res = step(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/step/baa320.wgsl.expected.glsl b/test/tint/builtins/gen/var/step/baa320.wgsl.expected.glsl index 6ac70dfe28..1279b5603c 100644 --- a/test/tint/builtins/gen/var/step/baa320.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/step/baa320.wgsl.expected.glsl @@ -2,8 +2,8 @@ #extension GL_AMD_gpu_shader_half_float : require void step_baa320() { - f16vec4 arg_0 = f16vec4(0.0hf); - f16vec4 arg_1 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_1 = f16vec4(1.0hf); f16vec4 res = step(arg_0, arg_1); } @@ -25,8 +25,8 @@ void main() { precision mediump float; void step_baa320() { - f16vec4 arg_0 = f16vec4(0.0hf); - f16vec4 arg_1 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_1 = f16vec4(1.0hf); f16vec4 res = step(arg_0, arg_1); } @@ -42,8 +42,8 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void step_baa320() { - f16vec4 arg_0 = f16vec4(0.0hf); - f16vec4 arg_1 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_1 = f16vec4(1.0hf); f16vec4 res = step(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/step/baa320.wgsl.expected.msl b/test/tint/builtins/gen/var/step/baa320.wgsl.expected.msl index e0841af8a9..721f39b380 100644 --- a/test/tint/builtins/gen/var/step/baa320.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/step/baa320.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void step_baa320() { - half4 arg_0 = half4(0.0h); - half4 arg_1 = half4(0.0h); + half4 arg_0 = half4(1.0h); + half4 arg_1 = half4(1.0h); half4 res = step(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/step/baa320.wgsl.expected.spvasm b/test/tint/builtins/gen/var/step/baa320.wgsl.expected.spvasm index 57e7451db6..8688f1341b 100644 --- a/test/tint/builtins/gen/var/step/baa320.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/step/baa320.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %20 = OpExtInstImport "GLSL.std.450" + %22 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -39,42 +39,44 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %24 = OpTypeFunction %v4float + %19 = OpConstantNull %v4half + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %step_baa320 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4half Function %15 - %arg_1 = OpVariable %_ptr_Function_v4half Function %15 - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - %21 = OpLoad %v4half %arg_0 - %22 = OpLoad %v4half %arg_1 - %19 = OpExtInst %v4half %20 Step %21 %22 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v4half Function %19 + %arg_1 = OpVariable %_ptr_Function_v4half Function %19 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + %23 = OpLoad %v4half %arg_0 + %24 = OpLoad %v4half %arg_1 + %21 = OpExtInst %v4half %22 Step %23 %24 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %step_baa320 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %step_baa320 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %step_baa320 + %35 = OpLabel + %36 = OpFunctionCall %void %step_baa320 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %step_baa320 + %38 = OpLabel + %39 = OpFunctionCall %void %step_baa320 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/step/baa320.wgsl.expected.wgsl b/test/tint/builtins/gen/var/step/baa320.wgsl.expected.wgsl index 6128002318..1b4a9014c4 100644 --- a/test/tint/builtins/gen/var/step/baa320.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/step/baa320.wgsl.expected.wgsl @@ -1,8 +1,8 @@ enable f16; fn step_baa320() { - var arg_0 = vec4(f16()); - var arg_1 = vec4(f16()); + var arg_0 = vec4(1.0h); + var arg_1 = vec4(1.0h); var res : vec4 = step(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/step/cc6b61.wgsl b/test/tint/builtins/gen/var/step/cc6b61.wgsl index 7b954e0a83..e53c65f8e6 100644 --- a/test/tint/builtins/gen/var/step/cc6b61.wgsl +++ b/test/tint/builtins/gen/var/step/cc6b61.wgsl @@ -25,8 +25,8 @@ enable f16; // fn step(vec<3, f16>, vec<3, f16>) -> vec<3, f16> fn step_cc6b61() { - var arg_0 = vec3(f16()); - var arg_1 = vec3(f16()); + var arg_0 = vec3(1.h); + var arg_1 = vec3(1.h); var res: vec3 = step(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/step/cc6b61.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/step/cc6b61.wgsl.expected.dxc.hlsl index 47f0c73c65..964e48e975 100644 --- a/test/tint/builtins/gen/var/step/cc6b61.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/step/cc6b61.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void step_cc6b61() { - vector arg_0 = (float16_t(0.0h)).xxx; - vector arg_1 = (float16_t(0.0h)).xxx; + vector arg_0 = (float16_t(1.0h)).xxx; + vector arg_1 = (float16_t(1.0h)).xxx; vector res = step(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/step/cc6b61.wgsl.expected.glsl b/test/tint/builtins/gen/var/step/cc6b61.wgsl.expected.glsl index 6b1be2e7b0..3484a43edf 100644 --- a/test/tint/builtins/gen/var/step/cc6b61.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/step/cc6b61.wgsl.expected.glsl @@ -2,8 +2,8 @@ #extension GL_AMD_gpu_shader_half_float : require void step_cc6b61() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); f16vec3 res = step(arg_0, arg_1); } @@ -25,8 +25,8 @@ void main() { precision mediump float; void step_cc6b61() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); f16vec3 res = step(arg_0, arg_1); } @@ -42,8 +42,8 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void step_cc6b61() { - f16vec3 arg_0 = f16vec3(0.0hf); - f16vec3 arg_1 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_1 = f16vec3(1.0hf); f16vec3 res = step(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/step/cc6b61.wgsl.expected.msl b/test/tint/builtins/gen/var/step/cc6b61.wgsl.expected.msl index 40defbb646..85fcf3b8c3 100644 --- a/test/tint/builtins/gen/var/step/cc6b61.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/step/cc6b61.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void step_cc6b61() { - half3 arg_0 = half3(0.0h); - half3 arg_1 = half3(0.0h); + half3 arg_0 = half3(1.0h); + half3 arg_1 = half3(1.0h); half3 res = step(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/step/cc6b61.wgsl.expected.spvasm b/test/tint/builtins/gen/var/step/cc6b61.wgsl.expected.spvasm index efbdfdce90..c650aac6ba 100644 --- a/test/tint/builtins/gen/var/step/cc6b61.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/step/cc6b61.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %20 = OpExtInstImport "GLSL.std.450" + %22 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -39,42 +39,44 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %24 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %step_cc6b61 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3half Function %15 - %arg_1 = OpVariable %_ptr_Function_v3half Function %15 - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - %21 = OpLoad %v3half %arg_0 - %22 = OpLoad %v3half %arg_1 - %19 = OpExtInst %v3half %20 Step %21 %22 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v3half Function %19 + %arg_1 = OpVariable %_ptr_Function_v3half Function %19 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + %23 = OpLoad %v3half %arg_0 + %24 = OpLoad %v3half %arg_1 + %21 = OpExtInst %v3half %22 Step %23 %24 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %step_cc6b61 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %step_cc6b61 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %step_cc6b61 + %35 = OpLabel + %36 = OpFunctionCall %void %step_cc6b61 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %step_cc6b61 + %38 = OpLabel + %39 = OpFunctionCall %void %step_cc6b61 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/step/cc6b61.wgsl.expected.wgsl b/test/tint/builtins/gen/var/step/cc6b61.wgsl.expected.wgsl index 68bf8277df..2609b26d2e 100644 --- a/test/tint/builtins/gen/var/step/cc6b61.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/step/cc6b61.wgsl.expected.wgsl @@ -1,8 +1,8 @@ enable f16; fn step_cc6b61() { - var arg_0 = vec3(f16()); - var arg_1 = vec3(f16()); + var arg_0 = vec3(1.0h); + var arg_1 = vec3(1.0h); var res : vec3 = step(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/tan/539e54.wgsl b/test/tint/builtins/gen/var/tan/539e54.wgsl index 1b4dec5ab8..d8a753f6de 100644 --- a/test/tint/builtins/gen/var/tan/539e54.wgsl +++ b/test/tint/builtins/gen/var/tan/539e54.wgsl @@ -25,7 +25,7 @@ enable f16; // fn tan(vec<4, f16>) -> vec<4, f16> fn tan_539e54() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.h); var res: vec4 = tan(arg_0); } diff --git a/test/tint/builtins/gen/var/tan/539e54.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/tan/539e54.wgsl.expected.dxc.hlsl index 57565884af..fd43be1577 100644 --- a/test/tint/builtins/gen/var/tan/539e54.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/tan/539e54.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void tan_539e54() { - vector arg_0 = (float16_t(0.0h)).xxxx; + vector arg_0 = (float16_t(1.0h)).xxxx; vector res = tan(arg_0); } diff --git a/test/tint/builtins/gen/var/tan/539e54.wgsl.expected.glsl b/test/tint/builtins/gen/var/tan/539e54.wgsl.expected.glsl index 7b8a22d361..af83ad120b 100644 --- a/test/tint/builtins/gen/var/tan/539e54.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/tan/539e54.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void tan_539e54() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = tan(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void tan_539e54() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = tan(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void tan_539e54() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = tan(arg_0); } diff --git a/test/tint/builtins/gen/var/tan/539e54.wgsl.expected.msl b/test/tint/builtins/gen/var/tan/539e54.wgsl.expected.msl index 6c347d9b27..cb30e6eb94 100644 --- a/test/tint/builtins/gen/var/tan/539e54.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/tan/539e54.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void tan_539e54() { - half4 arg_0 = half4(0.0h); + half4 arg_0 = half4(1.0h); half4 res = tan(arg_0); } diff --git a/test/tint/builtins/gen/var/tan/539e54.wgsl.expected.spvasm b/test/tint/builtins/gen/var/tan/539e54.wgsl.expected.spvasm index 3808f8e208..c61601d714 100644 --- a/test/tint/builtins/gen/var/tan/539e54.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/tan/539e54.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v4half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tan_539e54 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4half Function %15 - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v4half %arg_0 - %18 = OpExtInst %v4half %19 Tan %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v4half Function %19 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v4half %arg_0 + %20 = OpExtInst %v4half %21 Tan %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %tan_539e54 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %tan_539e54 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %tan_539e54 + %33 = OpLabel + %34 = OpFunctionCall %void %tan_539e54 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %tan_539e54 + %36 = OpLabel + %37 = OpFunctionCall %void %tan_539e54 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/tan/539e54.wgsl.expected.wgsl b/test/tint/builtins/gen/var/tan/539e54.wgsl.expected.wgsl index ceb00cf272..8112cdde63 100644 --- a/test/tint/builtins/gen/var/tan/539e54.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/tan/539e54.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn tan_539e54() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.0h); var res : vec4 = tan(arg_0); } diff --git a/test/tint/builtins/gen/var/tan/9f7c9c.wgsl b/test/tint/builtins/gen/var/tan/9f7c9c.wgsl index 812610e314..0bb6701752 100644 --- a/test/tint/builtins/gen/var/tan/9f7c9c.wgsl +++ b/test/tint/builtins/gen/var/tan/9f7c9c.wgsl @@ -25,7 +25,7 @@ enable f16; // fn tan(vec<2, f16>) -> vec<2, f16> fn tan_9f7c9c() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.h); var res: vec2 = tan(arg_0); } diff --git a/test/tint/builtins/gen/var/tan/9f7c9c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/tan/9f7c9c.wgsl.expected.dxc.hlsl index 2dc0ec5de1..90ecf8eea4 100644 --- a/test/tint/builtins/gen/var/tan/9f7c9c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/tan/9f7c9c.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void tan_9f7c9c() { - vector arg_0 = (float16_t(0.0h)).xx; + vector arg_0 = (float16_t(1.0h)).xx; vector res = tan(arg_0); } diff --git a/test/tint/builtins/gen/var/tan/9f7c9c.wgsl.expected.glsl b/test/tint/builtins/gen/var/tan/9f7c9c.wgsl.expected.glsl index fa9d31ee2d..f32bf3c958 100644 --- a/test/tint/builtins/gen/var/tan/9f7c9c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/tan/9f7c9c.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void tan_9f7c9c() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = tan(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void tan_9f7c9c() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = tan(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void tan_9f7c9c() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = tan(arg_0); } diff --git a/test/tint/builtins/gen/var/tan/9f7c9c.wgsl.expected.msl b/test/tint/builtins/gen/var/tan/9f7c9c.wgsl.expected.msl index 5e664677fe..94b6209c56 100644 --- a/test/tint/builtins/gen/var/tan/9f7c9c.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/tan/9f7c9c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void tan_9f7c9c() { - half2 arg_0 = half2(0.0h); + half2 arg_0 = half2(1.0h); half2 res = tan(arg_0); } diff --git a/test/tint/builtins/gen/var/tan/9f7c9c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/tan/9f7c9c.wgsl.expected.spvasm index f4068eea16..57105f9e0f 100644 --- a/test/tint/builtins/gen/var/tan/9f7c9c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/tan/9f7c9c.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v2half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tan_9f7c9c = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2half Function %15 - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v2half %arg_0 - %18 = OpExtInst %v2half %19 Tan %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v2half Function %19 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v2half %arg_0 + %20 = OpExtInst %v2half %21 Tan %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %tan_9f7c9c +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %tan_9f7c9c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %tan_9f7c9c + %33 = OpLabel + %34 = OpFunctionCall %void %tan_9f7c9c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %tan_9f7c9c + %36 = OpLabel + %37 = OpFunctionCall %void %tan_9f7c9c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/tan/9f7c9c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/tan/9f7c9c.wgsl.expected.wgsl index 87305cc0f9..be4538b539 100644 --- a/test/tint/builtins/gen/var/tan/9f7c9c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/tan/9f7c9c.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn tan_9f7c9c() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.0h); var res : vec2 = tan(arg_0); } diff --git a/test/tint/builtins/gen/var/tan/d4d491.wgsl b/test/tint/builtins/gen/var/tan/d4d491.wgsl index 3d3c9fa05c..4757ac79b9 100644 --- a/test/tint/builtins/gen/var/tan/d4d491.wgsl +++ b/test/tint/builtins/gen/var/tan/d4d491.wgsl @@ -25,7 +25,7 @@ enable f16; // fn tan(f16) -> f16 fn tan_d4d491() { - var arg_0 = f16(); + var arg_0 = 1.h; var res: f16 = tan(arg_0); } diff --git a/test/tint/builtins/gen/var/tan/d4d491.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/tan/d4d491.wgsl.expected.dxc.hlsl index fb9b0ef077..94b1682d48 100644 --- a/test/tint/builtins/gen/var/tan/d4d491.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/tan/d4d491.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void tan_d4d491() { - float16_t arg_0 = float16_t(0.0h); + float16_t arg_0 = float16_t(1.0h); float16_t res = tan(arg_0); } diff --git a/test/tint/builtins/gen/var/tan/d4d491.wgsl.expected.glsl b/test/tint/builtins/gen/var/tan/d4d491.wgsl.expected.glsl index c826b6bddb..7278b05dc9 100644 --- a/test/tint/builtins/gen/var/tan/d4d491.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/tan/d4d491.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void tan_d4d491() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = tan(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void tan_d4d491() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = tan(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void tan_d4d491() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = tan(arg_0); } diff --git a/test/tint/builtins/gen/var/tan/d4d491.wgsl.expected.msl b/test/tint/builtins/gen/var/tan/d4d491.wgsl.expected.msl index 792203e59a..93678f9f1d 100644 --- a/test/tint/builtins/gen/var/tan/d4d491.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/tan/d4d491.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void tan_d4d491() { - half arg_0 = 0.0h; + half arg_0 = 1.0h; half res = tan(arg_0); } diff --git a/test/tint/builtins/gen/var/tan/d4d491.wgsl.expected.spvasm b/test/tint/builtins/gen/var/tan/d4d491.wgsl.expected.spvasm index e05388b753..d1ce7313f5 100644 --- a/test/tint/builtins/gen/var/tan/d4d491.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/tan/d4d491.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %18 = OpExtInstImport "GLSL.std.450" + %19 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -37,39 +37,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %21 = OpTypeFunction %v4float + %17 = OpConstantNull %half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tan_d4d491 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_half Function %14 - %res = OpVariable %_ptr_Function_half Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %half %arg_0 - %17 = OpExtInst %half %18 Tan %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_half Function %17 + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %arg_0 %half_0x1p_0 + %20 = OpLoad %half %arg_0 + %18 = OpExtInst %half %19 Tan %20 + OpStore %res %18 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %tan_d4d491 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %tan_d4d491 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %tan_d4d491 + %31 = OpLabel + %32 = OpFunctionCall %void %tan_d4d491 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %tan_d4d491 + %34 = OpLabel + %35 = OpFunctionCall %void %tan_d4d491 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/tan/d4d491.wgsl.expected.wgsl b/test/tint/builtins/gen/var/tan/d4d491.wgsl.expected.wgsl index 34abd8dc84..d5af5d21c2 100644 --- a/test/tint/builtins/gen/var/tan/d4d491.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/tan/d4d491.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn tan_d4d491() { - var arg_0 = f16(); + var arg_0 = 1.0h; var res : f16 = tan(arg_0); } diff --git a/test/tint/builtins/gen/var/tan/db0456.wgsl b/test/tint/builtins/gen/var/tan/db0456.wgsl index 0277fd9754..8fc579fcb4 100644 --- a/test/tint/builtins/gen/var/tan/db0456.wgsl +++ b/test/tint/builtins/gen/var/tan/db0456.wgsl @@ -25,7 +25,7 @@ enable f16; // fn tan(vec<3, f16>) -> vec<3, f16> fn tan_db0456() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.h); var res: vec3 = tan(arg_0); } diff --git a/test/tint/builtins/gen/var/tan/db0456.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/tan/db0456.wgsl.expected.dxc.hlsl index b14a91a10d..ad3a0434e0 100644 --- a/test/tint/builtins/gen/var/tan/db0456.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/tan/db0456.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void tan_db0456() { - vector arg_0 = (float16_t(0.0h)).xxx; + vector arg_0 = (float16_t(1.0h)).xxx; vector res = tan(arg_0); } diff --git a/test/tint/builtins/gen/var/tan/db0456.wgsl.expected.glsl b/test/tint/builtins/gen/var/tan/db0456.wgsl.expected.glsl index 06986581e9..afc40d9130 100644 --- a/test/tint/builtins/gen/var/tan/db0456.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/tan/db0456.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void tan_db0456() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = tan(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void tan_db0456() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = tan(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void tan_db0456() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = tan(arg_0); } diff --git a/test/tint/builtins/gen/var/tan/db0456.wgsl.expected.msl b/test/tint/builtins/gen/var/tan/db0456.wgsl.expected.msl index 35e012d6fa..f7948b3071 100644 --- a/test/tint/builtins/gen/var/tan/db0456.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/tan/db0456.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void tan_db0456() { - half3 arg_0 = half3(0.0h); + half3 arg_0 = half3(1.0h); half3 res = tan(arg_0); } diff --git a/test/tint/builtins/gen/var/tan/db0456.wgsl.expected.spvasm b/test/tint/builtins/gen/var/tan/db0456.wgsl.expected.spvasm index 66a7ba7c63..ce933ec65a 100644 --- a/test/tint/builtins/gen/var/tan/db0456.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/tan/db0456.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tan_db0456 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3half Function %15 - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v3half %arg_0 - %18 = OpExtInst %v3half %19 Tan %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v3half Function %19 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v3half %arg_0 + %20 = OpExtInst %v3half %21 Tan %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %tan_db0456 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %tan_db0456 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %tan_db0456 + %33 = OpLabel + %34 = OpFunctionCall %void %tan_db0456 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %tan_db0456 + %36 = OpLabel + %37 = OpFunctionCall %void %tan_db0456 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/tan/db0456.wgsl.expected.wgsl b/test/tint/builtins/gen/var/tan/db0456.wgsl.expected.wgsl index fb3a092f1e..30e819d309 100644 --- a/test/tint/builtins/gen/var/tan/db0456.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/tan/db0456.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn tan_db0456() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.0h); var res : vec3 = tan(arg_0); } diff --git a/test/tint/builtins/gen/var/tanh/06a4fe.wgsl b/test/tint/builtins/gen/var/tanh/06a4fe.wgsl index 4c328b0616..c8175f8c16 100644 --- a/test/tint/builtins/gen/var/tanh/06a4fe.wgsl +++ b/test/tint/builtins/gen/var/tanh/06a4fe.wgsl @@ -25,7 +25,7 @@ enable f16; // fn tanh(vec<3, f16>) -> vec<3, f16> fn tanh_06a4fe() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.h); var res: vec3 = tanh(arg_0); } diff --git a/test/tint/builtins/gen/var/tanh/06a4fe.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/tanh/06a4fe.wgsl.expected.dxc.hlsl index 346965fc45..b4221eaccd 100644 --- a/test/tint/builtins/gen/var/tanh/06a4fe.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/tanh/06a4fe.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void tanh_06a4fe() { - vector arg_0 = (float16_t(0.0h)).xxx; + vector arg_0 = (float16_t(1.0h)).xxx; vector res = tanh(arg_0); } diff --git a/test/tint/builtins/gen/var/tanh/06a4fe.wgsl.expected.glsl b/test/tint/builtins/gen/var/tanh/06a4fe.wgsl.expected.glsl index 6d9857aa0c..0a8ceb5e57 100644 --- a/test/tint/builtins/gen/var/tanh/06a4fe.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/tanh/06a4fe.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void tanh_06a4fe() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = tanh(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void tanh_06a4fe() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = tanh(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void tanh_06a4fe() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = tanh(arg_0); } diff --git a/test/tint/builtins/gen/var/tanh/06a4fe.wgsl.expected.msl b/test/tint/builtins/gen/var/tanh/06a4fe.wgsl.expected.msl index 3f2db876d4..7bae70a755 100644 --- a/test/tint/builtins/gen/var/tanh/06a4fe.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/tanh/06a4fe.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void tanh_06a4fe() { - half3 arg_0 = half3(0.0h); + half3 arg_0 = half3(1.0h); half3 res = tanh(arg_0); } diff --git a/test/tint/builtins/gen/var/tanh/06a4fe.wgsl.expected.spvasm b/test/tint/builtins/gen/var/tanh/06a4fe.wgsl.expected.spvasm index 0a02492154..aec3954659 100644 --- a/test/tint/builtins/gen/var/tanh/06a4fe.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/tanh/06a4fe.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tanh_06a4fe = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3half Function %15 - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v3half %arg_0 - %18 = OpExtInst %v3half %19 Tanh %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v3half Function %19 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v3half %arg_0 + %20 = OpExtInst %v3half %21 Tanh %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %tanh_06a4fe +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %tanh_06a4fe OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %tanh_06a4fe + %33 = OpLabel + %34 = OpFunctionCall %void %tanh_06a4fe OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %tanh_06a4fe + %36 = OpLabel + %37 = OpFunctionCall %void %tanh_06a4fe OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/tanh/06a4fe.wgsl.expected.wgsl b/test/tint/builtins/gen/var/tanh/06a4fe.wgsl.expected.wgsl index 8f73c44a8c..681b24d632 100644 --- a/test/tint/builtins/gen/var/tanh/06a4fe.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/tanh/06a4fe.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn tanh_06a4fe() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.0h); var res : vec3 = tanh(arg_0); } diff --git a/test/tint/builtins/gen/var/tanh/5b19af.wgsl b/test/tint/builtins/gen/var/tanh/5b19af.wgsl index 1b1cc793f1..81ae6f2aeb 100644 --- a/test/tint/builtins/gen/var/tanh/5b19af.wgsl +++ b/test/tint/builtins/gen/var/tanh/5b19af.wgsl @@ -25,7 +25,7 @@ enable f16; // fn tanh(f16) -> f16 fn tanh_5b19af() { - var arg_0 = f16(); + var arg_0 = 1.h; var res: f16 = tanh(arg_0); } diff --git a/test/tint/builtins/gen/var/tanh/5b19af.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/tanh/5b19af.wgsl.expected.dxc.hlsl index 23e33a7e32..0c02a949fc 100644 --- a/test/tint/builtins/gen/var/tanh/5b19af.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/tanh/5b19af.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void tanh_5b19af() { - float16_t arg_0 = float16_t(0.0h); + float16_t arg_0 = float16_t(1.0h); float16_t res = tanh(arg_0); } diff --git a/test/tint/builtins/gen/var/tanh/5b19af.wgsl.expected.glsl b/test/tint/builtins/gen/var/tanh/5b19af.wgsl.expected.glsl index 27503fc53a..7dc44cdccf 100644 --- a/test/tint/builtins/gen/var/tanh/5b19af.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/tanh/5b19af.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void tanh_5b19af() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = tanh(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void tanh_5b19af() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = tanh(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void tanh_5b19af() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = tanh(arg_0); } diff --git a/test/tint/builtins/gen/var/tanh/5b19af.wgsl.expected.msl b/test/tint/builtins/gen/var/tanh/5b19af.wgsl.expected.msl index 143fb989b5..d0920acb15 100644 --- a/test/tint/builtins/gen/var/tanh/5b19af.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/tanh/5b19af.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void tanh_5b19af() { - half arg_0 = 0.0h; + half arg_0 = 1.0h; half res = tanh(arg_0); } diff --git a/test/tint/builtins/gen/var/tanh/5b19af.wgsl.expected.spvasm b/test/tint/builtins/gen/var/tanh/5b19af.wgsl.expected.spvasm index 9ea5007efe..877e896974 100644 --- a/test/tint/builtins/gen/var/tanh/5b19af.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/tanh/5b19af.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %18 = OpExtInstImport "GLSL.std.450" + %19 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -37,39 +37,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %21 = OpTypeFunction %v4float + %17 = OpConstantNull %half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tanh_5b19af = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_half Function %14 - %res = OpVariable %_ptr_Function_half Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %half %arg_0 - %17 = OpExtInst %half %18 Tanh %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_half Function %17 + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %arg_0 %half_0x1p_0 + %20 = OpLoad %half %arg_0 + %18 = OpExtInst %half %19 Tanh %20 + OpStore %res %18 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %tanh_5b19af +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %tanh_5b19af OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %tanh_5b19af + %31 = OpLabel + %32 = OpFunctionCall %void %tanh_5b19af OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %tanh_5b19af + %34 = OpLabel + %35 = OpFunctionCall %void %tanh_5b19af OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/tanh/5b19af.wgsl.expected.wgsl b/test/tint/builtins/gen/var/tanh/5b19af.wgsl.expected.wgsl index b1f8363f16..d5f3357921 100644 --- a/test/tint/builtins/gen/var/tanh/5b19af.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/tanh/5b19af.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn tanh_5b19af() { - var arg_0 = f16(); + var arg_0 = 1.0h; var res : f16 = tanh(arg_0); } diff --git a/test/tint/builtins/gen/var/tanh/6d105a.wgsl b/test/tint/builtins/gen/var/tanh/6d105a.wgsl index 08d3e6bb2c..b60f51572c 100644 --- a/test/tint/builtins/gen/var/tanh/6d105a.wgsl +++ b/test/tint/builtins/gen/var/tanh/6d105a.wgsl @@ -25,7 +25,7 @@ enable f16; // fn tanh(vec<2, f16>) -> vec<2, f16> fn tanh_6d105a() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.h); var res: vec2 = tanh(arg_0); } diff --git a/test/tint/builtins/gen/var/tanh/6d105a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/tanh/6d105a.wgsl.expected.dxc.hlsl index cb526b42f1..803f340363 100644 --- a/test/tint/builtins/gen/var/tanh/6d105a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/tanh/6d105a.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void tanh_6d105a() { - vector arg_0 = (float16_t(0.0h)).xx; + vector arg_0 = (float16_t(1.0h)).xx; vector res = tanh(arg_0); } diff --git a/test/tint/builtins/gen/var/tanh/6d105a.wgsl.expected.glsl b/test/tint/builtins/gen/var/tanh/6d105a.wgsl.expected.glsl index ab61ec7a4a..e0ae1ca588 100644 --- a/test/tint/builtins/gen/var/tanh/6d105a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/tanh/6d105a.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void tanh_6d105a() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = tanh(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void tanh_6d105a() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = tanh(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void tanh_6d105a() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = tanh(arg_0); } diff --git a/test/tint/builtins/gen/var/tanh/6d105a.wgsl.expected.msl b/test/tint/builtins/gen/var/tanh/6d105a.wgsl.expected.msl index 1affd276c0..0bd7275239 100644 --- a/test/tint/builtins/gen/var/tanh/6d105a.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/tanh/6d105a.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void tanh_6d105a() { - half2 arg_0 = half2(0.0h); + half2 arg_0 = half2(1.0h); half2 res = tanh(arg_0); } diff --git a/test/tint/builtins/gen/var/tanh/6d105a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/tanh/6d105a.wgsl.expected.spvasm index 8fa93ec8a1..f2528b2aad 100644 --- a/test/tint/builtins/gen/var/tanh/6d105a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/tanh/6d105a.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v2half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tanh_6d105a = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2half Function %15 - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v2half %arg_0 - %18 = OpExtInst %v2half %19 Tanh %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v2half Function %19 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v2half %arg_0 + %20 = OpExtInst %v2half %21 Tanh %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %tanh_6d105a +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %tanh_6d105a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %tanh_6d105a + %33 = OpLabel + %34 = OpFunctionCall %void %tanh_6d105a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %tanh_6d105a + %36 = OpLabel + %37 = OpFunctionCall %void %tanh_6d105a OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/tanh/6d105a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/tanh/6d105a.wgsl.expected.wgsl index b638ef85ac..7d07976fa7 100644 --- a/test/tint/builtins/gen/var/tanh/6d105a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/tanh/6d105a.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn tanh_6d105a() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.0h); var res : vec2 = tanh(arg_0); } diff --git a/test/tint/builtins/gen/var/tanh/e8efb3.wgsl b/test/tint/builtins/gen/var/tanh/e8efb3.wgsl index 8091075e2e..a5ea17691c 100644 --- a/test/tint/builtins/gen/var/tanh/e8efb3.wgsl +++ b/test/tint/builtins/gen/var/tanh/e8efb3.wgsl @@ -25,7 +25,7 @@ enable f16; // fn tanh(vec<4, f16>) -> vec<4, f16> fn tanh_e8efb3() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.h); var res: vec4 = tanh(arg_0); } diff --git a/test/tint/builtins/gen/var/tanh/e8efb3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/tanh/e8efb3.wgsl.expected.dxc.hlsl index 26cb7ee5b7..918a032f4e 100644 --- a/test/tint/builtins/gen/var/tanh/e8efb3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/tanh/e8efb3.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void tanh_e8efb3() { - vector arg_0 = (float16_t(0.0h)).xxxx; + vector arg_0 = (float16_t(1.0h)).xxxx; vector res = tanh(arg_0); } diff --git a/test/tint/builtins/gen/var/tanh/e8efb3.wgsl.expected.glsl b/test/tint/builtins/gen/var/tanh/e8efb3.wgsl.expected.glsl index 1d866b6cdc..1d317ccdb3 100644 --- a/test/tint/builtins/gen/var/tanh/e8efb3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/tanh/e8efb3.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void tanh_e8efb3() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = tanh(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void tanh_e8efb3() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = tanh(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void tanh_e8efb3() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = tanh(arg_0); } diff --git a/test/tint/builtins/gen/var/tanh/e8efb3.wgsl.expected.msl b/test/tint/builtins/gen/var/tanh/e8efb3.wgsl.expected.msl index 0b5e6f4d96..19df615d82 100644 --- a/test/tint/builtins/gen/var/tanh/e8efb3.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/tanh/e8efb3.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void tanh_e8efb3() { - half4 arg_0 = half4(0.0h); + half4 arg_0 = half4(1.0h); half4 res = tanh(arg_0); } diff --git a/test/tint/builtins/gen/var/tanh/e8efb3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/tanh/e8efb3.wgsl.expected.spvasm index 8e079164d6..4c6cb4797d 100644 --- a/test/tint/builtins/gen/var/tanh/e8efb3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/tanh/e8efb3.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v4half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tanh_e8efb3 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4half Function %15 - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v4half %arg_0 - %18 = OpExtInst %v4half %19 Tanh %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v4half Function %19 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v4half %arg_0 + %20 = OpExtInst %v4half %21 Tanh %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %tanh_e8efb3 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %tanh_e8efb3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %tanh_e8efb3 + %33 = OpLabel + %34 = OpFunctionCall %void %tanh_e8efb3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %tanh_e8efb3 + %36 = OpLabel + %37 = OpFunctionCall %void %tanh_e8efb3 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/tanh/e8efb3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/tanh/e8efb3.wgsl.expected.wgsl index bdb2905503..194fd5ca64 100644 --- a/test/tint/builtins/gen/var/tanh/e8efb3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/tanh/e8efb3.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn tanh_e8efb3() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.0h); var res : vec4 = tanh(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/06794e.wgsl b/test/tint/builtins/gen/var/transpose/06794e.wgsl index e17468f1cf..534407fedc 100644 --- a/test/tint/builtins/gen/var/transpose/06794e.wgsl +++ b/test/tint/builtins/gen/var/transpose/06794e.wgsl @@ -25,7 +25,7 @@ enable f16; // fn transpose(mat<3, 3, f16>) -> mat<3, 3, f16> fn transpose_06794e() { - var arg_0 = mat3x3(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16()); + var arg_0 = mat3x3(1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h); var res: mat3x3 = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/06794e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/transpose/06794e.wgsl.expected.dxc.hlsl index cdd16a4175..c87027e4a3 100644 --- a/test/tint/builtins/gen/var/transpose/06794e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/transpose/06794e.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void transpose_06794e() { - matrix arg_0 = matrix((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx); + matrix arg_0 = matrix((float16_t(1.0h)).xxx, (float16_t(1.0h)).xxx, (float16_t(1.0h)).xxx); matrix res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/06794e.wgsl.expected.glsl b/test/tint/builtins/gen/var/transpose/06794e.wgsl.expected.glsl index 558f547934..550afe156b 100644 --- a/test/tint/builtins/gen/var/transpose/06794e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/transpose/06794e.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void transpose_06794e() { - f16mat3 arg_0 = f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)); + f16mat3 arg_0 = f16mat3(f16vec3(1.0hf), f16vec3(1.0hf), f16vec3(1.0hf)); f16mat3 res = transpose(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void transpose_06794e() { - f16mat3 arg_0 = f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)); + f16mat3 arg_0 = f16mat3(f16vec3(1.0hf), f16vec3(1.0hf), f16vec3(1.0hf)); f16mat3 res = transpose(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void transpose_06794e() { - f16mat3 arg_0 = f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)); + f16mat3 arg_0 = f16mat3(f16vec3(1.0hf), f16vec3(1.0hf), f16vec3(1.0hf)); f16mat3 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/06794e.wgsl.expected.msl b/test/tint/builtins/gen/var/transpose/06794e.wgsl.expected.msl index bef8041f1c..35ebcd49ac 100644 --- a/test/tint/builtins/gen/var/transpose/06794e.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/transpose/06794e.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void transpose_06794e() { - half3x3 arg_0 = half3x3(half3(0.0h), half3(0.0h), half3(0.0h)); + half3x3 arg_0 = half3x3(half3(1.0h), half3(1.0h), half3(1.0h)); half3x3 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/06794e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/transpose/06794e.wgsl.expected.spvasm index 7817296401..f93f895386 100644 --- a/test/tint/builtins/gen/var/transpose/06794e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/transpose/06794e.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 39 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -38,39 +38,42 @@ %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 %mat3v3half = OpTypeMatrix %v3half 3 - %16 = OpConstantNull %mat3v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %17 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 + %18 = OpConstantComposite %mat3v3half %17 %17 %17 %_ptr_Function_mat3v3half = OpTypePointer Function %mat3v3half - %22 = OpTypeFunction %v4float + %21 = OpConstantNull %mat3v3half + %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %transpose_06794e = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_mat3v3half Function %16 - %res = OpVariable %_ptr_Function_mat3v3half Function %16 - OpStore %arg_0 %16 - %20 = OpLoad %mat3v3half %arg_0 - %19 = OpTranspose %mat3v3half %20 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_mat3v3half Function %21 + %res = OpVariable %_ptr_Function_mat3v3half Function %21 + OpStore %arg_0 %18 + %23 = OpLoad %mat3v3half %arg_0 + %22 = OpTranspose %mat3v3half %23 + OpStore %res %22 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %transpose_06794e +%vertex_main_inner = OpFunction %v4float None %25 + %27 = OpLabel + %28 = OpFunctionCall %void %transpose_06794e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %30 = OpLabel + %31 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %31 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %transpose_06794e - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %9 %34 = OpLabel %35 = OpFunctionCall %void %transpose_06794e OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %9 + %37 = OpLabel + %38 = OpFunctionCall %void %transpose_06794e + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/transpose/06794e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/transpose/06794e.wgsl.expected.wgsl index 500244dfe2..e5b99cac04 100644 --- a/test/tint/builtins/gen/var/transpose/06794e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/transpose/06794e.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn transpose_06794e() { - var arg_0 = mat3x3(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16()); + var arg_0 = mat3x3(1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h); var res : mat3x3 = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/5edd96.wgsl b/test/tint/builtins/gen/var/transpose/5edd96.wgsl index 8bf22e8ebc..1a6abd5b83 100644 --- a/test/tint/builtins/gen/var/transpose/5edd96.wgsl +++ b/test/tint/builtins/gen/var/transpose/5edd96.wgsl @@ -25,7 +25,7 @@ enable f16; // fn transpose(mat<4, 2, f16>) -> mat<2, 4, f16> fn transpose_5edd96() { - var arg_0 = mat4x2(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16()); + var arg_0 = mat4x2(1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h); var res: mat2x4 = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/5edd96.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/transpose/5edd96.wgsl.expected.dxc.hlsl index 5bfa600378..e4bc9193ec 100644 --- a/test/tint/builtins/gen/var/transpose/5edd96.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/transpose/5edd96.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void transpose_5edd96() { - matrix arg_0 = matrix((float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx); + matrix arg_0 = matrix((float16_t(1.0h)).xx, (float16_t(1.0h)).xx, (float16_t(1.0h)).xx, (float16_t(1.0h)).xx); matrix res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/5edd96.wgsl.expected.glsl b/test/tint/builtins/gen/var/transpose/5edd96.wgsl.expected.glsl index 68629f5da7..e05bcefc42 100644 --- a/test/tint/builtins/gen/var/transpose/5edd96.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/transpose/5edd96.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void transpose_5edd96() { - f16mat4x2 arg_0 = f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf)); + f16mat4x2 arg_0 = f16mat4x2(f16vec2(1.0hf), f16vec2(1.0hf), f16vec2(1.0hf), f16vec2(1.0hf)); f16mat2x4 res = transpose(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void transpose_5edd96() { - f16mat4x2 arg_0 = f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf)); + f16mat4x2 arg_0 = f16mat4x2(f16vec2(1.0hf), f16vec2(1.0hf), f16vec2(1.0hf), f16vec2(1.0hf)); f16mat2x4 res = transpose(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void transpose_5edd96() { - f16mat4x2 arg_0 = f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf)); + f16mat4x2 arg_0 = f16mat4x2(f16vec2(1.0hf), f16vec2(1.0hf), f16vec2(1.0hf), f16vec2(1.0hf)); f16mat2x4 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/5edd96.wgsl.expected.msl b/test/tint/builtins/gen/var/transpose/5edd96.wgsl.expected.msl index c656586ff3..b6a8ba5c5c 100644 --- a/test/tint/builtins/gen/var/transpose/5edd96.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/transpose/5edd96.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void transpose_5edd96() { - half4x2 arg_0 = half4x2(half2(0.0h), half2(0.0h), half2(0.0h), half2(0.0h)); + half4x2 arg_0 = half4x2(half2(1.0h), half2(1.0h), half2(1.0h), half2(1.0h)); half2x4 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/5edd96.wgsl.expected.spvasm b/test/tint/builtins/gen/var/transpose/5edd96.wgsl.expected.spvasm index a433092809..b059f58088 100644 --- a/test/tint/builtins/gen/var/transpose/5edd96.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/transpose/5edd96.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 43 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -38,43 +38,46 @@ %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 %mat4v2half = OpTypeMatrix %v2half 4 - %16 = OpConstantNull %mat4v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %17 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 + %18 = OpConstantComposite %mat4v2half %17 %17 %17 %17 %_ptr_Function_mat4v2half = OpTypePointer Function %mat4v2half + %21 = OpConstantNull %mat4v2half %v4half = OpTypeVector %half 4 %mat2v4half = OpTypeMatrix %v4half 2 %_ptr_Function_mat2v4half = OpTypePointer Function %mat2v4half - %25 = OpConstantNull %mat2v4half - %26 = OpTypeFunction %v4float + %28 = OpConstantNull %mat2v4half + %29 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %transpose_5edd96 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_mat4v2half Function %16 - %res = OpVariable %_ptr_Function_mat2v4half Function %25 - OpStore %arg_0 %16 - %22 = OpLoad %mat4v2half %arg_0 - %19 = OpTranspose %mat2v4half %22 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_mat4v2half Function %21 + %res = OpVariable %_ptr_Function_mat2v4half Function %28 + OpStore %arg_0 %18 + %25 = OpLoad %mat4v2half %arg_0 + %22 = OpTranspose %mat2v4half %25 + OpStore %res %22 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %transpose_5edd96 +%vertex_main_inner = OpFunction %v4float None %29 + %31 = OpLabel + %32 = OpFunctionCall %void %transpose_5edd96 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %34 = OpLabel + %35 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %35 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %transpose_5edd96 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %9 %38 = OpLabel %39 = OpFunctionCall %void %transpose_5edd96 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %9 + %41 = OpLabel + %42 = OpFunctionCall %void %transpose_5edd96 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/transpose/5edd96.wgsl.expected.wgsl b/test/tint/builtins/gen/var/transpose/5edd96.wgsl.expected.wgsl index 9c293d94ed..6301bbb1cb 100644 --- a/test/tint/builtins/gen/var/transpose/5edd96.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/transpose/5edd96.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn transpose_5edd96() { - var arg_0 = mat4x2(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16()); + var arg_0 = mat4x2(1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h); var res : mat2x4 = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/5f36bf.wgsl b/test/tint/builtins/gen/var/transpose/5f36bf.wgsl index 7dfb05cdf1..537fb1bbac 100644 --- a/test/tint/builtins/gen/var/transpose/5f36bf.wgsl +++ b/test/tint/builtins/gen/var/transpose/5f36bf.wgsl @@ -25,7 +25,7 @@ enable f16; // fn transpose(mat<4, 3, f16>) -> mat<3, 4, f16> fn transpose_5f36bf() { - var arg_0 = mat4x3(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16()); + var arg_0 = mat4x3(1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h); var res: mat3x4 = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/5f36bf.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/transpose/5f36bf.wgsl.expected.dxc.hlsl index 6f424bdd13..d9848bb465 100644 --- a/test/tint/builtins/gen/var/transpose/5f36bf.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/transpose/5f36bf.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void transpose_5f36bf() { - matrix arg_0 = matrix((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx); + matrix arg_0 = matrix((float16_t(1.0h)).xxx, (float16_t(1.0h)).xxx, (float16_t(1.0h)).xxx, (float16_t(1.0h)).xxx); matrix res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/5f36bf.wgsl.expected.glsl b/test/tint/builtins/gen/var/transpose/5f36bf.wgsl.expected.glsl index 306e862be8..eb65382ab0 100644 --- a/test/tint/builtins/gen/var/transpose/5f36bf.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/transpose/5f36bf.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void transpose_5f36bf() { - f16mat4x3 arg_0 = f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)); + f16mat4x3 arg_0 = f16mat4x3(f16vec3(1.0hf), f16vec3(1.0hf), f16vec3(1.0hf), f16vec3(1.0hf)); f16mat3x4 res = transpose(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void transpose_5f36bf() { - f16mat4x3 arg_0 = f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)); + f16mat4x3 arg_0 = f16mat4x3(f16vec3(1.0hf), f16vec3(1.0hf), f16vec3(1.0hf), f16vec3(1.0hf)); f16mat3x4 res = transpose(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void transpose_5f36bf() { - f16mat4x3 arg_0 = f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)); + f16mat4x3 arg_0 = f16mat4x3(f16vec3(1.0hf), f16vec3(1.0hf), f16vec3(1.0hf), f16vec3(1.0hf)); f16mat3x4 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/5f36bf.wgsl.expected.msl b/test/tint/builtins/gen/var/transpose/5f36bf.wgsl.expected.msl index 2f8a2ac28f..ccf7f2bb5d 100644 --- a/test/tint/builtins/gen/var/transpose/5f36bf.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/transpose/5f36bf.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void transpose_5f36bf() { - half4x3 arg_0 = half4x3(half3(0.0h), half3(0.0h), half3(0.0h), half3(0.0h)); + half4x3 arg_0 = half4x3(half3(1.0h), half3(1.0h), half3(1.0h), half3(1.0h)); half3x4 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/5f36bf.wgsl.expected.spvasm b/test/tint/builtins/gen/var/transpose/5f36bf.wgsl.expected.spvasm index 8a2641b0cf..11a1ed37d7 100644 --- a/test/tint/builtins/gen/var/transpose/5f36bf.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/transpose/5f36bf.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 43 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -38,43 +38,46 @@ %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 %mat4v3half = OpTypeMatrix %v3half 4 - %16 = OpConstantNull %mat4v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %17 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 + %18 = OpConstantComposite %mat4v3half %17 %17 %17 %17 %_ptr_Function_mat4v3half = OpTypePointer Function %mat4v3half + %21 = OpConstantNull %mat4v3half %v4half = OpTypeVector %half 4 %mat3v4half = OpTypeMatrix %v4half 3 %_ptr_Function_mat3v4half = OpTypePointer Function %mat3v4half - %25 = OpConstantNull %mat3v4half - %26 = OpTypeFunction %v4float + %28 = OpConstantNull %mat3v4half + %29 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %transpose_5f36bf = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_mat4v3half Function %16 - %res = OpVariable %_ptr_Function_mat3v4half Function %25 - OpStore %arg_0 %16 - %22 = OpLoad %mat4v3half %arg_0 - %19 = OpTranspose %mat3v4half %22 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_mat4v3half Function %21 + %res = OpVariable %_ptr_Function_mat3v4half Function %28 + OpStore %arg_0 %18 + %25 = OpLoad %mat4v3half %arg_0 + %22 = OpTranspose %mat3v4half %25 + OpStore %res %22 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %transpose_5f36bf +%vertex_main_inner = OpFunction %v4float None %29 + %31 = OpLabel + %32 = OpFunctionCall %void %transpose_5f36bf OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %34 = OpLabel + %35 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %35 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %transpose_5f36bf - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %9 %38 = OpLabel %39 = OpFunctionCall %void %transpose_5f36bf OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %9 + %41 = OpLabel + %42 = OpFunctionCall %void %transpose_5f36bf + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/transpose/5f36bf.wgsl.expected.wgsl b/test/tint/builtins/gen/var/transpose/5f36bf.wgsl.expected.wgsl index 4fe203151d..7633281f1c 100644 --- a/test/tint/builtins/gen/var/transpose/5f36bf.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/transpose/5f36bf.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn transpose_5f36bf() { - var arg_0 = mat4x3(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16()); + var arg_0 = mat4x3(1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h); var res : mat3x4 = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/7be8b2.wgsl b/test/tint/builtins/gen/var/transpose/7be8b2.wgsl index 7102102baf..6a9b894695 100644 --- a/test/tint/builtins/gen/var/transpose/7be8b2.wgsl +++ b/test/tint/builtins/gen/var/transpose/7be8b2.wgsl @@ -25,7 +25,7 @@ enable f16; // fn transpose(mat<2, 2, f16>) -> mat<2, 2, f16> fn transpose_7be8b2() { - var arg_0 = mat2x2(f16(), f16(), f16(), f16()); + var arg_0 = mat2x2(1.h, 1.h, 1.h, 1.h); var res: mat2x2 = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/7be8b2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/transpose/7be8b2.wgsl.expected.dxc.hlsl index ee1edd6352..5f701d3dd2 100644 --- a/test/tint/builtins/gen/var/transpose/7be8b2.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/transpose/7be8b2.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void transpose_7be8b2() { - matrix arg_0 = matrix((float16_t(0.0h)).xx, (float16_t(0.0h)).xx); + matrix arg_0 = matrix((float16_t(1.0h)).xx, (float16_t(1.0h)).xx); matrix res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/7be8b2.wgsl.expected.glsl b/test/tint/builtins/gen/var/transpose/7be8b2.wgsl.expected.glsl index f9c1764182..ce42da7423 100644 --- a/test/tint/builtins/gen/var/transpose/7be8b2.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/transpose/7be8b2.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void transpose_7be8b2() { - f16mat2 arg_0 = f16mat2(f16vec2(0.0hf), f16vec2(0.0hf)); + f16mat2 arg_0 = f16mat2(f16vec2(1.0hf), f16vec2(1.0hf)); f16mat2 res = transpose(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void transpose_7be8b2() { - f16mat2 arg_0 = f16mat2(f16vec2(0.0hf), f16vec2(0.0hf)); + f16mat2 arg_0 = f16mat2(f16vec2(1.0hf), f16vec2(1.0hf)); f16mat2 res = transpose(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void transpose_7be8b2() { - f16mat2 arg_0 = f16mat2(f16vec2(0.0hf), f16vec2(0.0hf)); + f16mat2 arg_0 = f16mat2(f16vec2(1.0hf), f16vec2(1.0hf)); f16mat2 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/7be8b2.wgsl.expected.msl b/test/tint/builtins/gen/var/transpose/7be8b2.wgsl.expected.msl index f53a158427..a352ada00e 100644 --- a/test/tint/builtins/gen/var/transpose/7be8b2.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/transpose/7be8b2.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void transpose_7be8b2() { - half2x2 arg_0 = half2x2(half2(0.0h), half2(0.0h)); + half2x2 arg_0 = half2x2(half2(1.0h), half2(1.0h)); half2x2 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/7be8b2.wgsl.expected.spvasm b/test/tint/builtins/gen/var/transpose/7be8b2.wgsl.expected.spvasm index f676cac4f0..ce66a9b890 100644 --- a/test/tint/builtins/gen/var/transpose/7be8b2.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/transpose/7be8b2.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 39 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -38,39 +38,42 @@ %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 %mat2v2half = OpTypeMatrix %v2half 2 - %16 = OpConstantNull %mat2v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %17 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 + %18 = OpConstantComposite %mat2v2half %17 %17 %_ptr_Function_mat2v2half = OpTypePointer Function %mat2v2half - %22 = OpTypeFunction %v4float + %21 = OpConstantNull %mat2v2half + %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %transpose_7be8b2 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_mat2v2half Function %16 - %res = OpVariable %_ptr_Function_mat2v2half Function %16 - OpStore %arg_0 %16 - %20 = OpLoad %mat2v2half %arg_0 - %19 = OpTranspose %mat2v2half %20 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_mat2v2half Function %21 + %res = OpVariable %_ptr_Function_mat2v2half Function %21 + OpStore %arg_0 %18 + %23 = OpLoad %mat2v2half %arg_0 + %22 = OpTranspose %mat2v2half %23 + OpStore %res %22 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %transpose_7be8b2 +%vertex_main_inner = OpFunction %v4float None %25 + %27 = OpLabel + %28 = OpFunctionCall %void %transpose_7be8b2 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %30 = OpLabel + %31 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %31 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %transpose_7be8b2 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %9 %34 = OpLabel %35 = OpFunctionCall %void %transpose_7be8b2 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %9 + %37 = OpLabel + %38 = OpFunctionCall %void %transpose_7be8b2 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/transpose/7be8b2.wgsl.expected.wgsl b/test/tint/builtins/gen/var/transpose/7be8b2.wgsl.expected.wgsl index 277d2e5d5f..0899191f9c 100644 --- a/test/tint/builtins/gen/var/transpose/7be8b2.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/transpose/7be8b2.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn transpose_7be8b2() { - var arg_0 = mat2x2(f16(), f16(), f16(), f16()); + var arg_0 = mat2x2(1.0h, 1.0h, 1.0h, 1.0h); var res : mat2x2 = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/844869.wgsl b/test/tint/builtins/gen/var/transpose/844869.wgsl index 920f4448fc..df41e767c0 100644 --- a/test/tint/builtins/gen/var/transpose/844869.wgsl +++ b/test/tint/builtins/gen/var/transpose/844869.wgsl @@ -25,7 +25,7 @@ enable f16; // fn transpose(mat<4, 4, f16>) -> mat<4, 4, f16> fn transpose_844869() { - var arg_0 = mat4x4(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16()); + var arg_0 = mat4x4(1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h); var res: mat4x4 = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/844869.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/transpose/844869.wgsl.expected.dxc.hlsl index 17bcee893a..67ade18f2b 100644 --- a/test/tint/builtins/gen/var/transpose/844869.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/transpose/844869.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void transpose_844869() { - matrix arg_0 = matrix((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx); + matrix arg_0 = matrix((float16_t(1.0h)).xxxx, (float16_t(1.0h)).xxxx, (float16_t(1.0h)).xxxx, (float16_t(1.0h)).xxxx); matrix res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/844869.wgsl.expected.glsl b/test/tint/builtins/gen/var/transpose/844869.wgsl.expected.glsl index 97269852bd..cb775212bd 100644 --- a/test/tint/builtins/gen/var/transpose/844869.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/transpose/844869.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void transpose_844869() { - f16mat4 arg_0 = f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf)); + f16mat4 arg_0 = f16mat4(f16vec4(1.0hf), f16vec4(1.0hf), f16vec4(1.0hf), f16vec4(1.0hf)); f16mat4 res = transpose(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void transpose_844869() { - f16mat4 arg_0 = f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf)); + f16mat4 arg_0 = f16mat4(f16vec4(1.0hf), f16vec4(1.0hf), f16vec4(1.0hf), f16vec4(1.0hf)); f16mat4 res = transpose(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void transpose_844869() { - f16mat4 arg_0 = f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf)); + f16mat4 arg_0 = f16mat4(f16vec4(1.0hf), f16vec4(1.0hf), f16vec4(1.0hf), f16vec4(1.0hf)); f16mat4 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/844869.wgsl.expected.msl b/test/tint/builtins/gen/var/transpose/844869.wgsl.expected.msl index 564ba7de7e..7b179667c1 100644 --- a/test/tint/builtins/gen/var/transpose/844869.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/transpose/844869.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void transpose_844869() { - half4x4 arg_0 = half4x4(half4(0.0h), half4(0.0h), half4(0.0h), half4(0.0h)); + half4x4 arg_0 = half4x4(half4(1.0h), half4(1.0h), half4(1.0h), half4(1.0h)); half4x4 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/844869.wgsl.expected.spvasm b/test/tint/builtins/gen/var/transpose/844869.wgsl.expected.spvasm index 204bd6cab5..6e24aa129e 100644 --- a/test/tint/builtins/gen/var/transpose/844869.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/transpose/844869.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 39 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -38,39 +38,42 @@ %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 %mat4v4half = OpTypeMatrix %v4half 4 - %16 = OpConstantNull %mat4v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %17 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 + %18 = OpConstantComposite %mat4v4half %17 %17 %17 %17 %_ptr_Function_mat4v4half = OpTypePointer Function %mat4v4half - %22 = OpTypeFunction %v4float + %21 = OpConstantNull %mat4v4half + %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %transpose_844869 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_mat4v4half Function %16 - %res = OpVariable %_ptr_Function_mat4v4half Function %16 - OpStore %arg_0 %16 - %20 = OpLoad %mat4v4half %arg_0 - %19 = OpTranspose %mat4v4half %20 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_mat4v4half Function %21 + %res = OpVariable %_ptr_Function_mat4v4half Function %21 + OpStore %arg_0 %18 + %23 = OpLoad %mat4v4half %arg_0 + %22 = OpTranspose %mat4v4half %23 + OpStore %res %22 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %transpose_844869 +%vertex_main_inner = OpFunction %v4float None %25 + %27 = OpLabel + %28 = OpFunctionCall %void %transpose_844869 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %30 = OpLabel + %31 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %31 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %transpose_844869 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %9 %34 = OpLabel %35 = OpFunctionCall %void %transpose_844869 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %9 + %37 = OpLabel + %38 = OpFunctionCall %void %transpose_844869 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/transpose/844869.wgsl.expected.wgsl b/test/tint/builtins/gen/var/transpose/844869.wgsl.expected.wgsl index a96ffd3034..43882f0671 100644 --- a/test/tint/builtins/gen/var/transpose/844869.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/transpose/844869.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn transpose_844869() { - var arg_0 = mat4x4(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16()); + var arg_0 = mat4x4(1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h); var res : mat4x4 = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/8c06ce.wgsl b/test/tint/builtins/gen/var/transpose/8c06ce.wgsl index 591691377f..2c8b1e3a17 100644 --- a/test/tint/builtins/gen/var/transpose/8c06ce.wgsl +++ b/test/tint/builtins/gen/var/transpose/8c06ce.wgsl @@ -25,7 +25,7 @@ enable f16; // fn transpose(mat<3, 4, f16>) -> mat<4, 3, f16> fn transpose_8c06ce() { - var arg_0 = mat3x4(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16()); + var arg_0 = mat3x4(1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h); var res: mat4x3 = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/8c06ce.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/transpose/8c06ce.wgsl.expected.dxc.hlsl index 8af9aa19df..f83c870da2 100644 --- a/test/tint/builtins/gen/var/transpose/8c06ce.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/transpose/8c06ce.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void transpose_8c06ce() { - matrix arg_0 = matrix((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx); + matrix arg_0 = matrix((float16_t(1.0h)).xxxx, (float16_t(1.0h)).xxxx, (float16_t(1.0h)).xxxx); matrix res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/8c06ce.wgsl.expected.glsl b/test/tint/builtins/gen/var/transpose/8c06ce.wgsl.expected.glsl index eb6e17c2fd..375e8a831a 100644 --- a/test/tint/builtins/gen/var/transpose/8c06ce.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/transpose/8c06ce.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void transpose_8c06ce() { - f16mat3x4 arg_0 = f16mat3x4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf)); + f16mat3x4 arg_0 = f16mat3x4(f16vec4(1.0hf), f16vec4(1.0hf), f16vec4(1.0hf)); f16mat4x3 res = transpose(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void transpose_8c06ce() { - f16mat3x4 arg_0 = f16mat3x4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf)); + f16mat3x4 arg_0 = f16mat3x4(f16vec4(1.0hf), f16vec4(1.0hf), f16vec4(1.0hf)); f16mat4x3 res = transpose(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void transpose_8c06ce() { - f16mat3x4 arg_0 = f16mat3x4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf)); + f16mat3x4 arg_0 = f16mat3x4(f16vec4(1.0hf), f16vec4(1.0hf), f16vec4(1.0hf)); f16mat4x3 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/8c06ce.wgsl.expected.msl b/test/tint/builtins/gen/var/transpose/8c06ce.wgsl.expected.msl index ae175b0d33..7484fc027d 100644 --- a/test/tint/builtins/gen/var/transpose/8c06ce.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/transpose/8c06ce.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void transpose_8c06ce() { - half3x4 arg_0 = half3x4(half4(0.0h), half4(0.0h), half4(0.0h)); + half3x4 arg_0 = half3x4(half4(1.0h), half4(1.0h), half4(1.0h)); half4x3 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/8c06ce.wgsl.expected.spvasm b/test/tint/builtins/gen/var/transpose/8c06ce.wgsl.expected.spvasm index c01b8c6b5f..5cc52f31a1 100644 --- a/test/tint/builtins/gen/var/transpose/8c06ce.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/transpose/8c06ce.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 43 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -38,43 +38,46 @@ %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 %mat3v4half = OpTypeMatrix %v4half 3 - %16 = OpConstantNull %mat3v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %17 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 + %18 = OpConstantComposite %mat3v4half %17 %17 %17 %_ptr_Function_mat3v4half = OpTypePointer Function %mat3v4half + %21 = OpConstantNull %mat3v4half %v3half = OpTypeVector %half 3 %mat4v3half = OpTypeMatrix %v3half 4 %_ptr_Function_mat4v3half = OpTypePointer Function %mat4v3half - %25 = OpConstantNull %mat4v3half - %26 = OpTypeFunction %v4float + %28 = OpConstantNull %mat4v3half + %29 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %transpose_8c06ce = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_mat3v4half Function %16 - %res = OpVariable %_ptr_Function_mat4v3half Function %25 - OpStore %arg_0 %16 - %22 = OpLoad %mat3v4half %arg_0 - %19 = OpTranspose %mat4v3half %22 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_mat3v4half Function %21 + %res = OpVariable %_ptr_Function_mat4v3half Function %28 + OpStore %arg_0 %18 + %25 = OpLoad %mat3v4half %arg_0 + %22 = OpTranspose %mat4v3half %25 + OpStore %res %22 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %transpose_8c06ce +%vertex_main_inner = OpFunction %v4float None %29 + %31 = OpLabel + %32 = OpFunctionCall %void %transpose_8c06ce OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %34 = OpLabel + %35 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %35 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %transpose_8c06ce - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %9 %38 = OpLabel %39 = OpFunctionCall %void %transpose_8c06ce OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %9 + %41 = OpLabel + %42 = OpFunctionCall %void %transpose_8c06ce + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/transpose/8c06ce.wgsl.expected.wgsl b/test/tint/builtins/gen/var/transpose/8c06ce.wgsl.expected.wgsl index ee401e76ed..1aa96e46e2 100644 --- a/test/tint/builtins/gen/var/transpose/8c06ce.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/transpose/8c06ce.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn transpose_8c06ce() { - var arg_0 = mat3x4(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16()); + var arg_0 = mat3x4(1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h); var res : mat4x3 = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl b/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl index fd8dc13bd2..ca4d50cca7 100644 --- a/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl +++ b/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl @@ -25,7 +25,7 @@ enable f16; // fn transpose(mat<3, 2, f16>) -> mat<2, 3, f16> fn transpose_b9ad1f() { - var arg_0 = mat3x2(f16(), f16(), f16(), f16(), f16(), f16()); + var arg_0 = mat3x2(1.h, 1.h, 1.h, 1.h, 1.h, 1.h); var res: mat2x3 = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl.expected.dxc.hlsl index dae12f3130..aa75d026ec 100644 --- a/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void transpose_b9ad1f() { - matrix arg_0 = matrix((float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx); + matrix arg_0 = matrix((float16_t(1.0h)).xx, (float16_t(1.0h)).xx, (float16_t(1.0h)).xx); matrix res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl.expected.glsl b/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl.expected.glsl index fbe4830053..b6e288ba93 100644 --- a/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void transpose_b9ad1f() { - f16mat3x2 arg_0 = f16mat3x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf)); + f16mat3x2 arg_0 = f16mat3x2(f16vec2(1.0hf), f16vec2(1.0hf), f16vec2(1.0hf)); f16mat2x3 res = transpose(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void transpose_b9ad1f() { - f16mat3x2 arg_0 = f16mat3x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf)); + f16mat3x2 arg_0 = f16mat3x2(f16vec2(1.0hf), f16vec2(1.0hf), f16vec2(1.0hf)); f16mat2x3 res = transpose(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void transpose_b9ad1f() { - f16mat3x2 arg_0 = f16mat3x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf)); + f16mat3x2 arg_0 = f16mat3x2(f16vec2(1.0hf), f16vec2(1.0hf), f16vec2(1.0hf)); f16mat2x3 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl.expected.msl b/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl.expected.msl index df905fe9d5..13d549999b 100644 --- a/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void transpose_b9ad1f() { - half3x2 arg_0 = half3x2(half2(0.0h), half2(0.0h), half2(0.0h)); + half3x2 arg_0 = half3x2(half2(1.0h), half2(1.0h), half2(1.0h)); half2x3 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl.expected.spvasm index 0aefff3660..5af2d0d700 100644 --- a/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 43 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -38,43 +38,46 @@ %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 %mat3v2half = OpTypeMatrix %v2half 3 - %16 = OpConstantNull %mat3v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %17 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 + %18 = OpConstantComposite %mat3v2half %17 %17 %17 %_ptr_Function_mat3v2half = OpTypePointer Function %mat3v2half + %21 = OpConstantNull %mat3v2half %v3half = OpTypeVector %half 3 %mat2v3half = OpTypeMatrix %v3half 2 %_ptr_Function_mat2v3half = OpTypePointer Function %mat2v3half - %25 = OpConstantNull %mat2v3half - %26 = OpTypeFunction %v4float + %28 = OpConstantNull %mat2v3half + %29 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %transpose_b9ad1f = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_mat3v2half Function %16 - %res = OpVariable %_ptr_Function_mat2v3half Function %25 - OpStore %arg_0 %16 - %22 = OpLoad %mat3v2half %arg_0 - %19 = OpTranspose %mat2v3half %22 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_mat3v2half Function %21 + %res = OpVariable %_ptr_Function_mat2v3half Function %28 + OpStore %arg_0 %18 + %25 = OpLoad %mat3v2half %arg_0 + %22 = OpTranspose %mat2v3half %25 + OpStore %res %22 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %transpose_b9ad1f +%vertex_main_inner = OpFunction %v4float None %29 + %31 = OpLabel + %32 = OpFunctionCall %void %transpose_b9ad1f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %34 = OpLabel + %35 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %35 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %transpose_b9ad1f - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %9 %38 = OpLabel %39 = OpFunctionCall %void %transpose_b9ad1f OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %9 + %41 = OpLabel + %42 = OpFunctionCall %void %transpose_b9ad1f + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl.expected.wgsl index c96a7dc0b5..b03542ab11 100644 --- a/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn transpose_b9ad1f() { - var arg_0 = mat3x2(f16(), f16(), f16(), f16(), f16(), f16()); + var arg_0 = mat3x2(1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h); var res : mat2x3 = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/d6faec.wgsl b/test/tint/builtins/gen/var/transpose/d6faec.wgsl index d5b7ec3e39..69281e0014 100644 --- a/test/tint/builtins/gen/var/transpose/d6faec.wgsl +++ b/test/tint/builtins/gen/var/transpose/d6faec.wgsl @@ -25,7 +25,7 @@ enable f16; // fn transpose(mat<2, 3, f16>) -> mat<3, 2, f16> fn transpose_d6faec() { - var arg_0 = mat2x3(f16(), f16(), f16(), f16(), f16(), f16()); + var arg_0 = mat2x3(1.h, 1.h, 1.h, 1.h, 1.h, 1.h); var res: mat3x2 = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/d6faec.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/transpose/d6faec.wgsl.expected.dxc.hlsl index 5f07e18872..61e30559e3 100644 --- a/test/tint/builtins/gen/var/transpose/d6faec.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/transpose/d6faec.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void transpose_d6faec() { - matrix arg_0 = matrix((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx); + matrix arg_0 = matrix((float16_t(1.0h)).xxx, (float16_t(1.0h)).xxx); matrix res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/d6faec.wgsl.expected.glsl b/test/tint/builtins/gen/var/transpose/d6faec.wgsl.expected.glsl index b4d1afed88..83dbe18597 100644 --- a/test/tint/builtins/gen/var/transpose/d6faec.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/transpose/d6faec.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void transpose_d6faec() { - f16mat2x3 arg_0 = f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf)); + f16mat2x3 arg_0 = f16mat2x3(f16vec3(1.0hf), f16vec3(1.0hf)); f16mat3x2 res = transpose(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void transpose_d6faec() { - f16mat2x3 arg_0 = f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf)); + f16mat2x3 arg_0 = f16mat2x3(f16vec3(1.0hf), f16vec3(1.0hf)); f16mat3x2 res = transpose(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void transpose_d6faec() { - f16mat2x3 arg_0 = f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf)); + f16mat2x3 arg_0 = f16mat2x3(f16vec3(1.0hf), f16vec3(1.0hf)); f16mat3x2 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/d6faec.wgsl.expected.msl b/test/tint/builtins/gen/var/transpose/d6faec.wgsl.expected.msl index 1f7eac07e3..0e8d5a05d0 100644 --- a/test/tint/builtins/gen/var/transpose/d6faec.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/transpose/d6faec.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void transpose_d6faec() { - half2x3 arg_0 = half2x3(half3(0.0h), half3(0.0h)); + half2x3 arg_0 = half2x3(half3(1.0h), half3(1.0h)); half3x2 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/d6faec.wgsl.expected.spvasm b/test/tint/builtins/gen/var/transpose/d6faec.wgsl.expected.spvasm index 513643d34f..3b781a59a7 100644 --- a/test/tint/builtins/gen/var/transpose/d6faec.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/transpose/d6faec.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 43 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -38,43 +38,46 @@ %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 %mat2v3half = OpTypeMatrix %v3half 2 - %16 = OpConstantNull %mat2v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %17 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 + %18 = OpConstantComposite %mat2v3half %17 %17 %_ptr_Function_mat2v3half = OpTypePointer Function %mat2v3half + %21 = OpConstantNull %mat2v3half %v2half = OpTypeVector %half 2 %mat3v2half = OpTypeMatrix %v2half 3 %_ptr_Function_mat3v2half = OpTypePointer Function %mat3v2half - %25 = OpConstantNull %mat3v2half - %26 = OpTypeFunction %v4float + %28 = OpConstantNull %mat3v2half + %29 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %transpose_d6faec = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_mat2v3half Function %16 - %res = OpVariable %_ptr_Function_mat3v2half Function %25 - OpStore %arg_0 %16 - %22 = OpLoad %mat2v3half %arg_0 - %19 = OpTranspose %mat3v2half %22 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_mat2v3half Function %21 + %res = OpVariable %_ptr_Function_mat3v2half Function %28 + OpStore %arg_0 %18 + %25 = OpLoad %mat2v3half %arg_0 + %22 = OpTranspose %mat3v2half %25 + OpStore %res %22 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %transpose_d6faec +%vertex_main_inner = OpFunction %v4float None %29 + %31 = OpLabel + %32 = OpFunctionCall %void %transpose_d6faec OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %34 = OpLabel + %35 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %35 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %transpose_d6faec - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %9 %38 = OpLabel %39 = OpFunctionCall %void %transpose_d6faec OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %9 + %41 = OpLabel + %42 = OpFunctionCall %void %transpose_d6faec + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/transpose/d6faec.wgsl.expected.wgsl b/test/tint/builtins/gen/var/transpose/d6faec.wgsl.expected.wgsl index 472aade960..f439b66581 100644 --- a/test/tint/builtins/gen/var/transpose/d6faec.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/transpose/d6faec.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn transpose_d6faec() { - var arg_0 = mat2x3(f16(), f16(), f16(), f16(), f16(), f16()); + var arg_0 = mat2x3(1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h); var res : mat3x2 = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/faeb05.wgsl b/test/tint/builtins/gen/var/transpose/faeb05.wgsl index 0e2feed300..e891630a65 100644 --- a/test/tint/builtins/gen/var/transpose/faeb05.wgsl +++ b/test/tint/builtins/gen/var/transpose/faeb05.wgsl @@ -25,7 +25,7 @@ enable f16; // fn transpose(mat<2, 4, f16>) -> mat<4, 2, f16> fn transpose_faeb05() { - var arg_0 = mat2x4(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16()); + var arg_0 = mat2x4(1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h, 1.h); var res: mat4x2 = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/faeb05.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/transpose/faeb05.wgsl.expected.dxc.hlsl index e318602606..b0ada990ee 100644 --- a/test/tint/builtins/gen/var/transpose/faeb05.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/transpose/faeb05.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void transpose_faeb05() { - matrix arg_0 = matrix((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx); + matrix arg_0 = matrix((float16_t(1.0h)).xxxx, (float16_t(1.0h)).xxxx); matrix res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/faeb05.wgsl.expected.glsl b/test/tint/builtins/gen/var/transpose/faeb05.wgsl.expected.glsl index 3080917650..86c2ac6598 100644 --- a/test/tint/builtins/gen/var/transpose/faeb05.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/transpose/faeb05.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void transpose_faeb05() { - f16mat2x4 arg_0 = f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf)); + f16mat2x4 arg_0 = f16mat2x4(f16vec4(1.0hf), f16vec4(1.0hf)); f16mat4x2 res = transpose(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void transpose_faeb05() { - f16mat2x4 arg_0 = f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf)); + f16mat2x4 arg_0 = f16mat2x4(f16vec4(1.0hf), f16vec4(1.0hf)); f16mat4x2 res = transpose(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void transpose_faeb05() { - f16mat2x4 arg_0 = f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf)); + f16mat2x4 arg_0 = f16mat2x4(f16vec4(1.0hf), f16vec4(1.0hf)); f16mat4x2 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/faeb05.wgsl.expected.msl b/test/tint/builtins/gen/var/transpose/faeb05.wgsl.expected.msl index f941a64552..674a561425 100644 --- a/test/tint/builtins/gen/var/transpose/faeb05.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/transpose/faeb05.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void transpose_faeb05() { - half2x4 arg_0 = half2x4(half4(0.0h), half4(0.0h)); + half2x4 arg_0 = half2x4(half4(1.0h), half4(1.0h)); half4x2 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/faeb05.wgsl.expected.spvasm b/test/tint/builtins/gen/var/transpose/faeb05.wgsl.expected.spvasm index f7a4c55661..5b43dfb59d 100644 --- a/test/tint/builtins/gen/var/transpose/faeb05.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/transpose/faeb05.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 43 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -38,43 +38,46 @@ %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 %mat2v4half = OpTypeMatrix %v4half 2 - %16 = OpConstantNull %mat2v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %17 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 + %18 = OpConstantComposite %mat2v4half %17 %17 %_ptr_Function_mat2v4half = OpTypePointer Function %mat2v4half + %21 = OpConstantNull %mat2v4half %v2half = OpTypeVector %half 2 %mat4v2half = OpTypeMatrix %v2half 4 %_ptr_Function_mat4v2half = OpTypePointer Function %mat4v2half - %25 = OpConstantNull %mat4v2half - %26 = OpTypeFunction %v4float + %28 = OpConstantNull %mat4v2half + %29 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %transpose_faeb05 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_mat2v4half Function %16 - %res = OpVariable %_ptr_Function_mat4v2half Function %25 - OpStore %arg_0 %16 - %22 = OpLoad %mat2v4half %arg_0 - %19 = OpTranspose %mat4v2half %22 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_mat2v4half Function %21 + %res = OpVariable %_ptr_Function_mat4v2half Function %28 + OpStore %arg_0 %18 + %25 = OpLoad %mat2v4half %arg_0 + %22 = OpTranspose %mat4v2half %25 + OpStore %res %22 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %transpose_faeb05 +%vertex_main_inner = OpFunction %v4float None %29 + %31 = OpLabel + %32 = OpFunctionCall %void %transpose_faeb05 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %34 = OpLabel + %35 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %35 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %transpose_faeb05 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %9 %38 = OpLabel %39 = OpFunctionCall %void %transpose_faeb05 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %9 + %41 = OpLabel + %42 = OpFunctionCall %void %transpose_faeb05 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/transpose/faeb05.wgsl.expected.wgsl b/test/tint/builtins/gen/var/transpose/faeb05.wgsl.expected.wgsl index a6de2cbd2c..10f8d0a895 100644 --- a/test/tint/builtins/gen/var/transpose/faeb05.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/transpose/faeb05.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn transpose_faeb05() { - var arg_0 = mat2x4(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16()); + var arg_0 = mat2x4(1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h, 1.0h); var res : mat4x2 = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/trunc/103ab8.wgsl b/test/tint/builtins/gen/var/trunc/103ab8.wgsl index 144541ae66..09e2de388b 100644 --- a/test/tint/builtins/gen/var/trunc/103ab8.wgsl +++ b/test/tint/builtins/gen/var/trunc/103ab8.wgsl @@ -25,7 +25,7 @@ enable f16; // fn trunc(vec<3, f16>) -> vec<3, f16> fn trunc_103ab8() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.h); var res: vec3 = trunc(arg_0); } diff --git a/test/tint/builtins/gen/var/trunc/103ab8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/trunc/103ab8.wgsl.expected.dxc.hlsl index 6adf48c5c4..ddbd6d2139 100644 --- a/test/tint/builtins/gen/var/trunc/103ab8.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/trunc/103ab8.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void trunc_103ab8() { - vector arg_0 = (float16_t(0.0h)).xxx; + vector arg_0 = (float16_t(1.0h)).xxx; vector res = trunc(arg_0); } diff --git a/test/tint/builtins/gen/var/trunc/103ab8.wgsl.expected.glsl b/test/tint/builtins/gen/var/trunc/103ab8.wgsl.expected.glsl index cd4f15d4f1..ffb099ff39 100644 --- a/test/tint/builtins/gen/var/trunc/103ab8.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/trunc/103ab8.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void trunc_103ab8() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = trunc(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void trunc_103ab8() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = trunc(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void trunc_103ab8() { - f16vec3 arg_0 = f16vec3(0.0hf); + f16vec3 arg_0 = f16vec3(1.0hf); f16vec3 res = trunc(arg_0); } diff --git a/test/tint/builtins/gen/var/trunc/103ab8.wgsl.expected.msl b/test/tint/builtins/gen/var/trunc/103ab8.wgsl.expected.msl index 3bd56b9c27..22056f0381 100644 --- a/test/tint/builtins/gen/var/trunc/103ab8.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/trunc/103ab8.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void trunc_103ab8() { - half3 arg_0 = half3(0.0h); + half3 arg_0 = half3(1.0h); half3 res = trunc(arg_0); } diff --git a/test/tint/builtins/gen/var/trunc/103ab8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/trunc/103ab8.wgsl.expected.spvasm index 7080335868..91192b4435 100644 --- a/test/tint/builtins/gen/var/trunc/103ab8.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/trunc/103ab8.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 - %15 = OpConstantNull %v3half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %trunc_103ab8 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3half Function %15 - %res = OpVariable %_ptr_Function_v3half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v3half %arg_0 - %18 = OpExtInst %v3half %19 Trunc %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v3half Function %19 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v3half %arg_0 + %20 = OpExtInst %v3half %21 Trunc %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %trunc_103ab8 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %trunc_103ab8 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %trunc_103ab8 + %33 = OpLabel + %34 = OpFunctionCall %void %trunc_103ab8 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %trunc_103ab8 + %36 = OpLabel + %37 = OpFunctionCall %void %trunc_103ab8 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/trunc/103ab8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/trunc/103ab8.wgsl.expected.wgsl index a4cd5c830b..dc42691710 100644 --- a/test/tint/builtins/gen/var/trunc/103ab8.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/trunc/103ab8.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn trunc_103ab8() { - var arg_0 = vec3(f16()); + var arg_0 = vec3(1.0h); var res : vec3 = trunc(arg_0); } diff --git a/test/tint/builtins/gen/var/trunc/a56109.wgsl b/test/tint/builtins/gen/var/trunc/a56109.wgsl index f7ece8d716..4e6b5b1dc8 100644 --- a/test/tint/builtins/gen/var/trunc/a56109.wgsl +++ b/test/tint/builtins/gen/var/trunc/a56109.wgsl @@ -25,7 +25,7 @@ enable f16; // fn trunc(vec<2, f16>) -> vec<2, f16> fn trunc_a56109() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.h); var res: vec2 = trunc(arg_0); } diff --git a/test/tint/builtins/gen/var/trunc/a56109.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/trunc/a56109.wgsl.expected.dxc.hlsl index 39ea25561b..059dfcf7b6 100644 --- a/test/tint/builtins/gen/var/trunc/a56109.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/trunc/a56109.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void trunc_a56109() { - vector arg_0 = (float16_t(0.0h)).xx; + vector arg_0 = (float16_t(1.0h)).xx; vector res = trunc(arg_0); } diff --git a/test/tint/builtins/gen/var/trunc/a56109.wgsl.expected.glsl b/test/tint/builtins/gen/var/trunc/a56109.wgsl.expected.glsl index 754116e0ec..3855c86497 100644 --- a/test/tint/builtins/gen/var/trunc/a56109.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/trunc/a56109.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void trunc_a56109() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = trunc(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void trunc_a56109() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = trunc(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void trunc_a56109() { - f16vec2 arg_0 = f16vec2(0.0hf); + f16vec2 arg_0 = f16vec2(1.0hf); f16vec2 res = trunc(arg_0); } diff --git a/test/tint/builtins/gen/var/trunc/a56109.wgsl.expected.msl b/test/tint/builtins/gen/var/trunc/a56109.wgsl.expected.msl index 395166bc39..38660ec486 100644 --- a/test/tint/builtins/gen/var/trunc/a56109.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/trunc/a56109.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void trunc_a56109() { - half2 arg_0 = half2(0.0h); + half2 arg_0 = half2(1.0h); half2 res = trunc(arg_0); } diff --git a/test/tint/builtins/gen/var/trunc/a56109.wgsl.expected.spvasm b/test/tint/builtins/gen/var/trunc/a56109.wgsl.expected.spvasm index fa693e8dd3..c7d09416d2 100644 --- a/test/tint/builtins/gen/var/trunc/a56109.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/trunc/a56109.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 - %15 = OpConstantNull %v2half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v2half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %trunc_a56109 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2half Function %15 - %res = OpVariable %_ptr_Function_v2half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v2half %arg_0 - %18 = OpExtInst %v2half %19 Trunc %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v2half Function %19 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v2half %arg_0 + %20 = OpExtInst %v2half %21 Trunc %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %trunc_a56109 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %trunc_a56109 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %trunc_a56109 + %33 = OpLabel + %34 = OpFunctionCall %void %trunc_a56109 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %trunc_a56109 + %36 = OpLabel + %37 = OpFunctionCall %void %trunc_a56109 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/trunc/a56109.wgsl.expected.wgsl b/test/tint/builtins/gen/var/trunc/a56109.wgsl.expected.wgsl index be9c55da32..71aabc5af3 100644 --- a/test/tint/builtins/gen/var/trunc/a56109.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/trunc/a56109.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn trunc_a56109() { - var arg_0 = vec2(f16()); + var arg_0 = vec2(1.0h); var res : vec2 = trunc(arg_0); } diff --git a/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl b/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl index 3aad0e3d85..ee4f839c68 100644 --- a/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl +++ b/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl @@ -25,7 +25,7 @@ enable f16; // fn trunc(f16) -> f16 fn trunc_cc2b0d() { - var arg_0 = f16(); + var arg_0 = 1.h; var res: f16 = trunc(arg_0); } diff --git a/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl.expected.dxc.hlsl index e998713fb2..8f1a6afef6 100644 --- a/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void trunc_cc2b0d() { - float16_t arg_0 = float16_t(0.0h); + float16_t arg_0 = float16_t(1.0h); float16_t res = trunc(arg_0); } diff --git a/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl.expected.glsl b/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl.expected.glsl index 73a3d1e537..f0e9d9cde4 100644 --- a/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void trunc_cc2b0d() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = trunc(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void trunc_cc2b0d() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = trunc(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void trunc_cc2b0d() { - float16_t arg_0 = 0.0hf; + float16_t arg_0 = 1.0hf; float16_t res = trunc(arg_0); } diff --git a/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl.expected.msl b/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl.expected.msl index 3b88cd73ed..25fd8e19d8 100644 --- a/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void trunc_cc2b0d() { - half arg_0 = 0.0h; + half arg_0 = 1.0h; half res = trunc(arg_0); } diff --git a/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl.expected.spvasm index a227bbaf5b..1266beb6e0 100644 --- a/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %18 = OpExtInstImport "GLSL.std.450" + %19 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -37,39 +37,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 - %14 = OpConstantNull %half +%half_0x1p_0 = OpConstant %half 0x1p+0 %_ptr_Function_half = OpTypePointer Function %half - %21 = OpTypeFunction %v4float + %17 = OpConstantNull %half + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %trunc_cc2b0d = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_half Function %14 - %res = OpVariable %_ptr_Function_half Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %half %arg_0 - %17 = OpExtInst %half %18 Trunc %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_half Function %17 + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %arg_0 %half_0x1p_0 + %20 = OpLoad %half %arg_0 + %18 = OpExtInst %half %19 Trunc %20 + OpStore %res %18 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %trunc_cc2b0d +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %trunc_cc2b0d OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %trunc_cc2b0d + %31 = OpLabel + %32 = OpFunctionCall %void %trunc_cc2b0d OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %trunc_cc2b0d + %34 = OpLabel + %35 = OpFunctionCall %void %trunc_cc2b0d OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl.expected.wgsl index 5530fe352e..cc68f295cd 100644 --- a/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn trunc_cc2b0d() { - var arg_0 = f16(); + var arg_0 = 1.0h; var res : f16 = trunc(arg_0); } diff --git a/test/tint/builtins/gen/var/trunc/ce7c17.wgsl b/test/tint/builtins/gen/var/trunc/ce7c17.wgsl index a90b8321b1..be36c021da 100644 --- a/test/tint/builtins/gen/var/trunc/ce7c17.wgsl +++ b/test/tint/builtins/gen/var/trunc/ce7c17.wgsl @@ -25,7 +25,7 @@ enable f16; // fn trunc(vec<4, f16>) -> vec<4, f16> fn trunc_ce7c17() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.h); var res: vec4 = trunc(arg_0); } diff --git a/test/tint/builtins/gen/var/trunc/ce7c17.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/trunc/ce7c17.wgsl.expected.dxc.hlsl index b3fc9a34d3..fedd729c03 100644 --- a/test/tint/builtins/gen/var/trunc/ce7c17.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/trunc/ce7c17.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void trunc_ce7c17() { - vector arg_0 = (float16_t(0.0h)).xxxx; + vector arg_0 = (float16_t(1.0h)).xxxx; vector res = trunc(arg_0); } diff --git a/test/tint/builtins/gen/var/trunc/ce7c17.wgsl.expected.glsl b/test/tint/builtins/gen/var/trunc/ce7c17.wgsl.expected.glsl index 53c46bdd96..6b65996bbf 100644 --- a/test/tint/builtins/gen/var/trunc/ce7c17.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/trunc/ce7c17.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void trunc_ce7c17() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = trunc(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void trunc_ce7c17() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = trunc(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void trunc_ce7c17() { - f16vec4 arg_0 = f16vec4(0.0hf); + f16vec4 arg_0 = f16vec4(1.0hf); f16vec4 res = trunc(arg_0); } diff --git a/test/tint/builtins/gen/var/trunc/ce7c17.wgsl.expected.msl b/test/tint/builtins/gen/var/trunc/ce7c17.wgsl.expected.msl index 183371de7f..f3f90c4aed 100644 --- a/test/tint/builtins/gen/var/trunc/ce7c17.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/trunc/ce7c17.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void trunc_ce7c17() { - half4 arg_0 = half4(0.0h); + half4 arg_0 = half4(1.0h); half4 res = trunc(arg_0); } diff --git a/test/tint/builtins/gen/var/trunc/ce7c17.wgsl.expected.spvasm b/test/tint/builtins/gen/var/trunc/ce7c17.wgsl.expected.spvasm index 9341301ab6..91cad17725 100644 --- a/test/tint/builtins/gen/var/trunc/ce7c17.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/trunc/ce7c17.wgsl.expected.spvasm @@ -1,14 +1,14 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,39 +38,41 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 - %15 = OpConstantNull %v4half +%half_0x1p_0 = OpConstant %half 0x1p+0 + %16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v4half + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %trunc_ce7c17 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4half Function %15 - %res = OpVariable %_ptr_Function_v4half Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v4half %arg_0 - %18 = OpExtInst %v4half %19 Trunc %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v4half Function %19 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v4half %arg_0 + %20 = OpExtInst %v4half %21 Trunc %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %trunc_ce7c17 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %trunc_ce7c17 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %trunc_ce7c17 + %33 = OpLabel + %34 = OpFunctionCall %void %trunc_ce7c17 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %trunc_ce7c17 + %36 = OpLabel + %37 = OpFunctionCall %void %trunc_ce7c17 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/trunc/ce7c17.wgsl.expected.wgsl b/test/tint/builtins/gen/var/trunc/ce7c17.wgsl.expected.wgsl index bc7e46a46f..8fa5b3b2b5 100644 --- a/test/tint/builtins/gen/var/trunc/ce7c17.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/trunc/ce7c17.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn trunc_ce7c17() { - var arg_0 = vec4(f16()); + var arg_0 = vec4(1.0h); var res : vec4 = trunc(arg_0); }