From bf8a230c81ea6490ff67b8887c38ce5df3ccd5f9 Mon Sep 17 00:00:00 2001 From: Antonio Maiorano Date: Fri, 16 Dec 2022 18:37:19 +0000 Subject: [PATCH] tint: const eval of ldexp builtin Bug: tint:1581 Change-Id: Ib21717065041b65a637f4d73ce0088544b1fce0d Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/114321 Reviewed-by: Ben Clayton Commit-Queue: Antonio Maiorano Kokoro: Kokoro --- src/tint/intrinsics.def | 5 +- src/tint/resolver/const_eval.cc | 42 + src/tint/resolver/const_eval.h | 9 + src/tint/resolver/const_eval_builtin_test.cc | 65 ++ src/tint/resolver/intrinsic_table.inl | 817 +++++++++--------- .../builtins/gen/literal/ldexp/082c1f.wgsl | 45 + .../ldexp/082c1f.wgsl.expected.dxc.hlsl | 30 + .../ldexp/082c1f.wgsl.expected.fxc.hlsl | 36 + .../literal/ldexp/082c1f.wgsl.expected.glsl | 52 ++ .../literal/ldexp/082c1f.wgsl.expected.msl | 33 + .../literal/ldexp/082c1f.wgsl.expected.spvasm | 70 ++ .../literal/ldexp/082c1f.wgsl.expected.wgsl | 21 + .../builtins/gen/literal/ldexp/217a31.wgsl | 45 + .../ldexp/217a31.wgsl.expected.dxc.hlsl | 30 + .../ldexp/217a31.wgsl.expected.fxc.hlsl | 35 + .../literal/ldexp/217a31.wgsl.expected.glsl | 52 ++ .../literal/ldexp/217a31.wgsl.expected.msl | 33 + .../literal/ldexp/217a31.wgsl.expected.spvasm | 72 ++ .../literal/ldexp/217a31.wgsl.expected.wgsl | 21 + .../builtins/gen/literal/ldexp/2bfc68.wgsl | 43 + .../ldexp/2bfc68.wgsl.expected.dxc.hlsl | 30 + .../ldexp/2bfc68.wgsl.expected.fxc.hlsl | 30 + .../literal/ldexp/2bfc68.wgsl.expected.glsl | 49 ++ .../literal/ldexp/2bfc68.wgsl.expected.msl | 33 + .../literal/ldexp/2bfc68.wgsl.expected.spvasm | 67 ++ .../literal/ldexp/2bfc68.wgsl.expected.wgsl | 19 + .../builtins/gen/literal/ldexp/2c6370.wgsl | 43 + .../ldexp/2c6370.wgsl.expected.dxc.hlsl | 30 + .../ldexp/2c6370.wgsl.expected.fxc.hlsl | 30 + .../literal/ldexp/2c6370.wgsl.expected.glsl | 49 ++ .../literal/ldexp/2c6370.wgsl.expected.msl | 33 + .../literal/ldexp/2c6370.wgsl.expected.spvasm | 67 ++ .../literal/ldexp/2c6370.wgsl.expected.wgsl | 19 + .../builtins/gen/literal/ldexp/376938.wgsl | 43 + .../ldexp/376938.wgsl.expected.dxc.hlsl | 30 + .../ldexp/376938.wgsl.expected.fxc.hlsl | 30 + .../literal/ldexp/376938.wgsl.expected.glsl | 49 ++ .../literal/ldexp/376938.wgsl.expected.msl | 33 + .../literal/ldexp/376938.wgsl.expected.spvasm | 65 ++ .../literal/ldexp/376938.wgsl.expected.wgsl | 19 + .../ldexp/3d90b4.wgsl.expected.dxc.hlsl | 2 +- .../ldexp/3d90b4.wgsl.expected.fxc.hlsl | 5 +- .../literal/ldexp/3d90b4.wgsl.expected.glsl | 6 +- .../literal/ldexp/3d90b4.wgsl.expected.msl | 2 +- .../literal/ldexp/3d90b4.wgsl.expected.spvasm | 40 +- .../builtins/gen/literal/ldexp/4a3ad9.wgsl | 43 + .../ldexp/4a3ad9.wgsl.expected.dxc.hlsl | 30 + .../ldexp/4a3ad9.wgsl.expected.fxc.hlsl | 30 + .../literal/ldexp/4a3ad9.wgsl.expected.glsl | 49 ++ .../literal/ldexp/4a3ad9.wgsl.expected.msl | 33 + .../literal/ldexp/4a3ad9.wgsl.expected.spvasm | 67 ++ .../literal/ldexp/4a3ad9.wgsl.expected.wgsl | 19 + .../builtins/gen/literal/ldexp/593ff3.wgsl | 43 + .../ldexp/593ff3.wgsl.expected.dxc.hlsl | 30 + .../ldexp/593ff3.wgsl.expected.fxc.hlsl | 30 + .../literal/ldexp/593ff3.wgsl.expected.glsl | 49 ++ .../literal/ldexp/593ff3.wgsl.expected.msl | 33 + .../literal/ldexp/593ff3.wgsl.expected.spvasm | 67 ++ .../literal/ldexp/593ff3.wgsl.expected.wgsl | 19 + .../ldexp/624e0c.wgsl.expected.dxc.hlsl | 2 +- .../ldexp/624e0c.wgsl.expected.fxc.hlsl | 6 +- .../literal/ldexp/624e0c.wgsl.expected.glsl | 6 +- .../literal/ldexp/624e0c.wgsl.expected.msl | 2 +- .../literal/ldexp/624e0c.wgsl.expected.spvasm | 36 +- .../builtins/gen/literal/ldexp/65a7bd.wgsl | 43 + .../ldexp/65a7bd.wgsl.expected.dxc.hlsl | 30 + .../ldexp/65a7bd.wgsl.expected.fxc.hlsl | 30 + .../literal/ldexp/65a7bd.wgsl.expected.glsl | 49 ++ .../literal/ldexp/65a7bd.wgsl.expected.msl | 33 + .../literal/ldexp/65a7bd.wgsl.expected.spvasm | 65 ++ .../literal/ldexp/65a7bd.wgsl.expected.wgsl | 19 + .../builtins/gen/literal/ldexp/71ebe3.wgsl | 43 + .../ldexp/71ebe3.wgsl.expected.dxc.hlsl | 30 + .../ldexp/71ebe3.wgsl.expected.fxc.hlsl | 30 + .../literal/ldexp/71ebe3.wgsl.expected.glsl | 49 ++ .../literal/ldexp/71ebe3.wgsl.expected.msl | 33 + .../literal/ldexp/71ebe3.wgsl.expected.spvasm | 64 ++ .../literal/ldexp/71ebe3.wgsl.expected.wgsl | 19 + .../ldexp/7485ce.wgsl.expected.dxc.hlsl | 2 +- .../ldexp/7485ce.wgsl.expected.fxc.hlsl | 5 +- .../literal/ldexp/7485ce.wgsl.expected.glsl | 6 +- .../literal/ldexp/7485ce.wgsl.expected.msl | 2 +- .../literal/ldexp/7485ce.wgsl.expected.spvasm | 40 +- .../ldexp/7fa13c.wgsl.expected.dxc.hlsl | 2 +- .../ldexp/7fa13c.wgsl.expected.fxc.hlsl | 5 +- .../literal/ldexp/7fa13c.wgsl.expected.glsl | 6 +- .../literal/ldexp/7fa13c.wgsl.expected.msl | 2 +- .../literal/ldexp/7fa13c.wgsl.expected.spvasm | 40 +- .../builtins/gen/literal/ldexp/8a0c2f.wgsl | 45 + .../ldexp/8a0c2f.wgsl.expected.dxc.hlsl | 30 + .../ldexp/8a0c2f.wgsl.expected.fxc.hlsl | 35 + .../literal/ldexp/8a0c2f.wgsl.expected.glsl | 52 ++ .../literal/ldexp/8a0c2f.wgsl.expected.msl | 33 + .../literal/ldexp/8a0c2f.wgsl.expected.spvasm | 72 ++ .../literal/ldexp/8a0c2f.wgsl.expected.wgsl | 21 + .../builtins/gen/literal/ldexp/8e43e9.wgsl | 45 + .../ldexp/8e43e9.wgsl.expected.dxc.hlsl | 30 + .../ldexp/8e43e9.wgsl.expected.fxc.hlsl | 35 + .../literal/ldexp/8e43e9.wgsl.expected.glsl | 52 ++ .../literal/ldexp/8e43e9.wgsl.expected.msl | 33 + .../literal/ldexp/8e43e9.wgsl.expected.spvasm | 72 ++ .../literal/ldexp/8e43e9.wgsl.expected.wgsl | 21 + .../builtins/gen/literal/ldexp/a22679.wgsl | 43 + .../ldexp/a22679.wgsl.expected.dxc.hlsl | 30 + .../ldexp/a22679.wgsl.expected.fxc.hlsl | 30 + .../literal/ldexp/a22679.wgsl.expected.glsl | 49 ++ .../literal/ldexp/a22679.wgsl.expected.msl | 33 + .../literal/ldexp/a22679.wgsl.expected.spvasm | 67 ++ .../literal/ldexp/a22679.wgsl.expected.wgsl | 19 + .../ldexp/a31cdc.wgsl.expected.dxc.hlsl | 2 +- .../ldexp/a31cdc.wgsl.expected.fxc.hlsl | 2 +- .../literal/ldexp/a31cdc.wgsl.expected.glsl | 6 +- .../literal/ldexp/a31cdc.wgsl.expected.msl | 2 +- .../literal/ldexp/a31cdc.wgsl.expected.spvasm | 41 +- .../builtins/gen/literal/ldexp/a6126e.wgsl | 43 + .../ldexp/a6126e.wgsl.expected.dxc.hlsl | 30 + .../ldexp/a6126e.wgsl.expected.fxc.hlsl | 30 + .../literal/ldexp/a6126e.wgsl.expected.glsl | 49 ++ .../literal/ldexp/a6126e.wgsl.expected.msl | 33 + .../literal/ldexp/a6126e.wgsl.expected.spvasm | 67 ++ .../literal/ldexp/a6126e.wgsl.expected.wgsl | 19 + .../ldexp/abd718.wgsl.expected.dxc.hlsl | 2 +- .../ldexp/abd718.wgsl.expected.fxc.hlsl | 2 +- .../literal/ldexp/abd718.wgsl.expected.glsl | 6 +- .../literal/ldexp/abd718.wgsl.expected.msl | 2 +- .../literal/ldexp/abd718.wgsl.expected.spvasm | 41 +- .../builtins/gen/literal/ldexp/c9d0b7.wgsl | 43 + .../ldexp/c9d0b7.wgsl.expected.dxc.hlsl | 30 + .../ldexp/c9d0b7.wgsl.expected.fxc.hlsl | 30 + .../literal/ldexp/c9d0b7.wgsl.expected.glsl | 49 ++ .../literal/ldexp/c9d0b7.wgsl.expected.msl | 33 + .../literal/ldexp/c9d0b7.wgsl.expected.spvasm | 64 ++ .../literal/ldexp/c9d0b7.wgsl.expected.wgsl | 19 + .../builtins/gen/literal/ldexp/cb0faf.wgsl | 43 + .../ldexp/cb0faf.wgsl.expected.dxc.hlsl | 30 + .../ldexp/cb0faf.wgsl.expected.fxc.hlsl | 30 + .../literal/ldexp/cb0faf.wgsl.expected.glsl | 49 ++ .../literal/ldexp/cb0faf.wgsl.expected.msl | 33 + .../literal/ldexp/cb0faf.wgsl.expected.spvasm | 65 ++ .../literal/ldexp/cb0faf.wgsl.expected.wgsl | 19 + .../ldexp/cc9cde.wgsl.expected.dxc.hlsl | 2 +- .../ldexp/cc9cde.wgsl.expected.fxc.hlsl | 2 +- .../literal/ldexp/cc9cde.wgsl.expected.glsl | 6 +- .../literal/ldexp/cc9cde.wgsl.expected.msl | 2 +- .../literal/ldexp/cc9cde.wgsl.expected.spvasm | 37 +- .../ldexp/db8b49.wgsl.expected.dxc.hlsl | 2 +- .../ldexp/db8b49.wgsl.expected.fxc.hlsl | 2 +- .../literal/ldexp/db8b49.wgsl.expected.glsl | 6 +- .../literal/ldexp/db8b49.wgsl.expected.msl | 2 +- .../literal/ldexp/db8b49.wgsl.expected.spvasm | 35 +- .../builtins/gen/literal/ldexp/fdbc7b.wgsl | 43 + .../ldexp/fdbc7b.wgsl.expected.dxc.hlsl | 30 + .../ldexp/fdbc7b.wgsl.expected.fxc.hlsl | 30 + .../literal/ldexp/fdbc7b.wgsl.expected.glsl | 49 ++ .../literal/ldexp/fdbc7b.wgsl.expected.msl | 33 + .../literal/ldexp/fdbc7b.wgsl.expected.spvasm | 64 ++ .../literal/ldexp/fdbc7b.wgsl.expected.wgsl | 19 + test/tint/builtins/gen/var/ldexp/082c1f.wgsl | 47 + .../var/ldexp/082c1f.wgsl.expected.dxc.hlsl | 31 + .../var/ldexp/082c1f.wgsl.expected.fxc.hlsl | 37 + .../gen/var/ldexp/082c1f.wgsl.expected.glsl | 55 ++ .../gen/var/ldexp/082c1f.wgsl.expected.msl | 34 + .../gen/var/ldexp/082c1f.wgsl.expected.spvasm | 78 ++ .../gen/var/ldexp/082c1f.wgsl.expected.wgsl | 23 + test/tint/builtins/gen/var/ldexp/217a31.wgsl | 47 + .../var/ldexp/217a31.wgsl.expected.dxc.hlsl | 31 + .../var/ldexp/217a31.wgsl.expected.fxc.hlsl | 37 + .../gen/var/ldexp/217a31.wgsl.expected.glsl | 55 ++ .../gen/var/ldexp/217a31.wgsl.expected.msl | 34 + .../gen/var/ldexp/217a31.wgsl.expected.spvasm | 82 ++ .../gen/var/ldexp/217a31.wgsl.expected.wgsl | 23 + test/tint/builtins/gen/var/ldexp/2bfc68.wgsl | 45 + .../var/ldexp/2bfc68.wgsl.expected.dxc.hlsl | 31 + .../var/ldexp/2bfc68.wgsl.expected.fxc.hlsl | 31 + .../gen/var/ldexp/2bfc68.wgsl.expected.glsl | 52 ++ .../gen/var/ldexp/2bfc68.wgsl.expected.msl | 34 + .../gen/var/ldexp/2bfc68.wgsl.expected.spvasm | 78 ++ .../gen/var/ldexp/2bfc68.wgsl.expected.wgsl | 21 + test/tint/builtins/gen/var/ldexp/2c6370.wgsl | 45 + .../var/ldexp/2c6370.wgsl.expected.dxc.hlsl | 30 + .../var/ldexp/2c6370.wgsl.expected.fxc.hlsl | 30 + .../gen/var/ldexp/2c6370.wgsl.expected.glsl | 49 ++ .../gen/var/ldexp/2c6370.wgsl.expected.msl | 33 + .../gen/var/ldexp/2c6370.wgsl.expected.spvasm | 67 ++ .../gen/var/ldexp/2c6370.wgsl.expected.wgsl | 21 + test/tint/builtins/gen/var/ldexp/376938.wgsl | 45 + .../var/ldexp/376938.wgsl.expected.dxc.hlsl | 31 + .../var/ldexp/376938.wgsl.expected.fxc.hlsl | 31 + .../gen/var/ldexp/376938.wgsl.expected.glsl | 52 ++ .../gen/var/ldexp/376938.wgsl.expected.msl | 34 + .../gen/var/ldexp/376938.wgsl.expected.spvasm | 76 ++ .../gen/var/ldexp/376938.wgsl.expected.wgsl | 21 + .../var/ldexp/3d90b4.wgsl.expected.fxc.hlsl | 6 +- test/tint/builtins/gen/var/ldexp/4a3ad9.wgsl | 45 + .../var/ldexp/4a3ad9.wgsl.expected.dxc.hlsl | 30 + .../var/ldexp/4a3ad9.wgsl.expected.fxc.hlsl | 30 + .../gen/var/ldexp/4a3ad9.wgsl.expected.glsl | 49 ++ .../gen/var/ldexp/4a3ad9.wgsl.expected.msl | 33 + .../gen/var/ldexp/4a3ad9.wgsl.expected.spvasm | 67 ++ .../gen/var/ldexp/4a3ad9.wgsl.expected.wgsl | 21 + test/tint/builtins/gen/var/ldexp/593ff3.wgsl | 45 + .../var/ldexp/593ff3.wgsl.expected.dxc.hlsl | 31 + .../var/ldexp/593ff3.wgsl.expected.fxc.hlsl | 31 + .../gen/var/ldexp/593ff3.wgsl.expected.glsl | 52 ++ .../gen/var/ldexp/593ff3.wgsl.expected.msl | 34 + .../gen/var/ldexp/593ff3.wgsl.expected.spvasm | 76 ++ .../gen/var/ldexp/593ff3.wgsl.expected.wgsl | 21 + .../var/ldexp/624e0c.wgsl.expected.fxc.hlsl | 6 +- test/tint/builtins/gen/var/ldexp/65a7bd.wgsl | 45 + .../var/ldexp/65a7bd.wgsl.expected.dxc.hlsl | 31 + .../var/ldexp/65a7bd.wgsl.expected.fxc.hlsl | 31 + .../gen/var/ldexp/65a7bd.wgsl.expected.glsl | 52 ++ .../gen/var/ldexp/65a7bd.wgsl.expected.msl | 34 + .../gen/var/ldexp/65a7bd.wgsl.expected.spvasm | 74 ++ .../gen/var/ldexp/65a7bd.wgsl.expected.wgsl | 21 + test/tint/builtins/gen/var/ldexp/71ebe3.wgsl | 45 + .../var/ldexp/71ebe3.wgsl.expected.dxc.hlsl | 31 + .../var/ldexp/71ebe3.wgsl.expected.fxc.hlsl | 31 + .../gen/var/ldexp/71ebe3.wgsl.expected.glsl | 52 ++ .../gen/var/ldexp/71ebe3.wgsl.expected.msl | 34 + .../gen/var/ldexp/71ebe3.wgsl.expected.spvasm | 73 ++ .../gen/var/ldexp/71ebe3.wgsl.expected.wgsl | 21 + .../var/ldexp/7485ce.wgsl.expected.fxc.hlsl | 6 +- .../var/ldexp/7fa13c.wgsl.expected.fxc.hlsl | 6 +- test/tint/builtins/gen/var/ldexp/8a0c2f.wgsl | 47 + .../var/ldexp/8a0c2f.wgsl.expected.dxc.hlsl | 31 + .../var/ldexp/8a0c2f.wgsl.expected.fxc.hlsl | 37 + .../gen/var/ldexp/8a0c2f.wgsl.expected.glsl | 55 ++ .../gen/var/ldexp/8a0c2f.wgsl.expected.msl | 34 + .../gen/var/ldexp/8a0c2f.wgsl.expected.spvasm | 82 ++ .../gen/var/ldexp/8a0c2f.wgsl.expected.wgsl | 23 + test/tint/builtins/gen/var/ldexp/8e43e9.wgsl | 47 + .../var/ldexp/8e43e9.wgsl.expected.dxc.hlsl | 31 + .../var/ldexp/8e43e9.wgsl.expected.fxc.hlsl | 37 + .../gen/var/ldexp/8e43e9.wgsl.expected.glsl | 55 ++ .../gen/var/ldexp/8e43e9.wgsl.expected.msl | 34 + .../gen/var/ldexp/8e43e9.wgsl.expected.spvasm | 82 ++ .../gen/var/ldexp/8e43e9.wgsl.expected.wgsl | 23 + test/tint/builtins/gen/var/ldexp/a22679.wgsl | 45 + .../var/ldexp/a22679.wgsl.expected.dxc.hlsl | 31 + .../var/ldexp/a22679.wgsl.expected.fxc.hlsl | 31 + .../gen/var/ldexp/a22679.wgsl.expected.glsl | 52 ++ .../gen/var/ldexp/a22679.wgsl.expected.msl | 34 + .../gen/var/ldexp/a22679.wgsl.expected.spvasm | 76 ++ .../gen/var/ldexp/a22679.wgsl.expected.wgsl | 21 + test/tint/builtins/gen/var/ldexp/a6126e.wgsl | 45 + .../var/ldexp/a6126e.wgsl.expected.dxc.hlsl | 31 + .../var/ldexp/a6126e.wgsl.expected.fxc.hlsl | 31 + .../gen/var/ldexp/a6126e.wgsl.expected.glsl | 52 ++ .../gen/var/ldexp/a6126e.wgsl.expected.msl | 34 + .../gen/var/ldexp/a6126e.wgsl.expected.spvasm | 78 ++ .../gen/var/ldexp/a6126e.wgsl.expected.wgsl | 21 + test/tint/builtins/gen/var/ldexp/c9d0b7.wgsl | 45 + .../var/ldexp/c9d0b7.wgsl.expected.dxc.hlsl | 31 + .../var/ldexp/c9d0b7.wgsl.expected.fxc.hlsl | 31 + .../gen/var/ldexp/c9d0b7.wgsl.expected.glsl | 52 ++ .../gen/var/ldexp/c9d0b7.wgsl.expected.msl | 34 + .../gen/var/ldexp/c9d0b7.wgsl.expected.spvasm | 71 ++ .../gen/var/ldexp/c9d0b7.wgsl.expected.wgsl | 21 + test/tint/builtins/gen/var/ldexp/cb0faf.wgsl | 45 + .../var/ldexp/cb0faf.wgsl.expected.dxc.hlsl | 30 + .../var/ldexp/cb0faf.wgsl.expected.fxc.hlsl | 30 + .../gen/var/ldexp/cb0faf.wgsl.expected.glsl | 49 ++ .../gen/var/ldexp/cb0faf.wgsl.expected.msl | 33 + .../gen/var/ldexp/cb0faf.wgsl.expected.spvasm | 65 ++ .../gen/var/ldexp/cb0faf.wgsl.expected.wgsl | 21 + test/tint/builtins/gen/var/ldexp/fdbc7b.wgsl | 45 + .../var/ldexp/fdbc7b.wgsl.expected.dxc.hlsl | 30 + .../var/ldexp/fdbc7b.wgsl.expected.fxc.hlsl | 30 + .../gen/var/ldexp/fdbc7b.wgsl.expected.glsl | 49 ++ .../gen/var/ldexp/fdbc7b.wgsl.expected.msl | 33 + .../gen/var/ldexp/fdbc7b.wgsl.expected.spvasm | 64 ++ .../gen/var/ldexp/fdbc7b.wgsl.expected.wgsl | 21 + .../0-opt.spvasm | 3 +- .../0-opt.wgsl | 2 +- .../0-opt.spvasm | 3 +- .../0-opt.wgsl | 2 +- 277 files changed, 9797 insertions(+), 623 deletions(-) create mode 100644 test/tint/builtins/gen/literal/ldexp/082c1f.wgsl create mode 100644 test/tint/builtins/gen/literal/ldexp/082c1f.wgsl.expected.dxc.hlsl create mode 100644 test/tint/builtins/gen/literal/ldexp/082c1f.wgsl.expected.fxc.hlsl create mode 100644 test/tint/builtins/gen/literal/ldexp/082c1f.wgsl.expected.glsl create mode 100644 test/tint/builtins/gen/literal/ldexp/082c1f.wgsl.expected.msl create mode 100644 test/tint/builtins/gen/literal/ldexp/082c1f.wgsl.expected.spvasm create mode 100644 test/tint/builtins/gen/literal/ldexp/082c1f.wgsl.expected.wgsl create mode 100644 test/tint/builtins/gen/literal/ldexp/217a31.wgsl create mode 100644 test/tint/builtins/gen/literal/ldexp/217a31.wgsl.expected.dxc.hlsl create mode 100644 test/tint/builtins/gen/literal/ldexp/217a31.wgsl.expected.fxc.hlsl create mode 100644 test/tint/builtins/gen/literal/ldexp/217a31.wgsl.expected.glsl create mode 100644 test/tint/builtins/gen/literal/ldexp/217a31.wgsl.expected.msl create mode 100644 test/tint/builtins/gen/literal/ldexp/217a31.wgsl.expected.spvasm create mode 100644 test/tint/builtins/gen/literal/ldexp/217a31.wgsl.expected.wgsl create mode 100644 test/tint/builtins/gen/literal/ldexp/2bfc68.wgsl create mode 100644 test/tint/builtins/gen/literal/ldexp/2bfc68.wgsl.expected.dxc.hlsl create mode 100644 test/tint/builtins/gen/literal/ldexp/2bfc68.wgsl.expected.fxc.hlsl create mode 100644 test/tint/builtins/gen/literal/ldexp/2bfc68.wgsl.expected.glsl create mode 100644 test/tint/builtins/gen/literal/ldexp/2bfc68.wgsl.expected.msl create mode 100644 test/tint/builtins/gen/literal/ldexp/2bfc68.wgsl.expected.spvasm create mode 100644 test/tint/builtins/gen/literal/ldexp/2bfc68.wgsl.expected.wgsl create mode 100644 test/tint/builtins/gen/literal/ldexp/2c6370.wgsl create mode 100644 test/tint/builtins/gen/literal/ldexp/2c6370.wgsl.expected.dxc.hlsl create mode 100644 test/tint/builtins/gen/literal/ldexp/2c6370.wgsl.expected.fxc.hlsl create mode 100644 test/tint/builtins/gen/literal/ldexp/2c6370.wgsl.expected.glsl create mode 100644 test/tint/builtins/gen/literal/ldexp/2c6370.wgsl.expected.msl create mode 100644 test/tint/builtins/gen/literal/ldexp/2c6370.wgsl.expected.spvasm create mode 100644 test/tint/builtins/gen/literal/ldexp/2c6370.wgsl.expected.wgsl create mode 100644 test/tint/builtins/gen/literal/ldexp/376938.wgsl create mode 100644 test/tint/builtins/gen/literal/ldexp/376938.wgsl.expected.dxc.hlsl create mode 100644 test/tint/builtins/gen/literal/ldexp/376938.wgsl.expected.fxc.hlsl create mode 100644 test/tint/builtins/gen/literal/ldexp/376938.wgsl.expected.glsl create mode 100644 test/tint/builtins/gen/literal/ldexp/376938.wgsl.expected.msl create mode 100644 test/tint/builtins/gen/literal/ldexp/376938.wgsl.expected.spvasm create mode 100644 test/tint/builtins/gen/literal/ldexp/376938.wgsl.expected.wgsl create mode 100644 test/tint/builtins/gen/literal/ldexp/4a3ad9.wgsl create mode 100644 test/tint/builtins/gen/literal/ldexp/4a3ad9.wgsl.expected.dxc.hlsl create mode 100644 test/tint/builtins/gen/literal/ldexp/4a3ad9.wgsl.expected.fxc.hlsl create mode 100644 test/tint/builtins/gen/literal/ldexp/4a3ad9.wgsl.expected.glsl create mode 100644 test/tint/builtins/gen/literal/ldexp/4a3ad9.wgsl.expected.msl create mode 100644 test/tint/builtins/gen/literal/ldexp/4a3ad9.wgsl.expected.spvasm create mode 100644 test/tint/builtins/gen/literal/ldexp/4a3ad9.wgsl.expected.wgsl create mode 100644 test/tint/builtins/gen/literal/ldexp/593ff3.wgsl create mode 100644 test/tint/builtins/gen/literal/ldexp/593ff3.wgsl.expected.dxc.hlsl create mode 100644 test/tint/builtins/gen/literal/ldexp/593ff3.wgsl.expected.fxc.hlsl create mode 100644 test/tint/builtins/gen/literal/ldexp/593ff3.wgsl.expected.glsl create mode 100644 test/tint/builtins/gen/literal/ldexp/593ff3.wgsl.expected.msl create mode 100644 test/tint/builtins/gen/literal/ldexp/593ff3.wgsl.expected.spvasm create mode 100644 test/tint/builtins/gen/literal/ldexp/593ff3.wgsl.expected.wgsl create mode 100644 test/tint/builtins/gen/literal/ldexp/65a7bd.wgsl create mode 100644 test/tint/builtins/gen/literal/ldexp/65a7bd.wgsl.expected.dxc.hlsl create mode 100644 test/tint/builtins/gen/literal/ldexp/65a7bd.wgsl.expected.fxc.hlsl create mode 100644 test/tint/builtins/gen/literal/ldexp/65a7bd.wgsl.expected.glsl create mode 100644 test/tint/builtins/gen/literal/ldexp/65a7bd.wgsl.expected.msl create mode 100644 test/tint/builtins/gen/literal/ldexp/65a7bd.wgsl.expected.spvasm create mode 100644 test/tint/builtins/gen/literal/ldexp/65a7bd.wgsl.expected.wgsl create mode 100644 test/tint/builtins/gen/literal/ldexp/71ebe3.wgsl create mode 100644 test/tint/builtins/gen/literal/ldexp/71ebe3.wgsl.expected.dxc.hlsl create mode 100644 test/tint/builtins/gen/literal/ldexp/71ebe3.wgsl.expected.fxc.hlsl create mode 100644 test/tint/builtins/gen/literal/ldexp/71ebe3.wgsl.expected.glsl create mode 100644 test/tint/builtins/gen/literal/ldexp/71ebe3.wgsl.expected.msl create mode 100644 test/tint/builtins/gen/literal/ldexp/71ebe3.wgsl.expected.spvasm create mode 100644 test/tint/builtins/gen/literal/ldexp/71ebe3.wgsl.expected.wgsl create mode 100644 test/tint/builtins/gen/literal/ldexp/8a0c2f.wgsl create mode 100644 test/tint/builtins/gen/literal/ldexp/8a0c2f.wgsl.expected.dxc.hlsl create mode 100644 test/tint/builtins/gen/literal/ldexp/8a0c2f.wgsl.expected.fxc.hlsl create mode 100644 test/tint/builtins/gen/literal/ldexp/8a0c2f.wgsl.expected.glsl create mode 100644 test/tint/builtins/gen/literal/ldexp/8a0c2f.wgsl.expected.msl create mode 100644 test/tint/builtins/gen/literal/ldexp/8a0c2f.wgsl.expected.spvasm create mode 100644 test/tint/builtins/gen/literal/ldexp/8a0c2f.wgsl.expected.wgsl create mode 100644 test/tint/builtins/gen/literal/ldexp/8e43e9.wgsl create mode 100644 test/tint/builtins/gen/literal/ldexp/8e43e9.wgsl.expected.dxc.hlsl create mode 100644 test/tint/builtins/gen/literal/ldexp/8e43e9.wgsl.expected.fxc.hlsl create mode 100644 test/tint/builtins/gen/literal/ldexp/8e43e9.wgsl.expected.glsl create mode 100644 test/tint/builtins/gen/literal/ldexp/8e43e9.wgsl.expected.msl create mode 100644 test/tint/builtins/gen/literal/ldexp/8e43e9.wgsl.expected.spvasm create mode 100644 test/tint/builtins/gen/literal/ldexp/8e43e9.wgsl.expected.wgsl create mode 100644 test/tint/builtins/gen/literal/ldexp/a22679.wgsl create mode 100644 test/tint/builtins/gen/literal/ldexp/a22679.wgsl.expected.dxc.hlsl create mode 100644 test/tint/builtins/gen/literal/ldexp/a22679.wgsl.expected.fxc.hlsl create mode 100644 test/tint/builtins/gen/literal/ldexp/a22679.wgsl.expected.glsl create mode 100644 test/tint/builtins/gen/literal/ldexp/a22679.wgsl.expected.msl create mode 100644 test/tint/builtins/gen/literal/ldexp/a22679.wgsl.expected.spvasm create mode 100644 test/tint/builtins/gen/literal/ldexp/a22679.wgsl.expected.wgsl create mode 100644 test/tint/builtins/gen/literal/ldexp/a6126e.wgsl create mode 100644 test/tint/builtins/gen/literal/ldexp/a6126e.wgsl.expected.dxc.hlsl create mode 100644 test/tint/builtins/gen/literal/ldexp/a6126e.wgsl.expected.fxc.hlsl create mode 100644 test/tint/builtins/gen/literal/ldexp/a6126e.wgsl.expected.glsl create mode 100644 test/tint/builtins/gen/literal/ldexp/a6126e.wgsl.expected.msl create mode 100644 test/tint/builtins/gen/literal/ldexp/a6126e.wgsl.expected.spvasm create mode 100644 test/tint/builtins/gen/literal/ldexp/a6126e.wgsl.expected.wgsl create mode 100644 test/tint/builtins/gen/literal/ldexp/c9d0b7.wgsl create mode 100644 test/tint/builtins/gen/literal/ldexp/c9d0b7.wgsl.expected.dxc.hlsl create mode 100644 test/tint/builtins/gen/literal/ldexp/c9d0b7.wgsl.expected.fxc.hlsl create mode 100644 test/tint/builtins/gen/literal/ldexp/c9d0b7.wgsl.expected.glsl create mode 100644 test/tint/builtins/gen/literal/ldexp/c9d0b7.wgsl.expected.msl create mode 100644 test/tint/builtins/gen/literal/ldexp/c9d0b7.wgsl.expected.spvasm create mode 100644 test/tint/builtins/gen/literal/ldexp/c9d0b7.wgsl.expected.wgsl create mode 100644 test/tint/builtins/gen/literal/ldexp/cb0faf.wgsl create mode 100644 test/tint/builtins/gen/literal/ldexp/cb0faf.wgsl.expected.dxc.hlsl create mode 100644 test/tint/builtins/gen/literal/ldexp/cb0faf.wgsl.expected.fxc.hlsl create mode 100644 test/tint/builtins/gen/literal/ldexp/cb0faf.wgsl.expected.glsl create mode 100644 test/tint/builtins/gen/literal/ldexp/cb0faf.wgsl.expected.msl create mode 100644 test/tint/builtins/gen/literal/ldexp/cb0faf.wgsl.expected.spvasm create mode 100644 test/tint/builtins/gen/literal/ldexp/cb0faf.wgsl.expected.wgsl create mode 100644 test/tint/builtins/gen/literal/ldexp/fdbc7b.wgsl create mode 100644 test/tint/builtins/gen/literal/ldexp/fdbc7b.wgsl.expected.dxc.hlsl create mode 100644 test/tint/builtins/gen/literal/ldexp/fdbc7b.wgsl.expected.fxc.hlsl create mode 100644 test/tint/builtins/gen/literal/ldexp/fdbc7b.wgsl.expected.glsl create mode 100644 test/tint/builtins/gen/literal/ldexp/fdbc7b.wgsl.expected.msl create mode 100644 test/tint/builtins/gen/literal/ldexp/fdbc7b.wgsl.expected.spvasm create mode 100644 test/tint/builtins/gen/literal/ldexp/fdbc7b.wgsl.expected.wgsl create mode 100644 test/tint/builtins/gen/var/ldexp/082c1f.wgsl create mode 100644 test/tint/builtins/gen/var/ldexp/082c1f.wgsl.expected.dxc.hlsl create mode 100644 test/tint/builtins/gen/var/ldexp/082c1f.wgsl.expected.fxc.hlsl create mode 100644 test/tint/builtins/gen/var/ldexp/082c1f.wgsl.expected.glsl create mode 100644 test/tint/builtins/gen/var/ldexp/082c1f.wgsl.expected.msl create mode 100644 test/tint/builtins/gen/var/ldexp/082c1f.wgsl.expected.spvasm create mode 100644 test/tint/builtins/gen/var/ldexp/082c1f.wgsl.expected.wgsl create mode 100644 test/tint/builtins/gen/var/ldexp/217a31.wgsl create mode 100644 test/tint/builtins/gen/var/ldexp/217a31.wgsl.expected.dxc.hlsl create mode 100644 test/tint/builtins/gen/var/ldexp/217a31.wgsl.expected.fxc.hlsl create mode 100644 test/tint/builtins/gen/var/ldexp/217a31.wgsl.expected.glsl create mode 100644 test/tint/builtins/gen/var/ldexp/217a31.wgsl.expected.msl create mode 100644 test/tint/builtins/gen/var/ldexp/217a31.wgsl.expected.spvasm create mode 100644 test/tint/builtins/gen/var/ldexp/217a31.wgsl.expected.wgsl create mode 100644 test/tint/builtins/gen/var/ldexp/2bfc68.wgsl create mode 100644 test/tint/builtins/gen/var/ldexp/2bfc68.wgsl.expected.dxc.hlsl create mode 100644 test/tint/builtins/gen/var/ldexp/2bfc68.wgsl.expected.fxc.hlsl create mode 100644 test/tint/builtins/gen/var/ldexp/2bfc68.wgsl.expected.glsl create mode 100644 test/tint/builtins/gen/var/ldexp/2bfc68.wgsl.expected.msl create mode 100644 test/tint/builtins/gen/var/ldexp/2bfc68.wgsl.expected.spvasm create mode 100644 test/tint/builtins/gen/var/ldexp/2bfc68.wgsl.expected.wgsl create mode 100644 test/tint/builtins/gen/var/ldexp/2c6370.wgsl create mode 100644 test/tint/builtins/gen/var/ldexp/2c6370.wgsl.expected.dxc.hlsl create mode 100644 test/tint/builtins/gen/var/ldexp/2c6370.wgsl.expected.fxc.hlsl create mode 100644 test/tint/builtins/gen/var/ldexp/2c6370.wgsl.expected.glsl create mode 100644 test/tint/builtins/gen/var/ldexp/2c6370.wgsl.expected.msl create mode 100644 test/tint/builtins/gen/var/ldexp/2c6370.wgsl.expected.spvasm create mode 100644 test/tint/builtins/gen/var/ldexp/2c6370.wgsl.expected.wgsl create mode 100644 test/tint/builtins/gen/var/ldexp/376938.wgsl create mode 100644 test/tint/builtins/gen/var/ldexp/376938.wgsl.expected.dxc.hlsl create mode 100644 test/tint/builtins/gen/var/ldexp/376938.wgsl.expected.fxc.hlsl create mode 100644 test/tint/builtins/gen/var/ldexp/376938.wgsl.expected.glsl create mode 100644 test/tint/builtins/gen/var/ldexp/376938.wgsl.expected.msl create mode 100644 test/tint/builtins/gen/var/ldexp/376938.wgsl.expected.spvasm create mode 100644 test/tint/builtins/gen/var/ldexp/376938.wgsl.expected.wgsl create mode 100644 test/tint/builtins/gen/var/ldexp/4a3ad9.wgsl create mode 100644 test/tint/builtins/gen/var/ldexp/4a3ad9.wgsl.expected.dxc.hlsl create mode 100644 test/tint/builtins/gen/var/ldexp/4a3ad9.wgsl.expected.fxc.hlsl create mode 100644 test/tint/builtins/gen/var/ldexp/4a3ad9.wgsl.expected.glsl create mode 100644 test/tint/builtins/gen/var/ldexp/4a3ad9.wgsl.expected.msl create mode 100644 test/tint/builtins/gen/var/ldexp/4a3ad9.wgsl.expected.spvasm create mode 100644 test/tint/builtins/gen/var/ldexp/4a3ad9.wgsl.expected.wgsl create mode 100644 test/tint/builtins/gen/var/ldexp/593ff3.wgsl create mode 100644 test/tint/builtins/gen/var/ldexp/593ff3.wgsl.expected.dxc.hlsl create mode 100644 test/tint/builtins/gen/var/ldexp/593ff3.wgsl.expected.fxc.hlsl create mode 100644 test/tint/builtins/gen/var/ldexp/593ff3.wgsl.expected.glsl create mode 100644 test/tint/builtins/gen/var/ldexp/593ff3.wgsl.expected.msl create mode 100644 test/tint/builtins/gen/var/ldexp/593ff3.wgsl.expected.spvasm create mode 100644 test/tint/builtins/gen/var/ldexp/593ff3.wgsl.expected.wgsl create mode 100644 test/tint/builtins/gen/var/ldexp/65a7bd.wgsl create mode 100644 test/tint/builtins/gen/var/ldexp/65a7bd.wgsl.expected.dxc.hlsl create mode 100644 test/tint/builtins/gen/var/ldexp/65a7bd.wgsl.expected.fxc.hlsl create mode 100644 test/tint/builtins/gen/var/ldexp/65a7bd.wgsl.expected.glsl create mode 100644 test/tint/builtins/gen/var/ldexp/65a7bd.wgsl.expected.msl create mode 100644 test/tint/builtins/gen/var/ldexp/65a7bd.wgsl.expected.spvasm create mode 100644 test/tint/builtins/gen/var/ldexp/65a7bd.wgsl.expected.wgsl create mode 100644 test/tint/builtins/gen/var/ldexp/71ebe3.wgsl create mode 100644 test/tint/builtins/gen/var/ldexp/71ebe3.wgsl.expected.dxc.hlsl create mode 100644 test/tint/builtins/gen/var/ldexp/71ebe3.wgsl.expected.fxc.hlsl create mode 100644 test/tint/builtins/gen/var/ldexp/71ebe3.wgsl.expected.glsl create mode 100644 test/tint/builtins/gen/var/ldexp/71ebe3.wgsl.expected.msl create mode 100644 test/tint/builtins/gen/var/ldexp/71ebe3.wgsl.expected.spvasm create mode 100644 test/tint/builtins/gen/var/ldexp/71ebe3.wgsl.expected.wgsl create mode 100644 test/tint/builtins/gen/var/ldexp/8a0c2f.wgsl create mode 100644 test/tint/builtins/gen/var/ldexp/8a0c2f.wgsl.expected.dxc.hlsl create mode 100644 test/tint/builtins/gen/var/ldexp/8a0c2f.wgsl.expected.fxc.hlsl create mode 100644 test/tint/builtins/gen/var/ldexp/8a0c2f.wgsl.expected.glsl create mode 100644 test/tint/builtins/gen/var/ldexp/8a0c2f.wgsl.expected.msl create mode 100644 test/tint/builtins/gen/var/ldexp/8a0c2f.wgsl.expected.spvasm create mode 100644 test/tint/builtins/gen/var/ldexp/8a0c2f.wgsl.expected.wgsl create mode 100644 test/tint/builtins/gen/var/ldexp/8e43e9.wgsl create mode 100644 test/tint/builtins/gen/var/ldexp/8e43e9.wgsl.expected.dxc.hlsl create mode 100644 test/tint/builtins/gen/var/ldexp/8e43e9.wgsl.expected.fxc.hlsl create mode 100644 test/tint/builtins/gen/var/ldexp/8e43e9.wgsl.expected.glsl create mode 100644 test/tint/builtins/gen/var/ldexp/8e43e9.wgsl.expected.msl create mode 100644 test/tint/builtins/gen/var/ldexp/8e43e9.wgsl.expected.spvasm create mode 100644 test/tint/builtins/gen/var/ldexp/8e43e9.wgsl.expected.wgsl create mode 100644 test/tint/builtins/gen/var/ldexp/a22679.wgsl create mode 100644 test/tint/builtins/gen/var/ldexp/a22679.wgsl.expected.dxc.hlsl create mode 100644 test/tint/builtins/gen/var/ldexp/a22679.wgsl.expected.fxc.hlsl create mode 100644 test/tint/builtins/gen/var/ldexp/a22679.wgsl.expected.glsl create mode 100644 test/tint/builtins/gen/var/ldexp/a22679.wgsl.expected.msl create mode 100644 test/tint/builtins/gen/var/ldexp/a22679.wgsl.expected.spvasm create mode 100644 test/tint/builtins/gen/var/ldexp/a22679.wgsl.expected.wgsl create mode 100644 test/tint/builtins/gen/var/ldexp/a6126e.wgsl create mode 100644 test/tint/builtins/gen/var/ldexp/a6126e.wgsl.expected.dxc.hlsl create mode 100644 test/tint/builtins/gen/var/ldexp/a6126e.wgsl.expected.fxc.hlsl create mode 100644 test/tint/builtins/gen/var/ldexp/a6126e.wgsl.expected.glsl create mode 100644 test/tint/builtins/gen/var/ldexp/a6126e.wgsl.expected.msl create mode 100644 test/tint/builtins/gen/var/ldexp/a6126e.wgsl.expected.spvasm create mode 100644 test/tint/builtins/gen/var/ldexp/a6126e.wgsl.expected.wgsl create mode 100644 test/tint/builtins/gen/var/ldexp/c9d0b7.wgsl create mode 100644 test/tint/builtins/gen/var/ldexp/c9d0b7.wgsl.expected.dxc.hlsl create mode 100644 test/tint/builtins/gen/var/ldexp/c9d0b7.wgsl.expected.fxc.hlsl create mode 100644 test/tint/builtins/gen/var/ldexp/c9d0b7.wgsl.expected.glsl create mode 100644 test/tint/builtins/gen/var/ldexp/c9d0b7.wgsl.expected.msl create mode 100644 test/tint/builtins/gen/var/ldexp/c9d0b7.wgsl.expected.spvasm create mode 100644 test/tint/builtins/gen/var/ldexp/c9d0b7.wgsl.expected.wgsl create mode 100644 test/tint/builtins/gen/var/ldexp/cb0faf.wgsl create mode 100644 test/tint/builtins/gen/var/ldexp/cb0faf.wgsl.expected.dxc.hlsl create mode 100644 test/tint/builtins/gen/var/ldexp/cb0faf.wgsl.expected.fxc.hlsl create mode 100644 test/tint/builtins/gen/var/ldexp/cb0faf.wgsl.expected.glsl create mode 100644 test/tint/builtins/gen/var/ldexp/cb0faf.wgsl.expected.msl create mode 100644 test/tint/builtins/gen/var/ldexp/cb0faf.wgsl.expected.spvasm create mode 100644 test/tint/builtins/gen/var/ldexp/cb0faf.wgsl.expected.wgsl create mode 100644 test/tint/builtins/gen/var/ldexp/fdbc7b.wgsl create mode 100644 test/tint/builtins/gen/var/ldexp/fdbc7b.wgsl.expected.dxc.hlsl create mode 100644 test/tint/builtins/gen/var/ldexp/fdbc7b.wgsl.expected.fxc.hlsl create mode 100644 test/tint/builtins/gen/var/ldexp/fdbc7b.wgsl.expected.glsl create mode 100644 test/tint/builtins/gen/var/ldexp/fdbc7b.wgsl.expected.msl create mode 100644 test/tint/builtins/gen/var/ldexp/fdbc7b.wgsl.expected.spvasm create mode 100644 test/tint/builtins/gen/var/ldexp/fdbc7b.wgsl.expected.wgsl diff --git a/src/tint/intrinsics.def b/src/tint/intrinsics.def index 2f6467e0db..2bb3fe75b0 100644 --- a/src/tint/intrinsics.def +++ b/src/tint/intrinsics.def @@ -226,6 +226,7 @@ match fia_fiu32: fa | ia | f32 | i32 | u32 match fa_f32: fa | f32 match fa_f32_f16: fa | f32 | f16 match ia_iu32: ia | i32 | u32 +match ia_i32: ia | i32 match fiu32_f16: f32 | i32 | u32 | f16 match fiu32: f32 | i32 | u32 match fi32_f16: f32 | i32 | f16 @@ -527,8 +528,8 @@ fn dot4U8Packed(u32, u32) -> u32 @const fn insertBits(vec, vec, u32, u32) -> vec @const fn inverseSqrt(T) -> T @const fn inverseSqrt(vec) -> vec -fn ldexp(T, i32) -> T -fn ldexp(vec, vec) -> vec +@const fn ldexp(T, U) -> T +@const fn ldexp(vec, vec) -> vec @const fn length(@test_value(0.0) T) -> T @const fn length(@test_value(0.0) vec) -> T @const fn log(T) -> T diff --git a/src/tint/resolver/const_eval.cc b/src/tint/resolver/const_eval.cc index 628975b348..29c57c7212 100644 --- a/src/tint/resolver/const_eval.cc +++ b/src/tint/resolver/const_eval.cc @@ -2654,6 +2654,48 @@ ConstEval::Result ConstEval::inverseSqrt(const type::Type* ty, return TransformElements(builder, ty, transform, args[0]); } +ConstEval::Result ConstEval::ldexp(const type::Type* ty, + utils::VectorRef args, + const Source& source) { + auto transform = [&](const constant::Value* c1, size_t index) { + auto create = [&](auto e1) -> ConstEval::Result { + using E1Type = decltype(e1); + // If e1 is AFloat, then e2 is AInt, otherwise it's i32 + using E2Type = std::conditional_t, AInt, i32>; + + E2Type e2; + auto* c2 = args[1]; + if (c2->Type()->Is()) { + e2 = c2->Index(index)->ValueAs(); + } else { + e2 = c2->ValueAs(); + } + + E2Type bias; + if constexpr (std::is_same_v) { + bias = 15; + } else if constexpr (std::is_same_v) { + bias = 127; + } else { + bias = 1023; + } + + if (e2 > bias + 1) { + AddError("e2 must be less than or equal to " + std::to_string(bias + 1), source); + return utils::Failure; + } + + auto target_ty = type::Type::DeepestElementOf(ty); + + auto r = std::ldexp(e1, static_cast(e2)); + return CreateScalar(builder, source, target_ty, E1Type{r}); + }; + return Dispatch_fa_f32_f16(create, c1); + }; + + return TransformElements(builder, ty, transform, args[0]); +} + ConstEval::Result ConstEval::length(const type::Type* ty, utils::VectorRef args, const Source& source) { diff --git a/src/tint/resolver/const_eval.h b/src/tint/resolver/const_eval.h index baeb7e468c..d75f5de2d4 100644 --- a/src/tint/resolver/const_eval.h +++ b/src/tint/resolver/const_eval.h @@ -725,6 +725,15 @@ class ConstEval { utils::VectorRef args, const Source& source); + /// ldexp builtin + /// @param ty the expression type + /// @param args the input arguments + /// @param source the source location + /// @return the result value, or null if the value cannot be calculated + Result ldexp(const type::Type* ty, + utils::VectorRef args, + const Source& source); + /// length builtin /// @param ty the expression type /// @param args the input arguments diff --git a/src/tint/resolver/const_eval_builtin_test.cc b/src/tint/resolver/const_eval_builtin_test.cc index 10070dbc62..76f82383e7 100644 --- a/src/tint/resolver/const_eval_builtin_test.cc +++ b/src/tint/resolver/const_eval_builtin_test.cc @@ -1550,6 +1550,71 @@ INSTANTIATE_TEST_SUITE_P( // testing::ValuesIn(Concat(ExtractBitsCases(), // ExtractBitsCases())))); +template +std::vector LdexpCases() { + using T2 = std::conditional_t, AInt, i32>; + T2 bias; + if constexpr (std::is_same_v) { + bias = 15; + } else if constexpr (std::is_same_v) { + bias = 127; + } else { + bias = 1023; + } + + auto compute = [](T e1, T2 e2) { return T{std::ldexp(e1.value, static_cast(e2.value))}; }; + + auto r = std::vector{ + C({T(0), T2(0)}, T(0)), // + C({T(7), T2(4)}, T(112)), // + C({T(7), T2(5)}, T(224)), // + C({T(7), T2(6)}, T(448)), // + C({T(7), T2(-4)}, T(0.4375)), // + C({T(7), T2(-5)}, T(0.21875)), // + C({T(7), T2(-6)}, T(0.109375)), // + // With bias exponent + C({T(0), T2(bias)}, T(0)), // + C({T(0), T2(bias + 1)}, T(0)), // + C({T(1), T2(bias)}, compute(T(1), T2(bias))), // + C({T(0.5), T2(bias)}, compute(T(0.5), T2(bias))), // + C({T(0.25), T2(bias)}, compute(T(0.25), T2(bias))), // + // The result may be zero if e2 + bias ≤ 0. + C({T(0), T2(-bias)}, T(0)), // + C({T(0), T2(-bias - 1)}, T(0)), // + C({T(0), T2(-bias - 2)}, T(0)), // + + // Vector tests + C({Vec(T(0), T(7), T(7)), Vec(T2(0), T2(4), T2(-4))}, Vec(T(0), T(112), T(0.4375))), + }; + + std::string e2_too_large_error_msg = + "12:34 error: e2 must be less than or equal to " + std::to_string(bias + 1); + auto val_overflow_error_msg = [](auto val) { + return "12:34 error: " + OverflowErrorMessage(val, FriendlyName()); + }; + ConcatInto(r, std::vector{ + // e2 is > bias + 1 + E({T(0), T2(bias + 2)}, e2_too_large_error_msg), + E({T(0), T2(bias + 1000)}, e2_too_large_error_msg), + E({T(0), T2::Highest()}, e2_too_large_error_msg), + // Result is inf + E({T(1), T2(bias + 1)}, val_overflow_error_msg(T::Inf())), + E({T(2), T2(bias + 1)}, val_overflow_error_msg(T::Inf())), + E({T::Highest(), T2(bias + 1)}, val_overflow_error_msg(T::Inf())), + E({T(-1), T2(bias + 1)}, val_overflow_error_msg(-T::Inf())), + E({T(-2), T2(bias + 1)}, val_overflow_error_msg(-T::Inf())), + E({T::Lowest(), T2(bias + 1)}, val_overflow_error_msg(-T::Inf())), + }); + return r; +} +INSTANTIATE_TEST_SUITE_P( // + Ldexp, + ResolverConstEvalBuiltinTest, + testing::Combine(testing::Values(sem::BuiltinType::kLdexp), + testing::ValuesIn(Concat(LdexpCases(), // + LdexpCases(), + LdexpCases())))); + template std::vector LengthCases() { const auto kSqrtOfHighest = T(std::sqrt(T::Highest())); diff --git a/src/tint/resolver/intrinsic_table.inl b/src/tint/resolver/intrinsic_table.inl index 926f6b50af..0507d94fd2 100644 --- a/src/tint/resolver/intrinsic_table.inl +++ b/src/tint/resolver/intrinsic_table.inl @@ -2112,6 +2112,40 @@ std::string IaIu32::String(MatchState*) const { return ss.str(); } +/// TypeMatcher for 'match ia_i32' +class IaI32 : public TypeMatcher { + public: + /// Checks whether the given type matches the matcher rules, and returns the + /// expected, canonicalized type on success. + /// Match may define and refine the template types and numbers in state. + /// @param state the MatchState + /// @param type the type to match + /// @returns the canonicalized type on match, otherwise nullptr + const type::Type* Match(MatchState& state, + const type::Type* type) const override; + /// @param state the MatchState + /// @return a string representation of the matcher. + std::string String(MatchState* state) const override; +}; + +const type::Type* IaI32::Match(MatchState& state, const type::Type* ty) const { + if (match_ia(state, ty)) { + return build_ia(state); + } + if (match_i32(state, ty)) { + return build_i32(state); + } + return nullptr; +} + +std::string IaI32::String(MatchState*) const { + std::stringstream ss; + // Note: We pass nullptr to the TypeMatcher::String() functions, as 'matcher's do not support + // template arguments, nor can they match sub-types. As such, they have no use for the MatchState. + ss << Ia().String(nullptr) << " or " << I32().String(nullptr); + return ss.str(); +} + /// TypeMatcher for 'match fiu32_f16' class Fiu32F16 : public TypeMatcher { public: @@ -2625,6 +2659,7 @@ class Matchers { FaF32 FaF32_; FaF32F16 FaF32F16_; IaIu32 IaIu32_; + IaI32 IaI32_; Fiu32F16 Fiu32F16_; Fiu32 Fiu32_; Fi32F16 Fi32F16_; @@ -2647,7 +2682,7 @@ class Matchers { ~Matchers(); /// The template types, types, and type matchers - TypeMatcher const* const type[71] = { + TypeMatcher const* const type[72] = { /* [0] */ &template_type_0_, /* [1] */ &template_type_1_, /* [2] */ &template_type_2_, @@ -2713,12 +2748,13 @@ class Matchers { /* [62] */ &FaF32_, /* [63] */ &FaF32F16_, /* [64] */ &IaIu32_, - /* [65] */ &Fiu32F16_, - /* [66] */ &Fiu32_, - /* [67] */ &Fi32F16_, - /* [68] */ &Fi32_, - /* [69] */ &F32F16_, - /* [70] */ &Iu32_, + /* [65] */ &IaI32_, + /* [66] */ &Fiu32F16_, + /* [67] */ &Fiu32_, + /* [68] */ &Fi32F16_, + /* [69] */ &Fi32_, + /* [70] */ &F32F16_, + /* [71] */ &Iu32_, }; /// The template numbers, and number matchers @@ -2785,7 +2821,7 @@ constexpr MatcherIndex kMatcherIndices[] = { /* [41] */ 0, /* [42] */ 23, /* [43] */ 0, - /* [44] */ 7, + /* [44] */ 1, /* [45] */ 48, /* [46] */ 0, /* [47] */ 0, @@ -6046,7 +6082,7 @@ constexpr ParameterInfo kParameters[] = { { /* [611] */ /* usage */ ParameterUsage::kNone, - /* matcher indices */ &kMatcherIndices[9], + /* matcher indices */ &kMatcherIndices[16], }, { /* [612] */ @@ -8054,137 +8090,137 @@ constexpr TemplateTypeInfo kTemplateTypes[] = { { /* [0] */ /* name */ "T", - /* matcher index */ 66, + /* matcher index */ 67, }, { /* [1] */ /* name */ "C", - /* matcher index */ 70, + /* matcher index */ 71, }, { /* [2] */ /* name */ "A", - /* matcher index */ 70, + /* matcher index */ 71, }, { /* [3] */ /* name */ "L", - /* matcher index */ 70, + /* matcher index */ 71, }, { /* [4] */ /* name */ "T", - /* matcher index */ 66, + /* matcher index */ 67, }, { /* [5] */ /* name */ "C", - /* matcher index */ 70, + /* matcher index */ 71, }, { /* [6] */ /* name */ "L", - /* matcher index */ 70, + /* matcher index */ 71, }, { /* [7] */ /* name */ "T", - /* matcher index */ 66, + /* matcher index */ 67, }, { /* [8] */ /* name */ "C", - /* matcher index */ 70, + /* matcher index */ 71, }, { /* [9] */ /* name */ "S", - /* matcher index */ 70, + /* matcher index */ 71, }, { /* [10] */ /* name */ "T", - /* matcher index */ 66, + /* matcher index */ 63, }, { /* [11] */ - /* name */ "L", - /* matcher index */ 70, + /* name */ "U", + /* matcher index */ 65, }, { /* [12] */ /* name */ "T", - /* matcher index */ 9, + /* matcher index */ 67, }, { /* [13] */ - /* name */ "U", - /* matcher index */ 54, + /* name */ "L", + /* matcher index */ 71, }, { /* [14] */ /* name */ "T", - /* matcher index */ 10, + /* matcher index */ 9, }, { /* [15] */ /* name */ "U", - /* matcher index */ 55, + /* matcher index */ 54, }, { /* [16] */ /* name */ "T", - /* matcher index */ 7, + /* matcher index */ 10, }, { /* [17] */ /* name */ "U", - /* matcher index */ 56, + /* matcher index */ 55, }, { /* [18] */ /* name */ "T", - /* matcher index */ 8, + /* matcher index */ 7, }, { /* [19] */ /* name */ "U", - /* matcher index */ 57, + /* matcher index */ 56, }, { /* [20] */ /* name */ "T", - /* matcher index */ 4, + /* matcher index */ 8, }, { /* [21] */ /* name */ "U", - /* matcher index */ 58, + /* matcher index */ 57, }, { /* [22] */ /* name */ "T", - /* matcher index */ 59, + /* matcher index */ 4, }, { /* [23] */ - /* name */ "T", - /* matcher index */ 63, + /* name */ "U", + /* matcher index */ 58, }, { /* [24] */ /* name */ "T", - /* matcher index */ kNoMatcher, + /* matcher index */ 59, }, { /* [25] */ /* name */ "T", - /* matcher index */ 70, + /* matcher index */ kNoMatcher, }, { /* [26] */ /* name */ "T", - /* matcher index */ 69, + /* matcher index */ 71, }, { /* [27] */ @@ -8204,7 +8240,7 @@ constexpr TemplateTypeInfo kTemplateTypes[] = { { /* [30] */ /* name */ "T", - /* matcher index */ 65, + /* matcher index */ 66, }, { /* [31] */ @@ -8236,6 +8272,11 @@ constexpr TemplateTypeInfo kTemplateTypes[] = { /* name */ "T", /* matcher index */ 53, }, + { + /* [37] */ + /* name */ "T", + /* matcher index */ 70, + }, }; constexpr TemplateNumberInfo kTemplateNumbers[] = { @@ -8309,7 +8350,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 2, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[10], + /* template types */ &kTemplateTypes[12], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[632], /* return matcher indices */ &kMatcherIndices[101], @@ -8333,7 +8374,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 2, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[10], + /* template types */ &kTemplateTypes[12], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[634], /* return matcher indices */ &kMatcherIndices[116], @@ -8357,7 +8398,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 2, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[10], + /* template types */ &kTemplateTypes[12], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[636], /* return matcher indices */ &kMatcherIndices[116], @@ -8381,7 +8422,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 2, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[10], + /* template types */ &kTemplateTypes[12], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[638], /* return matcher indices */ &kMatcherIndices[122], @@ -8405,7 +8446,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 2, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[10], + /* template types */ &kTemplateTypes[12], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[640], /* return matcher indices */ &kMatcherIndices[116], @@ -8429,7 +8470,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 2, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[10], + /* template types */ &kTemplateTypes[12], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[642], /* return matcher indices */ &kMatcherIndices[116], @@ -8453,7 +8494,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[919], /* return matcher indices */ &kMatcherIndices[116], @@ -8477,7 +8518,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[920], /* return matcher indices */ &kMatcherIndices[116], @@ -8501,7 +8542,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[921], /* return matcher indices */ &kMatcherIndices[116], @@ -8525,7 +8566,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[922], /* return matcher indices */ &kMatcherIndices[116], @@ -8549,7 +8590,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[923], /* return matcher indices */ &kMatcherIndices[116], @@ -8561,7 +8602,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 2, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[924], /* return matcher indices */ &kMatcherIndices[101], @@ -8573,7 +8614,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 2, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[925], /* return matcher indices */ &kMatcherIndices[116], @@ -8585,7 +8626,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 2, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[926], /* return matcher indices */ &kMatcherIndices[116], @@ -8597,7 +8638,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 2, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[927], /* return matcher indices */ &kMatcherIndices[122], @@ -8609,7 +8650,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[928], /* return matcher indices */ &kMatcherIndices[116], @@ -8621,7 +8662,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[501], /* return matcher indices */ &kMatcherIndices[110], @@ -8633,7 +8674,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[504], /* return matcher indices */ &kMatcherIndices[110], @@ -8645,7 +8686,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[331], /* return matcher indices */ &kMatcherIndices[110], @@ -8681,7 +8722,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[507], /* return matcher indices */ &kMatcherIndices[110], @@ -8693,7 +8734,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[339], /* return matcher indices */ &kMatcherIndices[110], @@ -8705,7 +8746,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[510], /* return matcher indices */ &kMatcherIndices[110], @@ -8729,7 +8770,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[513], /* return matcher indices */ &kMatcherIndices[38], @@ -8741,7 +8782,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[347], /* return matcher indices */ &kMatcherIndices[38], @@ -8777,7 +8818,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[516], /* return matcher indices */ &kMatcherIndices[38], @@ -8921,7 +8962,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 2, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[12], + /* template types */ &kTemplateTypes[14], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[980], /* return matcher indices */ &kMatcherIndices[110], @@ -8933,7 +8974,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 2, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[16], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[981], /* return matcher indices */ &kMatcherIndices[172], @@ -8945,7 +8986,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 2, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[16], + /* template types */ &kTemplateTypes[18], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[982], /* return matcher indices */ &kMatcherIndices[152], @@ -8957,7 +8998,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 2, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[18], + /* template types */ &kTemplateTypes[20], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[983], /* return matcher indices */ &kMatcherIndices[154], @@ -8969,7 +9010,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 2, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[20], + /* template types */ &kTemplateTypes[22], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[984], /* return matcher indices */ &kMatcherIndices[174], @@ -8981,7 +9022,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[387], /* return matcher indices */ &kMatcherIndices[110], @@ -8993,7 +9034,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 5, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[260], /* return matcher indices */ &kMatcherIndices[110], @@ -9029,7 +9070,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[391], /* return matcher indices */ &kMatcherIndices[110], @@ -9041,7 +9082,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 5, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[270], /* return matcher indices */ &kMatcherIndices[110], @@ -9053,7 +9094,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[395], /* return matcher indices */ &kMatcherIndices[110], @@ -9221,7 +9262,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[495], /* return matcher indices */ &kMatcherIndices[110], @@ -9233,7 +9274,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[311], /* return matcher indices */ &kMatcherIndices[110], @@ -9269,7 +9310,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[498], /* return matcher indices */ &kMatcherIndices[110], @@ -9425,7 +9466,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[549], /* return matcher indices */ nullptr, @@ -9509,7 +9550,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 2, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[12], + /* template types */ &kTemplateTypes[14], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[973], /* return matcher indices */ &kMatcherIndices[134], @@ -9521,7 +9562,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 2, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[16], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[974], /* return matcher indices */ &kMatcherIndices[166], @@ -9533,7 +9574,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 2, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[16], + /* template types */ &kTemplateTypes[18], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[975], /* return matcher indices */ &kMatcherIndices[144], @@ -9545,7 +9586,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 2, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[18], + /* template types */ &kTemplateTypes[20], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[976], /* return matcher indices */ &kMatcherIndices[122], @@ -9557,7 +9598,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 2, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[20], + /* template types */ &kTemplateTypes[22], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[977], /* return matcher indices */ &kMatcherIndices[168], @@ -9641,7 +9682,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[940], /* return matcher indices */ &kMatcherIndices[101], @@ -9653,7 +9694,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[941], /* return matcher indices */ &kMatcherIndices[101], @@ -9665,7 +9706,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[942], /* return matcher indices */ &kMatcherIndices[101], @@ -9677,7 +9718,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[943], /* return matcher indices */ &kMatcherIndices[101], @@ -9797,7 +9838,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[22], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[692], /* return matcher indices */ &kMatcherIndices[3], @@ -9809,7 +9850,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[22], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[694], /* return matcher indices */ &kMatcherIndices[30], @@ -9821,7 +9862,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[22], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[696], /* return matcher indices */ &kMatcherIndices[30], @@ -9833,7 +9874,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[22], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[698], /* return matcher indices */ &kMatcherIndices[30], @@ -9845,7 +9886,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 2, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[700], /* return matcher indices */ &kMatcherIndices[14], @@ -9857,7 +9898,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 2, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[702], /* return matcher indices */ &kMatcherIndices[14], @@ -9869,7 +9910,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 2, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[1], /* parameters */ &kParameters[704], /* return matcher indices */ &kMatcherIndices[96], @@ -9881,7 +9922,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 2, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[1], /* parameters */ &kParameters[706], /* return matcher indices */ &kMatcherIndices[30], @@ -9893,7 +9934,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 3, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[0], /* parameters */ &kParameters[708], /* return matcher indices */ &kMatcherIndices[26], @@ -9953,7 +9994,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 2, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[12], + /* template types */ &kTemplateTypes[14], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[966], /* return matcher indices */ &kMatcherIndices[108], @@ -9965,7 +10006,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 2, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[16], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[967], /* return matcher indices */ &kMatcherIndices[162], @@ -9977,7 +10018,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 2, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[16], + /* template types */ &kTemplateTypes[18], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[968], /* return matcher indices */ &kMatcherIndices[132], @@ -9989,7 +10030,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 2, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[18], + /* template types */ &kTemplateTypes[20], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[969], /* return matcher indices */ &kMatcherIndices[116], @@ -10001,7 +10042,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 2, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[20], + /* template types */ &kTemplateTypes[22], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[970], /* return matcher indices */ &kMatcherIndices[164], @@ -10013,7 +10054,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[359], /* return matcher indices */ &kMatcherIndices[110], @@ -10025,7 +10066,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 5, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[195], /* return matcher indices */ &kMatcherIndices[110], @@ -10061,7 +10102,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[363], /* return matcher indices */ &kMatcherIndices[110], @@ -10073,7 +10114,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 5, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[205], /* return matcher indices */ &kMatcherIndices[110], @@ -10085,7 +10126,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[367], /* return matcher indices */ &kMatcherIndices[110], @@ -10109,7 +10150,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 5, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[245], /* return matcher indices */ &kMatcherIndices[110], @@ -10121,7 +10162,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 6, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[102], /* return matcher indices */ &kMatcherIndices[110], @@ -10157,7 +10198,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 5, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[250], /* return matcher indices */ &kMatcherIndices[110], @@ -10169,7 +10210,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 6, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[114], /* return matcher indices */ &kMatcherIndices[110], @@ -10181,7 +10222,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 5, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[255], /* return matcher indices */ &kMatcherIndices[110], @@ -10205,7 +10246,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[323], /* return matcher indices */ &kMatcherIndices[110], @@ -10217,7 +10258,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 5, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[170], /* return matcher indices */ &kMatcherIndices[110], @@ -10253,7 +10294,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[327], /* return matcher indices */ &kMatcherIndices[110], @@ -10277,7 +10318,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[371], /* return matcher indices */ &kMatcherIndices[38], @@ -10289,7 +10330,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 5, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[215], /* return matcher indices */ &kMatcherIndices[38], @@ -10325,7 +10366,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[375], /* return matcher indices */ &kMatcherIndices[38], @@ -10349,7 +10390,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[379], /* return matcher indices */ &kMatcherIndices[38], @@ -10361,7 +10402,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 5, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[230], /* return matcher indices */ &kMatcherIndices[38], @@ -10397,7 +10438,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[383], /* return matcher indices */ &kMatcherIndices[38], @@ -10421,7 +10462,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 0, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[37], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[1012], /* return matcher indices */ &kMatcherIndices[176], @@ -10433,7 +10474,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[37], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[985], /* return matcher indices */ &kMatcherIndices[176], @@ -10445,7 +10486,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[431], /* return matcher indices */ &kMatcherIndices[176], @@ -10457,7 +10498,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[794], /* return matcher indices */ &kMatcherIndices[176], @@ -10469,7 +10510,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[16], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[986], /* return matcher indices */ &kMatcherIndices[180], @@ -10481,7 +10522,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[12], + /* template types */ &kTemplateTypes[14], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[987], /* return matcher indices */ &kMatcherIndices[178], @@ -10493,7 +10534,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 0, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[37], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[1012], /* return matcher indices */ &kMatcherIndices[182], @@ -10505,7 +10546,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[37], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[988], /* return matcher indices */ &kMatcherIndices[182], @@ -10517,7 +10558,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 6, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[138], /* return matcher indices */ &kMatcherIndices[182], @@ -10529,7 +10570,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[796], /* return matcher indices */ &kMatcherIndices[182], @@ -10541,7 +10582,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[16], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[989], /* return matcher indices */ &kMatcherIndices[186], @@ -10553,7 +10594,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[12], + /* template types */ &kTemplateTypes[14], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[990], /* return matcher indices */ &kMatcherIndices[184], @@ -10565,7 +10606,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 0, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[37], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[1012], /* return matcher indices */ &kMatcherIndices[188], @@ -10577,7 +10618,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[37], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[991], /* return matcher indices */ &kMatcherIndices[188], @@ -10589,7 +10630,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 8, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[49], /* return matcher indices */ &kMatcherIndices[188], @@ -10601,7 +10642,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[798], /* return matcher indices */ &kMatcherIndices[188], @@ -10613,7 +10654,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[16], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[992], /* return matcher indices */ &kMatcherIndices[192], @@ -10625,7 +10666,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[12], + /* template types */ &kTemplateTypes[14], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[993], /* return matcher indices */ &kMatcherIndices[190], @@ -10637,7 +10678,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 0, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[37], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[1012], /* return matcher indices */ &kMatcherIndices[194], @@ -10649,7 +10690,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[37], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[994], /* return matcher indices */ &kMatcherIndices[194], @@ -10661,7 +10702,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 6, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[144], /* return matcher indices */ &kMatcherIndices[194], @@ -10673,7 +10714,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[585], /* return matcher indices */ &kMatcherIndices[194], @@ -10685,7 +10726,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[16], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[995], /* return matcher indices */ &kMatcherIndices[198], @@ -10697,7 +10738,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[12], + /* template types */ &kTemplateTypes[14], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[996], /* return matcher indices */ &kMatcherIndices[196], @@ -10709,7 +10750,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 0, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[37], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[1012], /* return matcher indices */ &kMatcherIndices[200], @@ -10721,7 +10762,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[37], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[997], /* return matcher indices */ &kMatcherIndices[200], @@ -10733,7 +10774,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 9, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[40], /* return matcher indices */ &kMatcherIndices[200], @@ -10745,7 +10786,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[588], /* return matcher indices */ &kMatcherIndices[200], @@ -10757,7 +10798,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[16], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[998], /* return matcher indices */ &kMatcherIndices[204], @@ -10769,7 +10810,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[12], + /* template types */ &kTemplateTypes[14], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[999], /* return matcher indices */ &kMatcherIndices[202], @@ -10781,7 +10822,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 0, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[37], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[1012], /* return matcher indices */ &kMatcherIndices[206], @@ -10793,7 +10834,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[37], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[1000], /* return matcher indices */ &kMatcherIndices[206], @@ -10805,7 +10846,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 12, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[16], /* return matcher indices */ &kMatcherIndices[206], @@ -10817,7 +10858,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[591], /* return matcher indices */ &kMatcherIndices[206], @@ -10829,7 +10870,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[16], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[1001], /* return matcher indices */ &kMatcherIndices[210], @@ -10841,7 +10882,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[12], + /* template types */ &kTemplateTypes[14], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[1002], /* return matcher indices */ &kMatcherIndices[208], @@ -10853,7 +10894,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 0, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[37], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[1012], /* return matcher indices */ &kMatcherIndices[212], @@ -10865,7 +10906,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[37], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[1003], /* return matcher indices */ &kMatcherIndices[212], @@ -10877,7 +10918,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 8, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[57], /* return matcher indices */ &kMatcherIndices[212], @@ -10889,7 +10930,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[435], /* return matcher indices */ &kMatcherIndices[212], @@ -10901,7 +10942,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[16], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[1004], /* return matcher indices */ &kMatcherIndices[216], @@ -10913,7 +10954,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[12], + /* template types */ &kTemplateTypes[14], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[1005], /* return matcher indices */ &kMatcherIndices[214], @@ -10925,7 +10966,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 0, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[37], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[1012], /* return matcher indices */ &kMatcherIndices[218], @@ -10937,7 +10978,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[37], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[1006], /* return matcher indices */ &kMatcherIndices[218], @@ -10949,7 +10990,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 12, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[28], /* return matcher indices */ &kMatcherIndices[218], @@ -10961,7 +11002,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[439], /* return matcher indices */ &kMatcherIndices[218], @@ -10973,7 +11014,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[16], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[1007], /* return matcher indices */ &kMatcherIndices[222], @@ -10985,7 +11026,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[12], + /* template types */ &kTemplateTypes[14], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[1008], /* return matcher indices */ &kMatcherIndices[220], @@ -10997,7 +11038,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 0, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[37], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[1012], /* return matcher indices */ &kMatcherIndices[224], @@ -11009,7 +11050,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[37], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[1009], /* return matcher indices */ &kMatcherIndices[224], @@ -11021,7 +11062,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 16, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[0], /* return matcher indices */ &kMatcherIndices[224], @@ -11033,7 +11074,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[443], /* return matcher indices */ &kMatcherIndices[224], @@ -11045,7 +11086,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[16], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[1010], /* return matcher indices */ &kMatcherIndices[228], @@ -11057,7 +11098,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[12], + /* template types */ &kTemplateTypes[14], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[1011], /* return matcher indices */ &kMatcherIndices[226], @@ -11093,7 +11134,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[931], /* return matcher indices */ &kMatcherIndices[101], @@ -11105,7 +11146,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[932], /* return matcher indices */ &kMatcherIndices[101], @@ -11117,7 +11158,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 2, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[933], /* return matcher indices */ &kMatcherIndices[101], @@ -11129,7 +11170,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[22], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[672], /* return matcher indices */ &kMatcherIndices[3], @@ -11141,7 +11182,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[22], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[674], /* return matcher indices */ &kMatcherIndices[30], @@ -11153,7 +11194,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[22], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[676], /* return matcher indices */ &kMatcherIndices[30], @@ -11165,7 +11206,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[22], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[678], /* return matcher indices */ &kMatcherIndices[30], @@ -11177,7 +11218,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 2, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[680], /* return matcher indices */ &kMatcherIndices[14], @@ -11189,7 +11230,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[22], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[682], /* return matcher indices */ &kMatcherIndices[3], @@ -11201,7 +11242,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[22], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[684], /* return matcher indices */ &kMatcherIndices[30], @@ -11213,7 +11254,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[22], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[686], /* return matcher indices */ &kMatcherIndices[30], @@ -11225,7 +11266,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[22], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[688], /* return matcher indices */ &kMatcherIndices[30], @@ -11237,7 +11278,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 2, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[690], /* return matcher indices */ &kMatcherIndices[14], @@ -11249,7 +11290,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[22], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[710], /* return matcher indices */ &kMatcherIndices[3], @@ -11261,7 +11302,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[22], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[712], /* return matcher indices */ &kMatcherIndices[30], @@ -11273,7 +11314,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[22], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[714], /* return matcher indices */ &kMatcherIndices[30], @@ -11285,7 +11326,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[22], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[716], /* return matcher indices */ &kMatcherIndices[30], @@ -11297,7 +11338,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[22], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[718], /* return matcher indices */ &kMatcherIndices[3], @@ -11309,7 +11350,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[22], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[720], /* return matcher indices */ &kMatcherIndices[30], @@ -11321,7 +11362,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[22], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[722], /* return matcher indices */ &kMatcherIndices[30], @@ -11333,7 +11374,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[22], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[724], /* return matcher indices */ &kMatcherIndices[30], @@ -11345,7 +11386,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[730], /* return matcher indices */ &kMatcherIndices[35], @@ -11357,7 +11398,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[732], /* return matcher indices */ &kMatcherIndices[33], @@ -11393,7 +11434,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[738], /* return matcher indices */ &kMatcherIndices[35], @@ -11405,7 +11446,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[740], /* return matcher indices */ &kMatcherIndices[33], @@ -11441,7 +11482,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[468], /* return matcher indices */ &kMatcherIndices[3], @@ -11453,7 +11494,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[471], /* return matcher indices */ &kMatcherIndices[30], @@ -11465,7 +11506,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[474], /* return matcher indices */ &kMatcherIndices[30], @@ -11513,7 +11554,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 0, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[1012], /* return matcher indices */ &kMatcherIndices[9], @@ -11525,7 +11566,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[954], /* return matcher indices */ &kMatcherIndices[9], @@ -11549,7 +11590,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 0, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[1012], /* return matcher indices */ &kMatcherIndices[101], @@ -11561,7 +11602,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[956], /* return matcher indices */ &kMatcherIndices[101], @@ -11585,7 +11626,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 0, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[1012], /* return matcher indices */ &kMatcherIndices[38], @@ -11597,7 +11638,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[958], /* return matcher indices */ &kMatcherIndices[38], @@ -11621,7 +11662,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 0, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[1012], /* return matcher indices */ &kMatcherIndices[1], @@ -11633,7 +11674,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[960], /* return matcher indices */ &kMatcherIndices[1], @@ -11657,7 +11698,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 0, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[1012], /* return matcher indices */ &kMatcherIndices[35], @@ -11669,7 +11710,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[962], /* return matcher indices */ &kMatcherIndices[35], @@ -11693,7 +11734,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[22], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[800], /* return matcher indices */ &kMatcherIndices[3], @@ -11705,7 +11746,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[22], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[801], /* return matcher indices */ &kMatcherIndices[30], @@ -11717,7 +11758,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[802], /* return matcher indices */ &kMatcherIndices[3], @@ -11729,7 +11770,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[803], /* return matcher indices */ &kMatcherIndices[30], @@ -11741,7 +11782,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[804], /* return matcher indices */ &kMatcherIndices[3], @@ -11753,7 +11794,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[805], /* return matcher indices */ &kMatcherIndices[30], @@ -11765,7 +11806,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[806], /* return matcher indices */ &kMatcherIndices[35], @@ -11777,7 +11818,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[807], /* return matcher indices */ &kMatcherIndices[35], @@ -11789,7 +11830,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[808], /* return matcher indices */ &kMatcherIndices[35], @@ -11801,7 +11842,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[809], /* return matcher indices */ &kMatcherIndices[35], @@ -11813,7 +11854,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[811], /* return matcher indices */ &kMatcherIndices[3], @@ -11825,7 +11866,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[812], /* return matcher indices */ &kMatcherIndices[30], @@ -11837,7 +11878,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[813], /* return matcher indices */ &kMatcherIndices[3], @@ -11849,7 +11890,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[814], /* return matcher indices */ &kMatcherIndices[30], @@ -11861,7 +11902,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[815], /* return matcher indices */ &kMatcherIndices[3], @@ -11873,7 +11914,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[816], /* return matcher indices */ &kMatcherIndices[30], @@ -11885,7 +11926,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[594], /* return matcher indices */ &kMatcherIndices[3], @@ -11897,7 +11938,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[596], /* return matcher indices */ &kMatcherIndices[30], @@ -11909,7 +11950,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[817], /* return matcher indices */ &kMatcherIndices[3], @@ -11921,7 +11962,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[818], /* return matcher indices */ &kMatcherIndices[30], @@ -11933,7 +11974,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[819], /* return matcher indices */ &kMatcherIndices[3], @@ -11945,7 +11986,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[820], /* return matcher indices */ &kMatcherIndices[30], @@ -11957,7 +11998,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[22], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[447], /* return matcher indices */ &kMatcherIndices[3], @@ -11969,7 +12010,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[22], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[450], /* return matcher indices */ &kMatcherIndices[30], @@ -11981,7 +12022,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[821], /* return matcher indices */ &kMatcherIndices[3], @@ -11993,7 +12034,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[822], /* return matcher indices */ &kMatcherIndices[30], @@ -12005,7 +12046,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[823], /* return matcher indices */ &kMatcherIndices[3], @@ -12017,7 +12058,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[824], /* return matcher indices */ &kMatcherIndices[30], @@ -12029,7 +12070,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[25], + /* template types */ &kTemplateTypes[26], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[825], /* return matcher indices */ &kMatcherIndices[3], @@ -12041,7 +12082,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[25], + /* template types */ &kTemplateTypes[26], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[826], /* return matcher indices */ &kMatcherIndices[30], @@ -12053,7 +12094,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[25], + /* template types */ &kTemplateTypes[26], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[827], /* return matcher indices */ &kMatcherIndices[3], @@ -12065,7 +12106,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[25], + /* template types */ &kTemplateTypes[26], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[828], /* return matcher indices */ &kMatcherIndices[30], @@ -12077,7 +12118,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[25], + /* template types */ &kTemplateTypes[26], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[829], /* return matcher indices */ &kMatcherIndices[3], @@ -12089,7 +12130,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[25], + /* template types */ &kTemplateTypes[26], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[830], /* return matcher indices */ &kMatcherIndices[30], @@ -12101,7 +12142,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[831], /* return matcher indices */ &kMatcherIndices[3], @@ -12113,7 +12154,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[832], /* return matcher indices */ &kMatcherIndices[30], @@ -12125,7 +12166,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[600], /* return matcher indices */ &kMatcherIndices[3], @@ -12137,7 +12178,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[602], /* return matcher indices */ &kMatcherIndices[3], @@ -12149,7 +12190,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[834], /* return matcher indices */ &kMatcherIndices[38], @@ -12161,7 +12202,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[835], /* return matcher indices */ &kMatcherIndices[36], @@ -12173,7 +12214,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[836], /* return matcher indices */ &kMatcherIndices[38], @@ -12185,7 +12226,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[837], /* return matcher indices */ &kMatcherIndices[36], @@ -12197,7 +12238,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[838], /* return matcher indices */ &kMatcherIndices[38], @@ -12209,7 +12250,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[839], /* return matcher indices */ &kMatcherIndices[36], @@ -12221,7 +12262,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[840], /* return matcher indices */ &kMatcherIndices[38], @@ -12233,7 +12274,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[841], /* return matcher indices */ &kMatcherIndices[36], @@ -12245,7 +12286,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[842], /* return matcher indices */ &kMatcherIndices[38], @@ -12257,7 +12298,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[843], /* return matcher indices */ &kMatcherIndices[36], @@ -12269,7 +12310,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[844], /* return matcher indices */ &kMatcherIndices[38], @@ -12281,7 +12322,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[845], /* return matcher indices */ &kMatcherIndices[36], @@ -12293,7 +12334,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[846], /* return matcher indices */ &kMatcherIndices[3], @@ -12305,7 +12346,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[847], /* return matcher indices */ &kMatcherIndices[30], @@ -12317,7 +12358,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[848], /* return matcher indices */ &kMatcherIndices[3], @@ -12329,7 +12370,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[849], /* return matcher indices */ &kMatcherIndices[30], @@ -12341,7 +12382,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[25], + /* template types */ &kTemplateTypes[26], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[453], /* return matcher indices */ &kMatcherIndices[3], @@ -12353,7 +12394,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[25], + /* template types */ &kTemplateTypes[26], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[456], /* return matcher indices */ &kMatcherIndices[30], @@ -12365,7 +12406,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[25], + /* template types */ &kTemplateTypes[26], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[850], /* return matcher indices */ &kMatcherIndices[3], @@ -12377,7 +12418,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[25], + /* template types */ &kTemplateTypes[26], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[851], /* return matcher indices */ &kMatcherIndices[30], @@ -12389,7 +12430,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[25], + /* template types */ &kTemplateTypes[26], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[852], /* return matcher indices */ &kMatcherIndices[3], @@ -12401,7 +12442,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[25], + /* template types */ &kTemplateTypes[26], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[853], /* return matcher indices */ &kMatcherIndices[30], @@ -12413,7 +12454,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[854], /* return matcher indices */ &kMatcherIndices[3], @@ -12425,7 +12466,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[855], /* return matcher indices */ &kMatcherIndices[30], @@ -12437,7 +12478,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[462], /* return matcher indices */ &kMatcherIndices[3], @@ -12449,7 +12490,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[465], /* return matcher indices */ &kMatcherIndices[30], @@ -12461,7 +12502,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[856], /* return matcher indices */ &kMatcherIndices[3], @@ -12473,7 +12514,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[857], /* return matcher indices */ &kMatcherIndices[30], @@ -12485,7 +12526,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[858], /* return matcher indices */ &kMatcherIndices[104], @@ -12497,7 +12538,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[859], /* return matcher indices */ &kMatcherIndices[39], @@ -12509,7 +12550,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[860], /* return matcher indices */ &kMatcherIndices[38], @@ -12521,7 +12562,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[861], /* return matcher indices */ &kMatcherIndices[36], @@ -12533,7 +12574,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[862], /* return matcher indices */ &kMatcherIndices[38], @@ -12545,7 +12586,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[863], /* return matcher indices */ &kMatcherIndices[36], @@ -12557,7 +12598,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[864], /* return matcher indices */ &kMatcherIndices[38], @@ -12569,7 +12610,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[865], /* return matcher indices */ &kMatcherIndices[36], @@ -12581,7 +12622,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[25], + /* template types */ &kTemplateTypes[26], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[295], /* return matcher indices */ &kMatcherIndices[3], @@ -12593,7 +12634,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[25], + /* template types */ &kTemplateTypes[26], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[299], /* return matcher indices */ &kMatcherIndices[30], @@ -12605,7 +12646,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[866], /* return matcher indices */ &kMatcherIndices[3], @@ -12617,7 +12658,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[867], /* return matcher indices */ &kMatcherIndices[30], @@ -12627,33 +12668,33 @@ constexpr OverloadInfo kOverloads[] = { { /* [361] */ /* num parameters */ 2, - /* num template types */ 1, + /* num template types */ 2, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[610], /* return matcher indices */ &kMatcherIndices[3], /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* const eval */ nullptr, + /* const eval */ &ConstEval::ldexp, }, { /* [362] */ /* num parameters */ 2, - /* num template types */ 1, + /* num template types */ 2, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[612], /* return matcher indices */ &kMatcherIndices[30], /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* const eval */ nullptr, + /* const eval */ &ConstEval::ldexp, }, { /* [363] */ /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[868], /* return matcher indices */ &kMatcherIndices[3], @@ -12665,7 +12706,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[869], /* return matcher indices */ &kMatcherIndices[3], @@ -12677,7 +12718,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[870], /* return matcher indices */ &kMatcherIndices[3], @@ -12689,7 +12730,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[871], /* return matcher indices */ &kMatcherIndices[30], @@ -12701,7 +12742,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[872], /* return matcher indices */ &kMatcherIndices[3], @@ -12713,7 +12754,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[873], /* return matcher indices */ &kMatcherIndices[30], @@ -12725,7 +12766,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[22], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[614], /* return matcher indices */ &kMatcherIndices[3], @@ -12737,7 +12778,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[22], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[616], /* return matcher indices */ &kMatcherIndices[30], @@ -12749,7 +12790,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[22], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[618], /* return matcher indices */ &kMatcherIndices[3], @@ -12761,7 +12802,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[22], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[620], /* return matcher indices */ &kMatcherIndices[30], @@ -12773,7 +12814,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[874], /* return matcher indices */ &kMatcherIndices[106], @@ -12785,7 +12826,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[875], /* return matcher indices */ &kMatcherIndices[45], @@ -12797,7 +12838,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[622], /* return matcher indices */ &kMatcherIndices[3], @@ -12809,7 +12850,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[624], /* return matcher indices */ &kMatcherIndices[30], @@ -12821,7 +12862,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[882], /* return matcher indices */ &kMatcherIndices[38], @@ -12833,7 +12874,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[883], /* return matcher indices */ &kMatcherIndices[36], @@ -12845,7 +12886,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[884], /* return matcher indices */ &kMatcherIndices[3], @@ -12857,7 +12898,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[885], /* return matcher indices */ &kMatcherIndices[30], @@ -12869,7 +12910,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[25], + /* template types */ &kTemplateTypes[26], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[886], /* return matcher indices */ &kMatcherIndices[3], @@ -12881,7 +12922,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[25], + /* template types */ &kTemplateTypes[26], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[887], /* return matcher indices */ &kMatcherIndices[30], @@ -12893,7 +12934,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[888], /* return matcher indices */ &kMatcherIndices[3], @@ -12905,7 +12946,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[889], /* return matcher indices */ &kMatcherIndices[30], @@ -12917,7 +12958,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[890], /* return matcher indices */ &kMatcherIndices[3], @@ -12929,7 +12970,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[891], /* return matcher indices */ &kMatcherIndices[30], @@ -12965,7 +13006,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[894], /* return matcher indices */ &kMatcherIndices[3], @@ -12977,7 +13018,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[895], /* return matcher indices */ &kMatcherIndices[30], @@ -12989,7 +13030,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[896], /* return matcher indices */ &kMatcherIndices[3], @@ -13001,7 +13042,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[897], /* return matcher indices */ &kMatcherIndices[30], @@ -13013,7 +13054,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[489], /* return matcher indices */ &kMatcherIndices[3], @@ -13025,7 +13066,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[492], /* return matcher indices */ &kMatcherIndices[30], @@ -13037,7 +13078,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[898], /* return matcher indices */ &kMatcherIndices[3], @@ -13049,7 +13090,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[899], /* return matcher indices */ &kMatcherIndices[30], @@ -13061,7 +13102,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[628], /* return matcher indices */ &kMatcherIndices[3], @@ -13073,7 +13114,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[630], /* return matcher indices */ &kMatcherIndices[30], @@ -13085,7 +13126,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[900], /* return matcher indices */ &kMatcherIndices[3], @@ -13097,7 +13138,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[901], /* return matcher indices */ &kMatcherIndices[30], @@ -13109,7 +13150,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[902], /* return matcher indices */ &kMatcherIndices[3], @@ -13121,7 +13162,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[903], /* return matcher indices */ &kMatcherIndices[30], @@ -13133,7 +13174,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[905], /* return matcher indices */ &kMatcherIndices[3], @@ -13145,7 +13186,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[906], /* return matcher indices */ &kMatcherIndices[30], @@ -13169,7 +13210,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[945], /* return matcher indices */ &kMatcherIndices[101], @@ -13181,7 +13222,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[519], /* return matcher indices */ &kMatcherIndices[110], @@ -13193,7 +13234,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[522], /* return matcher indices */ &kMatcherIndices[110], @@ -13205,7 +13246,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[948], /* return matcher indices */ &kMatcherIndices[35], @@ -13217,7 +13258,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[949], /* return matcher indices */ &kMatcherIndices[33], @@ -13349,7 +13390,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[22], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[758], /* return matcher indices */ &kMatcherIndices[35], @@ -13361,7 +13402,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[22], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[760], /* return matcher indices */ &kMatcherIndices[33], @@ -13373,7 +13414,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[22], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[762], /* return matcher indices */ &kMatcherIndices[35], @@ -13385,7 +13426,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[22], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[764], /* return matcher indices */ &kMatcherIndices[33], @@ -13397,7 +13438,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[22], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[766], /* return matcher indices */ &kMatcherIndices[35], @@ -13409,7 +13450,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[22], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[768], /* return matcher indices */ &kMatcherIndices[33], @@ -13421,7 +13462,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[22], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[770], /* return matcher indices */ &kMatcherIndices[35], @@ -13493,7 +13534,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[24], + /* template types */ &kTemplateTypes[25], /* template numbers */ &kTemplateNumbers[8], /* parameters */ &kParameters[810], /* return matcher indices */ &kMatcherIndices[101], @@ -13505,7 +13546,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[598], /* return matcher indices */ &kMatcherIndices[102], @@ -13517,7 +13558,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[833], /* return matcher indices */ &kMatcherIndices[3], @@ -13529,7 +13570,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[22], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[604], /* return matcher indices */ &kMatcherIndices[3], @@ -13541,7 +13582,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[606], /* return matcher indices */ &kMatcherIndices[9], @@ -13553,7 +13594,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[608], /* return matcher indices */ &kMatcherIndices[101], @@ -13565,7 +13606,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[459], /* return matcher indices */ &kMatcherIndices[30], @@ -13577,7 +13618,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[876], /* return matcher indices */ &kMatcherIndices[30], @@ -13589,7 +13630,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[877], /* return matcher indices */ &kMatcherIndices[101], @@ -13601,7 +13642,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[878], /* return matcher indices */ &kMatcherIndices[101], @@ -13613,7 +13654,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[879], /* return matcher indices */ &kMatcherIndices[101], @@ -13625,7 +13666,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[880], /* return matcher indices */ &kMatcherIndices[101], @@ -13637,7 +13678,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[881], /* return matcher indices */ &kMatcherIndices[101], @@ -13649,7 +13690,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[626], /* return matcher indices */ &kMatcherIndices[30], @@ -13661,7 +13702,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[4], /* parameters */ &kParameters[477], /* return matcher indices */ &kMatcherIndices[30], @@ -13673,7 +13714,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 0, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[1012], /* return matcher indices */ nullptr, @@ -13685,7 +13726,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 2, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[10], /* template numbers */ &kTemplateNumbers[3], /* parameters */ &kParameters[904], /* return matcher indices */ &kMatcherIndices[18], @@ -13697,7 +13738,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[907], /* return matcher indices */ &kMatcherIndices[108], @@ -13709,7 +13750,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[908], /* return matcher indices */ &kMatcherIndices[108], @@ -13721,7 +13762,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[909], /* return matcher indices */ &kMatcherIndices[108], @@ -13733,7 +13774,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[910], /* return matcher indices */ &kMatcherIndices[110], @@ -13745,7 +13786,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[911], /* return matcher indices */ &kMatcherIndices[110], @@ -13757,7 +13798,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 0, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[1012], /* return matcher indices */ nullptr, @@ -13769,7 +13810,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[25], + /* template types */ &kTemplateTypes[26], /* template numbers */ &kTemplateNumbers[9], /* parameters */ &kParameters[946], /* return matcher indices */ &kMatcherIndices[3], @@ -13781,7 +13822,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[25], + /* template types */ &kTemplateTypes[26], /* template numbers */ &kTemplateNumbers[9], /* parameters */ &kParameters[654], /* return matcher indices */ nullptr, @@ -13793,7 +13834,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[25], + /* template types */ &kTemplateTypes[26], /* template numbers */ &kTemplateNumbers[9], /* parameters */ &kParameters[656], /* return matcher indices */ &kMatcherIndices[3], @@ -13805,7 +13846,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[25], + /* template types */ &kTemplateTypes[26], /* template numbers */ &kTemplateNumbers[9], /* parameters */ &kParameters[658], /* return matcher indices */ &kMatcherIndices[3], @@ -13817,7 +13858,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[25], + /* template types */ &kTemplateTypes[26], /* template numbers */ &kTemplateNumbers[9], /* parameters */ &kParameters[660], /* return matcher indices */ &kMatcherIndices[3], @@ -13829,7 +13870,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[25], + /* template types */ &kTemplateTypes[26], /* template numbers */ &kTemplateNumbers[9], /* parameters */ &kParameters[662], /* return matcher indices */ &kMatcherIndices[3], @@ -13841,7 +13882,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[25], + /* template types */ &kTemplateTypes[26], /* template numbers */ &kTemplateNumbers[9], /* parameters */ &kParameters[664], /* return matcher indices */ &kMatcherIndices[3], @@ -13853,7 +13894,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[25], + /* template types */ &kTemplateTypes[26], /* template numbers */ &kTemplateNumbers[9], /* parameters */ &kParameters[666], /* return matcher indices */ &kMatcherIndices[3], @@ -13865,7 +13906,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[25], + /* template types */ &kTemplateTypes[26], /* template numbers */ &kTemplateNumbers[9], /* parameters */ &kParameters[668], /* return matcher indices */ &kMatcherIndices[3], @@ -13877,7 +13918,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[25], + /* template types */ &kTemplateTypes[26], /* template numbers */ &kTemplateNumbers[9], /* parameters */ &kParameters[670], /* return matcher indices */ &kMatcherIndices[3], @@ -13889,7 +13930,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[25], + /* template types */ &kTemplateTypes[26], /* template numbers */ &kTemplateNumbers[9], /* parameters */ &kParameters[570], /* return matcher indices */ &kMatcherIndices[160], @@ -13901,7 +13942,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[24], + /* template types */ &kTemplateTypes[25], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[947], /* return matcher indices */ &kMatcherIndices[3], @@ -13913,7 +13954,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[746], /* return matcher indices */ &kMatcherIndices[35], @@ -13925,7 +13966,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[37], + /* template types */ &kTemplateTypes[38], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[748], /* return matcher indices */ &kMatcherIndices[35], @@ -14252,8 +14293,8 @@ constexpr IntrinsicInfo kBuiltins[] = { }, { /* [46] */ - /* fn ldexp(T, i32) -> T */ - /* fn ldexp(vec, vec) -> vec */ + /* fn ldexp(T, U) -> T */ + /* fn ldexp(vec, vec) -> vec */ /* num overloads */ 2, /* overloads */ &kOverloads[361], }, diff --git a/test/tint/builtins/gen/literal/ldexp/082c1f.wgsl b/test/tint/builtins/gen/literal/ldexp/082c1f.wgsl new file mode 100644 index 0000000000..1c5e386e83 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/082c1f.wgsl @@ -0,0 +1,45 @@ +// Copyright 2022 The Tint Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//////////////////////////////////////////////////////////////////////////////// +// File generated by tools/src/cmd/gen +// using the template: +// test/tint/builtins/gen/gen.wgsl.tmpl +// +// Do not modify this file directly +//////////////////////////////////////////////////////////////////////////////// + + +enable f16; + +// fn ldexp(f16, ia) -> f16 +fn ldexp_082c1f() { + var res: f16 = ldexp(1.h, 1); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_082c1f(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_082c1f(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_082c1f(); +} diff --git a/test/tint/builtins/gen/literal/ldexp/082c1f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/ldexp/082c1f.wgsl.expected.dxc.hlsl new file mode 100644 index 0000000000..21753fd0a3 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/082c1f.wgsl.expected.dxc.hlsl @@ -0,0 +1,30 @@ +void ldexp_082c1f() { + float16_t res = float16_t(2.0h); +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_082c1f(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_082c1f(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_082c1f(); + return; +} diff --git a/test/tint/builtins/gen/literal/ldexp/082c1f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ldexp/082c1f.wgsl.expected.fxc.hlsl new file mode 100644 index 0000000000..6c87f41882 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/082c1f.wgsl.expected.fxc.hlsl @@ -0,0 +1,36 @@ +SKIP: FAILED + +void ldexp_082c1f() { + float16_t res = float16_t(2.0h); +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_082c1f(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_082c1f(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_082c1f(); + return; +} +FXC validation failure: +C:\src\dawn\test\tint\Shader@0x000001E1B8560100(2,3-11): error X3000: unrecognized identifier 'float16_t' +C:\src\dawn\test\tint\Shader@0x000001E1B8560100(2,13-15): error X3000: unrecognized identifier 'res' + diff --git a/test/tint/builtins/gen/literal/ldexp/082c1f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/ldexp/082c1f.wgsl.expected.glsl new file mode 100644 index 0000000000..b0f4401651 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/082c1f.wgsl.expected.glsl @@ -0,0 +1,52 @@ +#version 310 es +#extension GL_AMD_gpu_shader_half_float : require + +void ldexp_082c1f() { + float16_t res = 2.0hf; +} + +vec4 vertex_main() { + ldexp_082c1f(); + return vec4(0.0f); +} + +void main() { + gl_PointSize = 1.0; + vec4 inner_result = vertex_main(); + gl_Position = inner_result; + gl_Position.y = -(gl_Position.y); + gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); + return; +} +#version 310 es +#extension GL_AMD_gpu_shader_half_float : require +precision mediump float; + +void ldexp_082c1f() { + float16_t res = 2.0hf; +} + +void fragment_main() { + ldexp_082c1f(); +} + +void main() { + fragment_main(); + return; +} +#version 310 es +#extension GL_AMD_gpu_shader_half_float : require + +void ldexp_082c1f() { + float16_t res = 2.0hf; +} + +void compute_main() { + ldexp_082c1f(); +} + +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + compute_main(); + return; +} diff --git a/test/tint/builtins/gen/literal/ldexp/082c1f.wgsl.expected.msl b/test/tint/builtins/gen/literal/ldexp/082c1f.wgsl.expected.msl new file mode 100644 index 0000000000..eca9a85004 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/082c1f.wgsl.expected.msl @@ -0,0 +1,33 @@ +#include + +using namespace metal; +void ldexp_082c1f() { + half res = 2.0h; +} + +struct tint_symbol { + float4 value [[position]]; +}; + +float4 vertex_main_inner() { + ldexp_082c1f(); + return float4(0.0f); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main() { + ldexp_082c1f(); + return; +} + +kernel void compute_main() { + ldexp_082c1f(); + return; +} + diff --git a/test/tint/builtins/gen/literal/ldexp/082c1f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/ldexp/082c1f.wgsl.expected.spvasm new file mode 100644 index 0000000000..9da2f38890 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/082c1f.wgsl.expected.spvasm @@ -0,0 +1,70 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 32 +; Schema: 0 + OpCapability Shader + OpCapability Float16 + OpCapability UniformAndStorageBuffer16BitAccess + OpCapability StorageBuffer16BitAccess + OpCapability StorageInputOutput16 + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size + OpEntryPoint Fragment %fragment_main "fragment_main" + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %fragment_main OriginUpperLeft + OpExecutionMode %compute_main LocalSize 1 1 1 + OpName %value "value" + OpName %vertex_point_size "vertex_point_size" + OpName %ldexp_082c1f "ldexp_082c1f" + OpName %res "res" + OpName %vertex_main_inner "vertex_main_inner" + OpName %vertex_main "vertex_main" + OpName %fragment_main "fragment_main" + OpName %compute_main "compute_main" + OpDecorate %value BuiltIn Position + OpDecorate %vertex_point_size BuiltIn PointSize + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%_ptr_Output_v4float = OpTypePointer Output %v4float + %5 = OpConstantNull %v4float + %value = OpVariable %_ptr_Output_v4float Output %5 +%_ptr_Output_float = OpTypePointer Output %float + %8 = OpConstantNull %float +%vertex_point_size = OpVariable %_ptr_Output_float Output %8 + %void = OpTypeVoid + %9 = OpTypeFunction %void + %half = OpTypeFloat 16 +%half_0x1p_1 = OpConstant %half 0x1p+1 +%_ptr_Function_half = OpTypePointer Function %half + %17 = OpConstantNull %half + %18 = OpTypeFunction %v4float + %float_1 = OpConstant %float 1 +%ldexp_082c1f = OpFunction %void None %9 + %12 = OpLabel + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %res %half_0x1p_1 + OpReturn + OpFunctionEnd +%vertex_main_inner = OpFunction %v4float None %18 + %20 = OpLabel + %21 = OpFunctionCall %void %ldexp_082c1f + OpReturnValue %5 + OpFunctionEnd +%vertex_main = OpFunction %void None %9 + %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 + %27 = OpLabel + %28 = OpFunctionCall %void %ldexp_082c1f + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %9 + %30 = OpLabel + %31 = OpFunctionCall %void %ldexp_082c1f + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/ldexp/082c1f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/ldexp/082c1f.wgsl.expected.wgsl new file mode 100644 index 0000000000..d1cc9fbd62 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/082c1f.wgsl.expected.wgsl @@ -0,0 +1,21 @@ +enable f16; + +fn ldexp_082c1f() { + var res : f16 = ldexp(1.0h, 1); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_082c1f(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_082c1f(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_082c1f(); +} diff --git a/test/tint/builtins/gen/literal/ldexp/217a31.wgsl b/test/tint/builtins/gen/literal/ldexp/217a31.wgsl new file mode 100644 index 0000000000..06890c6f38 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/217a31.wgsl @@ -0,0 +1,45 @@ +// Copyright 2022 The Tint Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//////////////////////////////////////////////////////////////////////////////// +// File generated by tools/src/cmd/gen +// using the template: +// test/tint/builtins/gen/gen.wgsl.tmpl +// +// Do not modify this file directly +//////////////////////////////////////////////////////////////////////////////// + + +enable f16; + +// fn ldexp(vec<2, f16>, vec<2, ia>) -> vec<2, f16> +fn ldexp_217a31() { + var res: vec2 = ldexp(vec2(1.h), vec2(1)); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_217a31(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_217a31(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_217a31(); +} diff --git a/test/tint/builtins/gen/literal/ldexp/217a31.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/ldexp/217a31.wgsl.expected.dxc.hlsl new file mode 100644 index 0000000000..8909c44832 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/217a31.wgsl.expected.dxc.hlsl @@ -0,0 +1,30 @@ +void ldexp_217a31() { + vector res = (float16_t(2.0h)).xx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_217a31(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_217a31(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_217a31(); + return; +} diff --git a/test/tint/builtins/gen/literal/ldexp/217a31.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ldexp/217a31.wgsl.expected.fxc.hlsl new file mode 100644 index 0000000000..772be048da --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/217a31.wgsl.expected.fxc.hlsl @@ -0,0 +1,35 @@ +SKIP: FAILED + +void ldexp_217a31() { + vector res = (float16_t(2.0h)).xx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_217a31(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_217a31(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_217a31(); + return; +} +FXC validation failure: +C:\src\dawn\test\tint\Shader@0x00000132D8550FB0(2,10-18): error X3000: syntax error: unexpected token 'float16_t' + diff --git a/test/tint/builtins/gen/literal/ldexp/217a31.wgsl.expected.glsl b/test/tint/builtins/gen/literal/ldexp/217a31.wgsl.expected.glsl new file mode 100644 index 0000000000..774e529b4c --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/217a31.wgsl.expected.glsl @@ -0,0 +1,52 @@ +#version 310 es +#extension GL_AMD_gpu_shader_half_float : require + +void ldexp_217a31() { + f16vec2 res = f16vec2(2.0hf); +} + +vec4 vertex_main() { + ldexp_217a31(); + return vec4(0.0f); +} + +void main() { + gl_PointSize = 1.0; + vec4 inner_result = vertex_main(); + gl_Position = inner_result; + gl_Position.y = -(gl_Position.y); + gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); + return; +} +#version 310 es +#extension GL_AMD_gpu_shader_half_float : require +precision mediump float; + +void ldexp_217a31() { + f16vec2 res = f16vec2(2.0hf); +} + +void fragment_main() { + ldexp_217a31(); +} + +void main() { + fragment_main(); + return; +} +#version 310 es +#extension GL_AMD_gpu_shader_half_float : require + +void ldexp_217a31() { + f16vec2 res = f16vec2(2.0hf); +} + +void compute_main() { + ldexp_217a31(); +} + +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + compute_main(); + return; +} diff --git a/test/tint/builtins/gen/literal/ldexp/217a31.wgsl.expected.msl b/test/tint/builtins/gen/literal/ldexp/217a31.wgsl.expected.msl new file mode 100644 index 0000000000..11399f1760 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/217a31.wgsl.expected.msl @@ -0,0 +1,33 @@ +#include + +using namespace metal; +void ldexp_217a31() { + half2 res = half2(2.0h); +} + +struct tint_symbol { + float4 value [[position]]; +}; + +float4 vertex_main_inner() { + ldexp_217a31(); + return float4(0.0f); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main() { + ldexp_217a31(); + return; +} + +kernel void compute_main() { + ldexp_217a31(); + return; +} + diff --git a/test/tint/builtins/gen/literal/ldexp/217a31.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/ldexp/217a31.wgsl.expected.spvasm new file mode 100644 index 0000000000..cf4aff84f5 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/217a31.wgsl.expected.spvasm @@ -0,0 +1,72 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 34 +; Schema: 0 + OpCapability Shader + OpCapability Float16 + OpCapability UniformAndStorageBuffer16BitAccess + OpCapability StorageBuffer16BitAccess + OpCapability StorageInputOutput16 + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size + OpEntryPoint Fragment %fragment_main "fragment_main" + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %fragment_main OriginUpperLeft + OpExecutionMode %compute_main LocalSize 1 1 1 + OpName %value "value" + OpName %vertex_point_size "vertex_point_size" + OpName %ldexp_217a31 "ldexp_217a31" + OpName %res "res" + OpName %vertex_main_inner "vertex_main_inner" + OpName %vertex_main "vertex_main" + OpName %fragment_main "fragment_main" + OpName %compute_main "compute_main" + OpDecorate %value BuiltIn Position + OpDecorate %vertex_point_size BuiltIn PointSize + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%_ptr_Output_v4float = OpTypePointer Output %v4float + %5 = OpConstantNull %v4float + %value = OpVariable %_ptr_Output_v4float Output %5 +%_ptr_Output_float = OpTypePointer Output %float + %8 = OpConstantNull %float +%vertex_point_size = OpVariable %_ptr_Output_float Output %8 + %void = OpTypeVoid + %9 = OpTypeFunction %void + %half = OpTypeFloat 16 + %v2half = OpTypeVector %half 2 +%half_0x1p_1 = OpConstant %half 0x1p+1 + %16 = OpConstantComposite %v2half %half_0x1p_1 %half_0x1p_1 +%_ptr_Function_v2half = OpTypePointer Function %v2half + %19 = OpConstantNull %v2half + %20 = OpTypeFunction %v4float + %float_1 = OpConstant %float 1 +%ldexp_217a31 = OpFunction %void None %9 + %12 = OpLabel + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %res %16 + OpReturn + OpFunctionEnd +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %ldexp_217a31 + OpReturnValue %5 + OpFunctionEnd +%vertex_main = OpFunction %void None %9 + %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 + %29 = OpLabel + %30 = OpFunctionCall %void %ldexp_217a31 + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %9 + %32 = OpLabel + %33 = OpFunctionCall %void %ldexp_217a31 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/ldexp/217a31.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/ldexp/217a31.wgsl.expected.wgsl new file mode 100644 index 0000000000..bdeebb0c8c --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/217a31.wgsl.expected.wgsl @@ -0,0 +1,21 @@ +enable f16; + +fn ldexp_217a31() { + var res : vec2 = ldexp(vec2(1.0h), vec2(1)); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_217a31(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_217a31(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_217a31(); +} diff --git a/test/tint/builtins/gen/literal/ldexp/2bfc68.wgsl b/test/tint/builtins/gen/literal/ldexp/2bfc68.wgsl new file mode 100644 index 0000000000..fe9f9a64d6 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/2bfc68.wgsl @@ -0,0 +1,43 @@ +// Copyright 2022 The Tint Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//////////////////////////////////////////////////////////////////////////////// +// File generated by tools/src/cmd/gen +// using the template: +// test/tint/builtins/gen/gen.wgsl.tmpl +// +// Do not modify this file directly +//////////////////////////////////////////////////////////////////////////////// + + +// fn ldexp(vec<2, fa>, vec<2, i32>) -> vec<2, fa> +fn ldexp_2bfc68() { + var res = ldexp(vec2(1.), vec2(1i)); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_2bfc68(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_2bfc68(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_2bfc68(); +} diff --git a/test/tint/builtins/gen/literal/ldexp/2bfc68.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/ldexp/2bfc68.wgsl.expected.dxc.hlsl new file mode 100644 index 0000000000..9cf0b1a43a --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/2bfc68.wgsl.expected.dxc.hlsl @@ -0,0 +1,30 @@ +void ldexp_2bfc68() { + float2 res = (2.0f).xx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_2bfc68(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_2bfc68(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_2bfc68(); + return; +} diff --git a/test/tint/builtins/gen/literal/ldexp/2bfc68.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ldexp/2bfc68.wgsl.expected.fxc.hlsl new file mode 100644 index 0000000000..9cf0b1a43a --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/2bfc68.wgsl.expected.fxc.hlsl @@ -0,0 +1,30 @@ +void ldexp_2bfc68() { + float2 res = (2.0f).xx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_2bfc68(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_2bfc68(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_2bfc68(); + return; +} diff --git a/test/tint/builtins/gen/literal/ldexp/2bfc68.wgsl.expected.glsl b/test/tint/builtins/gen/literal/ldexp/2bfc68.wgsl.expected.glsl new file mode 100644 index 0000000000..245054d9d6 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/2bfc68.wgsl.expected.glsl @@ -0,0 +1,49 @@ +#version 310 es + +void ldexp_2bfc68() { + vec2 res = vec2(2.0f); +} + +vec4 vertex_main() { + ldexp_2bfc68(); + return vec4(0.0f); +} + +void main() { + gl_PointSize = 1.0; + vec4 inner_result = vertex_main(); + gl_Position = inner_result; + gl_Position.y = -(gl_Position.y); + gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); + return; +} +#version 310 es +precision mediump float; + +void ldexp_2bfc68() { + vec2 res = vec2(2.0f); +} + +void fragment_main() { + ldexp_2bfc68(); +} + +void main() { + fragment_main(); + return; +} +#version 310 es + +void ldexp_2bfc68() { + vec2 res = vec2(2.0f); +} + +void compute_main() { + ldexp_2bfc68(); +} + +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + compute_main(); + return; +} diff --git a/test/tint/builtins/gen/literal/ldexp/2bfc68.wgsl.expected.msl b/test/tint/builtins/gen/literal/ldexp/2bfc68.wgsl.expected.msl new file mode 100644 index 0000000000..004b56ca9e --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/2bfc68.wgsl.expected.msl @@ -0,0 +1,33 @@ +#include + +using namespace metal; +void ldexp_2bfc68() { + float2 res = float2(2.0f); +} + +struct tint_symbol { + float4 value [[position]]; +}; + +float4 vertex_main_inner() { + ldexp_2bfc68(); + return float4(0.0f); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main() { + ldexp_2bfc68(); + return; +} + +kernel void compute_main() { + ldexp_2bfc68(); + return; +} + diff --git a/test/tint/builtins/gen/literal/ldexp/2bfc68.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/ldexp/2bfc68.wgsl.expected.spvasm new file mode 100644 index 0000000000..d9a576608d --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/2bfc68.wgsl.expected.spvasm @@ -0,0 +1,67 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 33 +; Schema: 0 + OpCapability Shader + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size + OpEntryPoint Fragment %fragment_main "fragment_main" + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %fragment_main OriginUpperLeft + OpExecutionMode %compute_main LocalSize 1 1 1 + OpName %value "value" + OpName %vertex_point_size "vertex_point_size" + OpName %ldexp_2bfc68 "ldexp_2bfc68" + OpName %res "res" + OpName %vertex_main_inner "vertex_main_inner" + OpName %vertex_main "vertex_main" + OpName %fragment_main "fragment_main" + OpName %compute_main "compute_main" + OpDecorate %value BuiltIn Position + OpDecorate %vertex_point_size BuiltIn PointSize + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%_ptr_Output_v4float = OpTypePointer Output %v4float + %5 = OpConstantNull %v4float + %value = OpVariable %_ptr_Output_v4float Output %5 +%_ptr_Output_float = OpTypePointer Output %float + %8 = OpConstantNull %float +%vertex_point_size = OpVariable %_ptr_Output_float Output %8 + %void = OpTypeVoid + %9 = OpTypeFunction %void + %v2float = OpTypeVector %float 2 + %float_2 = OpConstant %float 2 + %15 = OpConstantComposite %v2float %float_2 %float_2 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float + %19 = OpTypeFunction %v4float + %float_1 = OpConstant %float 1 +%ldexp_2bfc68 = OpFunction %void None %9 + %12 = OpLabel + %res = OpVariable %_ptr_Function_v2float Function %18 + OpStore %res %15 + OpReturn + OpFunctionEnd +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %ldexp_2bfc68 + OpReturnValue %5 + OpFunctionEnd +%vertex_main = OpFunction %void None %9 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 + OpStore %vertex_point_size %float_1 + OpReturn + OpFunctionEnd +%fragment_main = OpFunction %void None %9 + %28 = OpLabel + %29 = OpFunctionCall %void %ldexp_2bfc68 + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %9 + %31 = OpLabel + %32 = OpFunctionCall %void %ldexp_2bfc68 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/ldexp/2bfc68.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/ldexp/2bfc68.wgsl.expected.wgsl new file mode 100644 index 0000000000..f85cbc0d27 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/2bfc68.wgsl.expected.wgsl @@ -0,0 +1,19 @@ +fn ldexp_2bfc68() { + var res = ldexp(vec2(1.0), vec2(1i)); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_2bfc68(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_2bfc68(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_2bfc68(); +} diff --git a/test/tint/builtins/gen/literal/ldexp/2c6370.wgsl b/test/tint/builtins/gen/literal/ldexp/2c6370.wgsl new file mode 100644 index 0000000000..c42490fba3 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/2c6370.wgsl @@ -0,0 +1,43 @@ +// Copyright 2022 The Tint Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//////////////////////////////////////////////////////////////////////////////// +// File generated by tools/src/cmd/gen +// using the template: +// test/tint/builtins/gen/gen.wgsl.tmpl +// +// Do not modify this file directly +//////////////////////////////////////////////////////////////////////////////// + + +// fn ldexp(vec<2, fa>, vec<2, ia>) -> vec<2, fa> +fn ldexp_2c6370() { + var res = ldexp(vec2(1.), vec2(1)); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_2c6370(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_2c6370(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_2c6370(); +} diff --git a/test/tint/builtins/gen/literal/ldexp/2c6370.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/ldexp/2c6370.wgsl.expected.dxc.hlsl new file mode 100644 index 0000000000..0d345050f7 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/2c6370.wgsl.expected.dxc.hlsl @@ -0,0 +1,30 @@ +void ldexp_2c6370() { + float2 res = (2.0f).xx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_2c6370(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_2c6370(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_2c6370(); + return; +} diff --git a/test/tint/builtins/gen/literal/ldexp/2c6370.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ldexp/2c6370.wgsl.expected.fxc.hlsl new file mode 100644 index 0000000000..0d345050f7 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/2c6370.wgsl.expected.fxc.hlsl @@ -0,0 +1,30 @@ +void ldexp_2c6370() { + float2 res = (2.0f).xx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_2c6370(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_2c6370(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_2c6370(); + return; +} diff --git a/test/tint/builtins/gen/literal/ldexp/2c6370.wgsl.expected.glsl b/test/tint/builtins/gen/literal/ldexp/2c6370.wgsl.expected.glsl new file mode 100644 index 0000000000..629e3b2c95 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/2c6370.wgsl.expected.glsl @@ -0,0 +1,49 @@ +#version 310 es + +void ldexp_2c6370() { + vec2 res = vec2(2.0f); +} + +vec4 vertex_main() { + ldexp_2c6370(); + return vec4(0.0f); +} + +void main() { + gl_PointSize = 1.0; + vec4 inner_result = vertex_main(); + gl_Position = inner_result; + gl_Position.y = -(gl_Position.y); + gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); + return; +} +#version 310 es +precision mediump float; + +void ldexp_2c6370() { + vec2 res = vec2(2.0f); +} + +void fragment_main() { + ldexp_2c6370(); +} + +void main() { + fragment_main(); + return; +} +#version 310 es + +void ldexp_2c6370() { + vec2 res = vec2(2.0f); +} + +void compute_main() { + ldexp_2c6370(); +} + +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + compute_main(); + return; +} diff --git a/test/tint/builtins/gen/literal/ldexp/2c6370.wgsl.expected.msl b/test/tint/builtins/gen/literal/ldexp/2c6370.wgsl.expected.msl new file mode 100644 index 0000000000..f7f74ddcf6 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/2c6370.wgsl.expected.msl @@ -0,0 +1,33 @@ +#include + +using namespace metal; +void ldexp_2c6370() { + float2 res = float2(2.0f); +} + +struct tint_symbol { + float4 value [[position]]; +}; + +float4 vertex_main_inner() { + ldexp_2c6370(); + return float4(0.0f); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main() { + ldexp_2c6370(); + return; +} + +kernel void compute_main() { + ldexp_2c6370(); + return; +} + diff --git a/test/tint/builtins/gen/literal/ldexp/2c6370.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/ldexp/2c6370.wgsl.expected.spvasm new file mode 100644 index 0000000000..c03126a41e --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/2c6370.wgsl.expected.spvasm @@ -0,0 +1,67 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 33 +; Schema: 0 + OpCapability Shader + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size + OpEntryPoint Fragment %fragment_main "fragment_main" + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %fragment_main OriginUpperLeft + OpExecutionMode %compute_main LocalSize 1 1 1 + OpName %value "value" + OpName %vertex_point_size "vertex_point_size" + OpName %ldexp_2c6370 "ldexp_2c6370" + OpName %res "res" + OpName %vertex_main_inner "vertex_main_inner" + OpName %vertex_main "vertex_main" + OpName %fragment_main "fragment_main" + OpName %compute_main "compute_main" + OpDecorate %value BuiltIn Position + OpDecorate %vertex_point_size BuiltIn PointSize + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%_ptr_Output_v4float = OpTypePointer Output %v4float + %5 = OpConstantNull %v4float + %value = OpVariable %_ptr_Output_v4float Output %5 +%_ptr_Output_float = OpTypePointer Output %float + %8 = OpConstantNull %float +%vertex_point_size = OpVariable %_ptr_Output_float Output %8 + %void = OpTypeVoid + %9 = OpTypeFunction %void + %v2float = OpTypeVector %float 2 + %float_2 = OpConstant %float 2 + %15 = OpConstantComposite %v2float %float_2 %float_2 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float + %19 = OpTypeFunction %v4float + %float_1 = OpConstant %float 1 +%ldexp_2c6370 = OpFunction %void None %9 + %12 = OpLabel + %res = OpVariable %_ptr_Function_v2float Function %18 + OpStore %res %15 + OpReturn + OpFunctionEnd +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %ldexp_2c6370 + OpReturnValue %5 + OpFunctionEnd +%vertex_main = OpFunction %void None %9 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 + OpStore %vertex_point_size %float_1 + OpReturn + OpFunctionEnd +%fragment_main = OpFunction %void None %9 + %28 = OpLabel + %29 = OpFunctionCall %void %ldexp_2c6370 + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %9 + %31 = OpLabel + %32 = OpFunctionCall %void %ldexp_2c6370 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/ldexp/2c6370.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/ldexp/2c6370.wgsl.expected.wgsl new file mode 100644 index 0000000000..9a4c04a638 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/2c6370.wgsl.expected.wgsl @@ -0,0 +1,19 @@ +fn ldexp_2c6370() { + var res = ldexp(vec2(1.0), vec2(1)); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_2c6370(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_2c6370(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_2c6370(); +} diff --git a/test/tint/builtins/gen/literal/ldexp/376938.wgsl b/test/tint/builtins/gen/literal/ldexp/376938.wgsl new file mode 100644 index 0000000000..3cfa91bc02 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/376938.wgsl @@ -0,0 +1,43 @@ +// Copyright 2022 The Tint Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//////////////////////////////////////////////////////////////////////////////// +// File generated by tools/src/cmd/gen +// using the template: +// test/tint/builtins/gen/gen.wgsl.tmpl +// +// Do not modify this file directly +//////////////////////////////////////////////////////////////////////////////// + + +// fn ldexp(vec<4, fa>, vec<4, i32>) -> vec<4, fa> +fn ldexp_376938() { + var res = ldexp(vec4(1.), vec4(1i)); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_376938(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_376938(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_376938(); +} diff --git a/test/tint/builtins/gen/literal/ldexp/376938.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/ldexp/376938.wgsl.expected.dxc.hlsl new file mode 100644 index 0000000000..8375928bb9 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/376938.wgsl.expected.dxc.hlsl @@ -0,0 +1,30 @@ +void ldexp_376938() { + float4 res = (2.0f).xxxx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_376938(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_376938(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_376938(); + return; +} diff --git a/test/tint/builtins/gen/literal/ldexp/376938.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ldexp/376938.wgsl.expected.fxc.hlsl new file mode 100644 index 0000000000..8375928bb9 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/376938.wgsl.expected.fxc.hlsl @@ -0,0 +1,30 @@ +void ldexp_376938() { + float4 res = (2.0f).xxxx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_376938(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_376938(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_376938(); + return; +} diff --git a/test/tint/builtins/gen/literal/ldexp/376938.wgsl.expected.glsl b/test/tint/builtins/gen/literal/ldexp/376938.wgsl.expected.glsl new file mode 100644 index 0000000000..0df98a0ec1 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/376938.wgsl.expected.glsl @@ -0,0 +1,49 @@ +#version 310 es + +void ldexp_376938() { + vec4 res = vec4(2.0f); +} + +vec4 vertex_main() { + ldexp_376938(); + return vec4(0.0f); +} + +void main() { + gl_PointSize = 1.0; + vec4 inner_result = vertex_main(); + gl_Position = inner_result; + gl_Position.y = -(gl_Position.y); + gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); + return; +} +#version 310 es +precision mediump float; + +void ldexp_376938() { + vec4 res = vec4(2.0f); +} + +void fragment_main() { + ldexp_376938(); +} + +void main() { + fragment_main(); + return; +} +#version 310 es + +void ldexp_376938() { + vec4 res = vec4(2.0f); +} + +void compute_main() { + ldexp_376938(); +} + +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + compute_main(); + return; +} diff --git a/test/tint/builtins/gen/literal/ldexp/376938.wgsl.expected.msl b/test/tint/builtins/gen/literal/ldexp/376938.wgsl.expected.msl new file mode 100644 index 0000000000..9699a0dea3 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/376938.wgsl.expected.msl @@ -0,0 +1,33 @@ +#include + +using namespace metal; +void ldexp_376938() { + float4 res = float4(2.0f); +} + +struct tint_symbol { + float4 value [[position]]; +}; + +float4 vertex_main_inner() { + ldexp_376938(); + return float4(0.0f); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main() { + ldexp_376938(); + return; +} + +kernel void compute_main() { + ldexp_376938(); + return; +} + diff --git a/test/tint/builtins/gen/literal/ldexp/376938.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/ldexp/376938.wgsl.expected.spvasm new file mode 100644 index 0000000000..f58511eb5d --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/376938.wgsl.expected.spvasm @@ -0,0 +1,65 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 31 +; Schema: 0 + OpCapability Shader + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size + OpEntryPoint Fragment %fragment_main "fragment_main" + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %fragment_main OriginUpperLeft + OpExecutionMode %compute_main LocalSize 1 1 1 + OpName %value "value" + OpName %vertex_point_size "vertex_point_size" + OpName %ldexp_376938 "ldexp_376938" + OpName %res "res" + OpName %vertex_main_inner "vertex_main_inner" + OpName %vertex_main "vertex_main" + OpName %fragment_main "fragment_main" + OpName %compute_main "compute_main" + OpDecorate %value BuiltIn Position + OpDecorate %vertex_point_size BuiltIn PointSize + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%_ptr_Output_v4float = OpTypePointer Output %v4float + %5 = OpConstantNull %v4float + %value = OpVariable %_ptr_Output_v4float Output %5 +%_ptr_Output_float = OpTypePointer Output %float + %8 = OpConstantNull %float +%vertex_point_size = OpVariable %_ptr_Output_float Output %8 + %void = OpTypeVoid + %9 = OpTypeFunction %void + %float_2 = OpConstant %float 2 + %14 = OpConstantComposite %v4float %float_2 %float_2 %float_2 %float_2 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %17 = OpTypeFunction %v4float + %float_1 = OpConstant %float 1 +%ldexp_376938 = OpFunction %void None %9 + %12 = OpLabel + %res = OpVariable %_ptr_Function_v4float Function %5 + OpStore %res %14 + OpReturn + OpFunctionEnd +%vertex_main_inner = OpFunction %v4float None %17 + %19 = OpLabel + %20 = OpFunctionCall %void %ldexp_376938 + OpReturnValue %5 + OpFunctionEnd +%vertex_main = OpFunction %void None %9 + %22 = OpLabel + %23 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %23 + OpStore %vertex_point_size %float_1 + OpReturn + OpFunctionEnd +%fragment_main = OpFunction %void None %9 + %26 = OpLabel + %27 = OpFunctionCall %void %ldexp_376938 + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %9 + %29 = OpLabel + %30 = OpFunctionCall %void %ldexp_376938 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/ldexp/376938.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/ldexp/376938.wgsl.expected.wgsl new file mode 100644 index 0000000000..2b5a41ed96 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/376938.wgsl.expected.wgsl @@ -0,0 +1,19 @@ +fn ldexp_376938() { + var res = ldexp(vec4(1.0), vec4(1i)); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_376938(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_376938(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_376938(); +} 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 beb62a6674..69b9724e7e 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(1.0h)).xx, (1).xx); + vector res = (float16_t(2.0h)).xx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.fxc.hlsl index f1e0c9a825..925bf01fa1 100644 --- a/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ SKIP: FAILED void ldexp_3d90b4() { - vector res = ldexp((float16_t(0.0h)).xx, (1).xx); + vector res = (float16_t(2.0h)).xx; } struct tint_symbol { @@ -30,3 +30,6 @@ void compute_main() { ldexp_3d90b4(); return; } +FXC validation failure: +C:\src\dawn\test\tint\Shader@0x000001C8EE651B30(2,10-18): error X3000: syntax error: unexpected token 'float16_t' + 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 7779006524..0c83237bdb 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(1.0hf), ivec2(1)); + f16vec2 res = f16vec2(2.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void ldexp_3d90b4() { - f16vec2 res = ldexp(f16vec2(1.0hf), ivec2(1)); + f16vec2 res = f16vec2(2.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void ldexp_3d90b4() { - f16vec2 res = ldexp(f16vec2(1.0hf), ivec2(1)); + f16vec2 res = f16vec2(2.0hf); } 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 458ac36a17..02e836cfd0 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(1.0h), int2(1)); + half2 res = half2(2.0h); } 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 69d848c971..14b8d009a2 100644 --- a/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.spvasm @@ -1,14 +1,13 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %16 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -37,42 +36,37 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 -%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 - %22 = OpConstantComposite %v2int %int_1 %int_1 +%half_0x1p_1 = OpConstant %half 0x1p+1 + %16 = OpConstantComposite %v2half %half_0x1p_1 %half_0x1p_1 %_ptr_Function_v2half = OpTypePointer Function %v2half - %25 = OpConstantNull %v2half - %26 = OpTypeFunction %v4float + %19 = OpConstantNull %v2half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %ldexp_3d90b4 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2half Function %25 - %13 = OpExtInst %v2half %16 Ldexp %18 %22 - OpStore %res %13 + %res = OpVariable %_ptr_Function_v2half Function %19 + OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %ldexp_3d90b4 +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %ldexp_3d90b4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %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 - %35 = OpLabel - %36 = OpFunctionCall %void %ldexp_3d90b4 + %29 = OpLabel + %30 = OpFunctionCall %void %ldexp_3d90b4 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %void %ldexp_3d90b4 + %32 = OpLabel + %33 = OpFunctionCall %void %ldexp_3d90b4 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/ldexp/4a3ad9.wgsl b/test/tint/builtins/gen/literal/ldexp/4a3ad9.wgsl new file mode 100644 index 0000000000..f28017c668 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/4a3ad9.wgsl @@ -0,0 +1,43 @@ +// Copyright 2022 The Tint Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//////////////////////////////////////////////////////////////////////////////// +// File generated by tools/src/cmd/gen +// using the template: +// test/tint/builtins/gen/gen.wgsl.tmpl +// +// Do not modify this file directly +//////////////////////////////////////////////////////////////////////////////// + + +// fn ldexp(vec<3, fa>, vec<3, ia>) -> vec<3, fa> +fn ldexp_4a3ad9() { + var res = ldexp(vec3(1.), vec3(1)); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_4a3ad9(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_4a3ad9(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_4a3ad9(); +} diff --git a/test/tint/builtins/gen/literal/ldexp/4a3ad9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/ldexp/4a3ad9.wgsl.expected.dxc.hlsl new file mode 100644 index 0000000000..e2e2d8ddc3 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/4a3ad9.wgsl.expected.dxc.hlsl @@ -0,0 +1,30 @@ +void ldexp_4a3ad9() { + float3 res = (2.0f).xxx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_4a3ad9(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_4a3ad9(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_4a3ad9(); + return; +} diff --git a/test/tint/builtins/gen/literal/ldexp/4a3ad9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ldexp/4a3ad9.wgsl.expected.fxc.hlsl new file mode 100644 index 0000000000..e2e2d8ddc3 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/4a3ad9.wgsl.expected.fxc.hlsl @@ -0,0 +1,30 @@ +void ldexp_4a3ad9() { + float3 res = (2.0f).xxx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_4a3ad9(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_4a3ad9(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_4a3ad9(); + return; +} diff --git a/test/tint/builtins/gen/literal/ldexp/4a3ad9.wgsl.expected.glsl b/test/tint/builtins/gen/literal/ldexp/4a3ad9.wgsl.expected.glsl new file mode 100644 index 0000000000..9dba689db0 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/4a3ad9.wgsl.expected.glsl @@ -0,0 +1,49 @@ +#version 310 es + +void ldexp_4a3ad9() { + vec3 res = vec3(2.0f); +} + +vec4 vertex_main() { + ldexp_4a3ad9(); + return vec4(0.0f); +} + +void main() { + gl_PointSize = 1.0; + vec4 inner_result = vertex_main(); + gl_Position = inner_result; + gl_Position.y = -(gl_Position.y); + gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); + return; +} +#version 310 es +precision mediump float; + +void ldexp_4a3ad9() { + vec3 res = vec3(2.0f); +} + +void fragment_main() { + ldexp_4a3ad9(); +} + +void main() { + fragment_main(); + return; +} +#version 310 es + +void ldexp_4a3ad9() { + vec3 res = vec3(2.0f); +} + +void compute_main() { + ldexp_4a3ad9(); +} + +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + compute_main(); + return; +} diff --git a/test/tint/builtins/gen/literal/ldexp/4a3ad9.wgsl.expected.msl b/test/tint/builtins/gen/literal/ldexp/4a3ad9.wgsl.expected.msl new file mode 100644 index 0000000000..17d363be63 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/4a3ad9.wgsl.expected.msl @@ -0,0 +1,33 @@ +#include + +using namespace metal; +void ldexp_4a3ad9() { + float3 res = float3(2.0f); +} + +struct tint_symbol { + float4 value [[position]]; +}; + +float4 vertex_main_inner() { + ldexp_4a3ad9(); + return float4(0.0f); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main() { + ldexp_4a3ad9(); + return; +} + +kernel void compute_main() { + ldexp_4a3ad9(); + return; +} + diff --git a/test/tint/builtins/gen/literal/ldexp/4a3ad9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/ldexp/4a3ad9.wgsl.expected.spvasm new file mode 100644 index 0000000000..ed2d5ba260 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/4a3ad9.wgsl.expected.spvasm @@ -0,0 +1,67 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 33 +; Schema: 0 + OpCapability Shader + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size + OpEntryPoint Fragment %fragment_main "fragment_main" + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %fragment_main OriginUpperLeft + OpExecutionMode %compute_main LocalSize 1 1 1 + OpName %value "value" + OpName %vertex_point_size "vertex_point_size" + OpName %ldexp_4a3ad9 "ldexp_4a3ad9" + OpName %res "res" + OpName %vertex_main_inner "vertex_main_inner" + OpName %vertex_main "vertex_main" + OpName %fragment_main "fragment_main" + OpName %compute_main "compute_main" + OpDecorate %value BuiltIn Position + OpDecorate %vertex_point_size BuiltIn PointSize + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%_ptr_Output_v4float = OpTypePointer Output %v4float + %5 = OpConstantNull %v4float + %value = OpVariable %_ptr_Output_v4float Output %5 +%_ptr_Output_float = OpTypePointer Output %float + %8 = OpConstantNull %float +%vertex_point_size = OpVariable %_ptr_Output_float Output %8 + %void = OpTypeVoid + %9 = OpTypeFunction %void + %v3float = OpTypeVector %float 3 + %float_2 = OpConstant %float 2 + %15 = OpConstantComposite %v3float %float_2 %float_2 %float_2 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float + %19 = OpTypeFunction %v4float + %float_1 = OpConstant %float 1 +%ldexp_4a3ad9 = OpFunction %void None %9 + %12 = OpLabel + %res = OpVariable %_ptr_Function_v3float Function %18 + OpStore %res %15 + OpReturn + OpFunctionEnd +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %ldexp_4a3ad9 + OpReturnValue %5 + OpFunctionEnd +%vertex_main = OpFunction %void None %9 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 + OpStore %vertex_point_size %float_1 + OpReturn + OpFunctionEnd +%fragment_main = OpFunction %void None %9 + %28 = OpLabel + %29 = OpFunctionCall %void %ldexp_4a3ad9 + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %9 + %31 = OpLabel + %32 = OpFunctionCall %void %ldexp_4a3ad9 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/ldexp/4a3ad9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/ldexp/4a3ad9.wgsl.expected.wgsl new file mode 100644 index 0000000000..d5efc45a32 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/4a3ad9.wgsl.expected.wgsl @@ -0,0 +1,19 @@ +fn ldexp_4a3ad9() { + var res = ldexp(vec3(1.0), vec3(1)); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_4a3ad9(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_4a3ad9(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_4a3ad9(); +} diff --git a/test/tint/builtins/gen/literal/ldexp/593ff3.wgsl b/test/tint/builtins/gen/literal/ldexp/593ff3.wgsl new file mode 100644 index 0000000000..280871f4ea --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/593ff3.wgsl @@ -0,0 +1,43 @@ +// Copyright 2022 The Tint Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//////////////////////////////////////////////////////////////////////////////// +// File generated by tools/src/cmd/gen +// using the template: +// test/tint/builtins/gen/gen.wgsl.tmpl +// +// Do not modify this file directly +//////////////////////////////////////////////////////////////////////////////// + + +// fn ldexp(vec<3, f32>, vec<3, ia>) -> vec<3, f32> +fn ldexp_593ff3() { + var res: vec3 = ldexp(vec3(1.f), vec3(1)); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_593ff3(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_593ff3(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_593ff3(); +} diff --git a/test/tint/builtins/gen/literal/ldexp/593ff3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/ldexp/593ff3.wgsl.expected.dxc.hlsl new file mode 100644 index 0000000000..9bb2916dec --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/593ff3.wgsl.expected.dxc.hlsl @@ -0,0 +1,30 @@ +void ldexp_593ff3() { + float3 res = (2.0f).xxx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_593ff3(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_593ff3(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_593ff3(); + return; +} diff --git a/test/tint/builtins/gen/literal/ldexp/593ff3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ldexp/593ff3.wgsl.expected.fxc.hlsl new file mode 100644 index 0000000000..9bb2916dec --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/593ff3.wgsl.expected.fxc.hlsl @@ -0,0 +1,30 @@ +void ldexp_593ff3() { + float3 res = (2.0f).xxx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_593ff3(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_593ff3(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_593ff3(); + return; +} diff --git a/test/tint/builtins/gen/literal/ldexp/593ff3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/ldexp/593ff3.wgsl.expected.glsl new file mode 100644 index 0000000000..a35a95b2e2 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/593ff3.wgsl.expected.glsl @@ -0,0 +1,49 @@ +#version 310 es + +void ldexp_593ff3() { + vec3 res = vec3(2.0f); +} + +vec4 vertex_main() { + ldexp_593ff3(); + return vec4(0.0f); +} + +void main() { + gl_PointSize = 1.0; + vec4 inner_result = vertex_main(); + gl_Position = inner_result; + gl_Position.y = -(gl_Position.y); + gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); + return; +} +#version 310 es +precision mediump float; + +void ldexp_593ff3() { + vec3 res = vec3(2.0f); +} + +void fragment_main() { + ldexp_593ff3(); +} + +void main() { + fragment_main(); + return; +} +#version 310 es + +void ldexp_593ff3() { + vec3 res = vec3(2.0f); +} + +void compute_main() { + ldexp_593ff3(); +} + +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + compute_main(); + return; +} diff --git a/test/tint/builtins/gen/literal/ldexp/593ff3.wgsl.expected.msl b/test/tint/builtins/gen/literal/ldexp/593ff3.wgsl.expected.msl new file mode 100644 index 0000000000..2746bb7bba --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/593ff3.wgsl.expected.msl @@ -0,0 +1,33 @@ +#include + +using namespace metal; +void ldexp_593ff3() { + float3 res = float3(2.0f); +} + +struct tint_symbol { + float4 value [[position]]; +}; + +float4 vertex_main_inner() { + ldexp_593ff3(); + return float4(0.0f); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main() { + ldexp_593ff3(); + return; +} + +kernel void compute_main() { + ldexp_593ff3(); + return; +} + diff --git a/test/tint/builtins/gen/literal/ldexp/593ff3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/ldexp/593ff3.wgsl.expected.spvasm new file mode 100644 index 0000000000..6a465d8a98 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/593ff3.wgsl.expected.spvasm @@ -0,0 +1,67 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 33 +; Schema: 0 + OpCapability Shader + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size + OpEntryPoint Fragment %fragment_main "fragment_main" + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %fragment_main OriginUpperLeft + OpExecutionMode %compute_main LocalSize 1 1 1 + OpName %value "value" + OpName %vertex_point_size "vertex_point_size" + OpName %ldexp_593ff3 "ldexp_593ff3" + OpName %res "res" + OpName %vertex_main_inner "vertex_main_inner" + OpName %vertex_main "vertex_main" + OpName %fragment_main "fragment_main" + OpName %compute_main "compute_main" + OpDecorate %value BuiltIn Position + OpDecorate %vertex_point_size BuiltIn PointSize + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%_ptr_Output_v4float = OpTypePointer Output %v4float + %5 = OpConstantNull %v4float + %value = OpVariable %_ptr_Output_v4float Output %5 +%_ptr_Output_float = OpTypePointer Output %float + %8 = OpConstantNull %float +%vertex_point_size = OpVariable %_ptr_Output_float Output %8 + %void = OpTypeVoid + %9 = OpTypeFunction %void + %v3float = OpTypeVector %float 3 + %float_2 = OpConstant %float 2 + %15 = OpConstantComposite %v3float %float_2 %float_2 %float_2 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float + %19 = OpTypeFunction %v4float + %float_1 = OpConstant %float 1 +%ldexp_593ff3 = OpFunction %void None %9 + %12 = OpLabel + %res = OpVariable %_ptr_Function_v3float Function %18 + OpStore %res %15 + OpReturn + OpFunctionEnd +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %ldexp_593ff3 + OpReturnValue %5 + OpFunctionEnd +%vertex_main = OpFunction %void None %9 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 + OpStore %vertex_point_size %float_1 + OpReturn + OpFunctionEnd +%fragment_main = OpFunction %void None %9 + %28 = OpLabel + %29 = OpFunctionCall %void %ldexp_593ff3 + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %9 + %31 = OpLabel + %32 = OpFunctionCall %void %ldexp_593ff3 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/ldexp/593ff3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/ldexp/593ff3.wgsl.expected.wgsl new file mode 100644 index 0000000000..846a389203 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/593ff3.wgsl.expected.wgsl @@ -0,0 +1,19 @@ +fn ldexp_593ff3() { + var res : vec3 = ldexp(vec3(1.0f), vec3(1)); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_593ff3(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_593ff3(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_593ff3(); +} 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 400d56b3b3..a2b620378b 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(1.0h), 1); + float16_t res = float16_t(2.0h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.fxc.hlsl index 098737593b..e9b62dd002 100644 --- a/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ SKIP: FAILED void ldexp_624e0c() { - float16_t res = ldexp(float16_t(0.0h), 1); + float16_t res = float16_t(2.0h); } struct tint_symbol { @@ -30,3 +30,7 @@ void compute_main() { ldexp_624e0c(); return; } +FXC validation failure: +C:\src\dawn\test\tint\Shader@0x00000246DEBE4390(2,3-11): error X3000: unrecognized identifier 'float16_t' +C:\src\dawn\test\tint\Shader@0x00000246DEBE4390(2,13-15): error X3000: unrecognized identifier 'res' + 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 1ad1643444..86a0a7a590 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(1.0hf, 1); + float16_t res = 2.0hf; } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void ldexp_624e0c() { - float16_t res = ldexp(1.0hf, 1); + float16_t res = 2.0hf; } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void ldexp_624e0c() { - float16_t res = ldexp(1.0hf, 1); + float16_t res = 2.0hf; } 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 87d24f3981..c2af249dec 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(1.0h, 1); + half res = 2.0h; } 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 ca7b0f2e5e..15a4bac6a9 100644 --- a/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.spvasm @@ -1,14 +1,13 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 32 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %15 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -36,39 +35,36 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 -%half_0x1p_0 = OpConstant %half 0x1p+0 - %int = OpTypeInt 32 1 - %int_1 = OpConstant %int 1 +%half_0x1p_1 = OpConstant %half 0x1p+1 %_ptr_Function_half = OpTypePointer Function %half - %21 = OpConstantNull %half - %22 = OpTypeFunction %v4float + %17 = OpConstantNull %half + %18 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %ldexp_624e0c = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_half Function %21 - %13 = OpExtInst %half %15 Ldexp %half_0x1p_0 %int_1 - OpStore %res %13 + %res = OpVariable %_ptr_Function_half Function %17 + OpStore %res %half_0x1p_1 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %ldexp_624e0c +%vertex_main_inner = OpFunction %v4float None %18 + %20 = OpLabel + %21 = OpFunctionCall %void %ldexp_624e0c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %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 - %31 = OpLabel - %32 = OpFunctionCall %void %ldexp_624e0c + %27 = OpLabel + %28 = OpFunctionCall %void %ldexp_624e0c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %ldexp_624e0c + %30 = OpLabel + %31 = OpFunctionCall %void %ldexp_624e0c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/ldexp/65a7bd.wgsl b/test/tint/builtins/gen/literal/ldexp/65a7bd.wgsl new file mode 100644 index 0000000000..631d76f577 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/65a7bd.wgsl @@ -0,0 +1,43 @@ +// Copyright 2022 The Tint Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//////////////////////////////////////////////////////////////////////////////// +// File generated by tools/src/cmd/gen +// using the template: +// test/tint/builtins/gen/gen.wgsl.tmpl +// +// Do not modify this file directly +//////////////////////////////////////////////////////////////////////////////// + + +// fn ldexp(vec<4, f32>, vec<4, ia>) -> vec<4, f32> +fn ldexp_65a7bd() { + var res: vec4 = ldexp(vec4(1.f), vec4(1)); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_65a7bd(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_65a7bd(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_65a7bd(); +} diff --git a/test/tint/builtins/gen/literal/ldexp/65a7bd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/ldexp/65a7bd.wgsl.expected.dxc.hlsl new file mode 100644 index 0000000000..7618199fd7 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/65a7bd.wgsl.expected.dxc.hlsl @@ -0,0 +1,30 @@ +void ldexp_65a7bd() { + float4 res = (2.0f).xxxx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_65a7bd(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_65a7bd(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_65a7bd(); + return; +} diff --git a/test/tint/builtins/gen/literal/ldexp/65a7bd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ldexp/65a7bd.wgsl.expected.fxc.hlsl new file mode 100644 index 0000000000..7618199fd7 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/65a7bd.wgsl.expected.fxc.hlsl @@ -0,0 +1,30 @@ +void ldexp_65a7bd() { + float4 res = (2.0f).xxxx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_65a7bd(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_65a7bd(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_65a7bd(); + return; +} diff --git a/test/tint/builtins/gen/literal/ldexp/65a7bd.wgsl.expected.glsl b/test/tint/builtins/gen/literal/ldexp/65a7bd.wgsl.expected.glsl new file mode 100644 index 0000000000..596e044241 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/65a7bd.wgsl.expected.glsl @@ -0,0 +1,49 @@ +#version 310 es + +void ldexp_65a7bd() { + vec4 res = vec4(2.0f); +} + +vec4 vertex_main() { + ldexp_65a7bd(); + return vec4(0.0f); +} + +void main() { + gl_PointSize = 1.0; + vec4 inner_result = vertex_main(); + gl_Position = inner_result; + gl_Position.y = -(gl_Position.y); + gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); + return; +} +#version 310 es +precision mediump float; + +void ldexp_65a7bd() { + vec4 res = vec4(2.0f); +} + +void fragment_main() { + ldexp_65a7bd(); +} + +void main() { + fragment_main(); + return; +} +#version 310 es + +void ldexp_65a7bd() { + vec4 res = vec4(2.0f); +} + +void compute_main() { + ldexp_65a7bd(); +} + +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + compute_main(); + return; +} diff --git a/test/tint/builtins/gen/literal/ldexp/65a7bd.wgsl.expected.msl b/test/tint/builtins/gen/literal/ldexp/65a7bd.wgsl.expected.msl new file mode 100644 index 0000000000..4524da59de --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/65a7bd.wgsl.expected.msl @@ -0,0 +1,33 @@ +#include + +using namespace metal; +void ldexp_65a7bd() { + float4 res = float4(2.0f); +} + +struct tint_symbol { + float4 value [[position]]; +}; + +float4 vertex_main_inner() { + ldexp_65a7bd(); + return float4(0.0f); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main() { + ldexp_65a7bd(); + return; +} + +kernel void compute_main() { + ldexp_65a7bd(); + return; +} + diff --git a/test/tint/builtins/gen/literal/ldexp/65a7bd.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/ldexp/65a7bd.wgsl.expected.spvasm new file mode 100644 index 0000000000..b39d530198 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/65a7bd.wgsl.expected.spvasm @@ -0,0 +1,65 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 31 +; Schema: 0 + OpCapability Shader + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size + OpEntryPoint Fragment %fragment_main "fragment_main" + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %fragment_main OriginUpperLeft + OpExecutionMode %compute_main LocalSize 1 1 1 + OpName %value "value" + OpName %vertex_point_size "vertex_point_size" + OpName %ldexp_65a7bd "ldexp_65a7bd" + OpName %res "res" + OpName %vertex_main_inner "vertex_main_inner" + OpName %vertex_main "vertex_main" + OpName %fragment_main "fragment_main" + OpName %compute_main "compute_main" + OpDecorate %value BuiltIn Position + OpDecorate %vertex_point_size BuiltIn PointSize + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%_ptr_Output_v4float = OpTypePointer Output %v4float + %5 = OpConstantNull %v4float + %value = OpVariable %_ptr_Output_v4float Output %5 +%_ptr_Output_float = OpTypePointer Output %float + %8 = OpConstantNull %float +%vertex_point_size = OpVariable %_ptr_Output_float Output %8 + %void = OpTypeVoid + %9 = OpTypeFunction %void + %float_2 = OpConstant %float 2 + %14 = OpConstantComposite %v4float %float_2 %float_2 %float_2 %float_2 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %17 = OpTypeFunction %v4float + %float_1 = OpConstant %float 1 +%ldexp_65a7bd = OpFunction %void None %9 + %12 = OpLabel + %res = OpVariable %_ptr_Function_v4float Function %5 + OpStore %res %14 + OpReturn + OpFunctionEnd +%vertex_main_inner = OpFunction %v4float None %17 + %19 = OpLabel + %20 = OpFunctionCall %void %ldexp_65a7bd + OpReturnValue %5 + OpFunctionEnd +%vertex_main = OpFunction %void None %9 + %22 = OpLabel + %23 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %23 + OpStore %vertex_point_size %float_1 + OpReturn + OpFunctionEnd +%fragment_main = OpFunction %void None %9 + %26 = OpLabel + %27 = OpFunctionCall %void %ldexp_65a7bd + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %9 + %29 = OpLabel + %30 = OpFunctionCall %void %ldexp_65a7bd + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/ldexp/65a7bd.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/ldexp/65a7bd.wgsl.expected.wgsl new file mode 100644 index 0000000000..82cdf95e96 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/65a7bd.wgsl.expected.wgsl @@ -0,0 +1,19 @@ +fn ldexp_65a7bd() { + var res : vec4 = ldexp(vec4(1.0f), vec4(1)); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_65a7bd(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_65a7bd(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_65a7bd(); +} diff --git a/test/tint/builtins/gen/literal/ldexp/71ebe3.wgsl b/test/tint/builtins/gen/literal/ldexp/71ebe3.wgsl new file mode 100644 index 0000000000..a40a398d6d --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/71ebe3.wgsl @@ -0,0 +1,43 @@ +// Copyright 2022 The Tint Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//////////////////////////////////////////////////////////////////////////////// +// File generated by tools/src/cmd/gen +// using the template: +// test/tint/builtins/gen/gen.wgsl.tmpl +// +// Do not modify this file directly +//////////////////////////////////////////////////////////////////////////////// + + +// fn ldexp(fa, i32) -> fa +fn ldexp_71ebe3() { + var res = ldexp(1., 1i); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_71ebe3(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_71ebe3(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_71ebe3(); +} diff --git a/test/tint/builtins/gen/literal/ldexp/71ebe3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/ldexp/71ebe3.wgsl.expected.dxc.hlsl new file mode 100644 index 0000000000..95af106133 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/71ebe3.wgsl.expected.dxc.hlsl @@ -0,0 +1,30 @@ +void ldexp_71ebe3() { + float res = 2.0f; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_71ebe3(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_71ebe3(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_71ebe3(); + return; +} diff --git a/test/tint/builtins/gen/literal/ldexp/71ebe3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ldexp/71ebe3.wgsl.expected.fxc.hlsl new file mode 100644 index 0000000000..95af106133 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/71ebe3.wgsl.expected.fxc.hlsl @@ -0,0 +1,30 @@ +void ldexp_71ebe3() { + float res = 2.0f; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_71ebe3(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_71ebe3(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_71ebe3(); + return; +} diff --git a/test/tint/builtins/gen/literal/ldexp/71ebe3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/ldexp/71ebe3.wgsl.expected.glsl new file mode 100644 index 0000000000..7d99b31224 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/71ebe3.wgsl.expected.glsl @@ -0,0 +1,49 @@ +#version 310 es + +void ldexp_71ebe3() { + float res = 2.0f; +} + +vec4 vertex_main() { + ldexp_71ebe3(); + return vec4(0.0f); +} + +void main() { + gl_PointSize = 1.0; + vec4 inner_result = vertex_main(); + gl_Position = inner_result; + gl_Position.y = -(gl_Position.y); + gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); + return; +} +#version 310 es +precision mediump float; + +void ldexp_71ebe3() { + float res = 2.0f; +} + +void fragment_main() { + ldexp_71ebe3(); +} + +void main() { + fragment_main(); + return; +} +#version 310 es + +void ldexp_71ebe3() { + float res = 2.0f; +} + +void compute_main() { + ldexp_71ebe3(); +} + +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + compute_main(); + return; +} diff --git a/test/tint/builtins/gen/literal/ldexp/71ebe3.wgsl.expected.msl b/test/tint/builtins/gen/literal/ldexp/71ebe3.wgsl.expected.msl new file mode 100644 index 0000000000..034a94fb4d --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/71ebe3.wgsl.expected.msl @@ -0,0 +1,33 @@ +#include + +using namespace metal; +void ldexp_71ebe3() { + float res = 2.0f; +} + +struct tint_symbol { + float4 value [[position]]; +}; + +float4 vertex_main_inner() { + ldexp_71ebe3(); + return float4(0.0f); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main() { + ldexp_71ebe3(); + return; +} + +kernel void compute_main() { + ldexp_71ebe3(); + return; +} + diff --git a/test/tint/builtins/gen/literal/ldexp/71ebe3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/ldexp/71ebe3.wgsl.expected.spvasm new file mode 100644 index 0000000000..037a02d418 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/71ebe3.wgsl.expected.spvasm @@ -0,0 +1,64 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 30 +; Schema: 0 + OpCapability Shader + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size + OpEntryPoint Fragment %fragment_main "fragment_main" + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %fragment_main OriginUpperLeft + OpExecutionMode %compute_main LocalSize 1 1 1 + OpName %value "value" + OpName %vertex_point_size "vertex_point_size" + OpName %ldexp_71ebe3 "ldexp_71ebe3" + OpName %res "res" + OpName %vertex_main_inner "vertex_main_inner" + OpName %vertex_main "vertex_main" + OpName %fragment_main "fragment_main" + OpName %compute_main "compute_main" + OpDecorate %value BuiltIn Position + OpDecorate %vertex_point_size BuiltIn PointSize + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%_ptr_Output_v4float = OpTypePointer Output %v4float + %5 = OpConstantNull %v4float + %value = OpVariable %_ptr_Output_v4float Output %5 +%_ptr_Output_float = OpTypePointer Output %float + %8 = OpConstantNull %float +%vertex_point_size = OpVariable %_ptr_Output_float Output %8 + %void = OpTypeVoid + %9 = OpTypeFunction %void + %float_2 = OpConstant %float 2 +%_ptr_Function_float = OpTypePointer Function %float + %16 = OpTypeFunction %v4float + %float_1 = OpConstant %float 1 +%ldexp_71ebe3 = OpFunction %void None %9 + %12 = OpLabel + %res = OpVariable %_ptr_Function_float Function %8 + OpStore %res %float_2 + OpReturn + OpFunctionEnd +%vertex_main_inner = OpFunction %v4float None %16 + %18 = OpLabel + %19 = OpFunctionCall %void %ldexp_71ebe3 + OpReturnValue %5 + OpFunctionEnd +%vertex_main = OpFunction %void None %9 + %21 = OpLabel + %22 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %22 + OpStore %vertex_point_size %float_1 + OpReturn + OpFunctionEnd +%fragment_main = OpFunction %void None %9 + %25 = OpLabel + %26 = OpFunctionCall %void %ldexp_71ebe3 + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %9 + %28 = OpLabel + %29 = OpFunctionCall %void %ldexp_71ebe3 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/ldexp/71ebe3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/ldexp/71ebe3.wgsl.expected.wgsl new file mode 100644 index 0000000000..9895961e5f --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/71ebe3.wgsl.expected.wgsl @@ -0,0 +1,19 @@ +fn ldexp_71ebe3() { + var res = ldexp(1.0, 1i); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_71ebe3(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_71ebe3(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_71ebe3(); +} 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 030092ccd9..8b46162db0 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(1.0h)).xxx, (1).xxx); + vector res = (float16_t(2.0h)).xxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.fxc.hlsl index b6b1506a1e..2cc49b057a 100644 --- a/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ SKIP: FAILED void ldexp_7485ce() { - vector res = ldexp((float16_t(0.0h)).xxx, (1).xxx); + vector res = (float16_t(2.0h)).xxx; } struct tint_symbol { @@ -30,3 +30,6 @@ void compute_main() { ldexp_7485ce(); return; } +FXC validation failure: +C:\src\dawn\test\tint\Shader@0x000001A317BC93B0(2,10-18): error X3000: syntax error: unexpected token 'float16_t' + 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 105e249cfa..733e1a8f03 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(1.0hf), ivec3(1)); + f16vec3 res = f16vec3(2.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void ldexp_7485ce() { - f16vec3 res = ldexp(f16vec3(1.0hf), ivec3(1)); + f16vec3 res = f16vec3(2.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void ldexp_7485ce() { - f16vec3 res = ldexp(f16vec3(1.0hf), ivec3(1)); + f16vec3 res = f16vec3(2.0hf); } 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 a29ffa3ec0..fd47d2106f 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(1.0h), int3(1)); + half3 res = half3(2.0h); } 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 44a5e07f38..beb358bb82 100644 --- a/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.spvasm @@ -1,14 +1,13 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %16 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -37,42 +36,37 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 -%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 - %22 = OpConstantComposite %v3int %int_1 %int_1 %int_1 +%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 - %25 = OpConstantNull %v3half - %26 = OpTypeFunction %v4float + %19 = OpConstantNull %v3half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %ldexp_7485ce = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3half Function %25 - %13 = OpExtInst %v3half %16 Ldexp %18 %22 - OpStore %res %13 + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %ldexp_7485ce +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %ldexp_7485ce OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %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 - %35 = OpLabel - %36 = OpFunctionCall %void %ldexp_7485ce + %29 = OpLabel + %30 = OpFunctionCall %void %ldexp_7485ce OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %void %ldexp_7485ce + %32 = OpLabel + %33 = OpFunctionCall %void %ldexp_7485ce OpReturn OpFunctionEnd 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 36931fcef6..b887087abf 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(1.0h)).xxxx, (1).xxxx); + vector res = (float16_t(2.0h)).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.fxc.hlsl index a84e2faa41..f619ab8973 100644 --- a/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ SKIP: FAILED void ldexp_7fa13c() { - vector res = ldexp((float16_t(0.0h)).xxxx, (1).xxxx); + vector res = (float16_t(2.0h)).xxxx; } struct tint_symbol { @@ -30,3 +30,6 @@ void compute_main() { ldexp_7fa13c(); return; } +FXC validation failure: +C:\src\dawn\test\tint\Shader@0x000001D4BE9AE370(2,10-18): error X3000: syntax error: unexpected token 'float16_t' + 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 2ac9122934..2ceef88d2b 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(1.0hf), ivec4(1)); + f16vec4 res = f16vec4(2.0hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void ldexp_7fa13c() { - f16vec4 res = ldexp(f16vec4(1.0hf), ivec4(1)); + f16vec4 res = f16vec4(2.0hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void ldexp_7fa13c() { - f16vec4 res = ldexp(f16vec4(1.0hf), ivec4(1)); + f16vec4 res = f16vec4(2.0hf); } 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 536316a094..f9410cf2e6 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(1.0h), int4(1)); + half4 res = half4(2.0h); } 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 1ddace3169..fc3ef1d033 100644 --- a/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.spvasm @@ -1,14 +1,13 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability Float16 OpCapability UniformAndStorageBuffer16BitAccess OpCapability StorageBuffer16BitAccess OpCapability StorageInputOutput16 - %16 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -37,42 +36,37 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 -%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 - %22 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 +%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 - %25 = OpConstantNull %v4half - %26 = OpTypeFunction %v4float + %19 = OpConstantNull %v4half + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %ldexp_7fa13c = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4half Function %25 - %13 = OpExtInst %v4half %16 Ldexp %18 %22 - OpStore %res %13 + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %ldexp_7fa13c +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %ldexp_7fa13c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %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 - %35 = OpLabel - %36 = OpFunctionCall %void %ldexp_7fa13c + %29 = OpLabel + %30 = OpFunctionCall %void %ldexp_7fa13c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %void %ldexp_7fa13c + %32 = OpLabel + %33 = OpFunctionCall %void %ldexp_7fa13c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/ldexp/8a0c2f.wgsl b/test/tint/builtins/gen/literal/ldexp/8a0c2f.wgsl new file mode 100644 index 0000000000..3f7f79a9f5 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/8a0c2f.wgsl @@ -0,0 +1,45 @@ +// Copyright 2022 The Tint Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//////////////////////////////////////////////////////////////////////////////// +// File generated by tools/src/cmd/gen +// using the template: +// test/tint/builtins/gen/gen.wgsl.tmpl +// +// Do not modify this file directly +//////////////////////////////////////////////////////////////////////////////// + + +enable f16; + +// fn ldexp(vec<4, f16>, vec<4, ia>) -> vec<4, f16> +fn ldexp_8a0c2f() { + var res: vec4 = ldexp(vec4(1.h), vec4(1)); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_8a0c2f(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_8a0c2f(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_8a0c2f(); +} diff --git a/test/tint/builtins/gen/literal/ldexp/8a0c2f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/ldexp/8a0c2f.wgsl.expected.dxc.hlsl new file mode 100644 index 0000000000..88109b693b --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/8a0c2f.wgsl.expected.dxc.hlsl @@ -0,0 +1,30 @@ +void ldexp_8a0c2f() { + vector res = (float16_t(2.0h)).xxxx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_8a0c2f(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_8a0c2f(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_8a0c2f(); + return; +} diff --git a/test/tint/builtins/gen/literal/ldexp/8a0c2f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ldexp/8a0c2f.wgsl.expected.fxc.hlsl new file mode 100644 index 0000000000..ee084a5b7e --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/8a0c2f.wgsl.expected.fxc.hlsl @@ -0,0 +1,35 @@ +SKIP: FAILED + +void ldexp_8a0c2f() { + vector res = (float16_t(2.0h)).xxxx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_8a0c2f(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_8a0c2f(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_8a0c2f(); + return; +} +FXC validation failure: +C:\src\dawn\test\tint\Shader@0x0000021161096930(2,10-18): error X3000: syntax error: unexpected token 'float16_t' + diff --git a/test/tint/builtins/gen/literal/ldexp/8a0c2f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/ldexp/8a0c2f.wgsl.expected.glsl new file mode 100644 index 0000000000..7b4220b471 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/8a0c2f.wgsl.expected.glsl @@ -0,0 +1,52 @@ +#version 310 es +#extension GL_AMD_gpu_shader_half_float : require + +void ldexp_8a0c2f() { + f16vec4 res = f16vec4(2.0hf); +} + +vec4 vertex_main() { + ldexp_8a0c2f(); + return vec4(0.0f); +} + +void main() { + gl_PointSize = 1.0; + vec4 inner_result = vertex_main(); + gl_Position = inner_result; + gl_Position.y = -(gl_Position.y); + gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); + return; +} +#version 310 es +#extension GL_AMD_gpu_shader_half_float : require +precision mediump float; + +void ldexp_8a0c2f() { + f16vec4 res = f16vec4(2.0hf); +} + +void fragment_main() { + ldexp_8a0c2f(); +} + +void main() { + fragment_main(); + return; +} +#version 310 es +#extension GL_AMD_gpu_shader_half_float : require + +void ldexp_8a0c2f() { + f16vec4 res = f16vec4(2.0hf); +} + +void compute_main() { + ldexp_8a0c2f(); +} + +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + compute_main(); + return; +} diff --git a/test/tint/builtins/gen/literal/ldexp/8a0c2f.wgsl.expected.msl b/test/tint/builtins/gen/literal/ldexp/8a0c2f.wgsl.expected.msl new file mode 100644 index 0000000000..ba2809abe4 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/8a0c2f.wgsl.expected.msl @@ -0,0 +1,33 @@ +#include + +using namespace metal; +void ldexp_8a0c2f() { + half4 res = half4(2.0h); +} + +struct tint_symbol { + float4 value [[position]]; +}; + +float4 vertex_main_inner() { + ldexp_8a0c2f(); + return float4(0.0f); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main() { + ldexp_8a0c2f(); + return; +} + +kernel void compute_main() { + ldexp_8a0c2f(); + return; +} + diff --git a/test/tint/builtins/gen/literal/ldexp/8a0c2f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/ldexp/8a0c2f.wgsl.expected.spvasm new file mode 100644 index 0000000000..c40bb287d1 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/8a0c2f.wgsl.expected.spvasm @@ -0,0 +1,72 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 34 +; Schema: 0 + OpCapability Shader + OpCapability Float16 + OpCapability UniformAndStorageBuffer16BitAccess + OpCapability StorageBuffer16BitAccess + OpCapability StorageInputOutput16 + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size + OpEntryPoint Fragment %fragment_main "fragment_main" + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %fragment_main OriginUpperLeft + OpExecutionMode %compute_main LocalSize 1 1 1 + OpName %value "value" + OpName %vertex_point_size "vertex_point_size" + OpName %ldexp_8a0c2f "ldexp_8a0c2f" + OpName %res "res" + OpName %vertex_main_inner "vertex_main_inner" + OpName %vertex_main "vertex_main" + OpName %fragment_main "fragment_main" + OpName %compute_main "compute_main" + OpDecorate %value BuiltIn Position + OpDecorate %vertex_point_size BuiltIn PointSize + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%_ptr_Output_v4float = OpTypePointer Output %v4float + %5 = OpConstantNull %v4float + %value = OpVariable %_ptr_Output_v4float Output %5 +%_ptr_Output_float = OpTypePointer Output %float + %8 = OpConstantNull %float +%vertex_point_size = OpVariable %_ptr_Output_float Output %8 + %void = OpTypeVoid + %9 = OpTypeFunction %void + %half = OpTypeFloat 16 + %v4half = OpTypeVector %half 4 +%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 + %19 = OpConstantNull %v4half + %20 = OpTypeFunction %v4float + %float_1 = OpConstant %float 1 +%ldexp_8a0c2f = OpFunction %void None %9 + %12 = OpLabel + %res = OpVariable %_ptr_Function_v4half Function %19 + OpStore %res %16 + OpReturn + OpFunctionEnd +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %ldexp_8a0c2f + OpReturnValue %5 + OpFunctionEnd +%vertex_main = OpFunction %void None %9 + %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 + %29 = OpLabel + %30 = OpFunctionCall %void %ldexp_8a0c2f + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %9 + %32 = OpLabel + %33 = OpFunctionCall %void %ldexp_8a0c2f + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/ldexp/8a0c2f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/ldexp/8a0c2f.wgsl.expected.wgsl new file mode 100644 index 0000000000..ed2cd1eebe --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/8a0c2f.wgsl.expected.wgsl @@ -0,0 +1,21 @@ +enable f16; + +fn ldexp_8a0c2f() { + var res : vec4 = ldexp(vec4(1.0h), vec4(1)); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_8a0c2f(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_8a0c2f(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_8a0c2f(); +} diff --git a/test/tint/builtins/gen/literal/ldexp/8e43e9.wgsl b/test/tint/builtins/gen/literal/ldexp/8e43e9.wgsl new file mode 100644 index 0000000000..3d32e42767 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/8e43e9.wgsl @@ -0,0 +1,45 @@ +// Copyright 2022 The Tint Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//////////////////////////////////////////////////////////////////////////////// +// File generated by tools/src/cmd/gen +// using the template: +// test/tint/builtins/gen/gen.wgsl.tmpl +// +// Do not modify this file directly +//////////////////////////////////////////////////////////////////////////////// + + +enable f16; + +// fn ldexp(vec<3, f16>, vec<3, ia>) -> vec<3, f16> +fn ldexp_8e43e9() { + var res: vec3 = ldexp(vec3(1.h), vec3(1)); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_8e43e9(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_8e43e9(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_8e43e9(); +} diff --git a/test/tint/builtins/gen/literal/ldexp/8e43e9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/ldexp/8e43e9.wgsl.expected.dxc.hlsl new file mode 100644 index 0000000000..b2d3816caa --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/8e43e9.wgsl.expected.dxc.hlsl @@ -0,0 +1,30 @@ +void ldexp_8e43e9() { + vector res = (float16_t(2.0h)).xxx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_8e43e9(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_8e43e9(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_8e43e9(); + return; +} diff --git a/test/tint/builtins/gen/literal/ldexp/8e43e9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ldexp/8e43e9.wgsl.expected.fxc.hlsl new file mode 100644 index 0000000000..ca6aad3dd0 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/8e43e9.wgsl.expected.fxc.hlsl @@ -0,0 +1,35 @@ +SKIP: FAILED + +void ldexp_8e43e9() { + vector res = (float16_t(2.0h)).xxx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_8e43e9(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_8e43e9(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_8e43e9(); + return; +} +FXC validation failure: +C:\src\dawn\test\tint\Shader@0x00000172CFF90020(2,10-18): error X3000: syntax error: unexpected token 'float16_t' + diff --git a/test/tint/builtins/gen/literal/ldexp/8e43e9.wgsl.expected.glsl b/test/tint/builtins/gen/literal/ldexp/8e43e9.wgsl.expected.glsl new file mode 100644 index 0000000000..a3d738ca08 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/8e43e9.wgsl.expected.glsl @@ -0,0 +1,52 @@ +#version 310 es +#extension GL_AMD_gpu_shader_half_float : require + +void ldexp_8e43e9() { + f16vec3 res = f16vec3(2.0hf); +} + +vec4 vertex_main() { + ldexp_8e43e9(); + return vec4(0.0f); +} + +void main() { + gl_PointSize = 1.0; + vec4 inner_result = vertex_main(); + gl_Position = inner_result; + gl_Position.y = -(gl_Position.y); + gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); + return; +} +#version 310 es +#extension GL_AMD_gpu_shader_half_float : require +precision mediump float; + +void ldexp_8e43e9() { + f16vec3 res = f16vec3(2.0hf); +} + +void fragment_main() { + ldexp_8e43e9(); +} + +void main() { + fragment_main(); + return; +} +#version 310 es +#extension GL_AMD_gpu_shader_half_float : require + +void ldexp_8e43e9() { + f16vec3 res = f16vec3(2.0hf); +} + +void compute_main() { + ldexp_8e43e9(); +} + +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + compute_main(); + return; +} diff --git a/test/tint/builtins/gen/literal/ldexp/8e43e9.wgsl.expected.msl b/test/tint/builtins/gen/literal/ldexp/8e43e9.wgsl.expected.msl new file mode 100644 index 0000000000..0f02cac5ad --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/8e43e9.wgsl.expected.msl @@ -0,0 +1,33 @@ +#include + +using namespace metal; +void ldexp_8e43e9() { + half3 res = half3(2.0h); +} + +struct tint_symbol { + float4 value [[position]]; +}; + +float4 vertex_main_inner() { + ldexp_8e43e9(); + return float4(0.0f); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main() { + ldexp_8e43e9(); + return; +} + +kernel void compute_main() { + ldexp_8e43e9(); + return; +} + diff --git a/test/tint/builtins/gen/literal/ldexp/8e43e9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/ldexp/8e43e9.wgsl.expected.spvasm new file mode 100644 index 0000000000..f94ca99b07 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/8e43e9.wgsl.expected.spvasm @@ -0,0 +1,72 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 34 +; Schema: 0 + OpCapability Shader + OpCapability Float16 + OpCapability UniformAndStorageBuffer16BitAccess + OpCapability StorageBuffer16BitAccess + OpCapability StorageInputOutput16 + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size + OpEntryPoint Fragment %fragment_main "fragment_main" + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %fragment_main OriginUpperLeft + OpExecutionMode %compute_main LocalSize 1 1 1 + OpName %value "value" + OpName %vertex_point_size "vertex_point_size" + OpName %ldexp_8e43e9 "ldexp_8e43e9" + OpName %res "res" + OpName %vertex_main_inner "vertex_main_inner" + OpName %vertex_main "vertex_main" + OpName %fragment_main "fragment_main" + OpName %compute_main "compute_main" + OpDecorate %value BuiltIn Position + OpDecorate %vertex_point_size BuiltIn PointSize + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%_ptr_Output_v4float = OpTypePointer Output %v4float + %5 = OpConstantNull %v4float + %value = OpVariable %_ptr_Output_v4float Output %5 +%_ptr_Output_float = OpTypePointer Output %float + %8 = OpConstantNull %float +%vertex_point_size = OpVariable %_ptr_Output_float Output %8 + %void = OpTypeVoid + %9 = OpTypeFunction %void + %half = OpTypeFloat 16 + %v3half = OpTypeVector %half 3 +%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 + %19 = OpConstantNull %v3half + %20 = OpTypeFunction %v4float + %float_1 = OpConstant %float 1 +%ldexp_8e43e9 = OpFunction %void None %9 + %12 = OpLabel + %res = OpVariable %_ptr_Function_v3half Function %19 + OpStore %res %16 + OpReturn + OpFunctionEnd +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %ldexp_8e43e9 + OpReturnValue %5 + OpFunctionEnd +%vertex_main = OpFunction %void None %9 + %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 + %29 = OpLabel + %30 = OpFunctionCall %void %ldexp_8e43e9 + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %9 + %32 = OpLabel + %33 = OpFunctionCall %void %ldexp_8e43e9 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/ldexp/8e43e9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/ldexp/8e43e9.wgsl.expected.wgsl new file mode 100644 index 0000000000..6c057521ab --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/8e43e9.wgsl.expected.wgsl @@ -0,0 +1,21 @@ +enable f16; + +fn ldexp_8e43e9() { + var res : vec3 = ldexp(vec3(1.0h), vec3(1)); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_8e43e9(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_8e43e9(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_8e43e9(); +} diff --git a/test/tint/builtins/gen/literal/ldexp/a22679.wgsl b/test/tint/builtins/gen/literal/ldexp/a22679.wgsl new file mode 100644 index 0000000000..c3f51b3e89 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/a22679.wgsl @@ -0,0 +1,43 @@ +// Copyright 2022 The Tint Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//////////////////////////////////////////////////////////////////////////////// +// File generated by tools/src/cmd/gen +// using the template: +// test/tint/builtins/gen/gen.wgsl.tmpl +// +// Do not modify this file directly +//////////////////////////////////////////////////////////////////////////////// + + +// fn ldexp(vec<2, f32>, vec<2, ia>) -> vec<2, f32> +fn ldexp_a22679() { + var res: vec2 = ldexp(vec2(1.f), vec2(1)); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_a22679(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_a22679(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_a22679(); +} diff --git a/test/tint/builtins/gen/literal/ldexp/a22679.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/ldexp/a22679.wgsl.expected.dxc.hlsl new file mode 100644 index 0000000000..bccd1a51f1 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/a22679.wgsl.expected.dxc.hlsl @@ -0,0 +1,30 @@ +void ldexp_a22679() { + float2 res = (2.0f).xx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_a22679(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_a22679(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_a22679(); + return; +} diff --git a/test/tint/builtins/gen/literal/ldexp/a22679.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ldexp/a22679.wgsl.expected.fxc.hlsl new file mode 100644 index 0000000000..bccd1a51f1 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/a22679.wgsl.expected.fxc.hlsl @@ -0,0 +1,30 @@ +void ldexp_a22679() { + float2 res = (2.0f).xx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_a22679(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_a22679(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_a22679(); + return; +} diff --git a/test/tint/builtins/gen/literal/ldexp/a22679.wgsl.expected.glsl b/test/tint/builtins/gen/literal/ldexp/a22679.wgsl.expected.glsl new file mode 100644 index 0000000000..22cff50c58 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/a22679.wgsl.expected.glsl @@ -0,0 +1,49 @@ +#version 310 es + +void ldexp_a22679() { + vec2 res = vec2(2.0f); +} + +vec4 vertex_main() { + ldexp_a22679(); + return vec4(0.0f); +} + +void main() { + gl_PointSize = 1.0; + vec4 inner_result = vertex_main(); + gl_Position = inner_result; + gl_Position.y = -(gl_Position.y); + gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); + return; +} +#version 310 es +precision mediump float; + +void ldexp_a22679() { + vec2 res = vec2(2.0f); +} + +void fragment_main() { + ldexp_a22679(); +} + +void main() { + fragment_main(); + return; +} +#version 310 es + +void ldexp_a22679() { + vec2 res = vec2(2.0f); +} + +void compute_main() { + ldexp_a22679(); +} + +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + compute_main(); + return; +} diff --git a/test/tint/builtins/gen/literal/ldexp/a22679.wgsl.expected.msl b/test/tint/builtins/gen/literal/ldexp/a22679.wgsl.expected.msl new file mode 100644 index 0000000000..3548b48ea5 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/a22679.wgsl.expected.msl @@ -0,0 +1,33 @@ +#include + +using namespace metal; +void ldexp_a22679() { + float2 res = float2(2.0f); +} + +struct tint_symbol { + float4 value [[position]]; +}; + +float4 vertex_main_inner() { + ldexp_a22679(); + return float4(0.0f); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main() { + ldexp_a22679(); + return; +} + +kernel void compute_main() { + ldexp_a22679(); + return; +} + diff --git a/test/tint/builtins/gen/literal/ldexp/a22679.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/ldexp/a22679.wgsl.expected.spvasm new file mode 100644 index 0000000000..43f2cbfadc --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/a22679.wgsl.expected.spvasm @@ -0,0 +1,67 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 33 +; Schema: 0 + OpCapability Shader + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size + OpEntryPoint Fragment %fragment_main "fragment_main" + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %fragment_main OriginUpperLeft + OpExecutionMode %compute_main LocalSize 1 1 1 + OpName %value "value" + OpName %vertex_point_size "vertex_point_size" + OpName %ldexp_a22679 "ldexp_a22679" + OpName %res "res" + OpName %vertex_main_inner "vertex_main_inner" + OpName %vertex_main "vertex_main" + OpName %fragment_main "fragment_main" + OpName %compute_main "compute_main" + OpDecorate %value BuiltIn Position + OpDecorate %vertex_point_size BuiltIn PointSize + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%_ptr_Output_v4float = OpTypePointer Output %v4float + %5 = OpConstantNull %v4float + %value = OpVariable %_ptr_Output_v4float Output %5 +%_ptr_Output_float = OpTypePointer Output %float + %8 = OpConstantNull %float +%vertex_point_size = OpVariable %_ptr_Output_float Output %8 + %void = OpTypeVoid + %9 = OpTypeFunction %void + %v2float = OpTypeVector %float 2 + %float_2 = OpConstant %float 2 + %15 = OpConstantComposite %v2float %float_2 %float_2 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float + %19 = OpTypeFunction %v4float + %float_1 = OpConstant %float 1 +%ldexp_a22679 = OpFunction %void None %9 + %12 = OpLabel + %res = OpVariable %_ptr_Function_v2float Function %18 + OpStore %res %15 + OpReturn + OpFunctionEnd +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %ldexp_a22679 + OpReturnValue %5 + OpFunctionEnd +%vertex_main = OpFunction %void None %9 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 + OpStore %vertex_point_size %float_1 + OpReturn + OpFunctionEnd +%fragment_main = OpFunction %void None %9 + %28 = OpLabel + %29 = OpFunctionCall %void %ldexp_a22679 + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %9 + %31 = OpLabel + %32 = OpFunctionCall %void %ldexp_a22679 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/ldexp/a22679.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/ldexp/a22679.wgsl.expected.wgsl new file mode 100644 index 0000000000..c97e9a899f --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/a22679.wgsl.expected.wgsl @@ -0,0 +1,19 @@ +fn ldexp_a22679() { + var res : vec2 = ldexp(vec2(1.0f), vec2(1)); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_a22679(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_a22679(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_a22679(); +} diff --git a/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl.expected.dxc.hlsl index b2ec51db34..f23dd5c172 100644 --- a/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void ldexp_a31cdc() { - float3 res = ldexp((1.0f).xxx, (1).xxx); + float3 res = (2.0f).xxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl.expected.fxc.hlsl index b2ec51db34..f23dd5c172 100644 --- a/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void ldexp_a31cdc() { - float3 res = ldexp((1.0f).xxx, (1).xxx); + float3 res = (2.0f).xxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl.expected.glsl b/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl.expected.glsl index 6183994b60..030040bbb0 100644 --- a/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void ldexp_a31cdc() { - vec3 res = ldexp(vec3(1.0f), ivec3(1)); + vec3 res = vec3(2.0f); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void ldexp_a31cdc() { - vec3 res = ldexp(vec3(1.0f), ivec3(1)); + vec3 res = vec3(2.0f); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void ldexp_a31cdc() { - vec3 res = ldexp(vec3(1.0f), ivec3(1)); + vec3 res = vec3(2.0f); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl.expected.msl b/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl.expected.msl index 14c9d99921..c9c07bfbc4 100644 --- a/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void ldexp_a31cdc() { - float3 res = ldexp(float3(1.0f), int3(1)); + float3 res = float3(2.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl.expected.spvasm index ea305234c6..3dc1f32b39 100644 --- a/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl.expected.spvasm @@ -1,10 +1,9 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 33 ; Schema: 0 OpCapability Shader - %15 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -32,41 +31,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %float_1 = OpConstant %float 1 - %17 = OpConstantComposite %v3float %float_1 %float_1 %float_1 - %int = OpTypeInt 32 1 - %v3int = OpTypeVector %int 3 - %int_1 = OpConstant %int 1 - %21 = OpConstantComposite %v3int %int_1 %int_1 %int_1 + %float_2 = OpConstant %float 2 + %15 = OpConstantComposite %v3float %float_2 %float_2 %float_2 %_ptr_Function_v3float = OpTypePointer Function %v3float - %24 = OpConstantNull %v3float - %25 = OpTypeFunction %v4float + %18 = OpConstantNull %v3float + %19 = OpTypeFunction %v4float + %float_1 = OpConstant %float 1 %ldexp_a31cdc = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %24 - %13 = OpExtInst %v3float %15 Ldexp %17 %21 - OpStore %res %13 + %res = OpVariable %_ptr_Function_v3float Function %18 + OpStore %res %15 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %ldexp_a31cdc +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %ldexp_a31cdc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %ldexp_a31cdc + %28 = OpLabel + %29 = OpFunctionCall %void %ldexp_a31cdc OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %ldexp_a31cdc + %31 = OpLabel + %32 = OpFunctionCall %void %ldexp_a31cdc OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/ldexp/a6126e.wgsl b/test/tint/builtins/gen/literal/ldexp/a6126e.wgsl new file mode 100644 index 0000000000..717c2a8f36 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/a6126e.wgsl @@ -0,0 +1,43 @@ +// Copyright 2022 The Tint Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//////////////////////////////////////////////////////////////////////////////// +// File generated by tools/src/cmd/gen +// using the template: +// test/tint/builtins/gen/gen.wgsl.tmpl +// +// Do not modify this file directly +//////////////////////////////////////////////////////////////////////////////// + + +// fn ldexp(vec<3, fa>, vec<3, i32>) -> vec<3, fa> +fn ldexp_a6126e() { + var res = ldexp(vec3(1.), vec3(1i)); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_a6126e(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_a6126e(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_a6126e(); +} diff --git a/test/tint/builtins/gen/literal/ldexp/a6126e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/ldexp/a6126e.wgsl.expected.dxc.hlsl new file mode 100644 index 0000000000..0b98307575 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/a6126e.wgsl.expected.dxc.hlsl @@ -0,0 +1,30 @@ +void ldexp_a6126e() { + float3 res = (2.0f).xxx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_a6126e(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_a6126e(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_a6126e(); + return; +} diff --git a/test/tint/builtins/gen/literal/ldexp/a6126e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ldexp/a6126e.wgsl.expected.fxc.hlsl new file mode 100644 index 0000000000..0b98307575 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/a6126e.wgsl.expected.fxc.hlsl @@ -0,0 +1,30 @@ +void ldexp_a6126e() { + float3 res = (2.0f).xxx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_a6126e(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_a6126e(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_a6126e(); + return; +} diff --git a/test/tint/builtins/gen/literal/ldexp/a6126e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/ldexp/a6126e.wgsl.expected.glsl new file mode 100644 index 0000000000..c082edd5bd --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/a6126e.wgsl.expected.glsl @@ -0,0 +1,49 @@ +#version 310 es + +void ldexp_a6126e() { + vec3 res = vec3(2.0f); +} + +vec4 vertex_main() { + ldexp_a6126e(); + return vec4(0.0f); +} + +void main() { + gl_PointSize = 1.0; + vec4 inner_result = vertex_main(); + gl_Position = inner_result; + gl_Position.y = -(gl_Position.y); + gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); + return; +} +#version 310 es +precision mediump float; + +void ldexp_a6126e() { + vec3 res = vec3(2.0f); +} + +void fragment_main() { + ldexp_a6126e(); +} + +void main() { + fragment_main(); + return; +} +#version 310 es + +void ldexp_a6126e() { + vec3 res = vec3(2.0f); +} + +void compute_main() { + ldexp_a6126e(); +} + +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + compute_main(); + return; +} diff --git a/test/tint/builtins/gen/literal/ldexp/a6126e.wgsl.expected.msl b/test/tint/builtins/gen/literal/ldexp/a6126e.wgsl.expected.msl new file mode 100644 index 0000000000..043a0d5bd1 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/a6126e.wgsl.expected.msl @@ -0,0 +1,33 @@ +#include + +using namespace metal; +void ldexp_a6126e() { + float3 res = float3(2.0f); +} + +struct tint_symbol { + float4 value [[position]]; +}; + +float4 vertex_main_inner() { + ldexp_a6126e(); + return float4(0.0f); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main() { + ldexp_a6126e(); + return; +} + +kernel void compute_main() { + ldexp_a6126e(); + return; +} + diff --git a/test/tint/builtins/gen/literal/ldexp/a6126e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/ldexp/a6126e.wgsl.expected.spvasm new file mode 100644 index 0000000000..f41c3a8db2 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/a6126e.wgsl.expected.spvasm @@ -0,0 +1,67 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 33 +; Schema: 0 + OpCapability Shader + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size + OpEntryPoint Fragment %fragment_main "fragment_main" + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %fragment_main OriginUpperLeft + OpExecutionMode %compute_main LocalSize 1 1 1 + OpName %value "value" + OpName %vertex_point_size "vertex_point_size" + OpName %ldexp_a6126e "ldexp_a6126e" + OpName %res "res" + OpName %vertex_main_inner "vertex_main_inner" + OpName %vertex_main "vertex_main" + OpName %fragment_main "fragment_main" + OpName %compute_main "compute_main" + OpDecorate %value BuiltIn Position + OpDecorate %vertex_point_size BuiltIn PointSize + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%_ptr_Output_v4float = OpTypePointer Output %v4float + %5 = OpConstantNull %v4float + %value = OpVariable %_ptr_Output_v4float Output %5 +%_ptr_Output_float = OpTypePointer Output %float + %8 = OpConstantNull %float +%vertex_point_size = OpVariable %_ptr_Output_float Output %8 + %void = OpTypeVoid + %9 = OpTypeFunction %void + %v3float = OpTypeVector %float 3 + %float_2 = OpConstant %float 2 + %15 = OpConstantComposite %v3float %float_2 %float_2 %float_2 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float + %19 = OpTypeFunction %v4float + %float_1 = OpConstant %float 1 +%ldexp_a6126e = OpFunction %void None %9 + %12 = OpLabel + %res = OpVariable %_ptr_Function_v3float Function %18 + OpStore %res %15 + OpReturn + OpFunctionEnd +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %ldexp_a6126e + OpReturnValue %5 + OpFunctionEnd +%vertex_main = OpFunction %void None %9 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 + OpStore %vertex_point_size %float_1 + OpReturn + OpFunctionEnd +%fragment_main = OpFunction %void None %9 + %28 = OpLabel + %29 = OpFunctionCall %void %ldexp_a6126e + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %9 + %31 = OpLabel + %32 = OpFunctionCall %void %ldexp_a6126e + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/ldexp/a6126e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/ldexp/a6126e.wgsl.expected.wgsl new file mode 100644 index 0000000000..dbd95f6076 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/a6126e.wgsl.expected.wgsl @@ -0,0 +1,19 @@ +fn ldexp_a6126e() { + var res = ldexp(vec3(1.0), vec3(1i)); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_a6126e(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_a6126e(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_a6126e(); +} diff --git a/test/tint/builtins/gen/literal/ldexp/abd718.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/ldexp/abd718.wgsl.expected.dxc.hlsl index e630230fe4..a4ae26ef88 100644 --- a/test/tint/builtins/gen/literal/ldexp/abd718.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/ldexp/abd718.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void ldexp_abd718() { - float2 res = ldexp((1.0f).xx, (1).xx); + float2 res = (2.0f).xx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/ldexp/abd718.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ldexp/abd718.wgsl.expected.fxc.hlsl index e630230fe4..a4ae26ef88 100644 --- a/test/tint/builtins/gen/literal/ldexp/abd718.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/ldexp/abd718.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void ldexp_abd718() { - float2 res = ldexp((1.0f).xx, (1).xx); + float2 res = (2.0f).xx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/ldexp/abd718.wgsl.expected.glsl b/test/tint/builtins/gen/literal/ldexp/abd718.wgsl.expected.glsl index c529027948..67212c59d1 100644 --- a/test/tint/builtins/gen/literal/ldexp/abd718.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/ldexp/abd718.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void ldexp_abd718() { - vec2 res = ldexp(vec2(1.0f), ivec2(1)); + vec2 res = vec2(2.0f); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void ldexp_abd718() { - vec2 res = ldexp(vec2(1.0f), ivec2(1)); + vec2 res = vec2(2.0f); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void ldexp_abd718() { - vec2 res = ldexp(vec2(1.0f), ivec2(1)); + vec2 res = vec2(2.0f); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/ldexp/abd718.wgsl.expected.msl b/test/tint/builtins/gen/literal/ldexp/abd718.wgsl.expected.msl index 2e6ab5c61d..d7463d85ef 100644 --- a/test/tint/builtins/gen/literal/ldexp/abd718.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/ldexp/abd718.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void ldexp_abd718() { - float2 res = ldexp(float2(1.0f), int2(1)); + float2 res = float2(2.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/ldexp/abd718.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/ldexp/abd718.wgsl.expected.spvasm index c00bbce1e5..29673d9c23 100644 --- a/test/tint/builtins/gen/literal/ldexp/abd718.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/ldexp/abd718.wgsl.expected.spvasm @@ -1,10 +1,9 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 33 ; Schema: 0 OpCapability Shader - %15 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -32,41 +31,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %float_1 = OpConstant %float 1 - %17 = OpConstantComposite %v2float %float_1 %float_1 - %int = OpTypeInt 32 1 - %v2int = OpTypeVector %int 2 - %int_1 = OpConstant %int 1 - %21 = OpConstantComposite %v2int %int_1 %int_1 + %float_2 = OpConstant %float 2 + %15 = OpConstantComposite %v2float %float_2 %float_2 %_ptr_Function_v2float = OpTypePointer Function %v2float - %24 = OpConstantNull %v2float - %25 = OpTypeFunction %v4float + %18 = OpConstantNull %v2float + %19 = OpTypeFunction %v4float + %float_1 = OpConstant %float 1 %ldexp_abd718 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %24 - %13 = OpExtInst %v2float %15 Ldexp %17 %21 - OpStore %res %13 + %res = OpVariable %_ptr_Function_v2float Function %18 + OpStore %res %15 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %ldexp_abd718 +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %ldexp_abd718 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %ldexp_abd718 + %28 = OpLabel + %29 = OpFunctionCall %void %ldexp_abd718 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %ldexp_abd718 + %31 = OpLabel + %32 = OpFunctionCall %void %ldexp_abd718 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/ldexp/c9d0b7.wgsl b/test/tint/builtins/gen/literal/ldexp/c9d0b7.wgsl new file mode 100644 index 0000000000..9724c84a62 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/c9d0b7.wgsl @@ -0,0 +1,43 @@ +// Copyright 2022 The Tint Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//////////////////////////////////////////////////////////////////////////////// +// File generated by tools/src/cmd/gen +// using the template: +// test/tint/builtins/gen/gen.wgsl.tmpl +// +// Do not modify this file directly +//////////////////////////////////////////////////////////////////////////////// + + +// fn ldexp(f32, ia) -> f32 +fn ldexp_c9d0b7() { + var res: f32 = ldexp(1.f, 1); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_c9d0b7(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_c9d0b7(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_c9d0b7(); +} diff --git a/test/tint/builtins/gen/literal/ldexp/c9d0b7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/ldexp/c9d0b7.wgsl.expected.dxc.hlsl new file mode 100644 index 0000000000..1b12fc5fac --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/c9d0b7.wgsl.expected.dxc.hlsl @@ -0,0 +1,30 @@ +void ldexp_c9d0b7() { + float res = 2.0f; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_c9d0b7(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_c9d0b7(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_c9d0b7(); + return; +} diff --git a/test/tint/builtins/gen/literal/ldexp/c9d0b7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ldexp/c9d0b7.wgsl.expected.fxc.hlsl new file mode 100644 index 0000000000..1b12fc5fac --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/c9d0b7.wgsl.expected.fxc.hlsl @@ -0,0 +1,30 @@ +void ldexp_c9d0b7() { + float res = 2.0f; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_c9d0b7(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_c9d0b7(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_c9d0b7(); + return; +} diff --git a/test/tint/builtins/gen/literal/ldexp/c9d0b7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/ldexp/c9d0b7.wgsl.expected.glsl new file mode 100644 index 0000000000..7351482b23 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/c9d0b7.wgsl.expected.glsl @@ -0,0 +1,49 @@ +#version 310 es + +void ldexp_c9d0b7() { + float res = 2.0f; +} + +vec4 vertex_main() { + ldexp_c9d0b7(); + return vec4(0.0f); +} + +void main() { + gl_PointSize = 1.0; + vec4 inner_result = vertex_main(); + gl_Position = inner_result; + gl_Position.y = -(gl_Position.y); + gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); + return; +} +#version 310 es +precision mediump float; + +void ldexp_c9d0b7() { + float res = 2.0f; +} + +void fragment_main() { + ldexp_c9d0b7(); +} + +void main() { + fragment_main(); + return; +} +#version 310 es + +void ldexp_c9d0b7() { + float res = 2.0f; +} + +void compute_main() { + ldexp_c9d0b7(); +} + +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + compute_main(); + return; +} diff --git a/test/tint/builtins/gen/literal/ldexp/c9d0b7.wgsl.expected.msl b/test/tint/builtins/gen/literal/ldexp/c9d0b7.wgsl.expected.msl new file mode 100644 index 0000000000..724f18ecb2 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/c9d0b7.wgsl.expected.msl @@ -0,0 +1,33 @@ +#include + +using namespace metal; +void ldexp_c9d0b7() { + float res = 2.0f; +} + +struct tint_symbol { + float4 value [[position]]; +}; + +float4 vertex_main_inner() { + ldexp_c9d0b7(); + return float4(0.0f); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main() { + ldexp_c9d0b7(); + return; +} + +kernel void compute_main() { + ldexp_c9d0b7(); + return; +} + diff --git a/test/tint/builtins/gen/literal/ldexp/c9d0b7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/ldexp/c9d0b7.wgsl.expected.spvasm new file mode 100644 index 0000000000..67bd84265d --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/c9d0b7.wgsl.expected.spvasm @@ -0,0 +1,64 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 30 +; Schema: 0 + OpCapability Shader + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size + OpEntryPoint Fragment %fragment_main "fragment_main" + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %fragment_main OriginUpperLeft + OpExecutionMode %compute_main LocalSize 1 1 1 + OpName %value "value" + OpName %vertex_point_size "vertex_point_size" + OpName %ldexp_c9d0b7 "ldexp_c9d0b7" + OpName %res "res" + OpName %vertex_main_inner "vertex_main_inner" + OpName %vertex_main "vertex_main" + OpName %fragment_main "fragment_main" + OpName %compute_main "compute_main" + OpDecorate %value BuiltIn Position + OpDecorate %vertex_point_size BuiltIn PointSize + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%_ptr_Output_v4float = OpTypePointer Output %v4float + %5 = OpConstantNull %v4float + %value = OpVariable %_ptr_Output_v4float Output %5 +%_ptr_Output_float = OpTypePointer Output %float + %8 = OpConstantNull %float +%vertex_point_size = OpVariable %_ptr_Output_float Output %8 + %void = OpTypeVoid + %9 = OpTypeFunction %void + %float_2 = OpConstant %float 2 +%_ptr_Function_float = OpTypePointer Function %float + %16 = OpTypeFunction %v4float + %float_1 = OpConstant %float 1 +%ldexp_c9d0b7 = OpFunction %void None %9 + %12 = OpLabel + %res = OpVariable %_ptr_Function_float Function %8 + OpStore %res %float_2 + OpReturn + OpFunctionEnd +%vertex_main_inner = OpFunction %v4float None %16 + %18 = OpLabel + %19 = OpFunctionCall %void %ldexp_c9d0b7 + OpReturnValue %5 + OpFunctionEnd +%vertex_main = OpFunction %void None %9 + %21 = OpLabel + %22 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %22 + OpStore %vertex_point_size %float_1 + OpReturn + OpFunctionEnd +%fragment_main = OpFunction %void None %9 + %25 = OpLabel + %26 = OpFunctionCall %void %ldexp_c9d0b7 + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %9 + %28 = OpLabel + %29 = OpFunctionCall %void %ldexp_c9d0b7 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/ldexp/c9d0b7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/ldexp/c9d0b7.wgsl.expected.wgsl new file mode 100644 index 0000000000..024a1cb006 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/c9d0b7.wgsl.expected.wgsl @@ -0,0 +1,19 @@ +fn ldexp_c9d0b7() { + var res : f32 = ldexp(1.0f, 1); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_c9d0b7(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_c9d0b7(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_c9d0b7(); +} diff --git a/test/tint/builtins/gen/literal/ldexp/cb0faf.wgsl b/test/tint/builtins/gen/literal/ldexp/cb0faf.wgsl new file mode 100644 index 0000000000..66e9b94e9a --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/cb0faf.wgsl @@ -0,0 +1,43 @@ +// Copyright 2022 The Tint Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//////////////////////////////////////////////////////////////////////////////// +// File generated by tools/src/cmd/gen +// using the template: +// test/tint/builtins/gen/gen.wgsl.tmpl +// +// Do not modify this file directly +//////////////////////////////////////////////////////////////////////////////// + + +// fn ldexp(vec<4, fa>, vec<4, ia>) -> vec<4, fa> +fn ldexp_cb0faf() { + var res = ldexp(vec4(1.), vec4(1)); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_cb0faf(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_cb0faf(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_cb0faf(); +} diff --git a/test/tint/builtins/gen/literal/ldexp/cb0faf.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/ldexp/cb0faf.wgsl.expected.dxc.hlsl new file mode 100644 index 0000000000..bd074989e8 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/cb0faf.wgsl.expected.dxc.hlsl @@ -0,0 +1,30 @@ +void ldexp_cb0faf() { + float4 res = (2.0f).xxxx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_cb0faf(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_cb0faf(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_cb0faf(); + return; +} diff --git a/test/tint/builtins/gen/literal/ldexp/cb0faf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ldexp/cb0faf.wgsl.expected.fxc.hlsl new file mode 100644 index 0000000000..bd074989e8 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/cb0faf.wgsl.expected.fxc.hlsl @@ -0,0 +1,30 @@ +void ldexp_cb0faf() { + float4 res = (2.0f).xxxx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_cb0faf(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_cb0faf(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_cb0faf(); + return; +} diff --git a/test/tint/builtins/gen/literal/ldexp/cb0faf.wgsl.expected.glsl b/test/tint/builtins/gen/literal/ldexp/cb0faf.wgsl.expected.glsl new file mode 100644 index 0000000000..9676cec9be --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/cb0faf.wgsl.expected.glsl @@ -0,0 +1,49 @@ +#version 310 es + +void ldexp_cb0faf() { + vec4 res = vec4(2.0f); +} + +vec4 vertex_main() { + ldexp_cb0faf(); + return vec4(0.0f); +} + +void main() { + gl_PointSize = 1.0; + vec4 inner_result = vertex_main(); + gl_Position = inner_result; + gl_Position.y = -(gl_Position.y); + gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); + return; +} +#version 310 es +precision mediump float; + +void ldexp_cb0faf() { + vec4 res = vec4(2.0f); +} + +void fragment_main() { + ldexp_cb0faf(); +} + +void main() { + fragment_main(); + return; +} +#version 310 es + +void ldexp_cb0faf() { + vec4 res = vec4(2.0f); +} + +void compute_main() { + ldexp_cb0faf(); +} + +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + compute_main(); + return; +} diff --git a/test/tint/builtins/gen/literal/ldexp/cb0faf.wgsl.expected.msl b/test/tint/builtins/gen/literal/ldexp/cb0faf.wgsl.expected.msl new file mode 100644 index 0000000000..a05798ce97 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/cb0faf.wgsl.expected.msl @@ -0,0 +1,33 @@ +#include + +using namespace metal; +void ldexp_cb0faf() { + float4 res = float4(2.0f); +} + +struct tint_symbol { + float4 value [[position]]; +}; + +float4 vertex_main_inner() { + ldexp_cb0faf(); + return float4(0.0f); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main() { + ldexp_cb0faf(); + return; +} + +kernel void compute_main() { + ldexp_cb0faf(); + return; +} + diff --git a/test/tint/builtins/gen/literal/ldexp/cb0faf.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/ldexp/cb0faf.wgsl.expected.spvasm new file mode 100644 index 0000000000..11293bdc16 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/cb0faf.wgsl.expected.spvasm @@ -0,0 +1,65 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 31 +; Schema: 0 + OpCapability Shader + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size + OpEntryPoint Fragment %fragment_main "fragment_main" + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %fragment_main OriginUpperLeft + OpExecutionMode %compute_main LocalSize 1 1 1 + OpName %value "value" + OpName %vertex_point_size "vertex_point_size" + OpName %ldexp_cb0faf "ldexp_cb0faf" + OpName %res "res" + OpName %vertex_main_inner "vertex_main_inner" + OpName %vertex_main "vertex_main" + OpName %fragment_main "fragment_main" + OpName %compute_main "compute_main" + OpDecorate %value BuiltIn Position + OpDecorate %vertex_point_size BuiltIn PointSize + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%_ptr_Output_v4float = OpTypePointer Output %v4float + %5 = OpConstantNull %v4float + %value = OpVariable %_ptr_Output_v4float Output %5 +%_ptr_Output_float = OpTypePointer Output %float + %8 = OpConstantNull %float +%vertex_point_size = OpVariable %_ptr_Output_float Output %8 + %void = OpTypeVoid + %9 = OpTypeFunction %void + %float_2 = OpConstant %float 2 + %14 = OpConstantComposite %v4float %float_2 %float_2 %float_2 %float_2 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %17 = OpTypeFunction %v4float + %float_1 = OpConstant %float 1 +%ldexp_cb0faf = OpFunction %void None %9 + %12 = OpLabel + %res = OpVariable %_ptr_Function_v4float Function %5 + OpStore %res %14 + OpReturn + OpFunctionEnd +%vertex_main_inner = OpFunction %v4float None %17 + %19 = OpLabel + %20 = OpFunctionCall %void %ldexp_cb0faf + OpReturnValue %5 + OpFunctionEnd +%vertex_main = OpFunction %void None %9 + %22 = OpLabel + %23 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %23 + OpStore %vertex_point_size %float_1 + OpReturn + OpFunctionEnd +%fragment_main = OpFunction %void None %9 + %26 = OpLabel + %27 = OpFunctionCall %void %ldexp_cb0faf + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %9 + %29 = OpLabel + %30 = OpFunctionCall %void %ldexp_cb0faf + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/ldexp/cb0faf.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/ldexp/cb0faf.wgsl.expected.wgsl new file mode 100644 index 0000000000..ab2b81875e --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/cb0faf.wgsl.expected.wgsl @@ -0,0 +1,19 @@ +fn ldexp_cb0faf() { + var res = ldexp(vec4(1.0), vec4(1)); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_cb0faf(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_cb0faf(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_cb0faf(); +} diff --git a/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl.expected.dxc.hlsl index 9769500139..5f43a9271d 100644 --- a/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void ldexp_cc9cde() { - float4 res = ldexp((1.0f).xxxx, (1).xxxx); + float4 res = (2.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl.expected.fxc.hlsl index 9769500139..5f43a9271d 100644 --- a/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void ldexp_cc9cde() { - float4 res = ldexp((1.0f).xxxx, (1).xxxx); + float4 res = (2.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl.expected.glsl b/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl.expected.glsl index 99f1ba3866..fb12c433c2 100644 --- a/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void ldexp_cc9cde() { - vec4 res = ldexp(vec4(1.0f), ivec4(1)); + vec4 res = vec4(2.0f); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void ldexp_cc9cde() { - vec4 res = ldexp(vec4(1.0f), ivec4(1)); + vec4 res = vec4(2.0f); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void ldexp_cc9cde() { - vec4 res = ldexp(vec4(1.0f), ivec4(1)); + vec4 res = vec4(2.0f); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl.expected.msl b/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl.expected.msl index cdaeabfb28..0e0510d05c 100644 --- a/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void ldexp_cc9cde() { - float4 res = ldexp(float4(1.0f), int4(1)); + float4 res = float4(2.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl.expected.spvasm index da8bfed14d..26ef769e3f 100644 --- a/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl.expected.spvasm @@ -1,10 +1,9 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 31 ; Schema: 0 OpCapability Shader - %14 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -31,40 +30,36 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void - %float_1 = OpConstant %float 1 - %16 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 - %int = OpTypeInt 32 1 - %v4int = OpTypeVector %int 4 - %int_1 = OpConstant %int 1 - %20 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %float_2 = OpConstant %float 2 + %14 = OpConstantComposite %v4float %float_2 %float_2 %float_2 %float_2 %_ptr_Function_v4float = OpTypePointer Function %v4float - %23 = OpTypeFunction %v4float + %17 = OpTypeFunction %v4float + %float_1 = OpConstant %float 1 %ldexp_cc9cde = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 - %13 = OpExtInst %v4float %14 Ldexp %16 %20 - OpStore %res %13 + OpStore %res %14 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %ldexp_cc9cde +%vertex_main_inner = OpFunction %v4float None %17 + %19 = OpLabel + %20 = OpFunctionCall %void %ldexp_cc9cde OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %22 = OpLabel + %23 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %23 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %ldexp_cc9cde + %26 = OpLabel + %27 = OpFunctionCall %void %ldexp_cc9cde OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %ldexp_cc9cde + %29 = OpLabel + %30 = OpFunctionCall %void %ldexp_cc9cde OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/ldexp/db8b49.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/ldexp/db8b49.wgsl.expected.dxc.hlsl index 43091d15b6..dbe98d7224 100644 --- a/test/tint/builtins/gen/literal/ldexp/db8b49.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/ldexp/db8b49.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void ldexp_db8b49() { - float res = ldexp(1.0f, 1); + float res = 2.0f; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/ldexp/db8b49.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ldexp/db8b49.wgsl.expected.fxc.hlsl index 43091d15b6..dbe98d7224 100644 --- a/test/tint/builtins/gen/literal/ldexp/db8b49.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/ldexp/db8b49.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void ldexp_db8b49() { - float res = ldexp(1.0f, 1); + float res = 2.0f; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/ldexp/db8b49.wgsl.expected.glsl b/test/tint/builtins/gen/literal/ldexp/db8b49.wgsl.expected.glsl index 00cc0c840f..7a94486a1d 100644 --- a/test/tint/builtins/gen/literal/ldexp/db8b49.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/ldexp/db8b49.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void ldexp_db8b49() { - float res = ldexp(1.0f, 1); + float res = 2.0f; } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void ldexp_db8b49() { - float res = ldexp(1.0f, 1); + float res = 2.0f; } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void ldexp_db8b49() { - float res = ldexp(1.0f, 1); + float res = 2.0f; } void compute_main() { diff --git a/test/tint/builtins/gen/literal/ldexp/db8b49.wgsl.expected.msl b/test/tint/builtins/gen/literal/ldexp/db8b49.wgsl.expected.msl index e9ca7818af..9f8afd01c5 100644 --- a/test/tint/builtins/gen/literal/ldexp/db8b49.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/ldexp/db8b49.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void ldexp_db8b49() { - float res = ldexp(1.0f, 1); + float res = 2.0f; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/ldexp/db8b49.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/ldexp/db8b49.wgsl.expected.spvasm index 7e09bc0224..0a3680a002 100644 --- a/test/tint/builtins/gen/literal/ldexp/db8b49.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/ldexp/db8b49.wgsl.expected.spvasm @@ -1,10 +1,9 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 30 ; Schema: 0 OpCapability Shader - %14 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -31,37 +30,35 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void - %float_1 = OpConstant %float 1 - %int = OpTypeInt 32 1 - %int_1 = OpConstant %int 1 + %float_2 = OpConstant %float 2 %_ptr_Function_float = OpTypePointer Function %float - %20 = OpTypeFunction %v4float + %16 = OpTypeFunction %v4float + %float_1 = OpConstant %float 1 %ldexp_db8b49 = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 - %13 = OpExtInst %float %14 Ldexp %float_1 %int_1 - OpStore %res %13 + OpStore %res %float_2 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %ldexp_db8b49 +%vertex_main_inner = OpFunction %v4float None %16 + %18 = OpLabel + %19 = OpFunctionCall %void %ldexp_db8b49 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %21 = OpLabel + %22 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %22 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 + %25 = OpLabel + %26 = OpFunctionCall %void %ldexp_db8b49 + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %9 %28 = OpLabel %29 = OpFunctionCall %void %ldexp_db8b49 OpReturn OpFunctionEnd -%compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %ldexp_db8b49 - OpReturn - OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/ldexp/fdbc7b.wgsl b/test/tint/builtins/gen/literal/ldexp/fdbc7b.wgsl new file mode 100644 index 0000000000..7f88d2fd85 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/fdbc7b.wgsl @@ -0,0 +1,43 @@ +// Copyright 2022 The Tint Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//////////////////////////////////////////////////////////////////////////////// +// File generated by tools/src/cmd/gen +// using the template: +// test/tint/builtins/gen/gen.wgsl.tmpl +// +// Do not modify this file directly +//////////////////////////////////////////////////////////////////////////////// + + +// fn ldexp(fa, ia) -> fa +fn ldexp_fdbc7b() { + var res = ldexp(1., 1); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_fdbc7b(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_fdbc7b(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_fdbc7b(); +} diff --git a/test/tint/builtins/gen/literal/ldexp/fdbc7b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/ldexp/fdbc7b.wgsl.expected.dxc.hlsl new file mode 100644 index 0000000000..ce91ad5564 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/fdbc7b.wgsl.expected.dxc.hlsl @@ -0,0 +1,30 @@ +void ldexp_fdbc7b() { + float res = 2.0f; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_fdbc7b(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_fdbc7b(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_fdbc7b(); + return; +} diff --git a/test/tint/builtins/gen/literal/ldexp/fdbc7b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ldexp/fdbc7b.wgsl.expected.fxc.hlsl new file mode 100644 index 0000000000..ce91ad5564 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/fdbc7b.wgsl.expected.fxc.hlsl @@ -0,0 +1,30 @@ +void ldexp_fdbc7b() { + float res = 2.0f; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_fdbc7b(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_fdbc7b(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_fdbc7b(); + return; +} diff --git a/test/tint/builtins/gen/literal/ldexp/fdbc7b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/ldexp/fdbc7b.wgsl.expected.glsl new file mode 100644 index 0000000000..b2017bf0ca --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/fdbc7b.wgsl.expected.glsl @@ -0,0 +1,49 @@ +#version 310 es + +void ldexp_fdbc7b() { + float res = 2.0f; +} + +vec4 vertex_main() { + ldexp_fdbc7b(); + return vec4(0.0f); +} + +void main() { + gl_PointSize = 1.0; + vec4 inner_result = vertex_main(); + gl_Position = inner_result; + gl_Position.y = -(gl_Position.y); + gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); + return; +} +#version 310 es +precision mediump float; + +void ldexp_fdbc7b() { + float res = 2.0f; +} + +void fragment_main() { + ldexp_fdbc7b(); +} + +void main() { + fragment_main(); + return; +} +#version 310 es + +void ldexp_fdbc7b() { + float res = 2.0f; +} + +void compute_main() { + ldexp_fdbc7b(); +} + +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + compute_main(); + return; +} diff --git a/test/tint/builtins/gen/literal/ldexp/fdbc7b.wgsl.expected.msl b/test/tint/builtins/gen/literal/ldexp/fdbc7b.wgsl.expected.msl new file mode 100644 index 0000000000..36be6012e9 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/fdbc7b.wgsl.expected.msl @@ -0,0 +1,33 @@ +#include + +using namespace metal; +void ldexp_fdbc7b() { + float res = 2.0f; +} + +struct tint_symbol { + float4 value [[position]]; +}; + +float4 vertex_main_inner() { + ldexp_fdbc7b(); + return float4(0.0f); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main() { + ldexp_fdbc7b(); + return; +} + +kernel void compute_main() { + ldexp_fdbc7b(); + return; +} + diff --git a/test/tint/builtins/gen/literal/ldexp/fdbc7b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/ldexp/fdbc7b.wgsl.expected.spvasm new file mode 100644 index 0000000000..7238d0dac0 --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/fdbc7b.wgsl.expected.spvasm @@ -0,0 +1,64 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 30 +; Schema: 0 + OpCapability Shader + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size + OpEntryPoint Fragment %fragment_main "fragment_main" + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %fragment_main OriginUpperLeft + OpExecutionMode %compute_main LocalSize 1 1 1 + OpName %value "value" + OpName %vertex_point_size "vertex_point_size" + OpName %ldexp_fdbc7b "ldexp_fdbc7b" + OpName %res "res" + OpName %vertex_main_inner "vertex_main_inner" + OpName %vertex_main "vertex_main" + OpName %fragment_main "fragment_main" + OpName %compute_main "compute_main" + OpDecorate %value BuiltIn Position + OpDecorate %vertex_point_size BuiltIn PointSize + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%_ptr_Output_v4float = OpTypePointer Output %v4float + %5 = OpConstantNull %v4float + %value = OpVariable %_ptr_Output_v4float Output %5 +%_ptr_Output_float = OpTypePointer Output %float + %8 = OpConstantNull %float +%vertex_point_size = OpVariable %_ptr_Output_float Output %8 + %void = OpTypeVoid + %9 = OpTypeFunction %void + %float_2 = OpConstant %float 2 +%_ptr_Function_float = OpTypePointer Function %float + %16 = OpTypeFunction %v4float + %float_1 = OpConstant %float 1 +%ldexp_fdbc7b = OpFunction %void None %9 + %12 = OpLabel + %res = OpVariable %_ptr_Function_float Function %8 + OpStore %res %float_2 + OpReturn + OpFunctionEnd +%vertex_main_inner = OpFunction %v4float None %16 + %18 = OpLabel + %19 = OpFunctionCall %void %ldexp_fdbc7b + OpReturnValue %5 + OpFunctionEnd +%vertex_main = OpFunction %void None %9 + %21 = OpLabel + %22 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %22 + OpStore %vertex_point_size %float_1 + OpReturn + OpFunctionEnd +%fragment_main = OpFunction %void None %9 + %25 = OpLabel + %26 = OpFunctionCall %void %ldexp_fdbc7b + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %9 + %28 = OpLabel + %29 = OpFunctionCall %void %ldexp_fdbc7b + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/ldexp/fdbc7b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/ldexp/fdbc7b.wgsl.expected.wgsl new file mode 100644 index 0000000000..f91b9a445b --- /dev/null +++ b/test/tint/builtins/gen/literal/ldexp/fdbc7b.wgsl.expected.wgsl @@ -0,0 +1,19 @@ +fn ldexp_fdbc7b() { + var res = ldexp(1.0, 1); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_fdbc7b(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_fdbc7b(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_fdbc7b(); +} diff --git a/test/tint/builtins/gen/var/ldexp/082c1f.wgsl b/test/tint/builtins/gen/var/ldexp/082c1f.wgsl new file mode 100644 index 0000000000..57aee577c5 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/082c1f.wgsl @@ -0,0 +1,47 @@ +// Copyright 2022 The Tint Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//////////////////////////////////////////////////////////////////////////////// +// File generated by tools/src/cmd/gen +// using the template: +// test/tint/builtins/gen/gen.wgsl.tmpl +// +// Do not modify this file directly +//////////////////////////////////////////////////////////////////////////////// + + +enable f16; + +// fn ldexp(f16, ia) -> f16 +fn ldexp_082c1f() { + var arg_0 = 1.h; + const arg_1 = 1; + var res: f16 = ldexp(arg_0, arg_1); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_082c1f(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_082c1f(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_082c1f(); +} diff --git a/test/tint/builtins/gen/var/ldexp/082c1f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/ldexp/082c1f.wgsl.expected.dxc.hlsl new file mode 100644 index 0000000000..5719218cdd --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/082c1f.wgsl.expected.dxc.hlsl @@ -0,0 +1,31 @@ +void ldexp_082c1f() { + float16_t arg_0 = float16_t(1.0h); + float16_t res = ldexp(arg_0, 1); +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_082c1f(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_082c1f(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_082c1f(); + return; +} diff --git a/test/tint/builtins/gen/var/ldexp/082c1f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/ldexp/082c1f.wgsl.expected.fxc.hlsl new file mode 100644 index 0000000000..4e2e24739d --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/082c1f.wgsl.expected.fxc.hlsl @@ -0,0 +1,37 @@ +SKIP: FAILED + +void ldexp_082c1f() { + float16_t arg_0 = float16_t(1.0h); + float16_t res = ldexp(arg_0, 1); +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_082c1f(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_082c1f(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_082c1f(); + return; +} +FXC validation failure: +C:\src\dawn\test\tint\Shader@0x0000013446CBE820(2,3-11): error X3000: unrecognized identifier 'float16_t' +C:\src\dawn\test\tint\Shader@0x0000013446CBE820(2,13-17): error X3000: unrecognized identifier 'arg_0' + diff --git a/test/tint/builtins/gen/var/ldexp/082c1f.wgsl.expected.glsl b/test/tint/builtins/gen/var/ldexp/082c1f.wgsl.expected.glsl new file mode 100644 index 0000000000..2cf1b3379d --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/082c1f.wgsl.expected.glsl @@ -0,0 +1,55 @@ +#version 310 es +#extension GL_AMD_gpu_shader_half_float : require + +void ldexp_082c1f() { + float16_t arg_0 = 1.0hf; + float16_t res = ldexp(arg_0, 1); +} + +vec4 vertex_main() { + ldexp_082c1f(); + return vec4(0.0f); +} + +void main() { + gl_PointSize = 1.0; + vec4 inner_result = vertex_main(); + gl_Position = inner_result; + gl_Position.y = -(gl_Position.y); + gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); + return; +} +#version 310 es +#extension GL_AMD_gpu_shader_half_float : require +precision mediump float; + +void ldexp_082c1f() { + float16_t arg_0 = 1.0hf; + float16_t res = ldexp(arg_0, 1); +} + +void fragment_main() { + ldexp_082c1f(); +} + +void main() { + fragment_main(); + return; +} +#version 310 es +#extension GL_AMD_gpu_shader_half_float : require + +void ldexp_082c1f() { + float16_t arg_0 = 1.0hf; + float16_t res = ldexp(arg_0, 1); +} + +void compute_main() { + ldexp_082c1f(); +} + +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + compute_main(); + return; +} diff --git a/test/tint/builtins/gen/var/ldexp/082c1f.wgsl.expected.msl b/test/tint/builtins/gen/var/ldexp/082c1f.wgsl.expected.msl new file mode 100644 index 0000000000..4a4c644a5d --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/082c1f.wgsl.expected.msl @@ -0,0 +1,34 @@ +#include + +using namespace metal; +void ldexp_082c1f() { + half arg_0 = 1.0h; + half res = ldexp(arg_0, 1); +} + +struct tint_symbol { + float4 value [[position]]; +}; + +float4 vertex_main_inner() { + ldexp_082c1f(); + return float4(0.0f); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main() { + ldexp_082c1f(); + return; +} + +kernel void compute_main() { + ldexp_082c1f(); + return; +} + diff --git a/test/tint/builtins/gen/var/ldexp/082c1f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/ldexp/082c1f.wgsl.expected.spvasm new file mode 100644 index 0000000000..aa563fccec --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/082c1f.wgsl.expected.spvasm @@ -0,0 +1,78 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 38 +; Schema: 0 + OpCapability Shader + OpCapability Float16 + OpCapability UniformAndStorageBuffer16BitAccess + OpCapability StorageBuffer16BitAccess + OpCapability StorageInputOutput16 + %19 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size + OpEntryPoint Fragment %fragment_main "fragment_main" + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %fragment_main OriginUpperLeft + OpExecutionMode %compute_main LocalSize 1 1 1 + OpName %value "value" + OpName %vertex_point_size "vertex_point_size" + OpName %ldexp_082c1f "ldexp_082c1f" + OpName %arg_0 "arg_0" + OpName %res "res" + OpName %vertex_main_inner "vertex_main_inner" + OpName %vertex_main "vertex_main" + OpName %fragment_main "fragment_main" + OpName %compute_main "compute_main" + OpDecorate %value BuiltIn Position + OpDecorate %vertex_point_size BuiltIn PointSize + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%_ptr_Output_v4float = OpTypePointer Output %v4float + %5 = OpConstantNull %v4float + %value = OpVariable %_ptr_Output_v4float Output %5 +%_ptr_Output_float = OpTypePointer Output %float + %8 = OpConstantNull %float +%vertex_point_size = OpVariable %_ptr_Output_float Output %8 + %void = OpTypeVoid + %9 = OpTypeFunction %void + %half = OpTypeFloat 16 +%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 + %24 = OpTypeFunction %v4float + %float_1 = OpConstant %float 1 +%ldexp_082c1f = OpFunction %void None %9 + %12 = OpLabel + %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 Ldexp %20 %int_1 + OpStore %res %18 + OpReturn + OpFunctionEnd +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %ldexp_082c1f + OpReturnValue %5 + OpFunctionEnd +%vertex_main = OpFunction %void None %9 + %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 + %33 = OpLabel + %34 = OpFunctionCall %void %ldexp_082c1f + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %9 + %36 = OpLabel + %37 = OpFunctionCall %void %ldexp_082c1f + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/ldexp/082c1f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/ldexp/082c1f.wgsl.expected.wgsl new file mode 100644 index 0000000000..b9e963e1a1 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/082c1f.wgsl.expected.wgsl @@ -0,0 +1,23 @@ +enable f16; + +fn ldexp_082c1f() { + var arg_0 = 1.0h; + const arg_1 = 1; + var res : f16 = ldexp(arg_0, arg_1); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_082c1f(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_082c1f(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_082c1f(); +} diff --git a/test/tint/builtins/gen/var/ldexp/217a31.wgsl b/test/tint/builtins/gen/var/ldexp/217a31.wgsl new file mode 100644 index 0000000000..e764f38910 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/217a31.wgsl @@ -0,0 +1,47 @@ +// Copyright 2022 The Tint Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//////////////////////////////////////////////////////////////////////////////// +// File generated by tools/src/cmd/gen +// using the template: +// test/tint/builtins/gen/gen.wgsl.tmpl +// +// Do not modify this file directly +//////////////////////////////////////////////////////////////////////////////// + + +enable f16; + +// fn ldexp(vec<2, f16>, vec<2, ia>) -> vec<2, f16> +fn ldexp_217a31() { + var arg_0 = vec2(1.h); + const arg_1 = vec2(1); + var res: vec2 = ldexp(arg_0, arg_1); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_217a31(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_217a31(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_217a31(); +} diff --git a/test/tint/builtins/gen/var/ldexp/217a31.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/ldexp/217a31.wgsl.expected.dxc.hlsl new file mode 100644 index 0000000000..245ac052e6 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/217a31.wgsl.expected.dxc.hlsl @@ -0,0 +1,31 @@ +void ldexp_217a31() { + vector arg_0 = (float16_t(1.0h)).xx; + vector res = ldexp(arg_0, (1).xx); +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_217a31(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_217a31(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_217a31(); + return; +} diff --git a/test/tint/builtins/gen/var/ldexp/217a31.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/ldexp/217a31.wgsl.expected.fxc.hlsl new file mode 100644 index 0000000000..a7060546cd --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/217a31.wgsl.expected.fxc.hlsl @@ -0,0 +1,37 @@ +SKIP: FAILED + +void ldexp_217a31() { + vector arg_0 = (float16_t(1.0h)).xx; + vector res = ldexp(arg_0, (1).xx); +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_217a31(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_217a31(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_217a31(); + return; +} +FXC validation failure: +C:\src\dawn\test\tint\Shader@0x000002B2A1EB5A40(2,10-18): error X3000: syntax error: unexpected token 'float16_t' +C:\src\dawn\test\tint\Shader@0x000002B2A1EB5A40(3,10-18): error X3000: syntax error: unexpected token 'float16_t' + diff --git a/test/tint/builtins/gen/var/ldexp/217a31.wgsl.expected.glsl b/test/tint/builtins/gen/var/ldexp/217a31.wgsl.expected.glsl new file mode 100644 index 0000000000..28dac2d526 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/217a31.wgsl.expected.glsl @@ -0,0 +1,55 @@ +#version 310 es +#extension GL_AMD_gpu_shader_half_float : require + +void ldexp_217a31() { + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 res = ldexp(arg_0, ivec2(1)); +} + +vec4 vertex_main() { + ldexp_217a31(); + return vec4(0.0f); +} + +void main() { + gl_PointSize = 1.0; + vec4 inner_result = vertex_main(); + gl_Position = inner_result; + gl_Position.y = -(gl_Position.y); + gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); + return; +} +#version 310 es +#extension GL_AMD_gpu_shader_half_float : require +precision mediump float; + +void ldexp_217a31() { + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 res = ldexp(arg_0, ivec2(1)); +} + +void fragment_main() { + ldexp_217a31(); +} + +void main() { + fragment_main(); + return; +} +#version 310 es +#extension GL_AMD_gpu_shader_half_float : require + +void ldexp_217a31() { + f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 res = ldexp(arg_0, ivec2(1)); +} + +void compute_main() { + ldexp_217a31(); +} + +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + compute_main(); + return; +} diff --git a/test/tint/builtins/gen/var/ldexp/217a31.wgsl.expected.msl b/test/tint/builtins/gen/var/ldexp/217a31.wgsl.expected.msl new file mode 100644 index 0000000000..2eed3067ac --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/217a31.wgsl.expected.msl @@ -0,0 +1,34 @@ +#include + +using namespace metal; +void ldexp_217a31() { + half2 arg_0 = half2(1.0h); + half2 res = ldexp(arg_0, int2(1)); +} + +struct tint_symbol { + float4 value [[position]]; +}; + +float4 vertex_main_inner() { + ldexp_217a31(); + return float4(0.0f); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main() { + ldexp_217a31(); + return; +} + +kernel void compute_main() { + ldexp_217a31(); + return; +} + diff --git a/test/tint/builtins/gen/var/ldexp/217a31.wgsl.expected.spvasm b/test/tint/builtins/gen/var/ldexp/217a31.wgsl.expected.spvasm new file mode 100644 index 0000000000..056ec422d7 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/217a31.wgsl.expected.spvasm @@ -0,0 +1,82 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 42 +; Schema: 0 + OpCapability Shader + OpCapability Float16 + OpCapability UniformAndStorageBuffer16BitAccess + OpCapability StorageBuffer16BitAccess + OpCapability StorageInputOutput16 + %21 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size + OpEntryPoint Fragment %fragment_main "fragment_main" + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %fragment_main OriginUpperLeft + OpExecutionMode %compute_main LocalSize 1 1 1 + OpName %value "value" + OpName %vertex_point_size "vertex_point_size" + OpName %ldexp_217a31 "ldexp_217a31" + OpName %arg_0 "arg_0" + OpName %res "res" + OpName %vertex_main_inner "vertex_main_inner" + OpName %vertex_main "vertex_main" + OpName %fragment_main "fragment_main" + OpName %compute_main "compute_main" + OpDecorate %value BuiltIn Position + OpDecorate %vertex_point_size BuiltIn PointSize + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%_ptr_Output_v4float = OpTypePointer Output %v4float + %5 = OpConstantNull %v4float + %value = OpVariable %_ptr_Output_v4float Output %5 +%_ptr_Output_float = OpTypePointer Output %float + %8 = OpConstantNull %float +%vertex_point_size = OpVariable %_ptr_Output_float Output %8 + %void = OpTypeVoid + %9 = OpTypeFunction %void + %half = OpTypeFloat 16 + %v2half = OpTypeVector %half 2 +%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 + %26 = OpConstantComposite %v2int %int_1 %int_1 + %28 = OpTypeFunction %v4float + %float_1 = OpConstant %float 1 +%ldexp_217a31 = OpFunction %void None %9 + %12 = OpLabel + %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 Ldexp %22 %26 + OpStore %res %20 + OpReturn + OpFunctionEnd +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %ldexp_217a31 + OpReturnValue %5 + OpFunctionEnd +%vertex_main = OpFunction %void None %9 + %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 + %37 = OpLabel + %38 = OpFunctionCall %void %ldexp_217a31 + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %9 + %40 = OpLabel + %41 = OpFunctionCall %void %ldexp_217a31 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/ldexp/217a31.wgsl.expected.wgsl b/test/tint/builtins/gen/var/ldexp/217a31.wgsl.expected.wgsl new file mode 100644 index 0000000000..4ecfc9cd99 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/217a31.wgsl.expected.wgsl @@ -0,0 +1,23 @@ +enable f16; + +fn ldexp_217a31() { + var arg_0 = vec2(1.0h); + const arg_1 = vec2(1); + var res : vec2 = ldexp(arg_0, arg_1); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_217a31(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_217a31(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_217a31(); +} diff --git a/test/tint/builtins/gen/var/ldexp/2bfc68.wgsl b/test/tint/builtins/gen/var/ldexp/2bfc68.wgsl new file mode 100644 index 0000000000..1edfb79650 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/2bfc68.wgsl @@ -0,0 +1,45 @@ +// Copyright 2022 The Tint Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//////////////////////////////////////////////////////////////////////////////// +// File generated by tools/src/cmd/gen +// using the template: +// test/tint/builtins/gen/gen.wgsl.tmpl +// +// Do not modify this file directly +//////////////////////////////////////////////////////////////////////////////// + + +// fn ldexp(vec<2, fa>, vec<2, i32>) -> vec<2, fa> +fn ldexp_2bfc68() { + const arg_0 = vec2(1.); + var arg_1 = vec2(1i); + var res = ldexp(arg_0, arg_1); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_2bfc68(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_2bfc68(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_2bfc68(); +} diff --git a/test/tint/builtins/gen/var/ldexp/2bfc68.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/ldexp/2bfc68.wgsl.expected.dxc.hlsl new file mode 100644 index 0000000000..8fb4588566 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/2bfc68.wgsl.expected.dxc.hlsl @@ -0,0 +1,31 @@ +void ldexp_2bfc68() { + int2 arg_1 = (1).xx; + float2 res = ldexp((1.0f).xx, arg_1); +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_2bfc68(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_2bfc68(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_2bfc68(); + return; +} diff --git a/test/tint/builtins/gen/var/ldexp/2bfc68.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/ldexp/2bfc68.wgsl.expected.fxc.hlsl new file mode 100644 index 0000000000..8fb4588566 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/2bfc68.wgsl.expected.fxc.hlsl @@ -0,0 +1,31 @@ +void ldexp_2bfc68() { + int2 arg_1 = (1).xx; + float2 res = ldexp((1.0f).xx, arg_1); +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_2bfc68(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_2bfc68(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_2bfc68(); + return; +} diff --git a/test/tint/builtins/gen/var/ldexp/2bfc68.wgsl.expected.glsl b/test/tint/builtins/gen/var/ldexp/2bfc68.wgsl.expected.glsl new file mode 100644 index 0000000000..e762d08d54 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/2bfc68.wgsl.expected.glsl @@ -0,0 +1,52 @@ +#version 310 es + +void ldexp_2bfc68() { + ivec2 arg_1 = ivec2(1); + vec2 res = ldexp(vec2(1.0f), arg_1); +} + +vec4 vertex_main() { + ldexp_2bfc68(); + return vec4(0.0f); +} + +void main() { + gl_PointSize = 1.0; + vec4 inner_result = vertex_main(); + gl_Position = inner_result; + gl_Position.y = -(gl_Position.y); + gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); + return; +} +#version 310 es +precision mediump float; + +void ldexp_2bfc68() { + ivec2 arg_1 = ivec2(1); + vec2 res = ldexp(vec2(1.0f), arg_1); +} + +void fragment_main() { + ldexp_2bfc68(); +} + +void main() { + fragment_main(); + return; +} +#version 310 es + +void ldexp_2bfc68() { + ivec2 arg_1 = ivec2(1); + vec2 res = ldexp(vec2(1.0f), arg_1); +} + +void compute_main() { + ldexp_2bfc68(); +} + +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + compute_main(); + return; +} diff --git a/test/tint/builtins/gen/var/ldexp/2bfc68.wgsl.expected.msl b/test/tint/builtins/gen/var/ldexp/2bfc68.wgsl.expected.msl new file mode 100644 index 0000000000..01da8cb70e --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/2bfc68.wgsl.expected.msl @@ -0,0 +1,34 @@ +#include + +using namespace metal; +void ldexp_2bfc68() { + int2 arg_1 = int2(1); + float2 res = ldexp(float2(1.0f), arg_1); +} + +struct tint_symbol { + float4 value [[position]]; +}; + +float4 vertex_main_inner() { + ldexp_2bfc68(); + return float4(0.0f); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main() { + ldexp_2bfc68(); + return; +} + +kernel void compute_main() { + ldexp_2bfc68(); + return; +} + diff --git a/test/tint/builtins/gen/var/ldexp/2bfc68.wgsl.expected.spvasm b/test/tint/builtins/gen/var/ldexp/2bfc68.wgsl.expected.spvasm new file mode 100644 index 0000000000..15f0a68b81 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/2bfc68.wgsl.expected.spvasm @@ -0,0 +1,78 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 42 +; Schema: 0 + OpCapability Shader + %22 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size + OpEntryPoint Fragment %fragment_main "fragment_main" + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %fragment_main OriginUpperLeft + OpExecutionMode %compute_main LocalSize 1 1 1 + OpName %value "value" + OpName %vertex_point_size "vertex_point_size" + OpName %ldexp_2bfc68 "ldexp_2bfc68" + OpName %arg_1 "arg_1" + OpName %res "res" + OpName %vertex_main_inner "vertex_main_inner" + OpName %vertex_main "vertex_main" + OpName %fragment_main "fragment_main" + OpName %compute_main "compute_main" + OpDecorate %value BuiltIn Position + OpDecorate %vertex_point_size BuiltIn PointSize + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%_ptr_Output_v4float = OpTypePointer Output %v4float + %5 = OpConstantNull %v4float + %value = OpVariable %_ptr_Output_v4float Output %5 +%_ptr_Output_float = OpTypePointer Output %float + %8 = OpConstantNull %float +%vertex_point_size = OpVariable %_ptr_Output_float Output %8 + %void = OpTypeVoid + %9 = OpTypeFunction %void + %int = OpTypeInt 32 1 + %v2int = OpTypeVector %int 2 + %int_1 = OpConstant %int 1 + %16 = OpConstantComposite %v2int %int_1 %int_1 +%_ptr_Function_v2int = OpTypePointer Function %v2int + %19 = OpConstantNull %v2int + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %24 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %28 = OpConstantNull %v2float + %29 = OpTypeFunction %v4float +%ldexp_2bfc68 = OpFunction %void None %9 + %12 = OpLabel + %arg_1 = OpVariable %_ptr_Function_v2int Function %19 + %res = OpVariable %_ptr_Function_v2float Function %28 + OpStore %arg_1 %16 + %25 = OpLoad %v2int %arg_1 + %20 = OpExtInst %v2float %22 Ldexp %24 %25 + OpStore %res %20 + OpReturn + OpFunctionEnd +%vertex_main_inner = OpFunction %v4float None %29 + %31 = OpLabel + %32 = OpFunctionCall %void %ldexp_2bfc68 + OpReturnValue %5 + OpFunctionEnd +%vertex_main = OpFunction %void None %9 + %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 %ldexp_2bfc68 + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %9 + %40 = OpLabel + %41 = OpFunctionCall %void %ldexp_2bfc68 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/ldexp/2bfc68.wgsl.expected.wgsl b/test/tint/builtins/gen/var/ldexp/2bfc68.wgsl.expected.wgsl new file mode 100644 index 0000000000..bd5ed5e834 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/2bfc68.wgsl.expected.wgsl @@ -0,0 +1,21 @@ +fn ldexp_2bfc68() { + const arg_0 = vec2(1.0); + var arg_1 = vec2(1i); + var res = ldexp(arg_0, arg_1); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_2bfc68(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_2bfc68(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_2bfc68(); +} diff --git a/test/tint/builtins/gen/var/ldexp/2c6370.wgsl b/test/tint/builtins/gen/var/ldexp/2c6370.wgsl new file mode 100644 index 0000000000..b539c2aa79 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/2c6370.wgsl @@ -0,0 +1,45 @@ +// Copyright 2022 The Tint Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//////////////////////////////////////////////////////////////////////////////// +// File generated by tools/src/cmd/gen +// using the template: +// test/tint/builtins/gen/gen.wgsl.tmpl +// +// Do not modify this file directly +//////////////////////////////////////////////////////////////////////////////// + + +// fn ldexp(vec<2, fa>, vec<2, ia>) -> vec<2, fa> +fn ldexp_2c6370() { + const arg_0 = vec2(1.); + const arg_1 = vec2(1); + var res = ldexp(arg_0, arg_1); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_2c6370(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_2c6370(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_2c6370(); +} diff --git a/test/tint/builtins/gen/var/ldexp/2c6370.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/ldexp/2c6370.wgsl.expected.dxc.hlsl new file mode 100644 index 0000000000..0d345050f7 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/2c6370.wgsl.expected.dxc.hlsl @@ -0,0 +1,30 @@ +void ldexp_2c6370() { + float2 res = (2.0f).xx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_2c6370(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_2c6370(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_2c6370(); + return; +} diff --git a/test/tint/builtins/gen/var/ldexp/2c6370.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/ldexp/2c6370.wgsl.expected.fxc.hlsl new file mode 100644 index 0000000000..0d345050f7 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/2c6370.wgsl.expected.fxc.hlsl @@ -0,0 +1,30 @@ +void ldexp_2c6370() { + float2 res = (2.0f).xx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_2c6370(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_2c6370(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_2c6370(); + return; +} diff --git a/test/tint/builtins/gen/var/ldexp/2c6370.wgsl.expected.glsl b/test/tint/builtins/gen/var/ldexp/2c6370.wgsl.expected.glsl new file mode 100644 index 0000000000..629e3b2c95 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/2c6370.wgsl.expected.glsl @@ -0,0 +1,49 @@ +#version 310 es + +void ldexp_2c6370() { + vec2 res = vec2(2.0f); +} + +vec4 vertex_main() { + ldexp_2c6370(); + return vec4(0.0f); +} + +void main() { + gl_PointSize = 1.0; + vec4 inner_result = vertex_main(); + gl_Position = inner_result; + gl_Position.y = -(gl_Position.y); + gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); + return; +} +#version 310 es +precision mediump float; + +void ldexp_2c6370() { + vec2 res = vec2(2.0f); +} + +void fragment_main() { + ldexp_2c6370(); +} + +void main() { + fragment_main(); + return; +} +#version 310 es + +void ldexp_2c6370() { + vec2 res = vec2(2.0f); +} + +void compute_main() { + ldexp_2c6370(); +} + +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + compute_main(); + return; +} diff --git a/test/tint/builtins/gen/var/ldexp/2c6370.wgsl.expected.msl b/test/tint/builtins/gen/var/ldexp/2c6370.wgsl.expected.msl new file mode 100644 index 0000000000..f7f74ddcf6 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/2c6370.wgsl.expected.msl @@ -0,0 +1,33 @@ +#include + +using namespace metal; +void ldexp_2c6370() { + float2 res = float2(2.0f); +} + +struct tint_symbol { + float4 value [[position]]; +}; + +float4 vertex_main_inner() { + ldexp_2c6370(); + return float4(0.0f); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main() { + ldexp_2c6370(); + return; +} + +kernel void compute_main() { + ldexp_2c6370(); + return; +} + diff --git a/test/tint/builtins/gen/var/ldexp/2c6370.wgsl.expected.spvasm b/test/tint/builtins/gen/var/ldexp/2c6370.wgsl.expected.spvasm new file mode 100644 index 0000000000..c03126a41e --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/2c6370.wgsl.expected.spvasm @@ -0,0 +1,67 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 33 +; Schema: 0 + OpCapability Shader + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size + OpEntryPoint Fragment %fragment_main "fragment_main" + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %fragment_main OriginUpperLeft + OpExecutionMode %compute_main LocalSize 1 1 1 + OpName %value "value" + OpName %vertex_point_size "vertex_point_size" + OpName %ldexp_2c6370 "ldexp_2c6370" + OpName %res "res" + OpName %vertex_main_inner "vertex_main_inner" + OpName %vertex_main "vertex_main" + OpName %fragment_main "fragment_main" + OpName %compute_main "compute_main" + OpDecorate %value BuiltIn Position + OpDecorate %vertex_point_size BuiltIn PointSize + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%_ptr_Output_v4float = OpTypePointer Output %v4float + %5 = OpConstantNull %v4float + %value = OpVariable %_ptr_Output_v4float Output %5 +%_ptr_Output_float = OpTypePointer Output %float + %8 = OpConstantNull %float +%vertex_point_size = OpVariable %_ptr_Output_float Output %8 + %void = OpTypeVoid + %9 = OpTypeFunction %void + %v2float = OpTypeVector %float 2 + %float_2 = OpConstant %float 2 + %15 = OpConstantComposite %v2float %float_2 %float_2 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float + %19 = OpTypeFunction %v4float + %float_1 = OpConstant %float 1 +%ldexp_2c6370 = OpFunction %void None %9 + %12 = OpLabel + %res = OpVariable %_ptr_Function_v2float Function %18 + OpStore %res %15 + OpReturn + OpFunctionEnd +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %ldexp_2c6370 + OpReturnValue %5 + OpFunctionEnd +%vertex_main = OpFunction %void None %9 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 + OpStore %vertex_point_size %float_1 + OpReturn + OpFunctionEnd +%fragment_main = OpFunction %void None %9 + %28 = OpLabel + %29 = OpFunctionCall %void %ldexp_2c6370 + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %9 + %31 = OpLabel + %32 = OpFunctionCall %void %ldexp_2c6370 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/ldexp/2c6370.wgsl.expected.wgsl b/test/tint/builtins/gen/var/ldexp/2c6370.wgsl.expected.wgsl new file mode 100644 index 0000000000..d65a80e340 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/2c6370.wgsl.expected.wgsl @@ -0,0 +1,21 @@ +fn ldexp_2c6370() { + const arg_0 = vec2(1.0); + const arg_1 = vec2(1); + var res = ldexp(arg_0, arg_1); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_2c6370(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_2c6370(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_2c6370(); +} diff --git a/test/tint/builtins/gen/var/ldexp/376938.wgsl b/test/tint/builtins/gen/var/ldexp/376938.wgsl new file mode 100644 index 0000000000..6514ae7a70 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/376938.wgsl @@ -0,0 +1,45 @@ +// Copyright 2022 The Tint Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//////////////////////////////////////////////////////////////////////////////// +// File generated by tools/src/cmd/gen +// using the template: +// test/tint/builtins/gen/gen.wgsl.tmpl +// +// Do not modify this file directly +//////////////////////////////////////////////////////////////////////////////// + + +// fn ldexp(vec<4, fa>, vec<4, i32>) -> vec<4, fa> +fn ldexp_376938() { + const arg_0 = vec4(1.); + var arg_1 = vec4(1i); + var res = ldexp(arg_0, arg_1); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_376938(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_376938(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_376938(); +} diff --git a/test/tint/builtins/gen/var/ldexp/376938.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/ldexp/376938.wgsl.expected.dxc.hlsl new file mode 100644 index 0000000000..b45c9c75e4 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/376938.wgsl.expected.dxc.hlsl @@ -0,0 +1,31 @@ +void ldexp_376938() { + int4 arg_1 = (1).xxxx; + float4 res = ldexp((1.0f).xxxx, arg_1); +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_376938(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_376938(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_376938(); + return; +} diff --git a/test/tint/builtins/gen/var/ldexp/376938.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/ldexp/376938.wgsl.expected.fxc.hlsl new file mode 100644 index 0000000000..b45c9c75e4 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/376938.wgsl.expected.fxc.hlsl @@ -0,0 +1,31 @@ +void ldexp_376938() { + int4 arg_1 = (1).xxxx; + float4 res = ldexp((1.0f).xxxx, arg_1); +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_376938(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_376938(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_376938(); + return; +} diff --git a/test/tint/builtins/gen/var/ldexp/376938.wgsl.expected.glsl b/test/tint/builtins/gen/var/ldexp/376938.wgsl.expected.glsl new file mode 100644 index 0000000000..21fcf35d26 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/376938.wgsl.expected.glsl @@ -0,0 +1,52 @@ +#version 310 es + +void ldexp_376938() { + ivec4 arg_1 = ivec4(1); + vec4 res = ldexp(vec4(1.0f), arg_1); +} + +vec4 vertex_main() { + ldexp_376938(); + return vec4(0.0f); +} + +void main() { + gl_PointSize = 1.0; + vec4 inner_result = vertex_main(); + gl_Position = inner_result; + gl_Position.y = -(gl_Position.y); + gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); + return; +} +#version 310 es +precision mediump float; + +void ldexp_376938() { + ivec4 arg_1 = ivec4(1); + vec4 res = ldexp(vec4(1.0f), arg_1); +} + +void fragment_main() { + ldexp_376938(); +} + +void main() { + fragment_main(); + return; +} +#version 310 es + +void ldexp_376938() { + ivec4 arg_1 = ivec4(1); + vec4 res = ldexp(vec4(1.0f), arg_1); +} + +void compute_main() { + ldexp_376938(); +} + +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + compute_main(); + return; +} diff --git a/test/tint/builtins/gen/var/ldexp/376938.wgsl.expected.msl b/test/tint/builtins/gen/var/ldexp/376938.wgsl.expected.msl new file mode 100644 index 0000000000..82adde019d --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/376938.wgsl.expected.msl @@ -0,0 +1,34 @@ +#include + +using namespace metal; +void ldexp_376938() { + int4 arg_1 = int4(1); + float4 res = ldexp(float4(1.0f), arg_1); +} + +struct tint_symbol { + float4 value [[position]]; +}; + +float4 vertex_main_inner() { + ldexp_376938(); + return float4(0.0f); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main() { + ldexp_376938(); + return; +} + +kernel void compute_main() { + ldexp_376938(); + return; +} + diff --git a/test/tint/builtins/gen/var/ldexp/376938.wgsl.expected.spvasm b/test/tint/builtins/gen/var/ldexp/376938.wgsl.expected.spvasm new file mode 100644 index 0000000000..ac5db4993d --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/376938.wgsl.expected.spvasm @@ -0,0 +1,76 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 40 +; Schema: 0 + OpCapability Shader + %21 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size + OpEntryPoint Fragment %fragment_main "fragment_main" + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %fragment_main OriginUpperLeft + OpExecutionMode %compute_main LocalSize 1 1 1 + OpName %value "value" + OpName %vertex_point_size "vertex_point_size" + OpName %ldexp_376938 "ldexp_376938" + OpName %arg_1 "arg_1" + OpName %res "res" + OpName %vertex_main_inner "vertex_main_inner" + OpName %vertex_main "vertex_main" + OpName %fragment_main "fragment_main" + OpName %compute_main "compute_main" + OpDecorate %value BuiltIn Position + OpDecorate %vertex_point_size BuiltIn PointSize + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%_ptr_Output_v4float = OpTypePointer Output %v4float + %5 = OpConstantNull %v4float + %value = OpVariable %_ptr_Output_v4float Output %5 +%_ptr_Output_float = OpTypePointer Output %float + %8 = OpConstantNull %float +%vertex_point_size = OpVariable %_ptr_Output_float Output %8 + %void = OpTypeVoid + %9 = OpTypeFunction %void + %int = OpTypeInt 32 1 + %v4int = OpTypeVector %int 4 + %int_1 = OpConstant %int 1 + %16 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 +%_ptr_Function_v4int = OpTypePointer Function %v4int + %19 = OpConstantNull %v4int + %float_1 = OpConstant %float 1 + %23 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %27 = OpTypeFunction %v4float +%ldexp_376938 = OpFunction %void None %9 + %12 = OpLabel + %arg_1 = OpVariable %_ptr_Function_v4int Function %19 + %res = OpVariable %_ptr_Function_v4float Function %5 + OpStore %arg_1 %16 + %24 = OpLoad %v4int %arg_1 + %20 = OpExtInst %v4float %21 Ldexp %23 %24 + OpStore %res %20 + OpReturn + OpFunctionEnd +%vertex_main_inner = OpFunction %v4float None %27 + %29 = OpLabel + %30 = OpFunctionCall %void %ldexp_376938 + OpReturnValue %5 + OpFunctionEnd +%vertex_main = OpFunction %void None %9 + %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 + %35 = OpLabel + %36 = OpFunctionCall %void %ldexp_376938 + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %9 + %38 = OpLabel + %39 = OpFunctionCall %void %ldexp_376938 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/ldexp/376938.wgsl.expected.wgsl b/test/tint/builtins/gen/var/ldexp/376938.wgsl.expected.wgsl new file mode 100644 index 0000000000..db21329090 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/376938.wgsl.expected.wgsl @@ -0,0 +1,21 @@ +fn ldexp_376938() { + const arg_0 = vec4(1.0); + var arg_1 = vec4(1i); + var res = ldexp(arg_0, arg_1); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_376938(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_376938(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_376938(); +} diff --git a/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl.expected.fxc.hlsl index 9ae233638b..3658f7cd2b 100644 --- a/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ SKIP: FAILED 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); } @@ -32,3 +32,7 @@ void compute_main() { ldexp_3d90b4(); return; } +FXC validation failure: +C:\src\dawn\test\tint\Shader@0x00000297E3FBEC10(2,10-18): error X3000: syntax error: unexpected token 'float16_t' +C:\src\dawn\test\tint\Shader@0x00000297E3FBEC10(4,10-18): error X3000: syntax error: unexpected token 'float16_t' + diff --git a/test/tint/builtins/gen/var/ldexp/4a3ad9.wgsl b/test/tint/builtins/gen/var/ldexp/4a3ad9.wgsl new file mode 100644 index 0000000000..bfa0ed4ce3 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/4a3ad9.wgsl @@ -0,0 +1,45 @@ +// Copyright 2022 The Tint Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//////////////////////////////////////////////////////////////////////////////// +// File generated by tools/src/cmd/gen +// using the template: +// test/tint/builtins/gen/gen.wgsl.tmpl +// +// Do not modify this file directly +//////////////////////////////////////////////////////////////////////////////// + + +// fn ldexp(vec<3, fa>, vec<3, ia>) -> vec<3, fa> +fn ldexp_4a3ad9() { + const arg_0 = vec3(1.); + const arg_1 = vec3(1); + var res = ldexp(arg_0, arg_1); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_4a3ad9(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_4a3ad9(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_4a3ad9(); +} diff --git a/test/tint/builtins/gen/var/ldexp/4a3ad9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/ldexp/4a3ad9.wgsl.expected.dxc.hlsl new file mode 100644 index 0000000000..e2e2d8ddc3 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/4a3ad9.wgsl.expected.dxc.hlsl @@ -0,0 +1,30 @@ +void ldexp_4a3ad9() { + float3 res = (2.0f).xxx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_4a3ad9(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_4a3ad9(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_4a3ad9(); + return; +} diff --git a/test/tint/builtins/gen/var/ldexp/4a3ad9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/ldexp/4a3ad9.wgsl.expected.fxc.hlsl new file mode 100644 index 0000000000..e2e2d8ddc3 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/4a3ad9.wgsl.expected.fxc.hlsl @@ -0,0 +1,30 @@ +void ldexp_4a3ad9() { + float3 res = (2.0f).xxx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_4a3ad9(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_4a3ad9(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_4a3ad9(); + return; +} diff --git a/test/tint/builtins/gen/var/ldexp/4a3ad9.wgsl.expected.glsl b/test/tint/builtins/gen/var/ldexp/4a3ad9.wgsl.expected.glsl new file mode 100644 index 0000000000..9dba689db0 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/4a3ad9.wgsl.expected.glsl @@ -0,0 +1,49 @@ +#version 310 es + +void ldexp_4a3ad9() { + vec3 res = vec3(2.0f); +} + +vec4 vertex_main() { + ldexp_4a3ad9(); + return vec4(0.0f); +} + +void main() { + gl_PointSize = 1.0; + vec4 inner_result = vertex_main(); + gl_Position = inner_result; + gl_Position.y = -(gl_Position.y); + gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); + return; +} +#version 310 es +precision mediump float; + +void ldexp_4a3ad9() { + vec3 res = vec3(2.0f); +} + +void fragment_main() { + ldexp_4a3ad9(); +} + +void main() { + fragment_main(); + return; +} +#version 310 es + +void ldexp_4a3ad9() { + vec3 res = vec3(2.0f); +} + +void compute_main() { + ldexp_4a3ad9(); +} + +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + compute_main(); + return; +} diff --git a/test/tint/builtins/gen/var/ldexp/4a3ad9.wgsl.expected.msl b/test/tint/builtins/gen/var/ldexp/4a3ad9.wgsl.expected.msl new file mode 100644 index 0000000000..17d363be63 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/4a3ad9.wgsl.expected.msl @@ -0,0 +1,33 @@ +#include + +using namespace metal; +void ldexp_4a3ad9() { + float3 res = float3(2.0f); +} + +struct tint_symbol { + float4 value [[position]]; +}; + +float4 vertex_main_inner() { + ldexp_4a3ad9(); + return float4(0.0f); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main() { + ldexp_4a3ad9(); + return; +} + +kernel void compute_main() { + ldexp_4a3ad9(); + return; +} + diff --git a/test/tint/builtins/gen/var/ldexp/4a3ad9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/ldexp/4a3ad9.wgsl.expected.spvasm new file mode 100644 index 0000000000..ed2d5ba260 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/4a3ad9.wgsl.expected.spvasm @@ -0,0 +1,67 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 33 +; Schema: 0 + OpCapability Shader + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size + OpEntryPoint Fragment %fragment_main "fragment_main" + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %fragment_main OriginUpperLeft + OpExecutionMode %compute_main LocalSize 1 1 1 + OpName %value "value" + OpName %vertex_point_size "vertex_point_size" + OpName %ldexp_4a3ad9 "ldexp_4a3ad9" + OpName %res "res" + OpName %vertex_main_inner "vertex_main_inner" + OpName %vertex_main "vertex_main" + OpName %fragment_main "fragment_main" + OpName %compute_main "compute_main" + OpDecorate %value BuiltIn Position + OpDecorate %vertex_point_size BuiltIn PointSize + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%_ptr_Output_v4float = OpTypePointer Output %v4float + %5 = OpConstantNull %v4float + %value = OpVariable %_ptr_Output_v4float Output %5 +%_ptr_Output_float = OpTypePointer Output %float + %8 = OpConstantNull %float +%vertex_point_size = OpVariable %_ptr_Output_float Output %8 + %void = OpTypeVoid + %9 = OpTypeFunction %void + %v3float = OpTypeVector %float 3 + %float_2 = OpConstant %float 2 + %15 = OpConstantComposite %v3float %float_2 %float_2 %float_2 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float + %19 = OpTypeFunction %v4float + %float_1 = OpConstant %float 1 +%ldexp_4a3ad9 = OpFunction %void None %9 + %12 = OpLabel + %res = OpVariable %_ptr_Function_v3float Function %18 + OpStore %res %15 + OpReturn + OpFunctionEnd +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %ldexp_4a3ad9 + OpReturnValue %5 + OpFunctionEnd +%vertex_main = OpFunction %void None %9 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 + OpStore %vertex_point_size %float_1 + OpReturn + OpFunctionEnd +%fragment_main = OpFunction %void None %9 + %28 = OpLabel + %29 = OpFunctionCall %void %ldexp_4a3ad9 + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %9 + %31 = OpLabel + %32 = OpFunctionCall %void %ldexp_4a3ad9 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/ldexp/4a3ad9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/ldexp/4a3ad9.wgsl.expected.wgsl new file mode 100644 index 0000000000..b4c8fd662c --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/4a3ad9.wgsl.expected.wgsl @@ -0,0 +1,21 @@ +fn ldexp_4a3ad9() { + const arg_0 = vec3(1.0); + const arg_1 = vec3(1); + var res = ldexp(arg_0, arg_1); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_4a3ad9(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_4a3ad9(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_4a3ad9(); +} diff --git a/test/tint/builtins/gen/var/ldexp/593ff3.wgsl b/test/tint/builtins/gen/var/ldexp/593ff3.wgsl new file mode 100644 index 0000000000..ea9448e581 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/593ff3.wgsl @@ -0,0 +1,45 @@ +// Copyright 2022 The Tint Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//////////////////////////////////////////////////////////////////////////////// +// File generated by tools/src/cmd/gen +// using the template: +// test/tint/builtins/gen/gen.wgsl.tmpl +// +// Do not modify this file directly +//////////////////////////////////////////////////////////////////////////////// + + +// fn ldexp(vec<3, f32>, vec<3, ia>) -> vec<3, f32> +fn ldexp_593ff3() { + var arg_0 = vec3(1.f); + const arg_1 = vec3(1); + var res: vec3 = ldexp(arg_0, arg_1); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_593ff3(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_593ff3(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_593ff3(); +} diff --git a/test/tint/builtins/gen/var/ldexp/593ff3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/ldexp/593ff3.wgsl.expected.dxc.hlsl new file mode 100644 index 0000000000..57d8a99067 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/593ff3.wgsl.expected.dxc.hlsl @@ -0,0 +1,31 @@ +void ldexp_593ff3() { + float3 arg_0 = (1.0f).xxx; + float3 res = ldexp(arg_0, (1).xxx); +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_593ff3(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_593ff3(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_593ff3(); + return; +} diff --git a/test/tint/builtins/gen/var/ldexp/593ff3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/ldexp/593ff3.wgsl.expected.fxc.hlsl new file mode 100644 index 0000000000..57d8a99067 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/593ff3.wgsl.expected.fxc.hlsl @@ -0,0 +1,31 @@ +void ldexp_593ff3() { + float3 arg_0 = (1.0f).xxx; + float3 res = ldexp(arg_0, (1).xxx); +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_593ff3(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_593ff3(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_593ff3(); + return; +} diff --git a/test/tint/builtins/gen/var/ldexp/593ff3.wgsl.expected.glsl b/test/tint/builtins/gen/var/ldexp/593ff3.wgsl.expected.glsl new file mode 100644 index 0000000000..81202b8003 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/593ff3.wgsl.expected.glsl @@ -0,0 +1,52 @@ +#version 310 es + +void ldexp_593ff3() { + vec3 arg_0 = vec3(1.0f); + vec3 res = ldexp(arg_0, ivec3(1)); +} + +vec4 vertex_main() { + ldexp_593ff3(); + return vec4(0.0f); +} + +void main() { + gl_PointSize = 1.0; + vec4 inner_result = vertex_main(); + gl_Position = inner_result; + gl_Position.y = -(gl_Position.y); + gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); + return; +} +#version 310 es +precision mediump float; + +void ldexp_593ff3() { + vec3 arg_0 = vec3(1.0f); + vec3 res = ldexp(arg_0, ivec3(1)); +} + +void fragment_main() { + ldexp_593ff3(); +} + +void main() { + fragment_main(); + return; +} +#version 310 es + +void ldexp_593ff3() { + vec3 arg_0 = vec3(1.0f); + vec3 res = ldexp(arg_0, ivec3(1)); +} + +void compute_main() { + ldexp_593ff3(); +} + +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + compute_main(); + return; +} diff --git a/test/tint/builtins/gen/var/ldexp/593ff3.wgsl.expected.msl b/test/tint/builtins/gen/var/ldexp/593ff3.wgsl.expected.msl new file mode 100644 index 0000000000..c4b025f262 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/593ff3.wgsl.expected.msl @@ -0,0 +1,34 @@ +#include + +using namespace metal; +void ldexp_593ff3() { + float3 arg_0 = float3(1.0f); + float3 res = ldexp(arg_0, int3(1)); +} + +struct tint_symbol { + float4 value [[position]]; +}; + +float4 vertex_main_inner() { + ldexp_593ff3(); + return float4(0.0f); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main() { + ldexp_593ff3(); + return; +} + +kernel void compute_main() { + ldexp_593ff3(); + return; +} + diff --git a/test/tint/builtins/gen/var/ldexp/593ff3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/ldexp/593ff3.wgsl.expected.spvasm new file mode 100644 index 0000000000..1a1a14f1db --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/593ff3.wgsl.expected.spvasm @@ -0,0 +1,76 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 40 +; Schema: 0 + OpCapability Shader + %20 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size + OpEntryPoint Fragment %fragment_main "fragment_main" + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %fragment_main OriginUpperLeft + OpExecutionMode %compute_main LocalSize 1 1 1 + OpName %value "value" + OpName %vertex_point_size "vertex_point_size" + OpName %ldexp_593ff3 "ldexp_593ff3" + OpName %arg_0 "arg_0" + OpName %res "res" + OpName %vertex_main_inner "vertex_main_inner" + OpName %vertex_main "vertex_main" + OpName %fragment_main "fragment_main" + OpName %compute_main "compute_main" + OpDecorate %value BuiltIn Position + OpDecorate %vertex_point_size BuiltIn PointSize + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%_ptr_Output_v4float = OpTypePointer Output %v4float + %5 = OpConstantNull %v4float + %value = OpVariable %_ptr_Output_v4float Output %5 +%_ptr_Output_float = OpTypePointer Output %float + %8 = OpConstantNull %float +%vertex_point_size = OpVariable %_ptr_Output_float Output %8 + %void = OpTypeVoid + %9 = OpTypeFunction %void + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float + %int = OpTypeInt 32 1 + %v3int = OpTypeVector %int 3 + %int_1 = OpConstant %int 1 + %25 = OpConstantComposite %v3int %int_1 %int_1 %int_1 + %27 = OpTypeFunction %v4float +%ldexp_593ff3 = OpFunction %void None %9 + %12 = OpLabel + %arg_0 = OpVariable %_ptr_Function_v3float Function %18 + %res = OpVariable %_ptr_Function_v3float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v3float %arg_0 + %19 = OpExtInst %v3float %20 Ldexp %21 %25 + OpStore %res %19 + OpReturn + OpFunctionEnd +%vertex_main_inner = OpFunction %v4float None %27 + %29 = OpLabel + %30 = OpFunctionCall %void %ldexp_593ff3 + OpReturnValue %5 + OpFunctionEnd +%vertex_main = OpFunction %void None %9 + %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 + %35 = OpLabel + %36 = OpFunctionCall %void %ldexp_593ff3 + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %9 + %38 = OpLabel + %39 = OpFunctionCall %void %ldexp_593ff3 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/ldexp/593ff3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/ldexp/593ff3.wgsl.expected.wgsl new file mode 100644 index 0000000000..47ed92be5e --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/593ff3.wgsl.expected.wgsl @@ -0,0 +1,21 @@ +fn ldexp_593ff3() { + var arg_0 = vec3(1.0f); + const arg_1 = vec3(1); + var res : vec3 = ldexp(arg_0, arg_1); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_593ff3(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_593ff3(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_593ff3(); +} diff --git a/test/tint/builtins/gen/var/ldexp/624e0c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/ldexp/624e0c.wgsl.expected.fxc.hlsl index 3a434becd5..e3d231247d 100644 --- a/test/tint/builtins/gen/var/ldexp/624e0c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/ldexp/624e0c.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ SKIP: FAILED 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); } @@ -32,3 +32,7 @@ void compute_main() { ldexp_624e0c(); return; } +FXC validation failure: +C:\src\dawn\test\tint\Shader@0x0000026F55AA1260(2,3-11): error X3000: unrecognized identifier 'float16_t' +C:\src\dawn\test\tint\Shader@0x0000026F55AA1260(2,13-17): error X3000: unrecognized identifier 'arg_0' + diff --git a/test/tint/builtins/gen/var/ldexp/65a7bd.wgsl b/test/tint/builtins/gen/var/ldexp/65a7bd.wgsl new file mode 100644 index 0000000000..acc7e71569 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/65a7bd.wgsl @@ -0,0 +1,45 @@ +// Copyright 2022 The Tint Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//////////////////////////////////////////////////////////////////////////////// +// File generated by tools/src/cmd/gen +// using the template: +// test/tint/builtins/gen/gen.wgsl.tmpl +// +// Do not modify this file directly +//////////////////////////////////////////////////////////////////////////////// + + +// fn ldexp(vec<4, f32>, vec<4, ia>) -> vec<4, f32> +fn ldexp_65a7bd() { + var arg_0 = vec4(1.f); + const arg_1 = vec4(1); + var res: vec4 = ldexp(arg_0, arg_1); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_65a7bd(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_65a7bd(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_65a7bd(); +} diff --git a/test/tint/builtins/gen/var/ldexp/65a7bd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/ldexp/65a7bd.wgsl.expected.dxc.hlsl new file mode 100644 index 0000000000..5f15d6ec96 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/65a7bd.wgsl.expected.dxc.hlsl @@ -0,0 +1,31 @@ +void ldexp_65a7bd() { + float4 arg_0 = (1.0f).xxxx; + float4 res = ldexp(arg_0, (1).xxxx); +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_65a7bd(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_65a7bd(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_65a7bd(); + return; +} diff --git a/test/tint/builtins/gen/var/ldexp/65a7bd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/ldexp/65a7bd.wgsl.expected.fxc.hlsl new file mode 100644 index 0000000000..5f15d6ec96 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/65a7bd.wgsl.expected.fxc.hlsl @@ -0,0 +1,31 @@ +void ldexp_65a7bd() { + float4 arg_0 = (1.0f).xxxx; + float4 res = ldexp(arg_0, (1).xxxx); +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_65a7bd(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_65a7bd(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_65a7bd(); + return; +} diff --git a/test/tint/builtins/gen/var/ldexp/65a7bd.wgsl.expected.glsl b/test/tint/builtins/gen/var/ldexp/65a7bd.wgsl.expected.glsl new file mode 100644 index 0000000000..5fdaafe6b8 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/65a7bd.wgsl.expected.glsl @@ -0,0 +1,52 @@ +#version 310 es + +void ldexp_65a7bd() { + vec4 arg_0 = vec4(1.0f); + vec4 res = ldexp(arg_0, ivec4(1)); +} + +vec4 vertex_main() { + ldexp_65a7bd(); + return vec4(0.0f); +} + +void main() { + gl_PointSize = 1.0; + vec4 inner_result = vertex_main(); + gl_Position = inner_result; + gl_Position.y = -(gl_Position.y); + gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); + return; +} +#version 310 es +precision mediump float; + +void ldexp_65a7bd() { + vec4 arg_0 = vec4(1.0f); + vec4 res = ldexp(arg_0, ivec4(1)); +} + +void fragment_main() { + ldexp_65a7bd(); +} + +void main() { + fragment_main(); + return; +} +#version 310 es + +void ldexp_65a7bd() { + vec4 arg_0 = vec4(1.0f); + vec4 res = ldexp(arg_0, ivec4(1)); +} + +void compute_main() { + ldexp_65a7bd(); +} + +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + compute_main(); + return; +} diff --git a/test/tint/builtins/gen/var/ldexp/65a7bd.wgsl.expected.msl b/test/tint/builtins/gen/var/ldexp/65a7bd.wgsl.expected.msl new file mode 100644 index 0000000000..cea4917bf5 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/65a7bd.wgsl.expected.msl @@ -0,0 +1,34 @@ +#include + +using namespace metal; +void ldexp_65a7bd() { + float4 arg_0 = float4(1.0f); + float4 res = ldexp(arg_0, int4(1)); +} + +struct tint_symbol { + float4 value [[position]]; +}; + +float4 vertex_main_inner() { + ldexp_65a7bd(); + return float4(0.0f); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main() { + ldexp_65a7bd(); + return; +} + +kernel void compute_main() { + ldexp_65a7bd(); + return; +} + diff --git a/test/tint/builtins/gen/var/ldexp/65a7bd.wgsl.expected.spvasm b/test/tint/builtins/gen/var/ldexp/65a7bd.wgsl.expected.spvasm new file mode 100644 index 0000000000..b616b7e7c2 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/65a7bd.wgsl.expected.spvasm @@ -0,0 +1,74 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 38 +; Schema: 0 + OpCapability Shader + %18 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size + OpEntryPoint Fragment %fragment_main "fragment_main" + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %fragment_main OriginUpperLeft + OpExecutionMode %compute_main LocalSize 1 1 1 + OpName %value "value" + OpName %vertex_point_size "vertex_point_size" + OpName %ldexp_65a7bd "ldexp_65a7bd" + OpName %arg_0 "arg_0" + OpName %res "res" + OpName %vertex_main_inner "vertex_main_inner" + OpName %vertex_main "vertex_main" + OpName %fragment_main "fragment_main" + OpName %compute_main "compute_main" + OpDecorate %value BuiltIn Position + OpDecorate %vertex_point_size BuiltIn PointSize + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%_ptr_Output_v4float = OpTypePointer Output %v4float + %5 = OpConstantNull %v4float + %value = OpVariable %_ptr_Output_v4float Output %5 +%_ptr_Output_float = OpTypePointer Output %float + %8 = OpConstantNull %float +%vertex_point_size = OpVariable %_ptr_Output_float Output %8 + %void = OpTypeVoid + %9 = OpTypeFunction %void + %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %int = OpTypeInt 32 1 + %v4int = OpTypeVector %int 4 + %int_1 = OpConstant %int 1 + %23 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %25 = OpTypeFunction %v4float +%ldexp_65a7bd = OpFunction %void None %9 + %12 = OpLabel + %arg_0 = OpVariable %_ptr_Function_v4float Function %5 + %res = OpVariable %_ptr_Function_v4float Function %5 + OpStore %arg_0 %14 + %19 = OpLoad %v4float %arg_0 + %17 = OpExtInst %v4float %18 Ldexp %19 %23 + OpStore %res %17 + OpReturn + OpFunctionEnd +%vertex_main_inner = OpFunction %v4float None %25 + %27 = OpLabel + %28 = OpFunctionCall %void %ldexp_65a7bd + OpReturnValue %5 + OpFunctionEnd +%vertex_main = OpFunction %void None %9 + %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 %ldexp_65a7bd + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %9 + %36 = OpLabel + %37 = OpFunctionCall %void %ldexp_65a7bd + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/ldexp/65a7bd.wgsl.expected.wgsl b/test/tint/builtins/gen/var/ldexp/65a7bd.wgsl.expected.wgsl new file mode 100644 index 0000000000..22a5b83bd5 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/65a7bd.wgsl.expected.wgsl @@ -0,0 +1,21 @@ +fn ldexp_65a7bd() { + var arg_0 = vec4(1.0f); + const arg_1 = vec4(1); + var res : vec4 = ldexp(arg_0, arg_1); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_65a7bd(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_65a7bd(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_65a7bd(); +} diff --git a/test/tint/builtins/gen/var/ldexp/71ebe3.wgsl b/test/tint/builtins/gen/var/ldexp/71ebe3.wgsl new file mode 100644 index 0000000000..815f1739b3 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/71ebe3.wgsl @@ -0,0 +1,45 @@ +// Copyright 2022 The Tint Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//////////////////////////////////////////////////////////////////////////////// +// File generated by tools/src/cmd/gen +// using the template: +// test/tint/builtins/gen/gen.wgsl.tmpl +// +// Do not modify this file directly +//////////////////////////////////////////////////////////////////////////////// + + +// fn ldexp(fa, i32) -> fa +fn ldexp_71ebe3() { + const arg_0 = 1.; + var arg_1 = 1i; + var res = ldexp(arg_0, arg_1); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_71ebe3(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_71ebe3(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_71ebe3(); +} diff --git a/test/tint/builtins/gen/var/ldexp/71ebe3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/ldexp/71ebe3.wgsl.expected.dxc.hlsl new file mode 100644 index 0000000000..a0a920ae8d --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/71ebe3.wgsl.expected.dxc.hlsl @@ -0,0 +1,31 @@ +void ldexp_71ebe3() { + int arg_1 = 1; + float res = ldexp(1.0f, arg_1); +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_71ebe3(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_71ebe3(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_71ebe3(); + return; +} diff --git a/test/tint/builtins/gen/var/ldexp/71ebe3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/ldexp/71ebe3.wgsl.expected.fxc.hlsl new file mode 100644 index 0000000000..a0a920ae8d --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/71ebe3.wgsl.expected.fxc.hlsl @@ -0,0 +1,31 @@ +void ldexp_71ebe3() { + int arg_1 = 1; + float res = ldexp(1.0f, arg_1); +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_71ebe3(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_71ebe3(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_71ebe3(); + return; +} diff --git a/test/tint/builtins/gen/var/ldexp/71ebe3.wgsl.expected.glsl b/test/tint/builtins/gen/var/ldexp/71ebe3.wgsl.expected.glsl new file mode 100644 index 0000000000..eda6e14e81 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/71ebe3.wgsl.expected.glsl @@ -0,0 +1,52 @@ +#version 310 es + +void ldexp_71ebe3() { + int arg_1 = 1; + float res = ldexp(1.0f, arg_1); +} + +vec4 vertex_main() { + ldexp_71ebe3(); + return vec4(0.0f); +} + +void main() { + gl_PointSize = 1.0; + vec4 inner_result = vertex_main(); + gl_Position = inner_result; + gl_Position.y = -(gl_Position.y); + gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); + return; +} +#version 310 es +precision mediump float; + +void ldexp_71ebe3() { + int arg_1 = 1; + float res = ldexp(1.0f, arg_1); +} + +void fragment_main() { + ldexp_71ebe3(); +} + +void main() { + fragment_main(); + return; +} +#version 310 es + +void ldexp_71ebe3() { + int arg_1 = 1; + float res = ldexp(1.0f, arg_1); +} + +void compute_main() { + ldexp_71ebe3(); +} + +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + compute_main(); + return; +} diff --git a/test/tint/builtins/gen/var/ldexp/71ebe3.wgsl.expected.msl b/test/tint/builtins/gen/var/ldexp/71ebe3.wgsl.expected.msl new file mode 100644 index 0000000000..1595a63605 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/71ebe3.wgsl.expected.msl @@ -0,0 +1,34 @@ +#include + +using namespace metal; +void ldexp_71ebe3() { + int arg_1 = 1; + float res = ldexp(1.0f, arg_1); +} + +struct tint_symbol { + float4 value [[position]]; +}; + +float4 vertex_main_inner() { + ldexp_71ebe3(); + return float4(0.0f); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main() { + ldexp_71ebe3(); + return; +} + +kernel void compute_main() { + ldexp_71ebe3(); + return; +} + diff --git a/test/tint/builtins/gen/var/ldexp/71ebe3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/ldexp/71ebe3.wgsl.expected.spvasm new file mode 100644 index 0000000000..ece5e10b1b --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/71ebe3.wgsl.expected.spvasm @@ -0,0 +1,73 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 37 +; Schema: 0 + OpCapability Shader + %19 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size + OpEntryPoint Fragment %fragment_main "fragment_main" + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %fragment_main OriginUpperLeft + OpExecutionMode %compute_main LocalSize 1 1 1 + OpName %value "value" + OpName %vertex_point_size "vertex_point_size" + OpName %ldexp_71ebe3 "ldexp_71ebe3" + OpName %arg_1 "arg_1" + OpName %res "res" + OpName %vertex_main_inner "vertex_main_inner" + OpName %vertex_main "vertex_main" + OpName %fragment_main "fragment_main" + OpName %compute_main "compute_main" + OpDecorate %value BuiltIn Position + OpDecorate %vertex_point_size BuiltIn PointSize + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%_ptr_Output_v4float = OpTypePointer Output %v4float + %5 = OpConstantNull %v4float + %value = OpVariable %_ptr_Output_v4float Output %5 +%_ptr_Output_float = OpTypePointer Output %float + %8 = OpConstantNull %float +%vertex_point_size = OpVariable %_ptr_Output_float Output %8 + %void = OpTypeVoid + %9 = OpTypeFunction %void + %int = OpTypeInt 32 1 + %int_1 = OpConstant %int 1 +%_ptr_Function_int = OpTypePointer Function %int + %17 = OpConstantNull %int + %float_1 = OpConstant %float 1 +%_ptr_Function_float = OpTypePointer Function %float + %24 = OpTypeFunction %v4float +%ldexp_71ebe3 = OpFunction %void None %9 + %12 = OpLabel + %arg_1 = OpVariable %_ptr_Function_int Function %17 + %res = OpVariable %_ptr_Function_float Function %8 + OpStore %arg_1 %int_1 + %21 = OpLoad %int %arg_1 + %18 = OpExtInst %float %19 Ldexp %float_1 %21 + OpStore %res %18 + OpReturn + OpFunctionEnd +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %ldexp_71ebe3 + OpReturnValue %5 + OpFunctionEnd +%vertex_main = OpFunction %void None %9 + %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 %ldexp_71ebe3 + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %9 + %35 = OpLabel + %36 = OpFunctionCall %void %ldexp_71ebe3 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/ldexp/71ebe3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/ldexp/71ebe3.wgsl.expected.wgsl new file mode 100644 index 0000000000..c31d1a09cb --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/71ebe3.wgsl.expected.wgsl @@ -0,0 +1,21 @@ +fn ldexp_71ebe3() { + const arg_0 = 1.0; + var arg_1 = 1i; + var res = ldexp(arg_0, arg_1); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_71ebe3(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_71ebe3(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_71ebe3(); +} diff --git a/test/tint/builtins/gen/var/ldexp/7485ce.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/ldexp/7485ce.wgsl.expected.fxc.hlsl index 9f483e149c..2eea3139ae 100644 --- a/test/tint/builtins/gen/var/ldexp/7485ce.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/ldexp/7485ce.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ SKIP: FAILED 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); } @@ -32,3 +32,7 @@ void compute_main() { ldexp_7485ce(); return; } +FXC validation failure: +C:\src\dawn\test\tint\Shader@0x000001FA5B030020(2,10-18): error X3000: syntax error: unexpected token 'float16_t' +C:\src\dawn\test\tint\Shader@0x000001FA5B030020(4,10-18): error X3000: syntax error: unexpected token 'float16_t' + diff --git a/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl.expected.fxc.hlsl index 2b90260b8f..b2fa945815 100644 --- a/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ SKIP: FAILED 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); } @@ -32,3 +32,7 @@ void compute_main() { ldexp_7fa13c(); return; } +FXC validation failure: +C:\src\dawn\test\tint\Shader@0x000002AB3EB30940(2,10-18): error X3000: syntax error: unexpected token 'float16_t' +C:\src\dawn\test\tint\Shader@0x000002AB3EB30940(4,10-18): error X3000: syntax error: unexpected token 'float16_t' + diff --git a/test/tint/builtins/gen/var/ldexp/8a0c2f.wgsl b/test/tint/builtins/gen/var/ldexp/8a0c2f.wgsl new file mode 100644 index 0000000000..54a98d08df --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/8a0c2f.wgsl @@ -0,0 +1,47 @@ +// Copyright 2022 The Tint Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//////////////////////////////////////////////////////////////////////////////// +// File generated by tools/src/cmd/gen +// using the template: +// test/tint/builtins/gen/gen.wgsl.tmpl +// +// Do not modify this file directly +//////////////////////////////////////////////////////////////////////////////// + + +enable f16; + +// fn ldexp(vec<4, f16>, vec<4, ia>) -> vec<4, f16> +fn ldexp_8a0c2f() { + var arg_0 = vec4(1.h); + const arg_1 = vec4(1); + var res: vec4 = ldexp(arg_0, arg_1); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_8a0c2f(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_8a0c2f(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_8a0c2f(); +} diff --git a/test/tint/builtins/gen/var/ldexp/8a0c2f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/ldexp/8a0c2f.wgsl.expected.dxc.hlsl new file mode 100644 index 0000000000..0be3a6b534 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/8a0c2f.wgsl.expected.dxc.hlsl @@ -0,0 +1,31 @@ +void ldexp_8a0c2f() { + vector arg_0 = (float16_t(1.0h)).xxxx; + vector res = ldexp(arg_0, (1).xxxx); +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_8a0c2f(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_8a0c2f(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_8a0c2f(); + return; +} diff --git a/test/tint/builtins/gen/var/ldexp/8a0c2f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/ldexp/8a0c2f.wgsl.expected.fxc.hlsl new file mode 100644 index 0000000000..38e01ce458 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/8a0c2f.wgsl.expected.fxc.hlsl @@ -0,0 +1,37 @@ +SKIP: FAILED + +void ldexp_8a0c2f() { + vector arg_0 = (float16_t(1.0h)).xxxx; + vector res = ldexp(arg_0, (1).xxxx); +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_8a0c2f(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_8a0c2f(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_8a0c2f(); + return; +} +FXC validation failure: +C:\src\dawn\test\tint\Shader@0x000001B927CE7790(2,10-18): error X3000: syntax error: unexpected token 'float16_t' +C:\src\dawn\test\tint\Shader@0x000001B927CE7790(3,10-18): error X3000: syntax error: unexpected token 'float16_t' + diff --git a/test/tint/builtins/gen/var/ldexp/8a0c2f.wgsl.expected.glsl b/test/tint/builtins/gen/var/ldexp/8a0c2f.wgsl.expected.glsl new file mode 100644 index 0000000000..eac5e782e5 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/8a0c2f.wgsl.expected.glsl @@ -0,0 +1,55 @@ +#version 310 es +#extension GL_AMD_gpu_shader_half_float : require + +void ldexp_8a0c2f() { + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 res = ldexp(arg_0, ivec4(1)); +} + +vec4 vertex_main() { + ldexp_8a0c2f(); + return vec4(0.0f); +} + +void main() { + gl_PointSize = 1.0; + vec4 inner_result = vertex_main(); + gl_Position = inner_result; + gl_Position.y = -(gl_Position.y); + gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); + return; +} +#version 310 es +#extension GL_AMD_gpu_shader_half_float : require +precision mediump float; + +void ldexp_8a0c2f() { + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 res = ldexp(arg_0, ivec4(1)); +} + +void fragment_main() { + ldexp_8a0c2f(); +} + +void main() { + fragment_main(); + return; +} +#version 310 es +#extension GL_AMD_gpu_shader_half_float : require + +void ldexp_8a0c2f() { + f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 res = ldexp(arg_0, ivec4(1)); +} + +void compute_main() { + ldexp_8a0c2f(); +} + +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + compute_main(); + return; +} diff --git a/test/tint/builtins/gen/var/ldexp/8a0c2f.wgsl.expected.msl b/test/tint/builtins/gen/var/ldexp/8a0c2f.wgsl.expected.msl new file mode 100644 index 0000000000..c5f1b8e184 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/8a0c2f.wgsl.expected.msl @@ -0,0 +1,34 @@ +#include + +using namespace metal; +void ldexp_8a0c2f() { + half4 arg_0 = half4(1.0h); + half4 res = ldexp(arg_0, int4(1)); +} + +struct tint_symbol { + float4 value [[position]]; +}; + +float4 vertex_main_inner() { + ldexp_8a0c2f(); + return float4(0.0f); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main() { + ldexp_8a0c2f(); + return; +} + +kernel void compute_main() { + ldexp_8a0c2f(); + return; +} + diff --git a/test/tint/builtins/gen/var/ldexp/8a0c2f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/ldexp/8a0c2f.wgsl.expected.spvasm new file mode 100644 index 0000000000..fc841e5369 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/8a0c2f.wgsl.expected.spvasm @@ -0,0 +1,82 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 42 +; Schema: 0 + OpCapability Shader + OpCapability Float16 + OpCapability UniformAndStorageBuffer16BitAccess + OpCapability StorageBuffer16BitAccess + OpCapability StorageInputOutput16 + %21 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size + OpEntryPoint Fragment %fragment_main "fragment_main" + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %fragment_main OriginUpperLeft + OpExecutionMode %compute_main LocalSize 1 1 1 + OpName %value "value" + OpName %vertex_point_size "vertex_point_size" + OpName %ldexp_8a0c2f "ldexp_8a0c2f" + OpName %arg_0 "arg_0" + OpName %res "res" + OpName %vertex_main_inner "vertex_main_inner" + OpName %vertex_main "vertex_main" + OpName %fragment_main "fragment_main" + OpName %compute_main "compute_main" + OpDecorate %value BuiltIn Position + OpDecorate %vertex_point_size BuiltIn PointSize + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%_ptr_Output_v4float = OpTypePointer Output %v4float + %5 = OpConstantNull %v4float + %value = OpVariable %_ptr_Output_v4float Output %5 +%_ptr_Output_float = OpTypePointer Output %float + %8 = OpConstantNull %float +%vertex_point_size = OpVariable %_ptr_Output_float Output %8 + %void = OpTypeVoid + %9 = OpTypeFunction %void + %half = OpTypeFloat 16 + %v4half = OpTypeVector %half 4 +%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 + %26 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %28 = OpTypeFunction %v4float + %float_1 = OpConstant %float 1 +%ldexp_8a0c2f = OpFunction %void None %9 + %12 = OpLabel + %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 Ldexp %22 %26 + OpStore %res %20 + OpReturn + OpFunctionEnd +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %ldexp_8a0c2f + OpReturnValue %5 + OpFunctionEnd +%vertex_main = OpFunction %void None %9 + %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 + %37 = OpLabel + %38 = OpFunctionCall %void %ldexp_8a0c2f + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %9 + %40 = OpLabel + %41 = OpFunctionCall %void %ldexp_8a0c2f + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/ldexp/8a0c2f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/ldexp/8a0c2f.wgsl.expected.wgsl new file mode 100644 index 0000000000..48ea3f4d47 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/8a0c2f.wgsl.expected.wgsl @@ -0,0 +1,23 @@ +enable f16; + +fn ldexp_8a0c2f() { + var arg_0 = vec4(1.0h); + const arg_1 = vec4(1); + var res : vec4 = ldexp(arg_0, arg_1); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_8a0c2f(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_8a0c2f(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_8a0c2f(); +} diff --git a/test/tint/builtins/gen/var/ldexp/8e43e9.wgsl b/test/tint/builtins/gen/var/ldexp/8e43e9.wgsl new file mode 100644 index 0000000000..76183ef377 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/8e43e9.wgsl @@ -0,0 +1,47 @@ +// Copyright 2022 The Tint Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//////////////////////////////////////////////////////////////////////////////// +// File generated by tools/src/cmd/gen +// using the template: +// test/tint/builtins/gen/gen.wgsl.tmpl +// +// Do not modify this file directly +//////////////////////////////////////////////////////////////////////////////// + + +enable f16; + +// fn ldexp(vec<3, f16>, vec<3, ia>) -> vec<3, f16> +fn ldexp_8e43e9() { + var arg_0 = vec3(1.h); + const arg_1 = vec3(1); + var res: vec3 = ldexp(arg_0, arg_1); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_8e43e9(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_8e43e9(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_8e43e9(); +} diff --git a/test/tint/builtins/gen/var/ldexp/8e43e9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/ldexp/8e43e9.wgsl.expected.dxc.hlsl new file mode 100644 index 0000000000..3c8b9bd760 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/8e43e9.wgsl.expected.dxc.hlsl @@ -0,0 +1,31 @@ +void ldexp_8e43e9() { + vector arg_0 = (float16_t(1.0h)).xxx; + vector res = ldexp(arg_0, (1).xxx); +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_8e43e9(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_8e43e9(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_8e43e9(); + return; +} diff --git a/test/tint/builtins/gen/var/ldexp/8e43e9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/ldexp/8e43e9.wgsl.expected.fxc.hlsl new file mode 100644 index 0000000000..a48acb30c0 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/8e43e9.wgsl.expected.fxc.hlsl @@ -0,0 +1,37 @@ +SKIP: FAILED + +void ldexp_8e43e9() { + vector arg_0 = (float16_t(1.0h)).xxx; + vector res = ldexp(arg_0, (1).xxx); +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_8e43e9(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_8e43e9(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_8e43e9(); + return; +} +FXC validation failure: +C:\src\dawn\test\tint\Shader@0x000002129BF55A00(2,10-18): error X3000: syntax error: unexpected token 'float16_t' +C:\src\dawn\test\tint\Shader@0x000002129BF55A00(3,10-18): error X3000: syntax error: unexpected token 'float16_t' + diff --git a/test/tint/builtins/gen/var/ldexp/8e43e9.wgsl.expected.glsl b/test/tint/builtins/gen/var/ldexp/8e43e9.wgsl.expected.glsl new file mode 100644 index 0000000000..0f177aae45 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/8e43e9.wgsl.expected.glsl @@ -0,0 +1,55 @@ +#version 310 es +#extension GL_AMD_gpu_shader_half_float : require + +void ldexp_8e43e9() { + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 res = ldexp(arg_0, ivec3(1)); +} + +vec4 vertex_main() { + ldexp_8e43e9(); + return vec4(0.0f); +} + +void main() { + gl_PointSize = 1.0; + vec4 inner_result = vertex_main(); + gl_Position = inner_result; + gl_Position.y = -(gl_Position.y); + gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); + return; +} +#version 310 es +#extension GL_AMD_gpu_shader_half_float : require +precision mediump float; + +void ldexp_8e43e9() { + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 res = ldexp(arg_0, ivec3(1)); +} + +void fragment_main() { + ldexp_8e43e9(); +} + +void main() { + fragment_main(); + return; +} +#version 310 es +#extension GL_AMD_gpu_shader_half_float : require + +void ldexp_8e43e9() { + f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 res = ldexp(arg_0, ivec3(1)); +} + +void compute_main() { + ldexp_8e43e9(); +} + +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + compute_main(); + return; +} diff --git a/test/tint/builtins/gen/var/ldexp/8e43e9.wgsl.expected.msl b/test/tint/builtins/gen/var/ldexp/8e43e9.wgsl.expected.msl new file mode 100644 index 0000000000..57f08ea47f --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/8e43e9.wgsl.expected.msl @@ -0,0 +1,34 @@ +#include + +using namespace metal; +void ldexp_8e43e9() { + half3 arg_0 = half3(1.0h); + half3 res = ldexp(arg_0, int3(1)); +} + +struct tint_symbol { + float4 value [[position]]; +}; + +float4 vertex_main_inner() { + ldexp_8e43e9(); + return float4(0.0f); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main() { + ldexp_8e43e9(); + return; +} + +kernel void compute_main() { + ldexp_8e43e9(); + return; +} + diff --git a/test/tint/builtins/gen/var/ldexp/8e43e9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/ldexp/8e43e9.wgsl.expected.spvasm new file mode 100644 index 0000000000..7892e77cf7 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/8e43e9.wgsl.expected.spvasm @@ -0,0 +1,82 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 42 +; Schema: 0 + OpCapability Shader + OpCapability Float16 + OpCapability UniformAndStorageBuffer16BitAccess + OpCapability StorageBuffer16BitAccess + OpCapability StorageInputOutput16 + %21 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size + OpEntryPoint Fragment %fragment_main "fragment_main" + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %fragment_main OriginUpperLeft + OpExecutionMode %compute_main LocalSize 1 1 1 + OpName %value "value" + OpName %vertex_point_size "vertex_point_size" + OpName %ldexp_8e43e9 "ldexp_8e43e9" + OpName %arg_0 "arg_0" + OpName %res "res" + OpName %vertex_main_inner "vertex_main_inner" + OpName %vertex_main "vertex_main" + OpName %fragment_main "fragment_main" + OpName %compute_main "compute_main" + OpDecorate %value BuiltIn Position + OpDecorate %vertex_point_size BuiltIn PointSize + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%_ptr_Output_v4float = OpTypePointer Output %v4float + %5 = OpConstantNull %v4float + %value = OpVariable %_ptr_Output_v4float Output %5 +%_ptr_Output_float = OpTypePointer Output %float + %8 = OpConstantNull %float +%vertex_point_size = OpVariable %_ptr_Output_float Output %8 + %void = OpTypeVoid + %9 = OpTypeFunction %void + %half = OpTypeFloat 16 + %v3half = OpTypeVector %half 3 +%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 + %26 = OpConstantComposite %v3int %int_1 %int_1 %int_1 + %28 = OpTypeFunction %v4float + %float_1 = OpConstant %float 1 +%ldexp_8e43e9 = OpFunction %void None %9 + %12 = OpLabel + %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 Ldexp %22 %26 + OpStore %res %20 + OpReturn + OpFunctionEnd +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %ldexp_8e43e9 + OpReturnValue %5 + OpFunctionEnd +%vertex_main = OpFunction %void None %9 + %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 + %37 = OpLabel + %38 = OpFunctionCall %void %ldexp_8e43e9 + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %9 + %40 = OpLabel + %41 = OpFunctionCall %void %ldexp_8e43e9 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/ldexp/8e43e9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/ldexp/8e43e9.wgsl.expected.wgsl new file mode 100644 index 0000000000..f282db3bfd --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/8e43e9.wgsl.expected.wgsl @@ -0,0 +1,23 @@ +enable f16; + +fn ldexp_8e43e9() { + var arg_0 = vec3(1.0h); + const arg_1 = vec3(1); + var res : vec3 = ldexp(arg_0, arg_1); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_8e43e9(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_8e43e9(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_8e43e9(); +} diff --git a/test/tint/builtins/gen/var/ldexp/a22679.wgsl b/test/tint/builtins/gen/var/ldexp/a22679.wgsl new file mode 100644 index 0000000000..7aa4ea903c --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/a22679.wgsl @@ -0,0 +1,45 @@ +// Copyright 2022 The Tint Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//////////////////////////////////////////////////////////////////////////////// +// File generated by tools/src/cmd/gen +// using the template: +// test/tint/builtins/gen/gen.wgsl.tmpl +// +// Do not modify this file directly +//////////////////////////////////////////////////////////////////////////////// + + +// fn ldexp(vec<2, f32>, vec<2, ia>) -> vec<2, f32> +fn ldexp_a22679() { + var arg_0 = vec2(1.f); + const arg_1 = vec2(1); + var res: vec2 = ldexp(arg_0, arg_1); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_a22679(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_a22679(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_a22679(); +} diff --git a/test/tint/builtins/gen/var/ldexp/a22679.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/ldexp/a22679.wgsl.expected.dxc.hlsl new file mode 100644 index 0000000000..d488868e1f --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/a22679.wgsl.expected.dxc.hlsl @@ -0,0 +1,31 @@ +void ldexp_a22679() { + float2 arg_0 = (1.0f).xx; + float2 res = ldexp(arg_0, (1).xx); +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_a22679(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_a22679(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_a22679(); + return; +} diff --git a/test/tint/builtins/gen/var/ldexp/a22679.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/ldexp/a22679.wgsl.expected.fxc.hlsl new file mode 100644 index 0000000000..d488868e1f --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/a22679.wgsl.expected.fxc.hlsl @@ -0,0 +1,31 @@ +void ldexp_a22679() { + float2 arg_0 = (1.0f).xx; + float2 res = ldexp(arg_0, (1).xx); +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_a22679(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_a22679(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_a22679(); + return; +} diff --git a/test/tint/builtins/gen/var/ldexp/a22679.wgsl.expected.glsl b/test/tint/builtins/gen/var/ldexp/a22679.wgsl.expected.glsl new file mode 100644 index 0000000000..6f0630c544 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/a22679.wgsl.expected.glsl @@ -0,0 +1,52 @@ +#version 310 es + +void ldexp_a22679() { + vec2 arg_0 = vec2(1.0f); + vec2 res = ldexp(arg_0, ivec2(1)); +} + +vec4 vertex_main() { + ldexp_a22679(); + return vec4(0.0f); +} + +void main() { + gl_PointSize = 1.0; + vec4 inner_result = vertex_main(); + gl_Position = inner_result; + gl_Position.y = -(gl_Position.y); + gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); + return; +} +#version 310 es +precision mediump float; + +void ldexp_a22679() { + vec2 arg_0 = vec2(1.0f); + vec2 res = ldexp(arg_0, ivec2(1)); +} + +void fragment_main() { + ldexp_a22679(); +} + +void main() { + fragment_main(); + return; +} +#version 310 es + +void ldexp_a22679() { + vec2 arg_0 = vec2(1.0f); + vec2 res = ldexp(arg_0, ivec2(1)); +} + +void compute_main() { + ldexp_a22679(); +} + +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + compute_main(); + return; +} diff --git a/test/tint/builtins/gen/var/ldexp/a22679.wgsl.expected.msl b/test/tint/builtins/gen/var/ldexp/a22679.wgsl.expected.msl new file mode 100644 index 0000000000..428e958cc8 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/a22679.wgsl.expected.msl @@ -0,0 +1,34 @@ +#include + +using namespace metal; +void ldexp_a22679() { + float2 arg_0 = float2(1.0f); + float2 res = ldexp(arg_0, int2(1)); +} + +struct tint_symbol { + float4 value [[position]]; +}; + +float4 vertex_main_inner() { + ldexp_a22679(); + return float4(0.0f); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main() { + ldexp_a22679(); + return; +} + +kernel void compute_main() { + ldexp_a22679(); + return; +} + diff --git a/test/tint/builtins/gen/var/ldexp/a22679.wgsl.expected.spvasm b/test/tint/builtins/gen/var/ldexp/a22679.wgsl.expected.spvasm new file mode 100644 index 0000000000..67946b1a86 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/a22679.wgsl.expected.spvasm @@ -0,0 +1,76 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 40 +; Schema: 0 + OpCapability Shader + %20 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size + OpEntryPoint Fragment %fragment_main "fragment_main" + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %fragment_main OriginUpperLeft + OpExecutionMode %compute_main LocalSize 1 1 1 + OpName %value "value" + OpName %vertex_point_size "vertex_point_size" + OpName %ldexp_a22679 "ldexp_a22679" + OpName %arg_0 "arg_0" + OpName %res "res" + OpName %vertex_main_inner "vertex_main_inner" + OpName %vertex_main "vertex_main" + OpName %fragment_main "fragment_main" + OpName %compute_main "compute_main" + OpDecorate %value BuiltIn Position + OpDecorate %vertex_point_size BuiltIn PointSize + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%_ptr_Output_v4float = OpTypePointer Output %v4float + %5 = OpConstantNull %v4float + %value = OpVariable %_ptr_Output_v4float Output %5 +%_ptr_Output_float = OpTypePointer Output %float + %8 = OpConstantNull %float +%vertex_point_size = OpVariable %_ptr_Output_float Output %8 + %void = OpTypeVoid + %9 = OpTypeFunction %void + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float + %int = OpTypeInt 32 1 + %v2int = OpTypeVector %int 2 + %int_1 = OpConstant %int 1 + %25 = OpConstantComposite %v2int %int_1 %int_1 + %27 = OpTypeFunction %v4float +%ldexp_a22679 = OpFunction %void None %9 + %12 = OpLabel + %arg_0 = OpVariable %_ptr_Function_v2float Function %18 + %res = OpVariable %_ptr_Function_v2float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v2float %arg_0 + %19 = OpExtInst %v2float %20 Ldexp %21 %25 + OpStore %res %19 + OpReturn + OpFunctionEnd +%vertex_main_inner = OpFunction %v4float None %27 + %29 = OpLabel + %30 = OpFunctionCall %void %ldexp_a22679 + OpReturnValue %5 + OpFunctionEnd +%vertex_main = OpFunction %void None %9 + %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 + %35 = OpLabel + %36 = OpFunctionCall %void %ldexp_a22679 + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %9 + %38 = OpLabel + %39 = OpFunctionCall %void %ldexp_a22679 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/ldexp/a22679.wgsl.expected.wgsl b/test/tint/builtins/gen/var/ldexp/a22679.wgsl.expected.wgsl new file mode 100644 index 0000000000..e01bfb4694 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/a22679.wgsl.expected.wgsl @@ -0,0 +1,21 @@ +fn ldexp_a22679() { + var arg_0 = vec2(1.0f); + const arg_1 = vec2(1); + var res : vec2 = ldexp(arg_0, arg_1); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_a22679(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_a22679(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_a22679(); +} diff --git a/test/tint/builtins/gen/var/ldexp/a6126e.wgsl b/test/tint/builtins/gen/var/ldexp/a6126e.wgsl new file mode 100644 index 0000000000..3b7ca61e28 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/a6126e.wgsl @@ -0,0 +1,45 @@ +// Copyright 2022 The Tint Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//////////////////////////////////////////////////////////////////////////////// +// File generated by tools/src/cmd/gen +// using the template: +// test/tint/builtins/gen/gen.wgsl.tmpl +// +// Do not modify this file directly +//////////////////////////////////////////////////////////////////////////////// + + +// fn ldexp(vec<3, fa>, vec<3, i32>) -> vec<3, fa> +fn ldexp_a6126e() { + const arg_0 = vec3(1.); + var arg_1 = vec3(1i); + var res = ldexp(arg_0, arg_1); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_a6126e(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_a6126e(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_a6126e(); +} diff --git a/test/tint/builtins/gen/var/ldexp/a6126e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/ldexp/a6126e.wgsl.expected.dxc.hlsl new file mode 100644 index 0000000000..b8c3fab933 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/a6126e.wgsl.expected.dxc.hlsl @@ -0,0 +1,31 @@ +void ldexp_a6126e() { + int3 arg_1 = (1).xxx; + float3 res = ldexp((1.0f).xxx, arg_1); +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_a6126e(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_a6126e(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_a6126e(); + return; +} diff --git a/test/tint/builtins/gen/var/ldexp/a6126e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/ldexp/a6126e.wgsl.expected.fxc.hlsl new file mode 100644 index 0000000000..b8c3fab933 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/a6126e.wgsl.expected.fxc.hlsl @@ -0,0 +1,31 @@ +void ldexp_a6126e() { + int3 arg_1 = (1).xxx; + float3 res = ldexp((1.0f).xxx, arg_1); +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_a6126e(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_a6126e(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_a6126e(); + return; +} diff --git a/test/tint/builtins/gen/var/ldexp/a6126e.wgsl.expected.glsl b/test/tint/builtins/gen/var/ldexp/a6126e.wgsl.expected.glsl new file mode 100644 index 0000000000..147271982e --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/a6126e.wgsl.expected.glsl @@ -0,0 +1,52 @@ +#version 310 es + +void ldexp_a6126e() { + ivec3 arg_1 = ivec3(1); + vec3 res = ldexp(vec3(1.0f), arg_1); +} + +vec4 vertex_main() { + ldexp_a6126e(); + return vec4(0.0f); +} + +void main() { + gl_PointSize = 1.0; + vec4 inner_result = vertex_main(); + gl_Position = inner_result; + gl_Position.y = -(gl_Position.y); + gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); + return; +} +#version 310 es +precision mediump float; + +void ldexp_a6126e() { + ivec3 arg_1 = ivec3(1); + vec3 res = ldexp(vec3(1.0f), arg_1); +} + +void fragment_main() { + ldexp_a6126e(); +} + +void main() { + fragment_main(); + return; +} +#version 310 es + +void ldexp_a6126e() { + ivec3 arg_1 = ivec3(1); + vec3 res = ldexp(vec3(1.0f), arg_1); +} + +void compute_main() { + ldexp_a6126e(); +} + +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + compute_main(); + return; +} diff --git a/test/tint/builtins/gen/var/ldexp/a6126e.wgsl.expected.msl b/test/tint/builtins/gen/var/ldexp/a6126e.wgsl.expected.msl new file mode 100644 index 0000000000..f8e743d642 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/a6126e.wgsl.expected.msl @@ -0,0 +1,34 @@ +#include + +using namespace metal; +void ldexp_a6126e() { + int3 arg_1 = int3(1); + float3 res = ldexp(float3(1.0f), arg_1); +} + +struct tint_symbol { + float4 value [[position]]; +}; + +float4 vertex_main_inner() { + ldexp_a6126e(); + return float4(0.0f); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main() { + ldexp_a6126e(); + return; +} + +kernel void compute_main() { + ldexp_a6126e(); + return; +} + diff --git a/test/tint/builtins/gen/var/ldexp/a6126e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/ldexp/a6126e.wgsl.expected.spvasm new file mode 100644 index 0000000000..938efe1e06 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/a6126e.wgsl.expected.spvasm @@ -0,0 +1,78 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 42 +; Schema: 0 + OpCapability Shader + %22 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size + OpEntryPoint Fragment %fragment_main "fragment_main" + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %fragment_main OriginUpperLeft + OpExecutionMode %compute_main LocalSize 1 1 1 + OpName %value "value" + OpName %vertex_point_size "vertex_point_size" + OpName %ldexp_a6126e "ldexp_a6126e" + OpName %arg_1 "arg_1" + OpName %res "res" + OpName %vertex_main_inner "vertex_main_inner" + OpName %vertex_main "vertex_main" + OpName %fragment_main "fragment_main" + OpName %compute_main "compute_main" + OpDecorate %value BuiltIn Position + OpDecorate %vertex_point_size BuiltIn PointSize + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%_ptr_Output_v4float = OpTypePointer Output %v4float + %5 = OpConstantNull %v4float + %value = OpVariable %_ptr_Output_v4float Output %5 +%_ptr_Output_float = OpTypePointer Output %float + %8 = OpConstantNull %float +%vertex_point_size = OpVariable %_ptr_Output_float Output %8 + %void = OpTypeVoid + %9 = OpTypeFunction %void + %int = OpTypeInt 32 1 + %v3int = OpTypeVector %int 3 + %int_1 = OpConstant %int 1 + %16 = OpConstantComposite %v3int %int_1 %int_1 %int_1 +%_ptr_Function_v3int = OpTypePointer Function %v3int + %19 = OpConstantNull %v3int + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %24 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %28 = OpConstantNull %v3float + %29 = OpTypeFunction %v4float +%ldexp_a6126e = OpFunction %void None %9 + %12 = OpLabel + %arg_1 = OpVariable %_ptr_Function_v3int Function %19 + %res = OpVariable %_ptr_Function_v3float Function %28 + OpStore %arg_1 %16 + %25 = OpLoad %v3int %arg_1 + %20 = OpExtInst %v3float %22 Ldexp %24 %25 + OpStore %res %20 + OpReturn + OpFunctionEnd +%vertex_main_inner = OpFunction %v4float None %29 + %31 = OpLabel + %32 = OpFunctionCall %void %ldexp_a6126e + OpReturnValue %5 + OpFunctionEnd +%vertex_main = OpFunction %void None %9 + %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 %ldexp_a6126e + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %9 + %40 = OpLabel + %41 = OpFunctionCall %void %ldexp_a6126e + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/ldexp/a6126e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/ldexp/a6126e.wgsl.expected.wgsl new file mode 100644 index 0000000000..c060acacd7 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/a6126e.wgsl.expected.wgsl @@ -0,0 +1,21 @@ +fn ldexp_a6126e() { + const arg_0 = vec3(1.0); + var arg_1 = vec3(1i); + var res = ldexp(arg_0, arg_1); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_a6126e(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_a6126e(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_a6126e(); +} diff --git a/test/tint/builtins/gen/var/ldexp/c9d0b7.wgsl b/test/tint/builtins/gen/var/ldexp/c9d0b7.wgsl new file mode 100644 index 0000000000..48fac9f53d --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/c9d0b7.wgsl @@ -0,0 +1,45 @@ +// Copyright 2022 The Tint Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//////////////////////////////////////////////////////////////////////////////// +// File generated by tools/src/cmd/gen +// using the template: +// test/tint/builtins/gen/gen.wgsl.tmpl +// +// Do not modify this file directly +//////////////////////////////////////////////////////////////////////////////// + + +// fn ldexp(f32, ia) -> f32 +fn ldexp_c9d0b7() { + var arg_0 = 1.f; + const arg_1 = 1; + var res: f32 = ldexp(arg_0, arg_1); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_c9d0b7(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_c9d0b7(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_c9d0b7(); +} diff --git a/test/tint/builtins/gen/var/ldexp/c9d0b7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/ldexp/c9d0b7.wgsl.expected.dxc.hlsl new file mode 100644 index 0000000000..0c3a88578c --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/c9d0b7.wgsl.expected.dxc.hlsl @@ -0,0 +1,31 @@ +void ldexp_c9d0b7() { + float arg_0 = 1.0f; + float res = ldexp(arg_0, 1); +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_c9d0b7(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_c9d0b7(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_c9d0b7(); + return; +} diff --git a/test/tint/builtins/gen/var/ldexp/c9d0b7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/ldexp/c9d0b7.wgsl.expected.fxc.hlsl new file mode 100644 index 0000000000..0c3a88578c --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/c9d0b7.wgsl.expected.fxc.hlsl @@ -0,0 +1,31 @@ +void ldexp_c9d0b7() { + float arg_0 = 1.0f; + float res = ldexp(arg_0, 1); +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_c9d0b7(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_c9d0b7(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_c9d0b7(); + return; +} diff --git a/test/tint/builtins/gen/var/ldexp/c9d0b7.wgsl.expected.glsl b/test/tint/builtins/gen/var/ldexp/c9d0b7.wgsl.expected.glsl new file mode 100644 index 0000000000..98499279d9 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/c9d0b7.wgsl.expected.glsl @@ -0,0 +1,52 @@ +#version 310 es + +void ldexp_c9d0b7() { + float arg_0 = 1.0f; + float res = ldexp(arg_0, 1); +} + +vec4 vertex_main() { + ldexp_c9d0b7(); + return vec4(0.0f); +} + +void main() { + gl_PointSize = 1.0; + vec4 inner_result = vertex_main(); + gl_Position = inner_result; + gl_Position.y = -(gl_Position.y); + gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); + return; +} +#version 310 es +precision mediump float; + +void ldexp_c9d0b7() { + float arg_0 = 1.0f; + float res = ldexp(arg_0, 1); +} + +void fragment_main() { + ldexp_c9d0b7(); +} + +void main() { + fragment_main(); + return; +} +#version 310 es + +void ldexp_c9d0b7() { + float arg_0 = 1.0f; + float res = ldexp(arg_0, 1); +} + +void compute_main() { + ldexp_c9d0b7(); +} + +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + compute_main(); + return; +} diff --git a/test/tint/builtins/gen/var/ldexp/c9d0b7.wgsl.expected.msl b/test/tint/builtins/gen/var/ldexp/c9d0b7.wgsl.expected.msl new file mode 100644 index 0000000000..b6ac8c76b4 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/c9d0b7.wgsl.expected.msl @@ -0,0 +1,34 @@ +#include + +using namespace metal; +void ldexp_c9d0b7() { + float arg_0 = 1.0f; + float res = ldexp(arg_0, 1); +} + +struct tint_symbol { + float4 value [[position]]; +}; + +float4 vertex_main_inner() { + ldexp_c9d0b7(); + return float4(0.0f); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main() { + ldexp_c9d0b7(); + return; +} + +kernel void compute_main() { + ldexp_c9d0b7(); + return; +} + diff --git a/test/tint/builtins/gen/var/ldexp/c9d0b7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/ldexp/c9d0b7.wgsl.expected.spvasm new file mode 100644 index 0000000000..2759d06351 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/c9d0b7.wgsl.expected.spvasm @@ -0,0 +1,71 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 35 +; Schema: 0 + OpCapability Shader + %17 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size + OpEntryPoint Fragment %fragment_main "fragment_main" + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %fragment_main OriginUpperLeft + OpExecutionMode %compute_main LocalSize 1 1 1 + OpName %value "value" + OpName %vertex_point_size "vertex_point_size" + OpName %ldexp_c9d0b7 "ldexp_c9d0b7" + OpName %arg_0 "arg_0" + OpName %res "res" + OpName %vertex_main_inner "vertex_main_inner" + OpName %vertex_main "vertex_main" + OpName %fragment_main "fragment_main" + OpName %compute_main "compute_main" + OpDecorate %value BuiltIn Position + OpDecorate %vertex_point_size BuiltIn PointSize + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%_ptr_Output_v4float = OpTypePointer Output %v4float + %5 = OpConstantNull %v4float + %value = OpVariable %_ptr_Output_v4float Output %5 +%_ptr_Output_float = OpTypePointer Output %float + %8 = OpConstantNull %float +%vertex_point_size = OpVariable %_ptr_Output_float Output %8 + %void = OpTypeVoid + %9 = OpTypeFunction %void + %float_1 = OpConstant %float 1 +%_ptr_Function_float = OpTypePointer Function %float + %int = OpTypeInt 32 1 + %int_1 = OpConstant %int 1 + %22 = OpTypeFunction %v4float +%ldexp_c9d0b7 = OpFunction %void None %9 + %12 = OpLabel + %arg_0 = OpVariable %_ptr_Function_float Function %8 + %res = OpVariable %_ptr_Function_float Function %8 + OpStore %arg_0 %float_1 + %18 = OpLoad %float %arg_0 + %16 = OpExtInst %float %17 Ldexp %18 %int_1 + OpStore %res %16 + OpReturn + OpFunctionEnd +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %ldexp_c9d0b7 + OpReturnValue %5 + OpFunctionEnd +%vertex_main = OpFunction %void None %9 + %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_c9d0b7 + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %9 + %33 = OpLabel + %34 = OpFunctionCall %void %ldexp_c9d0b7 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/ldexp/c9d0b7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/ldexp/c9d0b7.wgsl.expected.wgsl new file mode 100644 index 0000000000..60556e7610 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/c9d0b7.wgsl.expected.wgsl @@ -0,0 +1,21 @@ +fn ldexp_c9d0b7() { + var arg_0 = 1.0f; + const arg_1 = 1; + var res : f32 = ldexp(arg_0, arg_1); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_c9d0b7(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_c9d0b7(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_c9d0b7(); +} diff --git a/test/tint/builtins/gen/var/ldexp/cb0faf.wgsl b/test/tint/builtins/gen/var/ldexp/cb0faf.wgsl new file mode 100644 index 0000000000..521b1ba404 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/cb0faf.wgsl @@ -0,0 +1,45 @@ +// Copyright 2022 The Tint Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//////////////////////////////////////////////////////////////////////////////// +// File generated by tools/src/cmd/gen +// using the template: +// test/tint/builtins/gen/gen.wgsl.tmpl +// +// Do not modify this file directly +//////////////////////////////////////////////////////////////////////////////// + + +// fn ldexp(vec<4, fa>, vec<4, ia>) -> vec<4, fa> +fn ldexp_cb0faf() { + const arg_0 = vec4(1.); + const arg_1 = vec4(1); + var res = ldexp(arg_0, arg_1); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_cb0faf(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_cb0faf(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_cb0faf(); +} diff --git a/test/tint/builtins/gen/var/ldexp/cb0faf.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/ldexp/cb0faf.wgsl.expected.dxc.hlsl new file mode 100644 index 0000000000..bd074989e8 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/cb0faf.wgsl.expected.dxc.hlsl @@ -0,0 +1,30 @@ +void ldexp_cb0faf() { + float4 res = (2.0f).xxxx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_cb0faf(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_cb0faf(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_cb0faf(); + return; +} diff --git a/test/tint/builtins/gen/var/ldexp/cb0faf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/ldexp/cb0faf.wgsl.expected.fxc.hlsl new file mode 100644 index 0000000000..bd074989e8 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/cb0faf.wgsl.expected.fxc.hlsl @@ -0,0 +1,30 @@ +void ldexp_cb0faf() { + float4 res = (2.0f).xxxx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_cb0faf(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_cb0faf(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_cb0faf(); + return; +} diff --git a/test/tint/builtins/gen/var/ldexp/cb0faf.wgsl.expected.glsl b/test/tint/builtins/gen/var/ldexp/cb0faf.wgsl.expected.glsl new file mode 100644 index 0000000000..9676cec9be --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/cb0faf.wgsl.expected.glsl @@ -0,0 +1,49 @@ +#version 310 es + +void ldexp_cb0faf() { + vec4 res = vec4(2.0f); +} + +vec4 vertex_main() { + ldexp_cb0faf(); + return vec4(0.0f); +} + +void main() { + gl_PointSize = 1.0; + vec4 inner_result = vertex_main(); + gl_Position = inner_result; + gl_Position.y = -(gl_Position.y); + gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); + return; +} +#version 310 es +precision mediump float; + +void ldexp_cb0faf() { + vec4 res = vec4(2.0f); +} + +void fragment_main() { + ldexp_cb0faf(); +} + +void main() { + fragment_main(); + return; +} +#version 310 es + +void ldexp_cb0faf() { + vec4 res = vec4(2.0f); +} + +void compute_main() { + ldexp_cb0faf(); +} + +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + compute_main(); + return; +} diff --git a/test/tint/builtins/gen/var/ldexp/cb0faf.wgsl.expected.msl b/test/tint/builtins/gen/var/ldexp/cb0faf.wgsl.expected.msl new file mode 100644 index 0000000000..a05798ce97 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/cb0faf.wgsl.expected.msl @@ -0,0 +1,33 @@ +#include + +using namespace metal; +void ldexp_cb0faf() { + float4 res = float4(2.0f); +} + +struct tint_symbol { + float4 value [[position]]; +}; + +float4 vertex_main_inner() { + ldexp_cb0faf(); + return float4(0.0f); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main() { + ldexp_cb0faf(); + return; +} + +kernel void compute_main() { + ldexp_cb0faf(); + return; +} + diff --git a/test/tint/builtins/gen/var/ldexp/cb0faf.wgsl.expected.spvasm b/test/tint/builtins/gen/var/ldexp/cb0faf.wgsl.expected.spvasm new file mode 100644 index 0000000000..11293bdc16 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/cb0faf.wgsl.expected.spvasm @@ -0,0 +1,65 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 31 +; Schema: 0 + OpCapability Shader + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size + OpEntryPoint Fragment %fragment_main "fragment_main" + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %fragment_main OriginUpperLeft + OpExecutionMode %compute_main LocalSize 1 1 1 + OpName %value "value" + OpName %vertex_point_size "vertex_point_size" + OpName %ldexp_cb0faf "ldexp_cb0faf" + OpName %res "res" + OpName %vertex_main_inner "vertex_main_inner" + OpName %vertex_main "vertex_main" + OpName %fragment_main "fragment_main" + OpName %compute_main "compute_main" + OpDecorate %value BuiltIn Position + OpDecorate %vertex_point_size BuiltIn PointSize + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%_ptr_Output_v4float = OpTypePointer Output %v4float + %5 = OpConstantNull %v4float + %value = OpVariable %_ptr_Output_v4float Output %5 +%_ptr_Output_float = OpTypePointer Output %float + %8 = OpConstantNull %float +%vertex_point_size = OpVariable %_ptr_Output_float Output %8 + %void = OpTypeVoid + %9 = OpTypeFunction %void + %float_2 = OpConstant %float 2 + %14 = OpConstantComposite %v4float %float_2 %float_2 %float_2 %float_2 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %17 = OpTypeFunction %v4float + %float_1 = OpConstant %float 1 +%ldexp_cb0faf = OpFunction %void None %9 + %12 = OpLabel + %res = OpVariable %_ptr_Function_v4float Function %5 + OpStore %res %14 + OpReturn + OpFunctionEnd +%vertex_main_inner = OpFunction %v4float None %17 + %19 = OpLabel + %20 = OpFunctionCall %void %ldexp_cb0faf + OpReturnValue %5 + OpFunctionEnd +%vertex_main = OpFunction %void None %9 + %22 = OpLabel + %23 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %23 + OpStore %vertex_point_size %float_1 + OpReturn + OpFunctionEnd +%fragment_main = OpFunction %void None %9 + %26 = OpLabel + %27 = OpFunctionCall %void %ldexp_cb0faf + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %9 + %29 = OpLabel + %30 = OpFunctionCall %void %ldexp_cb0faf + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/ldexp/cb0faf.wgsl.expected.wgsl b/test/tint/builtins/gen/var/ldexp/cb0faf.wgsl.expected.wgsl new file mode 100644 index 0000000000..3603070287 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/cb0faf.wgsl.expected.wgsl @@ -0,0 +1,21 @@ +fn ldexp_cb0faf() { + const arg_0 = vec4(1.0); + const arg_1 = vec4(1); + var res = ldexp(arg_0, arg_1); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_cb0faf(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_cb0faf(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_cb0faf(); +} diff --git a/test/tint/builtins/gen/var/ldexp/fdbc7b.wgsl b/test/tint/builtins/gen/var/ldexp/fdbc7b.wgsl new file mode 100644 index 0000000000..9775c0edfa --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/fdbc7b.wgsl @@ -0,0 +1,45 @@ +// Copyright 2022 The Tint Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//////////////////////////////////////////////////////////////////////////////// +// File generated by tools/src/cmd/gen +// using the template: +// test/tint/builtins/gen/gen.wgsl.tmpl +// +// Do not modify this file directly +//////////////////////////////////////////////////////////////////////////////// + + +// fn ldexp(fa, ia) -> fa +fn ldexp_fdbc7b() { + const arg_0 = 1.; + const arg_1 = 1; + var res = ldexp(arg_0, arg_1); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_fdbc7b(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_fdbc7b(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_fdbc7b(); +} diff --git a/test/tint/builtins/gen/var/ldexp/fdbc7b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/ldexp/fdbc7b.wgsl.expected.dxc.hlsl new file mode 100644 index 0000000000..ce91ad5564 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/fdbc7b.wgsl.expected.dxc.hlsl @@ -0,0 +1,30 @@ +void ldexp_fdbc7b() { + float res = 2.0f; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_fdbc7b(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_fdbc7b(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_fdbc7b(); + return; +} diff --git a/test/tint/builtins/gen/var/ldexp/fdbc7b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/ldexp/fdbc7b.wgsl.expected.fxc.hlsl new file mode 100644 index 0000000000..ce91ad5564 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/fdbc7b.wgsl.expected.fxc.hlsl @@ -0,0 +1,30 @@ +void ldexp_fdbc7b() { + float res = 2.0f; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + ldexp_fdbc7b(); + return (0.0f).xxxx; +} + +tint_symbol vertex_main() { + const float4 inner_result = vertex_main_inner(); + tint_symbol wrapper_result = (tint_symbol)0; + wrapper_result.value = inner_result; + return wrapper_result; +} + +void fragment_main() { + ldexp_fdbc7b(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + ldexp_fdbc7b(); + return; +} diff --git a/test/tint/builtins/gen/var/ldexp/fdbc7b.wgsl.expected.glsl b/test/tint/builtins/gen/var/ldexp/fdbc7b.wgsl.expected.glsl new file mode 100644 index 0000000000..b2017bf0ca --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/fdbc7b.wgsl.expected.glsl @@ -0,0 +1,49 @@ +#version 310 es + +void ldexp_fdbc7b() { + float res = 2.0f; +} + +vec4 vertex_main() { + ldexp_fdbc7b(); + return vec4(0.0f); +} + +void main() { + gl_PointSize = 1.0; + vec4 inner_result = vertex_main(); + gl_Position = inner_result; + gl_Position.y = -(gl_Position.y); + gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); + return; +} +#version 310 es +precision mediump float; + +void ldexp_fdbc7b() { + float res = 2.0f; +} + +void fragment_main() { + ldexp_fdbc7b(); +} + +void main() { + fragment_main(); + return; +} +#version 310 es + +void ldexp_fdbc7b() { + float res = 2.0f; +} + +void compute_main() { + ldexp_fdbc7b(); +} + +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + compute_main(); + return; +} diff --git a/test/tint/builtins/gen/var/ldexp/fdbc7b.wgsl.expected.msl b/test/tint/builtins/gen/var/ldexp/fdbc7b.wgsl.expected.msl new file mode 100644 index 0000000000..36be6012e9 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/fdbc7b.wgsl.expected.msl @@ -0,0 +1,33 @@ +#include + +using namespace metal; +void ldexp_fdbc7b() { + float res = 2.0f; +} + +struct tint_symbol { + float4 value [[position]]; +}; + +float4 vertex_main_inner() { + ldexp_fdbc7b(); + return float4(0.0f); +} + +vertex tint_symbol vertex_main() { + float4 const inner_result = vertex_main_inner(); + tint_symbol wrapper_result = {}; + wrapper_result.value = inner_result; + return wrapper_result; +} + +fragment void fragment_main() { + ldexp_fdbc7b(); + return; +} + +kernel void compute_main() { + ldexp_fdbc7b(); + return; +} + diff --git a/test/tint/builtins/gen/var/ldexp/fdbc7b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/ldexp/fdbc7b.wgsl.expected.spvasm new file mode 100644 index 0000000000..7238d0dac0 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/fdbc7b.wgsl.expected.spvasm @@ -0,0 +1,64 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 30 +; Schema: 0 + OpCapability Shader + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size + OpEntryPoint Fragment %fragment_main "fragment_main" + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %fragment_main OriginUpperLeft + OpExecutionMode %compute_main LocalSize 1 1 1 + OpName %value "value" + OpName %vertex_point_size "vertex_point_size" + OpName %ldexp_fdbc7b "ldexp_fdbc7b" + OpName %res "res" + OpName %vertex_main_inner "vertex_main_inner" + OpName %vertex_main "vertex_main" + OpName %fragment_main "fragment_main" + OpName %compute_main "compute_main" + OpDecorate %value BuiltIn Position + OpDecorate %vertex_point_size BuiltIn PointSize + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%_ptr_Output_v4float = OpTypePointer Output %v4float + %5 = OpConstantNull %v4float + %value = OpVariable %_ptr_Output_v4float Output %5 +%_ptr_Output_float = OpTypePointer Output %float + %8 = OpConstantNull %float +%vertex_point_size = OpVariable %_ptr_Output_float Output %8 + %void = OpTypeVoid + %9 = OpTypeFunction %void + %float_2 = OpConstant %float 2 +%_ptr_Function_float = OpTypePointer Function %float + %16 = OpTypeFunction %v4float + %float_1 = OpConstant %float 1 +%ldexp_fdbc7b = OpFunction %void None %9 + %12 = OpLabel + %res = OpVariable %_ptr_Function_float Function %8 + OpStore %res %float_2 + OpReturn + OpFunctionEnd +%vertex_main_inner = OpFunction %v4float None %16 + %18 = OpLabel + %19 = OpFunctionCall %void %ldexp_fdbc7b + OpReturnValue %5 + OpFunctionEnd +%vertex_main = OpFunction %void None %9 + %21 = OpLabel + %22 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %22 + OpStore %vertex_point_size %float_1 + OpReturn + OpFunctionEnd +%fragment_main = OpFunction %void None %9 + %25 = OpLabel + %26 = OpFunctionCall %void %ldexp_fdbc7b + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %9 + %28 = OpLabel + %29 = OpFunctionCall %void %ldexp_fdbc7b + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/ldexp/fdbc7b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/ldexp/fdbc7b.wgsl.expected.wgsl new file mode 100644 index 0000000000..040635e793 --- /dev/null +++ b/test/tint/builtins/gen/var/ldexp/fdbc7b.wgsl.expected.wgsl @@ -0,0 +1,21 @@ +fn ldexp_fdbc7b() { + const arg_0 = 1.0; + const arg_1 = 1; + var res = ldexp(arg_0, arg_1); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + ldexp_fdbc7b(); + return vec4(); +} + +@fragment +fn fragment_main() { + ldexp_fdbc7b(); +} + +@compute @workgroup_size(1) +fn compute_main() { + ldexp_fdbc7b(); +} diff --git a/test/tint/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.spvasm b/test/tint/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.spvasm index 65b9079c09..01b3f23718 100644 --- a/test/tint/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.spvasm +++ b/test/tint/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.spvasm @@ -83,8 +83,7 @@ %_ptr_Function_v3float = OpTypePointer Function %v3float %64 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %v3int = OpTypeVector %int 3 - %int_500 = OpConstant %int 500 - %67 = OpConstantComposite %v3int %int_500 %int_500 %int_500 + %67 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %uint_0 = OpConstant %uint 0 %_ptr_Function_float = OpTypePointer Function %float diff --git a/test/tint/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.wgsl b/test/tint/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.wgsl index 6d695adf70..b9cc8e2181 100644 --- a/test/tint/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.wgsl +++ b/test/tint/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.wgsl @@ -49,7 +49,7 @@ fn main_1() { let x_27 : i32 = x_6.x_GLF_uniform_int_values[4].el; let x_104 : f32 = f32(x_27); m1 = mat3x4(vec4(x_104, 0.0, 0.0, 0.0), vec4(0.0, x_104, 0.0, 0.0), vec4(0.0, 0.0, x_104, 0.0)); - undefined = ldexp(vec3(1.0, 1.0, 1.0), vec3(500, 500, 500)); + undefined = ldexp(vec3(1.0, 1.0, 1.0), vec3(1, 1, 1)); let x_28 : i32 = x_6.x_GLF_uniform_int_values[4].el; let x_111 : f32 = f32(x_28); let x_29 : i32 = x_6.x_GLF_uniform_int_values[0].el; diff --git a/test/tint/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.spvasm b/test/tint/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.spvasm index 78defc8414..ee07916a5e 100644 --- a/test/tint/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.spvasm +++ b/test/tint/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.spvasm @@ -31,7 +31,6 @@ %float_40_3300018 = OpConstant %float 40.3300018 %float_1 = OpConstant %float 1 %int = OpTypeInt 32 1 - %int_98980 = OpConstant %int 98980 %bool = OpTypeBool %uint = OpTypeInt 32 0 %uint_2 = OpConstant %uint 2 @@ -54,7 +53,7 @@ %main = OpFunction %void None %12 %31 = OpLabel %f = OpVariable %_ptr_Function_float Function - %32 = OpExtInst %float %1 Ldexp %float_1 %int_98980 + %32 = OpExtInst %float %1 Ldexp %float_1 %int_1 %33 = OpExtInst %float %1 Pow %float_40_3300018 %32 OpStore %f %33 %34 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_0 diff --git a/test/tint/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.wgsl b/test/tint/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.wgsl index e480acbc4c..cc7f52276a 100644 --- a/test/tint/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.wgsl +++ b/test/tint/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.wgsl @@ -30,7 +30,7 @@ fn main_1() { var f : f32; var x_48 : bool; var x_49_phi : bool; - f = pow(40.330001831, ldexp(1.0, 98980)); + f = pow(40.330001831, ldexp(1.0, 1)); let x_35 : i32 = x_6.x_GLF_uniform_int_values[0].el; let x_37 : i32 = x_6.x_GLF_uniform_int_values[0].el; let x_39 : i32 = x_6.x_GLF_uniform_int_values[1].el;