From bf8ee3549875457ee5019b83923bf0205763cfab Mon Sep 17 00:00:00 2001 From: Antonio Maiorano Date: Wed, 27 Jul 2022 15:02:25 +0000 Subject: [PATCH] const eval of clamp Bug: tint:1581 Change-Id: Icffaf023021e704b3beaacf35136a9d6263b31e3 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97221 Commit-Queue: Antonio Maiorano Reviewed-by: Ben Clayton --- src/tint/intrinsics.def | 5 +- src/tint/resolver/builtin_test.cc | 18 +- src/tint/resolver/const_eval.cc | 27 + src/tint/resolver/const_eval.h | 7 + src/tint/resolver/const_eval_test.cc | 25 + src/tint/resolver/intrinsic_table.inl | 839 ++++++++++-------- src/tint/resolver/intrinsic_table_test.cc | 94 +- .../clamp/0acf8f.wgsl.expected.dxc.hlsl | 2 +- .../clamp/0acf8f.wgsl.expected.fxc.hlsl | 2 +- .../literal/clamp/0acf8f.wgsl.expected.glsl | 6 +- .../literal/clamp/0acf8f.wgsl.expected.msl | 2 +- .../literal/clamp/0acf8f.wgsl.expected.spvasm | 34 +- .../builtins/gen/literal/clamp/177548.wgsl | 43 + .../clamp/177548.wgsl.expected.dxc.hlsl | 30 + .../clamp/177548.wgsl.expected.fxc.hlsl | 30 + .../literal/clamp/177548.wgsl.expected.glsl | 49 + .../literal/clamp/177548.wgsl.expected.msl | 33 + .../literal/clamp/177548.wgsl.expected.spvasm | 66 ++ .../literal/clamp/177548.wgsl.expected.wgsl | 19 + .../clamp/1a32e3.wgsl.expected.dxc.hlsl | 2 +- .../clamp/1a32e3.wgsl.expected.fxc.hlsl | 2 +- .../literal/clamp/1a32e3.wgsl.expected.glsl | 6 +- .../literal/clamp/1a32e3.wgsl.expected.msl | 2 +- .../literal/clamp/1a32e3.wgsl.expected.spvasm | 34 +- .../builtins/gen/literal/clamp/23aa4f.wgsl | 43 + .../clamp/23aa4f.wgsl.expected.dxc.hlsl | 30 + .../clamp/23aa4f.wgsl.expected.fxc.hlsl | 30 + .../literal/clamp/23aa4f.wgsl.expected.glsl | 49 + .../literal/clamp/23aa4f.wgsl.expected.msl | 33 + .../literal/clamp/23aa4f.wgsl.expected.spvasm | 66 ++ .../literal/clamp/23aa4f.wgsl.expected.wgsl | 19 + .../clamp/2bd567.wgsl.expected.dxc.hlsl | 2 +- .../clamp/2bd567.wgsl.expected.fxc.hlsl | 2 +- .../literal/clamp/2bd567.wgsl.expected.glsl | 6 +- .../literal/clamp/2bd567.wgsl.expected.msl | 2 +- .../literal/clamp/2bd567.wgsl.expected.spvasm | 28 +- .../clamp/2bde41.wgsl.expected.dxc.hlsl | 2 +- .../clamp/2bde41.wgsl.expected.fxc.hlsl | 2 +- .../literal/clamp/2bde41.wgsl.expected.glsl | 6 +- .../literal/clamp/2bde41.wgsl.expected.msl | 2 +- .../literal/clamp/2bde41.wgsl.expected.spvasm | 30 +- .../clamp/548fc7.wgsl.expected.dxc.hlsl | 2 +- .../clamp/548fc7.wgsl.expected.fxc.hlsl | 2 +- .../literal/clamp/548fc7.wgsl.expected.glsl | 6 +- .../literal/clamp/548fc7.wgsl.expected.msl | 2 +- .../literal/clamp/548fc7.wgsl.expected.spvasm | 34 +- .../builtins/gen/literal/clamp/5cf700.wgsl | 43 + .../clamp/5cf700.wgsl.expected.dxc.hlsl | 30 + .../clamp/5cf700.wgsl.expected.fxc.hlsl | 30 + .../literal/clamp/5cf700.wgsl.expected.glsl | 49 + .../literal/clamp/5cf700.wgsl.expected.msl | 33 + .../literal/clamp/5cf700.wgsl.expected.spvasm | 68 ++ .../literal/clamp/5cf700.wgsl.expected.wgsl | 19 + .../clamp/5f0819.wgsl.expected.dxc.hlsl | 2 +- .../clamp/5f0819.wgsl.expected.fxc.hlsl | 2 +- .../literal/clamp/5f0819.wgsl.expected.glsl | 6 +- .../literal/clamp/5f0819.wgsl.expected.msl | 2 +- .../literal/clamp/5f0819.wgsl.expected.spvasm | 34 +- .../clamp/6c1749.wgsl.expected.dxc.hlsl | 2 +- .../clamp/6c1749.wgsl.expected.fxc.hlsl | 2 +- .../literal/clamp/6c1749.wgsl.expected.glsl | 6 +- .../literal/clamp/6c1749.wgsl.expected.msl | 2 +- .../literal/clamp/6c1749.wgsl.expected.spvasm | 34 +- .../clamp/7706d7.wgsl.expected.dxc.hlsl | 2 +- .../clamp/7706d7.wgsl.expected.fxc.hlsl | 2 +- .../literal/clamp/7706d7.wgsl.expected.glsl | 6 +- .../literal/clamp/7706d7.wgsl.expected.msl | 2 +- .../literal/clamp/7706d7.wgsl.expected.spvasm | 34 +- .../clamp/867397.wgsl.expected.dxc.hlsl | 2 +- .../clamp/867397.wgsl.expected.fxc.hlsl | 2 +- .../literal/clamp/867397.wgsl.expected.glsl | 6 +- .../literal/clamp/867397.wgsl.expected.msl | 2 +- .../literal/clamp/867397.wgsl.expected.spvasm | 34 +- .../builtins/gen/literal/clamp/87df46.wgsl | 43 + .../clamp/87df46.wgsl.expected.dxc.hlsl | 30 + .../clamp/87df46.wgsl.expected.fxc.hlsl | 30 + .../literal/clamp/87df46.wgsl.expected.glsl | 49 + .../literal/clamp/87df46.wgsl.expected.msl | 33 + .../literal/clamp/87df46.wgsl.expected.spvasm | 68 ++ .../literal/clamp/87df46.wgsl.expected.wgsl | 19 + .../builtins/gen/literal/clamp/8b1eaa.wgsl | 43 + .../clamp/8b1eaa.wgsl.expected.dxc.hlsl | 30 + .../clamp/8b1eaa.wgsl.expected.fxc.hlsl | 30 + .../literal/clamp/8b1eaa.wgsl.expected.glsl | 49 + .../literal/clamp/8b1eaa.wgsl.expected.msl | 33 + .../literal/clamp/8b1eaa.wgsl.expected.spvasm | 66 ++ .../literal/clamp/8b1eaa.wgsl.expected.wgsl | 19 + .../builtins/gen/literal/clamp/96e56a.wgsl | 43 + .../clamp/96e56a.wgsl.expected.dxc.hlsl | 30 + .../clamp/96e56a.wgsl.expected.fxc.hlsl | 30 + .../literal/clamp/96e56a.wgsl.expected.glsl | 49 + .../literal/clamp/96e56a.wgsl.expected.msl | 33 + .../literal/clamp/96e56a.wgsl.expected.spvasm | 63 ++ .../literal/clamp/96e56a.wgsl.expected.wgsl | 19 + .../builtins/gen/literal/clamp/9d731c.wgsl | 43 + .../clamp/9d731c.wgsl.expected.dxc.hlsl | 30 + .../clamp/9d731c.wgsl.expected.fxc.hlsl | 30 + .../literal/clamp/9d731c.wgsl.expected.glsl | 49 + .../literal/clamp/9d731c.wgsl.expected.msl | 33 + .../literal/clamp/9d731c.wgsl.expected.spvasm | 68 ++ .../literal/clamp/9d731c.wgsl.expected.wgsl | 19 + .../clamp/a2de25.wgsl.expected.dxc.hlsl | 2 +- .../clamp/a2de25.wgsl.expected.fxc.hlsl | 2 +- .../literal/clamp/a2de25.wgsl.expected.glsl | 6 +- .../literal/clamp/a2de25.wgsl.expected.msl | 2 +- .../literal/clamp/a2de25.wgsl.expected.spvasm | 32 +- .../clamp/b07c65.wgsl.expected.dxc.hlsl | 2 +- .../clamp/b07c65.wgsl.expected.fxc.hlsl | 2 +- .../literal/clamp/b07c65.wgsl.expected.glsl | 6 +- .../literal/clamp/b07c65.wgsl.expected.msl | 2 +- .../literal/clamp/b07c65.wgsl.expected.spvasm | 32 +- .../clamp/bd43ce.wgsl.expected.dxc.hlsl | 2 +- .../clamp/bd43ce.wgsl.expected.fxc.hlsl | 2 +- .../literal/clamp/bd43ce.wgsl.expected.glsl | 6 +- .../literal/clamp/bd43ce.wgsl.expected.msl | 2 +- .../literal/clamp/bd43ce.wgsl.expected.spvasm | 34 +- .../builtins/gen/literal/clamp/d396af.wgsl | 43 + .../clamp/d396af.wgsl.expected.dxc.hlsl | 30 + .../clamp/d396af.wgsl.expected.fxc.hlsl | 30 + .../literal/clamp/d396af.wgsl.expected.glsl | 49 + .../literal/clamp/d396af.wgsl.expected.msl | 33 + .../literal/clamp/d396af.wgsl.expected.spvasm | 64 ++ .../literal/clamp/d396af.wgsl.expected.wgsl | 19 + test/tint/builtins/gen/var/clamp/177548.wgsl | 46 + .../var/clamp/177548.wgsl.expected.dxc.hlsl | 30 + .../var/clamp/177548.wgsl.expected.fxc.hlsl | 30 + .../gen/var/clamp/177548.wgsl.expected.glsl | 49 + .../gen/var/clamp/177548.wgsl.expected.msl | 33 + .../gen/var/clamp/177548.wgsl.expected.spvasm | 66 ++ .../gen/var/clamp/177548.wgsl.expected.wgsl | 22 + test/tint/builtins/gen/var/clamp/23aa4f.wgsl | 46 + .../var/clamp/23aa4f.wgsl.expected.dxc.hlsl | 30 + .../var/clamp/23aa4f.wgsl.expected.fxc.hlsl | 30 + .../gen/var/clamp/23aa4f.wgsl.expected.glsl | 49 + .../gen/var/clamp/23aa4f.wgsl.expected.msl | 33 + .../gen/var/clamp/23aa4f.wgsl.expected.spvasm | 66 ++ .../gen/var/clamp/23aa4f.wgsl.expected.wgsl | 22 + test/tint/builtins/gen/var/clamp/5cf700.wgsl | 46 + .../var/clamp/5cf700.wgsl.expected.dxc.hlsl | 30 + .../var/clamp/5cf700.wgsl.expected.fxc.hlsl | 30 + .../gen/var/clamp/5cf700.wgsl.expected.glsl | 49 + .../gen/var/clamp/5cf700.wgsl.expected.msl | 33 + .../gen/var/clamp/5cf700.wgsl.expected.spvasm | 68 ++ .../gen/var/clamp/5cf700.wgsl.expected.wgsl | 22 + test/tint/builtins/gen/var/clamp/87df46.wgsl | 46 + .../var/clamp/87df46.wgsl.expected.dxc.hlsl | 30 + .../var/clamp/87df46.wgsl.expected.fxc.hlsl | 30 + .../gen/var/clamp/87df46.wgsl.expected.glsl | 49 + .../gen/var/clamp/87df46.wgsl.expected.msl | 33 + .../gen/var/clamp/87df46.wgsl.expected.spvasm | 68 ++ .../gen/var/clamp/87df46.wgsl.expected.wgsl | 22 + test/tint/builtins/gen/var/clamp/8b1eaa.wgsl | 46 + .../var/clamp/8b1eaa.wgsl.expected.dxc.hlsl | 30 + .../var/clamp/8b1eaa.wgsl.expected.fxc.hlsl | 30 + .../gen/var/clamp/8b1eaa.wgsl.expected.glsl | 49 + .../gen/var/clamp/8b1eaa.wgsl.expected.msl | 33 + .../gen/var/clamp/8b1eaa.wgsl.expected.spvasm | 66 ++ .../gen/var/clamp/8b1eaa.wgsl.expected.wgsl | 22 + test/tint/builtins/gen/var/clamp/96e56a.wgsl | 46 + .../var/clamp/96e56a.wgsl.expected.dxc.hlsl | 30 + .../var/clamp/96e56a.wgsl.expected.fxc.hlsl | 30 + .../gen/var/clamp/96e56a.wgsl.expected.glsl | 49 + .../gen/var/clamp/96e56a.wgsl.expected.msl | 33 + .../gen/var/clamp/96e56a.wgsl.expected.spvasm | 63 ++ .../gen/var/clamp/96e56a.wgsl.expected.wgsl | 22 + test/tint/builtins/gen/var/clamp/9d731c.wgsl | 46 + .../var/clamp/9d731c.wgsl.expected.dxc.hlsl | 30 + .../var/clamp/9d731c.wgsl.expected.fxc.hlsl | 30 + .../gen/var/clamp/9d731c.wgsl.expected.glsl | 49 + .../gen/var/clamp/9d731c.wgsl.expected.msl | 33 + .../gen/var/clamp/9d731c.wgsl.expected.spvasm | 68 ++ .../gen/var/clamp/9d731c.wgsl.expected.wgsl | 22 + test/tint/builtins/gen/var/clamp/d396af.wgsl | 46 + .../var/clamp/d396af.wgsl.expected.dxc.hlsl | 30 + .../var/clamp/d396af.wgsl.expected.fxc.hlsl | 30 + .../gen/var/clamp/d396af.wgsl.expected.glsl | 49 + .../gen/var/clamp/d396af.wgsl.expected.msl | 33 + .../gen/var/clamp/d396af.wgsl.expected.spvasm | 64 ++ .../gen/var/clamp/d396af.wgsl.expected.wgsl | 22 + 179 files changed, 5222 insertions(+), 701 deletions(-) create mode 100644 test/tint/builtins/gen/literal/clamp/177548.wgsl create mode 100644 test/tint/builtins/gen/literal/clamp/177548.wgsl.expected.dxc.hlsl create mode 100644 test/tint/builtins/gen/literal/clamp/177548.wgsl.expected.fxc.hlsl create mode 100644 test/tint/builtins/gen/literal/clamp/177548.wgsl.expected.glsl create mode 100644 test/tint/builtins/gen/literal/clamp/177548.wgsl.expected.msl create mode 100644 test/tint/builtins/gen/literal/clamp/177548.wgsl.expected.spvasm create mode 100644 test/tint/builtins/gen/literal/clamp/177548.wgsl.expected.wgsl create mode 100644 test/tint/builtins/gen/literal/clamp/23aa4f.wgsl create mode 100644 test/tint/builtins/gen/literal/clamp/23aa4f.wgsl.expected.dxc.hlsl create mode 100644 test/tint/builtins/gen/literal/clamp/23aa4f.wgsl.expected.fxc.hlsl create mode 100644 test/tint/builtins/gen/literal/clamp/23aa4f.wgsl.expected.glsl create mode 100644 test/tint/builtins/gen/literal/clamp/23aa4f.wgsl.expected.msl create mode 100644 test/tint/builtins/gen/literal/clamp/23aa4f.wgsl.expected.spvasm create mode 100644 test/tint/builtins/gen/literal/clamp/23aa4f.wgsl.expected.wgsl create mode 100644 test/tint/builtins/gen/literal/clamp/5cf700.wgsl create mode 100644 test/tint/builtins/gen/literal/clamp/5cf700.wgsl.expected.dxc.hlsl create mode 100644 test/tint/builtins/gen/literal/clamp/5cf700.wgsl.expected.fxc.hlsl create mode 100644 test/tint/builtins/gen/literal/clamp/5cf700.wgsl.expected.glsl create mode 100644 test/tint/builtins/gen/literal/clamp/5cf700.wgsl.expected.msl create mode 100644 test/tint/builtins/gen/literal/clamp/5cf700.wgsl.expected.spvasm create mode 100644 test/tint/builtins/gen/literal/clamp/5cf700.wgsl.expected.wgsl create mode 100644 test/tint/builtins/gen/literal/clamp/87df46.wgsl create mode 100644 test/tint/builtins/gen/literal/clamp/87df46.wgsl.expected.dxc.hlsl create mode 100644 test/tint/builtins/gen/literal/clamp/87df46.wgsl.expected.fxc.hlsl create mode 100644 test/tint/builtins/gen/literal/clamp/87df46.wgsl.expected.glsl create mode 100644 test/tint/builtins/gen/literal/clamp/87df46.wgsl.expected.msl create mode 100644 test/tint/builtins/gen/literal/clamp/87df46.wgsl.expected.spvasm create mode 100644 test/tint/builtins/gen/literal/clamp/87df46.wgsl.expected.wgsl create mode 100644 test/tint/builtins/gen/literal/clamp/8b1eaa.wgsl create mode 100644 test/tint/builtins/gen/literal/clamp/8b1eaa.wgsl.expected.dxc.hlsl create mode 100644 test/tint/builtins/gen/literal/clamp/8b1eaa.wgsl.expected.fxc.hlsl create mode 100644 test/tint/builtins/gen/literal/clamp/8b1eaa.wgsl.expected.glsl create mode 100644 test/tint/builtins/gen/literal/clamp/8b1eaa.wgsl.expected.msl create mode 100644 test/tint/builtins/gen/literal/clamp/8b1eaa.wgsl.expected.spvasm create mode 100644 test/tint/builtins/gen/literal/clamp/8b1eaa.wgsl.expected.wgsl create mode 100644 test/tint/builtins/gen/literal/clamp/96e56a.wgsl create mode 100644 test/tint/builtins/gen/literal/clamp/96e56a.wgsl.expected.dxc.hlsl create mode 100644 test/tint/builtins/gen/literal/clamp/96e56a.wgsl.expected.fxc.hlsl create mode 100644 test/tint/builtins/gen/literal/clamp/96e56a.wgsl.expected.glsl create mode 100644 test/tint/builtins/gen/literal/clamp/96e56a.wgsl.expected.msl create mode 100644 test/tint/builtins/gen/literal/clamp/96e56a.wgsl.expected.spvasm create mode 100644 test/tint/builtins/gen/literal/clamp/96e56a.wgsl.expected.wgsl create mode 100644 test/tint/builtins/gen/literal/clamp/9d731c.wgsl create mode 100644 test/tint/builtins/gen/literal/clamp/9d731c.wgsl.expected.dxc.hlsl create mode 100644 test/tint/builtins/gen/literal/clamp/9d731c.wgsl.expected.fxc.hlsl create mode 100644 test/tint/builtins/gen/literal/clamp/9d731c.wgsl.expected.glsl create mode 100644 test/tint/builtins/gen/literal/clamp/9d731c.wgsl.expected.msl create mode 100644 test/tint/builtins/gen/literal/clamp/9d731c.wgsl.expected.spvasm create mode 100644 test/tint/builtins/gen/literal/clamp/9d731c.wgsl.expected.wgsl create mode 100644 test/tint/builtins/gen/literal/clamp/d396af.wgsl create mode 100644 test/tint/builtins/gen/literal/clamp/d396af.wgsl.expected.dxc.hlsl create mode 100644 test/tint/builtins/gen/literal/clamp/d396af.wgsl.expected.fxc.hlsl create mode 100644 test/tint/builtins/gen/literal/clamp/d396af.wgsl.expected.glsl create mode 100644 test/tint/builtins/gen/literal/clamp/d396af.wgsl.expected.msl create mode 100644 test/tint/builtins/gen/literal/clamp/d396af.wgsl.expected.spvasm create mode 100644 test/tint/builtins/gen/literal/clamp/d396af.wgsl.expected.wgsl create mode 100644 test/tint/builtins/gen/var/clamp/177548.wgsl create mode 100644 test/tint/builtins/gen/var/clamp/177548.wgsl.expected.dxc.hlsl create mode 100644 test/tint/builtins/gen/var/clamp/177548.wgsl.expected.fxc.hlsl create mode 100644 test/tint/builtins/gen/var/clamp/177548.wgsl.expected.glsl create mode 100644 test/tint/builtins/gen/var/clamp/177548.wgsl.expected.msl create mode 100644 test/tint/builtins/gen/var/clamp/177548.wgsl.expected.spvasm create mode 100644 test/tint/builtins/gen/var/clamp/177548.wgsl.expected.wgsl create mode 100644 test/tint/builtins/gen/var/clamp/23aa4f.wgsl create mode 100644 test/tint/builtins/gen/var/clamp/23aa4f.wgsl.expected.dxc.hlsl create mode 100644 test/tint/builtins/gen/var/clamp/23aa4f.wgsl.expected.fxc.hlsl create mode 100644 test/tint/builtins/gen/var/clamp/23aa4f.wgsl.expected.glsl create mode 100644 test/tint/builtins/gen/var/clamp/23aa4f.wgsl.expected.msl create mode 100644 test/tint/builtins/gen/var/clamp/23aa4f.wgsl.expected.spvasm create mode 100644 test/tint/builtins/gen/var/clamp/23aa4f.wgsl.expected.wgsl create mode 100644 test/tint/builtins/gen/var/clamp/5cf700.wgsl create mode 100644 test/tint/builtins/gen/var/clamp/5cf700.wgsl.expected.dxc.hlsl create mode 100644 test/tint/builtins/gen/var/clamp/5cf700.wgsl.expected.fxc.hlsl create mode 100644 test/tint/builtins/gen/var/clamp/5cf700.wgsl.expected.glsl create mode 100644 test/tint/builtins/gen/var/clamp/5cf700.wgsl.expected.msl create mode 100644 test/tint/builtins/gen/var/clamp/5cf700.wgsl.expected.spvasm create mode 100644 test/tint/builtins/gen/var/clamp/5cf700.wgsl.expected.wgsl create mode 100644 test/tint/builtins/gen/var/clamp/87df46.wgsl create mode 100644 test/tint/builtins/gen/var/clamp/87df46.wgsl.expected.dxc.hlsl create mode 100644 test/tint/builtins/gen/var/clamp/87df46.wgsl.expected.fxc.hlsl create mode 100644 test/tint/builtins/gen/var/clamp/87df46.wgsl.expected.glsl create mode 100644 test/tint/builtins/gen/var/clamp/87df46.wgsl.expected.msl create mode 100644 test/tint/builtins/gen/var/clamp/87df46.wgsl.expected.spvasm create mode 100644 test/tint/builtins/gen/var/clamp/87df46.wgsl.expected.wgsl create mode 100644 test/tint/builtins/gen/var/clamp/8b1eaa.wgsl create mode 100644 test/tint/builtins/gen/var/clamp/8b1eaa.wgsl.expected.dxc.hlsl create mode 100644 test/tint/builtins/gen/var/clamp/8b1eaa.wgsl.expected.fxc.hlsl create mode 100644 test/tint/builtins/gen/var/clamp/8b1eaa.wgsl.expected.glsl create mode 100644 test/tint/builtins/gen/var/clamp/8b1eaa.wgsl.expected.msl create mode 100644 test/tint/builtins/gen/var/clamp/8b1eaa.wgsl.expected.spvasm create mode 100644 test/tint/builtins/gen/var/clamp/8b1eaa.wgsl.expected.wgsl create mode 100644 test/tint/builtins/gen/var/clamp/96e56a.wgsl create mode 100644 test/tint/builtins/gen/var/clamp/96e56a.wgsl.expected.dxc.hlsl create mode 100644 test/tint/builtins/gen/var/clamp/96e56a.wgsl.expected.fxc.hlsl create mode 100644 test/tint/builtins/gen/var/clamp/96e56a.wgsl.expected.glsl create mode 100644 test/tint/builtins/gen/var/clamp/96e56a.wgsl.expected.msl create mode 100644 test/tint/builtins/gen/var/clamp/96e56a.wgsl.expected.spvasm create mode 100644 test/tint/builtins/gen/var/clamp/96e56a.wgsl.expected.wgsl create mode 100644 test/tint/builtins/gen/var/clamp/9d731c.wgsl create mode 100644 test/tint/builtins/gen/var/clamp/9d731c.wgsl.expected.dxc.hlsl create mode 100644 test/tint/builtins/gen/var/clamp/9d731c.wgsl.expected.fxc.hlsl create mode 100644 test/tint/builtins/gen/var/clamp/9d731c.wgsl.expected.glsl create mode 100644 test/tint/builtins/gen/var/clamp/9d731c.wgsl.expected.msl create mode 100644 test/tint/builtins/gen/var/clamp/9d731c.wgsl.expected.spvasm create mode 100644 test/tint/builtins/gen/var/clamp/9d731c.wgsl.expected.wgsl create mode 100644 test/tint/builtins/gen/var/clamp/d396af.wgsl create mode 100644 test/tint/builtins/gen/var/clamp/d396af.wgsl.expected.dxc.hlsl create mode 100644 test/tint/builtins/gen/var/clamp/d396af.wgsl.expected.fxc.hlsl create mode 100644 test/tint/builtins/gen/var/clamp/d396af.wgsl.expected.glsl create mode 100644 test/tint/builtins/gen/var/clamp/d396af.wgsl.expected.msl create mode 100644 test/tint/builtins/gen/var/clamp/d396af.wgsl.expected.spvasm create mode 100644 test/tint/builtins/gen/var/clamp/d396af.wgsl.expected.wgsl diff --git a/src/tint/intrinsics.def b/src/tint/intrinsics.def index cc073da869..11fb871101 100644 --- a/src/tint/intrinsics.def +++ b/src/tint/intrinsics.def @@ -135,6 +135,7 @@ match scalar_no_i32: f32 | f16 | u32 | bool match scalar_no_u32: f32 | f16 | i32 | bool match scalar_no_bool: f32 | f16 | i32 | u32 match fia_fi32_f16: fa | ia | f32 | i32 | f16 +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 @@ -377,8 +378,8 @@ fn atanh(f32) -> f32 fn atanh(vec) -> vec fn ceil(f32) -> f32 fn ceil(vec) -> vec -fn clamp(T, T, T) -> T -fn clamp(vec, vec, vec) -> vec +@const fn clamp(T, T, T) -> T +@const fn clamp(vec, vec, vec) -> vec fn cos(f32) -> f32 fn cos(vec) -> vec fn cosh(f32) -> f32 diff --git a/src/tint/resolver/builtin_test.cc b/src/tint/resolver/builtin_test.cc index b1d5744e7b..74367d142b 100644 --- a/src/tint/resolver/builtin_test.cc +++ b/src/tint/resolver/builtin_test.cc @@ -1415,14 +1415,16 @@ TEST_P(ResolverBuiltinTest_ThreeParam_FloatOrInt, Error_NoParams) { EXPECT_FALSE(r()->Resolve()); - EXPECT_EQ(r()->error(), "error: no matching call to " + std::string(param.name) + - "()\n\n" - "2 candidate functions:\n " + - std::string(param.name) + - "(T, T, T) -> T where: T is f32, i32 or u32\n " + - std::string(param.name) + - "(vecN, vecN, vecN) -> vecN where: T is f32, i32 " - "or u32\n"); + EXPECT_EQ( + r()->error(), + "error: no matching call to " + std::string(param.name) + + "()\n\n" + "2 candidate functions:\n " + + std::string(param.name) + + "(T, T, T) -> T where: T is abstract-float, abstract-int, f32, i32 or u32\n " + + std::string(param.name) + + "(vecN, vecN, vecN) -> vecN where: T is abstract-float, abstract-int, " + "f32, i32 or u32\n"); } INSTANTIATE_TEST_SUITE_P(ResolverTest, diff --git a/src/tint/resolver/const_eval.cc b/src/tint/resolver/const_eval.cc index 56b7aa355c..c2c6313163 100644 --- a/src/tint/resolver/const_eval.cc +++ b/src/tint/resolver/const_eval.cc @@ -79,6 +79,19 @@ auto Dispatch_fia_fi32_f16(F&& f, CONSTANTS&&... cs) { }); } +/// Helper that calls `f` passing in the value of all `cs`. +/// Assumes all `cs` are of the same type. +template +auto Dispatch_fia_fiu32(F&& f, CONSTANTS&&... cs) { + return Switch( + First(cs...)->Type(), // + [&](const sem::AbstractInt*) { return f(cs->template As()...); }, + [&](const sem::AbstractFloat*) { return f(cs->template As()...); }, + [&](const sem::F32*) { return f(cs->template As()...); }, + [&](const sem::I32*) { return f(cs->template As()...); }, + [&](const sem::U32*) { return f(cs->template As()...); }); +} + /// Helper that calls `f` passing in the value of all `cs`. /// Assumes all `cs` are of the same type. template @@ -723,6 +736,20 @@ const sem::Constant* ConstEval::atan2(const sem::Type*, args[1]->ConstantValue()); } +const sem::Constant* ConstEval::clamp(const sem::Type*, + utils::ConstVectorRef args) { + auto transform = [&](const sem::Constant* c0, const sem::Constant* c1, + const sem::Constant* c2) { + auto create = [&](auto e, auto low, auto high) { + return CreateElement(builder, c0->Type(), + decltype(e)(std::min(std::max(e, low), high))); + }; + return Dispatch_fia_fiu32(create, c0, c1, c2); + }; + return TransformElements(builder, transform, args[0]->ConstantValue(), args[1]->ConstantValue(), + args[2]->ConstantValue()); +} + utils::Result ConstEval::Convert(const sem::Type* target_ty, const sem::Constant* value, const Source& source) { diff --git a/src/tint/resolver/const_eval.h b/src/tint/resolver/const_eval.h index a9be358798..4d299f4ea8 100644 --- a/src/tint/resolver/const_eval.h +++ b/src/tint/resolver/const_eval.h @@ -198,6 +198,13 @@ class ConstEval { const sem::Constant* atan2(const sem::Type* ty, utils::ConstVectorRef args); + /// clamp builtin + /// @param ty the expression type + /// @param args the input arguments + /// @return the result value, or null if the value cannot be calculated + const sem::Constant* clamp(const sem::Type* ty, + utils::ConstVectorRef args); + private: /// Adds the given error message to the diagnostics void AddError(const std::string& msg, const Source& source) const; diff --git a/src/tint/resolver/const_eval_test.cc b/src/tint/resolver/const_eval_test.cc index 06763053c8..cd1855b356 100644 --- a/src/tint/resolver/const_eval_test.cc +++ b/src/tint/resolver/const_eval_test.cc @@ -3254,6 +3254,31 @@ INSTANTIATE_TEST_SUITE_P( // testing::ValuesIn(Concat(Atan2Cases(), // Atan2Cases())))); +template +std::vector ClampCases() { + return { + C({T(0), T(0), T(0)}, T(0)), + C({T(0), T(42), kHighest}, T(42)), + C({kLowest, T(0), T(42)}, T(0)), + C({T(0), kLowest, kHighest}, T(0)), + C({T(0), kHighest, kLowest}, kLowest), + C({kHighest, kHighest, kHighest}, kHighest), + C({kLowest, kLowest, kLowest}, kLowest), + C({kHighest, kLowest, kHighest}, kHighest), + C({kLowest, kLowest, kHighest}, kLowest), + }; +} + +INSTANTIATE_TEST_SUITE_P( // + Clamp, + ResolverConstEvalBuiltinTest, + testing::Combine(testing::Values(sem::BuiltinType::kClamp), + testing::ValuesIn(Concat(ClampCases(), // + ClampCases(), + ClampCases(), + ClampCases(), + ClampCases())))); + } // namespace builtin } // namespace diff --git a/src/tint/resolver/intrinsic_table.inl b/src/tint/resolver/intrinsic_table.inl index 3c065b6752..9e6749ce2e 100644 --- a/src/tint/resolver/intrinsic_table.inl +++ b/src/tint/resolver/intrinsic_table.inl @@ -1913,8 +1913,52 @@ std::string FiaFi32F16::String(MatchState*) const { return ss.str(); } -/// TypeMatcher for 'match fa_f32' +/// TypeMatcher for 'match fia_fiu32' /// @see src/tint/intrinsics.def:138:7 +class FiaFiu32 : 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 sem::Type* Match(MatchState& state, + const sem::Type* type) const override; + /// @param state the MatchState + /// @return a string representation of the matcher. + std::string String(MatchState* state) const override; +}; + +const sem::Type* FiaFiu32::Match(MatchState& state, const sem::Type* ty) const { + if (match_fa(ty)) { + return build_fa(state); + } + if (match_ia(ty)) { + return build_ia(state); + } + if (match_i32(ty)) { + return build_i32(state); + } + if (match_u32(ty)) { + return build_u32(state); + } + if (match_f32(ty)) { + return build_f32(state); + } + return nullptr; +} + +std::string FiaFiu32::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 << Fa().String(nullptr) << ", " << Ia().String(nullptr) << ", " << F32().String(nullptr) << ", " << I32().String(nullptr) << " or " << U32().String(nullptr); + return ss.str(); +} + +/// TypeMatcher for 'match fa_f32' +/// @see src/tint/intrinsics.def:139:7 class FaF32 : public TypeMatcher { public: /// Checks whether the given type matches the matcher rules, and returns the @@ -1949,7 +1993,7 @@ std::string FaF32::String(MatchState*) const { } /// TypeMatcher for 'match fa_f32_f16' -/// @see src/tint/intrinsics.def:139:7 +/// @see src/tint/intrinsics.def:140:7 class FaF32F16 : public TypeMatcher { public: /// Checks whether the given type matches the matcher rules, and returns the @@ -1987,7 +2031,7 @@ std::string FaF32F16::String(MatchState*) const { } /// TypeMatcher for 'match ia_iu32' -/// @see src/tint/intrinsics.def:140:7 +/// @see src/tint/intrinsics.def:141:7 class IaIu32 : public TypeMatcher { public: /// Checks whether the given type matches the matcher rules, and returns the @@ -2025,7 +2069,7 @@ std::string IaIu32::String(MatchState*) const { } /// TypeMatcher for 'match fiu32_f16' -/// @see src/tint/intrinsics.def:141:7 +/// @see src/tint/intrinsics.def:142:7 class Fiu32F16 : public TypeMatcher { public: /// Checks whether the given type matches the matcher rules, and returns the @@ -2066,7 +2110,7 @@ std::string Fiu32F16::String(MatchState*) const { } /// TypeMatcher for 'match fiu32' -/// @see src/tint/intrinsics.def:142:7 +/// @see src/tint/intrinsics.def:143:7 class Fiu32 : public TypeMatcher { public: /// Checks whether the given type matches the matcher rules, and returns the @@ -2104,7 +2148,7 @@ std::string Fiu32::String(MatchState*) const { } /// TypeMatcher for 'match fi32_f16' -/// @see src/tint/intrinsics.def:143:7 +/// @see src/tint/intrinsics.def:144:7 class Fi32F16 : public TypeMatcher { public: /// Checks whether the given type matches the matcher rules, and returns the @@ -2142,7 +2186,7 @@ std::string Fi32F16::String(MatchState*) const { } /// TypeMatcher for 'match fi32' -/// @see src/tint/intrinsics.def:144:7 +/// @see src/tint/intrinsics.def:145:7 class Fi32 : public TypeMatcher { public: /// Checks whether the given type matches the matcher rules, and returns the @@ -2177,7 +2221,7 @@ std::string Fi32::String(MatchState*) const { } /// TypeMatcher for 'match f32_f16' -/// @see src/tint/intrinsics.def:145:7 +/// @see src/tint/intrinsics.def:146:7 class F32F16 : public TypeMatcher { public: /// Checks whether the given type matches the matcher rules, and returns the @@ -2212,7 +2256,7 @@ std::string F32F16::String(MatchState*) const { } /// TypeMatcher for 'match iu32' -/// @see src/tint/intrinsics.def:146:7 +/// @see src/tint/intrinsics.def:147:7 class Iu32 : public TypeMatcher { public: /// Checks whether the given type matches the matcher rules, and returns the @@ -2247,7 +2291,7 @@ std::string Iu32::String(MatchState*) const { } /// EnumMatcher for 'match f32_texel_format' -/// @see src/tint/intrinsics.def:157:7 +/// @see src/tint/intrinsics.def:158:7 class F32TexelFormat : public NumberMatcher { public: /// Checks whether the given number matches the enum matcher rules. @@ -2280,7 +2324,7 @@ std::string F32TexelFormat::String(MatchState*) const { } /// EnumMatcher for 'match i32_texel_format' -/// @see src/tint/intrinsics.def:164:7 +/// @see src/tint/intrinsics.def:165:7 class I32TexelFormat : public NumberMatcher { public: /// Checks whether the given number matches the enum matcher rules. @@ -2312,7 +2356,7 @@ std::string I32TexelFormat::String(MatchState*) const { } /// EnumMatcher for 'match u32_texel_format' -/// @see src/tint/intrinsics.def:170:7 +/// @see src/tint/intrinsics.def:171:7 class U32TexelFormat : public NumberMatcher { public: /// Checks whether the given number matches the enum matcher rules. @@ -2344,7 +2388,7 @@ std::string U32TexelFormat::String(MatchState*) const { } /// EnumMatcher for 'match write' -/// @see src/tint/intrinsics.def:177:7 +/// @see src/tint/intrinsics.def:178:7 class Write : public NumberMatcher { public: /// Checks whether the given number matches the enum matcher rules. @@ -2370,7 +2414,7 @@ std::string Write::String(MatchState*) const { } /// EnumMatcher for 'match read_write' -/// @see src/tint/intrinsics.def:178:7 +/// @see src/tint/intrinsics.def:179:7 class ReadWrite : public NumberMatcher { public: /// Checks whether the given number matches the enum matcher rules. @@ -2396,7 +2440,7 @@ std::string ReadWrite::String(MatchState*) const { } /// EnumMatcher for 'match function_private_workgroup' -/// @see src/tint/intrinsics.def:180:7 +/// @see src/tint/intrinsics.def:181:7 class FunctionPrivateWorkgroup : public NumberMatcher { public: /// Checks whether the given number matches the enum matcher rules. @@ -2426,7 +2470,7 @@ std::string FunctionPrivateWorkgroup::String(MatchState*) const { } /// EnumMatcher for 'match workgroup_or_storage' -/// @see src/tint/intrinsics.def:184:7 +/// @see src/tint/intrinsics.def:185:7 class WorkgroupOrStorage : public NumberMatcher { public: /// Checks whether the given number matches the enum matcher rules. @@ -2455,7 +2499,7 @@ std::string WorkgroupOrStorage::String(MatchState*) const { } /// EnumMatcher for 'match storage' -/// @see src/tint/intrinsics.def:187:7 +/// @see src/tint/intrinsics.def:188:7 class Storage : public NumberMatcher { public: /// Checks whether the given number matches the enum matcher rules. @@ -2544,6 +2588,7 @@ class Matchers { ScalarNoU32 ScalarNoU32_; ScalarNoBool ScalarNoBool_; FiaFi32F16 FiaFi32F16_; + FiaFiu32 FiaFiu32_; FaF32 FaF32_; FaF32F16 FaF32F16_; IaIu32 IaIu32_; @@ -2569,7 +2614,7 @@ class Matchers { ~Matchers(); /// The template types, types, and type matchers - TypeMatcher const* const type[67] = { + TypeMatcher const* const type[68] = { /* [0] */ &template_type_0_, /* [1] */ &template_type_1_, /* [2] */ &Bool_, @@ -2628,15 +2673,16 @@ class Matchers { /* [55] */ &ScalarNoU32_, /* [56] */ &ScalarNoBool_, /* [57] */ &FiaFi32F16_, - /* [58] */ &FaF32_, - /* [59] */ &FaF32F16_, - /* [60] */ &IaIu32_, - /* [61] */ &Fiu32F16_, - /* [62] */ &Fiu32_, - /* [63] */ &Fi32F16_, - /* [64] */ &Fi32_, - /* [65] */ &F32F16_, - /* [66] */ &Iu32_, + /* [58] */ &FiaFiu32_, + /* [59] */ &FaF32_, + /* [60] */ &FaF32F16_, + /* [61] */ &IaIu32_, + /* [62] */ &Fiu32F16_, + /* [63] */ &Fiu32_, + /* [64] */ &Fi32F16_, + /* [65] */ &Fi32_, + /* [66] */ &F32F16_, + /* [67] */ &Iu32_, }; /// The template numbers, and number matchers @@ -7986,82 +8032,87 @@ constexpr TemplateTypeInfo kTemplateTypes[] = { { /* [10] */ /* name */ "T", - /* matcher index */ 66, + /* matcher index */ 67, }, { /* [11] */ /* name */ "T", - /* matcher index */ 59, + /* matcher index */ 60, }, { /* [12] */ /* name */ "T", - /* matcher index */ 58, + /* matcher index */ 59, }, { /* [13] */ /* name */ "T", - /* matcher index */ 65, + /* matcher index */ 66, }, { /* [14] */ /* name */ "T", - /* matcher index */ 62, + /* matcher index */ 58, }, { /* [15] */ /* name */ "T", - /* matcher index */ 50, + /* matcher index */ 63, }, { /* [16] */ /* name */ "T", - /* matcher index */ kNoMatcher, + /* matcher index */ 50, }, { /* [17] */ /* name */ "T", - /* matcher index */ 51, + /* matcher index */ kNoMatcher, }, { /* [18] */ /* name */ "T", - /* matcher index */ 56, + /* matcher index */ 51, }, { /* [19] */ /* name */ "T", - /* matcher index */ 53, + /* matcher index */ 56, }, { /* [20] */ /* name */ "T", - /* matcher index */ 52, + /* matcher index */ 53, }, { /* [21] */ /* name */ "T", - /* matcher index */ 55, + /* matcher index */ 52, }, { /* [22] */ /* name */ "T", - /* matcher index */ 54, + /* matcher index */ 55, }, { /* [23] */ /* name */ "T", - /* matcher index */ 61, + /* matcher index */ 54, }, { /* [24] */ /* name */ "T", - /* matcher index */ 57, + /* matcher index */ 62, }, { /* [25] */ /* name */ "T", - /* matcher index */ 60, + /* matcher index */ 57, + }, + { + /* [26] */ + /* name */ "T", + /* matcher index */ 61, }, }; @@ -8124,7 +8175,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[15], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[918], /* return matcher indices */ &kMatcherIndices[45], @@ -8136,7 +8187,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[15], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[617], /* return matcher indices */ &kMatcherIndices[45], @@ -8148,7 +8199,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[15], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[917], /* return matcher indices */ &kMatcherIndices[132], @@ -8160,7 +8211,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[15], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[621], /* return matcher indices */ &kMatcherIndices[132], @@ -8172,7 +8223,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[15], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[916], /* return matcher indices */ &kMatcherIndices[132], @@ -8184,7 +8235,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[15], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[625], /* return matcher indices */ &kMatcherIndices[132], @@ -8196,7 +8247,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[15], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[915], /* return matcher indices */ &kMatcherIndices[112], @@ -8208,7 +8259,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[15], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[629], /* return matcher indices */ &kMatcherIndices[112], @@ -8220,7 +8271,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[15], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[914], /* return matcher indices */ &kMatcherIndices[132], @@ -8232,7 +8283,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[15], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[633], /* return matcher indices */ &kMatcherIndices[132], @@ -8244,7 +8295,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[15], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[913], /* return matcher indices */ &kMatcherIndices[132], @@ -8256,7 +8307,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[15], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[637], /* return matcher indices */ &kMatcherIndices[132], @@ -8268,7 +8319,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[15], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[912], /* return matcher indices */ &kMatcherIndices[132], @@ -8280,7 +8331,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[911], /* return matcher indices */ &kMatcherIndices[132], @@ -8292,7 +8343,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[643], /* return matcher indices */ &kMatcherIndices[132], @@ -8304,7 +8355,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[910], /* return matcher indices */ &kMatcherIndices[132], @@ -8316,7 +8367,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[647], /* return matcher indices */ &kMatcherIndices[132], @@ -8328,7 +8379,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[909], /* return matcher indices */ &kMatcherIndices[132], @@ -8340,7 +8391,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[651], /* return matcher indices */ &kMatcherIndices[132], @@ -8352,7 +8403,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[835], /* return matcher indices */ &kMatcherIndices[132], @@ -8364,7 +8415,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[655], /* return matcher indices */ &kMatcherIndices[132], @@ -8376,7 +8427,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[907], /* return matcher indices */ &kMatcherIndices[132], @@ -8388,7 +8439,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 2, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[3], /* parameters */ &kParameters[905], /* return matcher indices */ &kMatcherIndices[45], @@ -8400,7 +8451,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 2, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[3], /* parameters */ &kParameters[904], /* return matcher indices */ &kMatcherIndices[132], @@ -8412,7 +8463,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 2, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[3], /* parameters */ &kParameters[903], /* return matcher indices */ &kMatcherIndices[132], @@ -8424,7 +8475,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 2, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[3], /* parameters */ &kParameters[902], /* return matcher indices */ &kMatcherIndices[112], @@ -8436,7 +8487,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[901], /* return matcher indices */ &kMatcherIndices[132], @@ -8448,7 +8499,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 0, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[17], + /* template types */ &kTemplateTypes[18], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[1004], /* return matcher indices */ &kMatcherIndices[122], @@ -8460,7 +8511,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[17], + /* template types */ &kTemplateTypes[18], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[955], /* return matcher indices */ &kMatcherIndices[122], @@ -8472,7 +8523,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[15], + /* template types */ &kTemplateTypes[16], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[956], /* return matcher indices */ &kMatcherIndices[122], @@ -8484,7 +8535,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[15], + /* template types */ &kTemplateTypes[16], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[399], /* return matcher indices */ &kMatcherIndices[122], @@ -8496,7 +8547,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[15], + /* template types */ &kTemplateTypes[16], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[564], /* return matcher indices */ &kMatcherIndices[122], @@ -8508,7 +8559,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[15], + /* template types */ &kTemplateTypes[16], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[573], /* return matcher indices */ &kMatcherIndices[122], @@ -8520,7 +8571,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[15], + /* template types */ &kTemplateTypes[16], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[576], /* return matcher indices */ &kMatcherIndices[122], @@ -8532,7 +8583,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[15], + /* template types */ &kTemplateTypes[16], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[605], /* return matcher indices */ &kMatcherIndices[122], @@ -8544,7 +8595,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[15], + /* template types */ &kTemplateTypes[16], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[603], /* return matcher indices */ &kMatcherIndices[122], @@ -8556,7 +8607,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[15], + /* template types */ &kTemplateTypes[16], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[601], /* return matcher indices */ &kMatcherIndices[122], @@ -8628,7 +8679,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[510], /* return matcher indices */ &kMatcherIndices[128], @@ -8640,7 +8691,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[507], /* return matcher indices */ &kMatcherIndices[128], @@ -8652,7 +8703,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[351], /* return matcher indices */ &kMatcherIndices[128], @@ -8664,7 +8715,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[347], /* return matcher indices */ &kMatcherIndices[128], @@ -8676,7 +8727,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 5, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[230], /* return matcher indices */ &kMatcherIndices[128], @@ -8688,7 +8739,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[495], /* return matcher indices */ &kMatcherIndices[128], @@ -8700,7 +8751,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[331], /* return matcher indices */ &kMatcherIndices[128], @@ -8712,7 +8763,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[489], /* return matcher indices */ &kMatcherIndices[128], @@ -8724,7 +8775,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[327], /* return matcher indices */ &kMatcherIndices[128], @@ -8736,7 +8787,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[474], /* return matcher indices */ &kMatcherIndices[4], @@ -8748,7 +8799,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[323], /* return matcher indices */ &kMatcherIndices[4], @@ -8760,7 +8811,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[319], /* return matcher indices */ &kMatcherIndices[4], @@ -8772,7 +8823,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 5, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[165], /* return matcher indices */ &kMatcherIndices[4], @@ -8784,7 +8835,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[462], /* return matcher indices */ &kMatcherIndices[4], @@ -8796,7 +8847,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[339], /* return matcher indices */ &kMatcherIndices[4], @@ -8808,7 +8859,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[315], /* return matcher indices */ &kMatcherIndices[128], @@ -8820,7 +8871,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 5, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[265], /* return matcher indices */ &kMatcherIndices[128], @@ -8832,7 +8883,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 5, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[260], /* return matcher indices */ &kMatcherIndices[128], @@ -8844,7 +8895,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 6, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[132], /* return matcher indices */ &kMatcherIndices[128], @@ -8856,7 +8907,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[299], /* return matcher indices */ &kMatcherIndices[128], @@ -8868,7 +8919,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 5, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[205], /* return matcher indices */ &kMatcherIndices[128], @@ -8880,7 +8931,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[295], /* return matcher indices */ &kMatcherIndices[128], @@ -8892,7 +8943,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 5, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[285], /* return matcher indices */ &kMatcherIndices[128], @@ -8904,7 +8955,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[303], /* return matcher indices */ &kMatcherIndices[4], @@ -8916,7 +8967,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 5, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[275], /* return matcher indices */ &kMatcherIndices[4], @@ -8928,7 +8979,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 5, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[270], /* return matcher indices */ &kMatcherIndices[4], @@ -8940,7 +8991,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 6, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[90], /* return matcher indices */ &kMatcherIndices[4], @@ -8952,7 +9003,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[307], /* return matcher indices */ &kMatcherIndices[4], @@ -8964,7 +9015,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 5, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[255], /* return matcher indices */ &kMatcherIndices[4], @@ -8976,7 +9027,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[471], /* return matcher indices */ &kMatcherIndices[128], @@ -8988,7 +9039,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[15], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[431], /* return matcher indices */ &kMatcherIndices[122], @@ -9000,7 +9051,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 5, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[15], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[250], /* return matcher indices */ &kMatcherIndices[122], @@ -9012,7 +9063,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 5, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[15], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[215], /* return matcher indices */ &kMatcherIndices[122], @@ -9024,7 +9075,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 6, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[15], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[96], /* return matcher indices */ &kMatcherIndices[122], @@ -9036,7 +9087,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[15], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[407], /* return matcher indices */ &kMatcherIndices[122], @@ -9048,7 +9099,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 5, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[15], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[170], /* return matcher indices */ &kMatcherIndices[122], @@ -9060,7 +9111,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[558], /* return matcher indices */ &kMatcherIndices[128], @@ -9072,7 +9123,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[387], /* return matcher indices */ &kMatcherIndices[128], @@ -9084,7 +9135,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[379], /* return matcher indices */ &kMatcherIndices[128], @@ -9096,7 +9147,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 5, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[160], /* return matcher indices */ &kMatcherIndices[128], @@ -9108,7 +9159,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[585], /* return matcher indices */ &kMatcherIndices[128], @@ -9120,7 +9171,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[375], /* return matcher indices */ &kMatcherIndices[128], @@ -9132,7 +9183,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[486], /* return matcher indices */ nullptr, @@ -9144,7 +9195,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[492], /* return matcher indices */ nullptr, @@ -9156,7 +9207,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[335], /* return matcher indices */ nullptr, @@ -9168,7 +9219,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[498], /* return matcher indices */ nullptr, @@ -9180,7 +9231,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[501], /* return matcher indices */ nullptr, @@ -9192,7 +9243,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[504], /* return matcher indices */ nullptr, @@ -9204,7 +9255,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[311], /* return matcher indices */ nullptr, @@ -9216,7 +9267,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[513], /* return matcher indices */ nullptr, @@ -9228,7 +9279,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[516], /* return matcher indices */ nullptr, @@ -9240,7 +9291,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[465], /* return matcher indices */ nullptr, @@ -9252,7 +9303,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[359], /* return matcher indices */ nullptr, @@ -9264,7 +9315,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[519], /* return matcher indices */ nullptr, @@ -9276,7 +9327,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 0, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[17], + /* template types */ &kTemplateTypes[18], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[1004], /* return matcher indices */ &kMatcherIndices[116], @@ -9288,7 +9339,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[17], + /* template types */ &kTemplateTypes[18], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[944], /* return matcher indices */ &kMatcherIndices[116], @@ -9300,7 +9351,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[15], + /* template types */ &kTemplateTypes[16], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[945], /* return matcher indices */ &kMatcherIndices[116], @@ -9312,7 +9363,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[15], + /* template types */ &kTemplateTypes[16], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[588], /* return matcher indices */ &kMatcherIndices[116], @@ -9324,7 +9375,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[15], + /* template types */ &kTemplateTypes[16], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[609], /* return matcher indices */ &kMatcherIndices[116], @@ -9336,7 +9387,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[15], + /* template types */ &kTemplateTypes[16], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[607], /* return matcher indices */ &kMatcherIndices[116], @@ -9408,7 +9459,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[15], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[880], /* return matcher indices */ &kMatcherIndices[45], @@ -9420,7 +9471,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[15], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[879], /* return matcher indices */ &kMatcherIndices[45], @@ -9432,7 +9483,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[15], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[878], /* return matcher indices */ &kMatcherIndices[45], @@ -9444,7 +9495,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[15], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[877], /* return matcher indices */ &kMatcherIndices[45], @@ -9456,7 +9507,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[15], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[876], /* return matcher indices */ &kMatcherIndices[45], @@ -9468,7 +9519,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[15], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[875], /* return matcher indices */ &kMatcherIndices[45], @@ -9480,7 +9531,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[874], /* return matcher indices */ &kMatcherIndices[45], @@ -9492,7 +9543,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[873], /* return matcher indices */ &kMatcherIndices[45], @@ -9504,7 +9555,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[872], /* return matcher indices */ &kMatcherIndices[45], @@ -9516,7 +9567,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[871], /* return matcher indices */ &kMatcherIndices[45], @@ -9528,7 +9579,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[727], /* return matcher indices */ &kMatcherIndices[1], @@ -9540,7 +9591,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[725], /* return matcher indices */ &kMatcherIndices[38], @@ -9552,7 +9603,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[723], /* return matcher indices */ &kMatcherIndices[38], @@ -9564,7 +9615,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[721], /* return matcher indices */ &kMatcherIndices[38], @@ -9636,7 +9687,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[15], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[522], /* return matcher indices */ &kMatcherIndices[122], @@ -9648,7 +9699,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[15], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[528], /* return matcher indices */ &kMatcherIndices[122], @@ -9660,7 +9711,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[15], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[363], /* return matcher indices */ &kMatcherIndices[122], @@ -9672,7 +9723,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[15], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[531], /* return matcher indices */ &kMatcherIndices[122], @@ -9684,7 +9735,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[15], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[549], /* return matcher indices */ &kMatcherIndices[122], @@ -9696,7 +9747,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[552], /* return matcher indices */ &kMatcherIndices[4], @@ -9708,7 +9759,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[383], /* return matcher indices */ &kMatcherIndices[4], @@ -9720,7 +9771,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[555], /* return matcher indices */ &kMatcherIndices[4], @@ -9732,7 +9783,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[783], /* return matcher indices */ &kMatcherIndices[128], @@ -9744,7 +9795,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 0, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[17], + /* template types */ &kTemplateTypes[18], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[1004], /* return matcher indices */ &kMatcherIndices[114], @@ -9756,7 +9807,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[17], + /* template types */ &kTemplateTypes[18], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[935], /* return matcher indices */ &kMatcherIndices[114], @@ -9768,7 +9819,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[15], + /* template types */ &kTemplateTypes[16], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[936], /* return matcher indices */ &kMatcherIndices[114], @@ -9780,7 +9831,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[15], + /* template types */ &kTemplateTypes[16], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[611], /* return matcher indices */ &kMatcherIndices[114], @@ -9852,7 +9903,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 5, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[180], /* return matcher indices */ &kMatcherIndices[128], @@ -9864,7 +9915,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 6, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[108], /* return matcher indices */ &kMatcherIndices[128], @@ -9876,7 +9927,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 6, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[102], /* return matcher indices */ &kMatcherIndices[128], @@ -9888,7 +9939,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 7, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[65], /* return matcher indices */ &kMatcherIndices[128], @@ -9900,7 +9951,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 5, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[235], /* return matcher indices */ &kMatcherIndices[128], @@ -9912,7 +9963,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 6, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[78], /* return matcher indices */ &kMatcherIndices[128], @@ -9924,7 +9975,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 5, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[245], /* return matcher indices */ &kMatcherIndices[128], @@ -9936,7 +9987,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 6, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[120], /* return matcher indices */ &kMatcherIndices[128], @@ -9948,7 +9999,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[343], /* return matcher indices */ &kMatcherIndices[128], @@ -9960,7 +10011,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 5, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[225], /* return matcher indices */ &kMatcherIndices[128], @@ -9972,7 +10023,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 5, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[150], /* return matcher indices */ &kMatcherIndices[128], @@ -9984,7 +10035,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 6, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[144], /* return matcher indices */ &kMatcherIndices[128], @@ -9996,7 +10047,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[439], /* return matcher indices */ &kMatcherIndices[128], @@ -10008,7 +10059,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 5, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[200], /* return matcher indices */ &kMatcherIndices[128], @@ -10020,7 +10071,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[435], /* return matcher indices */ &kMatcherIndices[128], @@ -10032,7 +10083,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 5, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[280], /* return matcher indices */ &kMatcherIndices[128], @@ -10116,7 +10167,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[419], /* return matcher indices */ &kMatcherIndices[4], @@ -10128,7 +10179,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 5, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[240], /* return matcher indices */ &kMatcherIndices[4], @@ -10140,7 +10191,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 5, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[220], /* return matcher indices */ &kMatcherIndices[4], @@ -10152,7 +10203,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 6, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[138], /* return matcher indices */ &kMatcherIndices[4], @@ -10164,7 +10215,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[403], /* return matcher indices */ &kMatcherIndices[4], @@ -10176,7 +10227,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 5, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[290], /* return matcher indices */ &kMatcherIndices[4], @@ -10332,7 +10383,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[395], /* return matcher indices */ &kMatcherIndices[4], @@ -10344,7 +10395,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 5, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[195], /* return matcher indices */ &kMatcherIndices[4], @@ -10356,7 +10407,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 5, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[155], /* return matcher indices */ &kMatcherIndices[4], @@ -10368,7 +10419,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 6, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[72], /* return matcher indices */ &kMatcherIndices[4], @@ -10380,7 +10431,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[371], /* return matcher indices */ &kMatcherIndices[4], @@ -10392,7 +10443,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 5, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[175], /* return matcher indices */ &kMatcherIndices[4], @@ -10404,7 +10455,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[367], /* return matcher indices */ &kMatcherIndices[128], @@ -10416,7 +10467,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 5, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[185], /* return matcher indices */ &kMatcherIndices[128], @@ -10428,7 +10479,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 5, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[190], /* return matcher indices */ &kMatcherIndices[128], @@ -10440,7 +10491,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 6, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[126], /* return matcher indices */ &kMatcherIndices[128], @@ -10452,7 +10503,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 4, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[355], /* return matcher indices */ &kMatcherIndices[128], @@ -10464,7 +10515,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 5, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[210], /* return matcher indices */ &kMatcherIndices[128], @@ -10908,7 +10959,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[737], /* return matcher indices */ &kMatcherIndices[1], @@ -10920,7 +10971,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[735], /* return matcher indices */ &kMatcherIndices[38], @@ -10932,7 +10983,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[733], /* return matcher indices */ &kMatcherIndices[38], @@ -10944,7 +10995,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[731], /* return matcher indices */ &kMatcherIndices[38], @@ -10968,7 +11019,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[15], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[885], /* return matcher indices */ &kMatcherIndices[45], @@ -10980,7 +11031,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[15], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[884], /* return matcher indices */ &kMatcherIndices[45], @@ -10992,7 +11043,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[883], /* return matcher indices */ &kMatcherIndices[45], @@ -11004,7 +11055,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[882], /* return matcher indices */ &kMatcherIndices[45], @@ -11016,7 +11067,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 2, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[3], /* parameters */ &kParameters[881], /* return matcher indices */ &kMatcherIndices[45], @@ -11028,7 +11079,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[749], /* return matcher indices */ &kMatcherIndices[1], @@ -11040,7 +11091,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[747], /* return matcher indices */ &kMatcherIndices[38], @@ -11052,7 +11103,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[745], /* return matcher indices */ &kMatcherIndices[38], @@ -11064,7 +11115,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[743], /* return matcher indices */ &kMatcherIndices[38], @@ -11088,7 +11139,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[701], /* return matcher indices */ &kMatcherIndices[1], @@ -11100,7 +11151,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[699], /* return matcher indices */ &kMatcherIndices[38], @@ -11112,7 +11163,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[695], /* return matcher indices */ &kMatcherIndices[38], @@ -11124,7 +11175,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[693], /* return matcher indices */ &kMatcherIndices[38], @@ -11136,7 +11187,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[687], /* return matcher indices */ &kMatcherIndices[16], @@ -11148,7 +11199,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[685], /* return matcher indices */ &kMatcherIndices[50], @@ -11184,7 +11235,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[679], /* return matcher indices */ &kMatcherIndices[16], @@ -11196,7 +11247,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[677], /* return matcher indices */ &kMatcherIndices[50], @@ -11232,7 +11283,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[709], /* return matcher indices */ &kMatcherIndices[1], @@ -11244,7 +11295,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[707], /* return matcher indices */ &kMatcherIndices[38], @@ -11256,7 +11307,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[705], /* return matcher indices */ &kMatcherIndices[38], @@ -11268,7 +11319,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[781], /* return matcher indices */ &kMatcherIndices[38], @@ -11280,7 +11331,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 0, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[1004], /* return matcher indices */ &kMatcherIndices[45], @@ -11292,7 +11343,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[920], /* return matcher indices */ &kMatcherIndices[45], @@ -11304,7 +11355,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[22], + /* template types */ &kTemplateTypes[23], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[921], /* return matcher indices */ &kMatcherIndices[45], @@ -11316,7 +11367,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 0, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[1004], /* return matcher indices */ &kMatcherIndices[16], @@ -11328,7 +11379,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[932], /* return matcher indices */ &kMatcherIndices[16], @@ -11340,7 +11391,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[18], + /* template types */ &kTemplateTypes[19], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[933], /* return matcher indices */ &kMatcherIndices[16], @@ -11352,7 +11403,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 0, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[1004], /* return matcher indices */ &kMatcherIndices[111], @@ -11364,7 +11415,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[929], /* return matcher indices */ &kMatcherIndices[111], @@ -11376,7 +11427,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[19], + /* template types */ &kTemplateTypes[20], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[930], /* return matcher indices */ &kMatcherIndices[111], @@ -11388,7 +11439,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 0, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[1004], /* return matcher indices */ &kMatcherIndices[4], @@ -11400,7 +11451,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[926], /* return matcher indices */ &kMatcherIndices[4], @@ -11412,7 +11463,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[20], + /* template types */ &kTemplateTypes[21], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[927], /* return matcher indices */ &kMatcherIndices[4], @@ -11424,7 +11475,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[19], + /* template types */ &kTemplateTypes[20], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[540], /* return matcher indices */ &kMatcherIndices[1], @@ -11436,7 +11487,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[19], + /* template types */ &kTemplateTypes[20], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[543], /* return matcher indices */ &kMatcherIndices[38], @@ -11448,7 +11499,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[19], + /* template types */ &kTemplateTypes[20], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[546], /* return matcher indices */ &kMatcherIndices[38], @@ -11460,7 +11511,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 0, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[1004], /* return matcher indices */ &kMatcherIndices[46], @@ -11472,7 +11523,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[923], /* return matcher indices */ &kMatcherIndices[46], @@ -11484,7 +11535,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[21], + /* template types */ &kTemplateTypes[22], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[924], /* return matcher indices */ &kMatcherIndices[46], @@ -11496,7 +11547,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[477], /* return matcher indices */ &kMatcherIndices[4], @@ -11508,7 +11559,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[480], /* return matcher indices */ &kMatcherIndices[41], @@ -11520,7 +11571,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[483], /* return matcher indices */ &kMatcherIndices[41], @@ -11532,7 +11583,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[860], /* return matcher indices */ &kMatcherIndices[1], @@ -11544,7 +11595,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[6], /* parameters */ &kParameters[861], /* return matcher indices */ &kMatcherIndices[38], @@ -11556,7 +11607,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[798], /* return matcher indices */ &kMatcherIndices[241], @@ -11568,7 +11619,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[810], /* return matcher indices */ &kMatcherIndices[174], @@ -11580,7 +11631,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[822], /* return matcher indices */ &kMatcherIndices[4], @@ -11592,7 +11643,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[823], /* return matcher indices */ &kMatcherIndices[41], @@ -11604,7 +11655,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[800], /* return matcher indices */ &kMatcherIndices[4], @@ -11616,7 +11667,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[799], /* return matcher indices */ &kMatcherIndices[41], @@ -11628,7 +11679,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[826], /* return matcher indices */ &kMatcherIndices[4], @@ -11640,7 +11691,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[830], /* return matcher indices */ &kMatcherIndices[41], @@ -11676,7 +11727,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[846], /* return matcher indices */ &kMatcherIndices[4], @@ -11688,7 +11739,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[848], /* return matcher indices */ &kMatcherIndices[41], @@ -11700,7 +11751,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[779], /* return matcher indices */ &kMatcherIndices[4], @@ -11712,7 +11763,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[777], /* return matcher indices */ &kMatcherIndices[41], @@ -11724,7 +11775,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[849], /* return matcher indices */ &kMatcherIndices[4], @@ -11736,7 +11787,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[850], /* return matcher indices */ &kMatcherIndices[4], @@ -11748,7 +11799,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[851], /* return matcher indices */ &kMatcherIndices[4], @@ -11760,7 +11811,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[852], /* return matcher indices */ &kMatcherIndices[41], @@ -11772,7 +11823,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[853], /* return matcher indices */ &kMatcherIndices[4], @@ -11784,7 +11835,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[854], /* return matcher indices */ &kMatcherIndices[41], @@ -11796,7 +11847,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[15], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[763], /* return matcher indices */ &kMatcherIndices[1], @@ -11808,7 +11859,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[15], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[761], /* return matcher indices */ &kMatcherIndices[38], @@ -11820,7 +11871,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[15], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[759], /* return matcher indices */ &kMatcherIndices[1], @@ -11832,7 +11883,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[15], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[757], /* return matcher indices */ &kMatcherIndices[38], @@ -11844,7 +11895,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[450], /* return matcher indices */ &kMatcherIndices[4], @@ -11856,7 +11907,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[447], /* return matcher indices */ &kMatcherIndices[41], @@ -11868,7 +11919,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[855], /* return matcher indices */ &kMatcherIndices[240], @@ -11880,7 +11931,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[856], /* return matcher indices */ &kMatcherIndices[138], @@ -11892,7 +11943,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[802], /* return matcher indices */ &kMatcherIndices[4], @@ -11904,7 +11955,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[801], /* return matcher indices */ &kMatcherIndices[41], @@ -11916,7 +11967,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[824], /* return matcher indices */ &kMatcherIndices[4], @@ -11928,7 +11979,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[825], /* return matcher indices */ &kMatcherIndices[41], @@ -11988,7 +12039,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[808], /* return matcher indices */ &kMatcherIndices[4], @@ -12000,7 +12051,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[807], /* return matcher indices */ &kMatcherIndices[41], @@ -12012,7 +12063,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[886], /* return matcher indices */ &kMatcherIndices[4], @@ -12024,7 +12075,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[809], /* return matcher indices */ &kMatcherIndices[41], @@ -12036,7 +12087,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[739], /* return matcher indices */ &kMatcherIndices[4], @@ -12048,7 +12099,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[703], /* return matcher indices */ &kMatcherIndices[41], @@ -12060,7 +12111,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[887], /* return matcher indices */ &kMatcherIndices[4], @@ -12072,7 +12123,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[888], /* return matcher indices */ &kMatcherIndices[41], @@ -12084,7 +12135,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[811], /* return matcher indices */ &kMatcherIndices[4], @@ -12096,7 +12147,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[1001], /* return matcher indices */ &kMatcherIndices[41], @@ -12108,7 +12159,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[813], /* return matcher indices */ &kMatcherIndices[4], @@ -12120,7 +12171,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[812], /* return matcher indices */ &kMatcherIndices[41], @@ -12156,7 +12207,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[891], /* return matcher indices */ &kMatcherIndices[4], @@ -12168,7 +12219,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[892], /* return matcher indices */ &kMatcherIndices[41], @@ -12180,7 +12231,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[815], /* return matcher indices */ &kMatcherIndices[4], @@ -12192,7 +12243,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[814], /* return matcher indices */ &kMatcherIndices[41], @@ -12204,7 +12255,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[893], /* return matcher indices */ &kMatcherIndices[4], @@ -12216,7 +12267,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[894], /* return matcher indices */ &kMatcherIndices[41], @@ -12228,7 +12279,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[895], /* return matcher indices */ &kMatcherIndices[4], @@ -12240,7 +12291,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[896], /* return matcher indices */ &kMatcherIndices[41], @@ -12252,7 +12303,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[897], /* return matcher indices */ &kMatcherIndices[4], @@ -12264,7 +12315,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[898], /* return matcher indices */ &kMatcherIndices[41], @@ -12276,7 +12327,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[567], /* return matcher indices */ &kMatcherIndices[4], @@ -12288,7 +12339,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[570], /* return matcher indices */ &kMatcherIndices[41], @@ -12300,7 +12351,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[899], /* return matcher indices */ &kMatcherIndices[4], @@ -12312,7 +12363,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[900], /* return matcher indices */ &kMatcherIndices[41], @@ -12324,7 +12375,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[671], /* return matcher indices */ &kMatcherIndices[4], @@ -12336,7 +12387,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[669], /* return matcher indices */ &kMatcherIndices[41], @@ -12372,7 +12423,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[919], /* return matcher indices */ &kMatcherIndices[4], @@ -12384,7 +12435,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[797], /* return matcher indices */ &kMatcherIndices[41], @@ -12396,7 +12447,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[984], /* return matcher indices */ &kMatcherIndices[4], @@ -12408,7 +12459,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[978], /* return matcher indices */ &kMatcherIndices[41], @@ -12420,7 +12471,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[817], /* return matcher indices */ &kMatcherIndices[4], @@ -12432,7 +12483,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[816], /* return matcher indices */ &kMatcherIndices[41], @@ -12444,7 +12495,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[964], /* return matcher indices */ &kMatcherIndices[4], @@ -12456,7 +12507,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[963], /* return matcher indices */ &kMatcherIndices[41], @@ -12468,7 +12519,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[819], /* return matcher indices */ &kMatcherIndices[4], @@ -12480,7 +12531,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[818], /* return matcher indices */ &kMatcherIndices[41], @@ -12516,7 +12567,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[821], /* return matcher indices */ &kMatcherIndices[4], @@ -12528,7 +12579,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[820], /* return matcher indices */ &kMatcherIndices[41], @@ -12540,7 +12591,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[635], /* return matcher indices */ &kMatcherIndices[16], @@ -12552,7 +12603,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[631], /* return matcher indices */ &kMatcherIndices[50], @@ -12564,7 +12615,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[641], /* return matcher indices */ &kMatcherIndices[16], @@ -12576,7 +12627,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[639], /* return matcher indices */ &kMatcherIndices[50], @@ -12588,7 +12639,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[649], /* return matcher indices */ &kMatcherIndices[16], @@ -12600,7 +12651,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[645], /* return matcher indices */ &kMatcherIndices[50], @@ -12612,7 +12663,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[787], /* return matcher indices */ &kMatcherIndices[4], @@ -12624,7 +12675,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[789], /* return matcher indices */ &kMatcherIndices[4], @@ -12636,7 +12687,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[829], /* return matcher indices */ &kMatcherIndices[4], @@ -12648,7 +12699,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[828], /* return matcher indices */ &kMatcherIndices[41], @@ -12660,7 +12711,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[15], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[1002], /* return matcher indices */ &kMatcherIndices[1], @@ -12672,7 +12723,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[15], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[996], /* return matcher indices */ &kMatcherIndices[38], @@ -12732,7 +12783,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[15], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[870], /* return matcher indices */ &kMatcherIndices[45], @@ -12744,7 +12795,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[869], /* return matcher indices */ &kMatcherIndices[45], @@ -12780,7 +12831,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[657], /* return matcher indices */ &kMatcherIndices[16], @@ -12792,7 +12843,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[23], + /* template types */ &kTemplateTypes[24], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[653], /* return matcher indices */ &kMatcherIndices[50], @@ -12804,7 +12855,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[839], /* return matcher indices */ &kMatcherIndices[4], @@ -12816,7 +12867,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[838], /* return matcher indices */ &kMatcherIndices[41], @@ -12828,7 +12879,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[841], /* return matcher indices */ &kMatcherIndices[4], @@ -12840,7 +12891,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[840], /* return matcher indices */ &kMatcherIndices[41], @@ -12857,7 +12908,7 @@ constexpr OverloadInfo kOverloads[] = { /* parameters */ &kParameters[537], /* return matcher indices */ &kMatcherIndices[1], /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* const eval */ nullptr, + /* const eval */ &ConstEval::clamp, }, { /* [395] */ @@ -12869,14 +12920,14 @@ constexpr OverloadInfo kOverloads[] = { /* parameters */ &kParameters[534], /* return matcher indices */ &kMatcherIndices[38], /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* const eval */ nullptr, + /* const eval */ &ConstEval::clamp, }, { /* [396] */ /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[843], /* return matcher indices */ &kMatcherIndices[4], @@ -12888,7 +12939,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[842], /* return matcher indices */ &kMatcherIndices[41], @@ -12900,7 +12951,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[845], /* return matcher indices */ &kMatcherIndices[4], @@ -12912,7 +12963,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[844], /* return matcher indices */ &kMatcherIndices[41], @@ -12948,7 +12999,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[17], + /* template types */ &kTemplateTypes[18], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[659], /* return matcher indices */ &kMatcherIndices[16], @@ -12960,7 +13011,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[17], + /* template types */ &kTemplateTypes[18], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[599], /* return matcher indices */ &kMatcherIndices[50], @@ -12972,7 +13023,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[17], + /* template types */ &kTemplateTypes[18], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[663], /* return matcher indices */ &kMatcherIndices[16], @@ -12984,7 +13035,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[17], + /* template types */ &kTemplateTypes[18], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[661], /* return matcher indices */ &kMatcherIndices[50], @@ -12996,7 +13047,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[934], /* return matcher indices */ &kMatcherIndices[4], @@ -13008,7 +13059,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[931], /* return matcher indices */ &kMatcherIndices[41], @@ -13020,7 +13071,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[957], /* return matcher indices */ &kMatcherIndices[4], @@ -13032,7 +13083,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[946], /* return matcher indices */ &kMatcherIndices[41], @@ -13068,7 +13119,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[959], /* return matcher indices */ &kMatcherIndices[4], @@ -13080,7 +13131,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[958], /* return matcher indices */ &kMatcherIndices[41], @@ -13092,7 +13143,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[975], /* return matcher indices */ &kMatcherIndices[16], @@ -13104,7 +13155,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[971], /* return matcher indices */ &kMatcherIndices[16], @@ -13116,7 +13167,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[981], /* return matcher indices */ &kMatcherIndices[16], @@ -13128,7 +13179,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[977], /* return matcher indices */ &kMatcherIndices[16], @@ -13140,7 +13191,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[989], /* return matcher indices */ &kMatcherIndices[4], @@ -13152,7 +13203,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[983], /* return matcher indices */ &kMatcherIndices[41], @@ -13164,7 +13215,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[995], /* return matcher indices */ &kMatcherIndices[4], @@ -13176,7 +13227,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[990], /* return matcher indices */ &kMatcherIndices[41], @@ -13188,7 +13239,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[862], /* return matcher indices */ &kMatcherIndices[1], @@ -13200,7 +13251,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[6], /* parameters */ &kParameters[863], /* return matcher indices */ &kMatcherIndices[38], @@ -13212,7 +13263,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[858], /* return matcher indices */ &kMatcherIndices[16], @@ -13224,7 +13275,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[859], /* return matcher indices */ &kMatcherIndices[50], @@ -13368,7 +13419,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[667], /* return matcher indices */ &kMatcherIndices[16], @@ -13380,7 +13431,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[665], /* return matcher indices */ &kMatcherIndices[16], @@ -13416,7 +13467,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 0, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[1004], /* return matcher indices */ nullptr, @@ -13428,7 +13479,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 0, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[1004], /* return matcher indices */ nullptr, @@ -13440,7 +13491,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[937], /* return matcher indices */ &kMatcherIndices[128], @@ -13452,7 +13503,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[947], /* return matcher indices */ &kMatcherIndices[128], @@ -13464,7 +13515,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[948], /* return matcher indices */ &kMatcherIndices[136], @@ -13476,7 +13527,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[961], /* return matcher indices */ &kMatcherIndices[136], @@ -13488,7 +13539,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[962], /* return matcher indices */ &kMatcherIndices[136], @@ -13500,7 +13551,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 2, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[5], /* parameters */ &kParameters[972], /* return matcher indices */ &kMatcherIndices[26], @@ -13512,7 +13563,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[525], /* return matcher indices */ &kMatcherIndices[41], @@ -13524,7 +13575,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[697], /* return matcher indices */ &kMatcherIndices[41], @@ -13536,7 +13587,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[868], /* return matcher indices */ &kMatcherIndices[46], @@ -13548,7 +13599,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[867], /* return matcher indices */ &kMatcherIndices[46], @@ -13560,7 +13611,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[866], /* return matcher indices */ &kMatcherIndices[46], @@ -13572,7 +13623,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[865], /* return matcher indices */ &kMatcherIndices[46], @@ -13584,7 +13635,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[857], /* return matcher indices */ &kMatcherIndices[41], @@ -13596,7 +13647,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[785], /* return matcher indices */ &kMatcherIndices[108], @@ -13608,7 +13659,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 3, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[453], /* return matcher indices */ &kMatcherIndices[41], @@ -13620,7 +13671,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[795], /* return matcher indices */ &kMatcherIndices[46], @@ -13632,7 +13683,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[793], /* return matcher indices */ &kMatcherIndices[45], @@ -13644,7 +13695,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 2, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[14], + /* template types */ &kTemplateTypes[15], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[791], /* return matcher indices */ &kMatcherIndices[1], @@ -13656,7 +13707,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[6], /* parameters */ &kParameters[827], /* return matcher indices */ &kMatcherIndices[4], @@ -13668,7 +13719,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 1, /* num template numbers */ 1, - /* template types */ &kTemplateTypes[16], + /* template types */ &kTemplateTypes[17], /* template numbers */ &kTemplateNumbers[8], /* parameters */ &kParameters[960], /* return matcher indices */ &kMatcherIndices[46], @@ -13680,7 +13731,7 @@ constexpr OverloadInfo kOverloads[] = { /* num parameters */ 1, /* num template types */ 0, /* num template numbers */ 0, - /* template types */ &kTemplateTypes[26], + /* template types */ &kTemplateTypes[27], /* template numbers */ &kTemplateNumbers[10], /* parameters */ &kParameters[864], /* return matcher indices */ &kMatcherIndices[46], @@ -13775,8 +13826,8 @@ constexpr IntrinsicInfo kBuiltins[] = { }, { /* [12] */ - /* fn clamp(T, T, T) -> T */ - /* fn clamp(vec, vec, vec) -> vec */ + /* fn clamp(T, T, T) -> T */ + /* fn clamp(vec, vec, vec) -> vec */ /* num overloads */ 2, /* overloads */ &kOverloads[394], }, diff --git a/src/tint/resolver/intrinsic_table_test.cc b/src/tint/resolver/intrinsic_table_test.cc index e8cb206dfd..9301386903 100644 --- a/src/tint/resolver/intrinsic_table_test.cc +++ b/src/tint/resolver/intrinsic_table_test.cc @@ -1075,14 +1075,14 @@ INSTANTIATE_TEST_SUITE_P( IntrinsicTableAbstractTernaryTest, testing::Values( // clang-format off // result | param a | param b | param c | arg a | arg b | arg c -Case::Create(), -Case::Create(), -Case::Create(), -Case::Create(), -Case::Create(), -Case::Create(), -Case::Create(), -Case::Create() +Case::Create(), +Case::Create(), +Case::Create(), +Case::Create(), +Case::Create(), +Case::Create(), +Case::Create(), +Case::Create() // clang-format on )); @@ -1091,14 +1091,14 @@ INSTANTIATE_TEST_SUITE_P( IntrinsicTableAbstractTernaryTest, testing::Values( // clang-format off // result | param a | param b | param c | arg a | arg b | arg c -Case::Create(), -Case::Create(), -Case::Create(), -Case::Create(), -Case::Create(), -Case::Create(), -Case::Create(), -Case::Create() +Case::Create(), +Case::Create(), +Case::Create(), +Case::Create(), +Case::Create(), +Case::Create(), +Case::Create(), +Case::Create() // clang-format on )); @@ -1270,6 +1270,68 @@ Case::Create( // clang-format on )); +struct IntrinsicTableAbstractTernaryTest_NonConstEval : public ResolverTestWithParam { + std::unique_ptr table = IntrinsicTable::Create(*this); +}; + +TEST_P(IntrinsicTableAbstractTernaryTest_NonConstEval, MatchMix) { + auto* arg_a = GetParam().arg_a(*this); + auto* arg_b = GetParam().arg_b(*this); + auto* arg_c = GetParam().arg_c(*this); + auto builtin = + table->Lookup(sem::BuiltinType::kMix, utils::Vector{arg_a, arg_b, arg_c}, Source{{12, 34}}); + + bool matched = builtin.sem != nullptr; + bool expected_match = GetParam().expected_match; + EXPECT_EQ(matched, expected_match) << Diagnostics().str(); + + auto* result = builtin.sem ? builtin.sem->ReturnType() : nullptr; + auto* expected_result = GetParam().expected_result(*this); + EXPECT_TYPE(result, expected_result); + + auto* param_a = builtin.sem ? builtin.sem->Parameters()[0]->Type() : nullptr; + auto* expected_param_a = GetParam().expected_param_a(*this); + EXPECT_TYPE(param_a, expected_param_a); + + auto* param_b = builtin.sem ? builtin.sem->Parameters()[1]->Type() : nullptr; + auto* expected_param_b = GetParam().expected_param_b(*this); + EXPECT_TYPE(param_b, expected_param_b); + + auto* param_c = builtin.sem ? builtin.sem->Parameters()[2]->Type() : nullptr; + auto* expected_param_c = GetParam().expected_param_c(*this); + EXPECT_TYPE(param_c, expected_param_c); +} + +INSTANTIATE_TEST_SUITE_P( + AFloat_f32, + IntrinsicTableAbstractTernaryTest_NonConstEval, + testing::Values( // clang-format off + // result | param a | param b | param c | arg a | arg b | arg c + Case::Create(), + Case::Create(), + Case::Create(), + Case::Create(), + Case::Create(), + Case::Create(), + Case::Create() + // clang-format on + )); + +INSTANTIATE_TEST_SUITE_P( + VecAFloat_Vecf32, + IntrinsicTableAbstractTernaryTest_NonConstEval, + testing::Values( // clang-format off + // result | param a | param b | param c | arg a | arg b | arg c + Case::Create(), + Case::Create(), + Case::Create(), + Case::Create(), + Case::Create(), + Case::Create(), + Case::Create () + // clang-format on + )); + } // namespace AbstractTernaryTests } // namespace diff --git a/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl.expected.dxc.hlsl index 2123bfb5b1..b80215545d 100644 --- a/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void clamp_0acf8f() { - float2 res = clamp((1.0f).xx, (1.0f).xx, (1.0f).xx); + float2 res = (1.0f).xx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl.expected.fxc.hlsl index 2123bfb5b1..b80215545d 100644 --- a/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void clamp_0acf8f() { - float2 res = clamp((1.0f).xx, (1.0f).xx, (1.0f).xx); + float2 res = (1.0f).xx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl.expected.glsl index ee477be64d..0a8ea6fec5 100644 --- a/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void clamp_0acf8f() { - vec2 res = clamp(vec2(1.0f), vec2(1.0f), vec2(1.0f)); + vec2 res = vec2(1.0f); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void clamp_0acf8f() { - vec2 res = clamp(vec2(1.0f), vec2(1.0f), vec2(1.0f)); + vec2 res = vec2(1.0f); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void clamp_0acf8f() { - vec2 res = clamp(vec2(1.0f), vec2(1.0f), vec2(1.0f)); + vec2 res = vec2(1.0f); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl.expected.msl b/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl.expected.msl index 75969fd7d5..3479eea015 100644 --- a/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void clamp_0acf8f() { - float2 res = clamp(float2(1.0f), float2(1.0f), float2(1.0f)); + float2 res = float2(1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl.expected.spvasm index d4e1c0c8c6..0b0dd312ce 100644 --- a/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl.expected.spvasm @@ -1,10 +1,9 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 32 ; 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" @@ -33,36 +32,35 @@ %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 %float_1 = OpConstant %float 1 - %17 = OpConstantComposite %v2float %float_1 %float_1 + %15 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float - %20 = OpConstantNull %v2float - %21 = OpTypeFunction %v4float + %18 = OpConstantNull %v2float + %19 = OpTypeFunction %v4float %clamp_0acf8f = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %20 - %13 = OpExtInst %v2float %15 NClamp %17 %17 %17 - OpStore %res %13 + %res = OpVariable %_ptr_Function_v2float Function %18 + OpStore %res %15 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %clamp_0acf8f +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %clamp_0acf8f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %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 - %29 = OpLabel - %30 = OpFunctionCall %void %clamp_0acf8f + %27 = OpLabel + %28 = OpFunctionCall %void %clamp_0acf8f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %clamp_0acf8f + %30 = OpLabel + %31 = OpFunctionCall %void %clamp_0acf8f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/clamp/177548.wgsl b/test/tint/builtins/gen/literal/clamp/177548.wgsl new file mode 100644 index 0000000000..b1020b41ae --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/177548.wgsl @@ -0,0 +1,43 @@ +// Copyright 2021 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 clamp(vec<2, ia>, vec<2, ia>, vec<2, ia>) -> vec<2, ia> +fn clamp_177548() { + var res = clamp(vec2(1.0), vec2(1.0), vec2(1.0)); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + clamp_177548(); + return vec4(); +} + +@fragment +fn fragment_main() { + clamp_177548(); +} + +@compute @workgroup_size(1) +fn compute_main() { + clamp_177548(); +} diff --git a/test/tint/builtins/gen/literal/clamp/177548.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/clamp/177548.wgsl.expected.dxc.hlsl new file mode 100644 index 0000000000..e6db476c70 --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/177548.wgsl.expected.dxc.hlsl @@ -0,0 +1,30 @@ +void clamp_177548() { + float2 res = (1.0f).xx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + clamp_177548(); + 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() { + clamp_177548(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + clamp_177548(); + return; +} diff --git a/test/tint/builtins/gen/literal/clamp/177548.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/clamp/177548.wgsl.expected.fxc.hlsl new file mode 100644 index 0000000000..e6db476c70 --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/177548.wgsl.expected.fxc.hlsl @@ -0,0 +1,30 @@ +void clamp_177548() { + float2 res = (1.0f).xx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + clamp_177548(); + 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() { + clamp_177548(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + clamp_177548(); + return; +} diff --git a/test/tint/builtins/gen/literal/clamp/177548.wgsl.expected.glsl b/test/tint/builtins/gen/literal/clamp/177548.wgsl.expected.glsl new file mode 100644 index 0000000000..aef0c70f7c --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/177548.wgsl.expected.glsl @@ -0,0 +1,49 @@ +#version 310 es + +void clamp_177548() { + vec2 res = vec2(1.0f); +} + +vec4 vertex_main() { + clamp_177548(); + 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 clamp_177548() { + vec2 res = vec2(1.0f); +} + +void fragment_main() { + clamp_177548(); +} + +void main() { + fragment_main(); + return; +} +#version 310 es + +void clamp_177548() { + vec2 res = vec2(1.0f); +} + +void compute_main() { + clamp_177548(); +} + +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/clamp/177548.wgsl.expected.msl b/test/tint/builtins/gen/literal/clamp/177548.wgsl.expected.msl new file mode 100644 index 0000000000..7c91b67871 --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/177548.wgsl.expected.msl @@ -0,0 +1,33 @@ +#include + +using namespace metal; +void clamp_177548() { + float2 res = float2(1.0f); +} + +struct tint_symbol { + float4 value [[position]]; +}; + +float4 vertex_main_inner() { + clamp_177548(); + 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() { + clamp_177548(); + return; +} + +kernel void compute_main() { + clamp_177548(); + return; +} + diff --git a/test/tint/builtins/gen/literal/clamp/177548.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/clamp/177548.wgsl.expected.spvasm new file mode 100644 index 0000000000..2b2e5dc76e --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/177548.wgsl.expected.spvasm @@ -0,0 +1,66 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 32 +; 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 %clamp_177548 "clamp_177548" + 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 + %19 = OpTypeFunction %v4float +%clamp_177548 = 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 %clamp_177548 + 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 + %27 = OpLabel + %28 = OpFunctionCall %void %clamp_177548 + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %9 + %30 = OpLabel + %31 = OpFunctionCall %void %clamp_177548 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/clamp/177548.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/clamp/177548.wgsl.expected.wgsl new file mode 100644 index 0000000000..43342f9116 --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/177548.wgsl.expected.wgsl @@ -0,0 +1,19 @@ +fn clamp_177548() { + var res = clamp(vec2(1.0), vec2(1.0), vec2(1.0)); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + clamp_177548(); + return vec4(); +} + +@fragment +fn fragment_main() { + clamp_177548(); +} + +@compute @workgroup_size(1) +fn compute_main() { + clamp_177548(); +} diff --git a/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl.expected.dxc.hlsl index 3e882bba25..8acdd229a0 100644 --- a/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void clamp_1a32e3() { - int4 res = clamp((1).xxxx, (1).xxxx, (1).xxxx); + int4 res = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl.expected.fxc.hlsl index 3e882bba25..8acdd229a0 100644 --- a/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void clamp_1a32e3() { - int4 res = clamp((1).xxxx, (1).xxxx, (1).xxxx); + int4 res = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl.expected.glsl index 89aa3efdb4..764d647638 100644 --- a/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void clamp_1a32e3() { - ivec4 res = clamp(ivec4(1), ivec4(1), ivec4(1)); + ivec4 res = ivec4(1); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void clamp_1a32e3() { - ivec4 res = clamp(ivec4(1), ivec4(1), ivec4(1)); + ivec4 res = ivec4(1); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void clamp_1a32e3() { - ivec4 res = clamp(ivec4(1), ivec4(1), ivec4(1)); + ivec4 res = ivec4(1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl.expected.msl b/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl.expected.msl index d3f1153380..e82fbd0bbe 100644 --- a/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void clamp_1a32e3() { - int4 res = clamp(int4(1), int4(1), int4(1)); + int4 res = int4(1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl.expected.spvasm index 36b90df4e4..65ad15f413 100644 --- a/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl.expected.spvasm @@ -1,10 +1,9 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 34 ; Schema: 0 OpCapability Shader - %16 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -34,37 +33,36 @@ %int = OpTypeInt 32 1 %v4int = OpTypeVector %int 4 %int_1 = OpConstant %int 1 - %18 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %16 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %21 = OpConstantNull %v4int - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v4int + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %clamp_1a32e3 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %21 - %13 = OpExtInst %v4int %16 SClamp %18 %18 %18 - OpStore %res %13 + %res = OpVariable %_ptr_Function_v4int Function %19 + OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %clamp_1a32e3 +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %clamp_1a32e3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %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 - %31 = OpLabel - %32 = OpFunctionCall %void %clamp_1a32e3 + %29 = OpLabel + %30 = OpFunctionCall %void %clamp_1a32e3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %clamp_1a32e3 + %32 = OpLabel + %33 = OpFunctionCall %void %clamp_1a32e3 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/clamp/23aa4f.wgsl b/test/tint/builtins/gen/literal/clamp/23aa4f.wgsl new file mode 100644 index 0000000000..b02caee49d --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/23aa4f.wgsl @@ -0,0 +1,43 @@ +// Copyright 2021 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 clamp(fa, fa, fa) -> fa +fn clamp_23aa4f() { + var res = clamp(1, 1, 1); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + clamp_23aa4f(); + return vec4(); +} + +@fragment +fn fragment_main() { + clamp_23aa4f(); +} + +@compute @workgroup_size(1) +fn compute_main() { + clamp_23aa4f(); +} diff --git a/test/tint/builtins/gen/literal/clamp/23aa4f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/clamp/23aa4f.wgsl.expected.dxc.hlsl new file mode 100644 index 0000000000..95967c6565 --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/23aa4f.wgsl.expected.dxc.hlsl @@ -0,0 +1,30 @@ +void clamp_23aa4f() { + int res = 1; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + clamp_23aa4f(); + 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() { + clamp_23aa4f(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + clamp_23aa4f(); + return; +} diff --git a/test/tint/builtins/gen/literal/clamp/23aa4f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/clamp/23aa4f.wgsl.expected.fxc.hlsl new file mode 100644 index 0000000000..95967c6565 --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/23aa4f.wgsl.expected.fxc.hlsl @@ -0,0 +1,30 @@ +void clamp_23aa4f() { + int res = 1; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + clamp_23aa4f(); + 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() { + clamp_23aa4f(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + clamp_23aa4f(); + return; +} diff --git a/test/tint/builtins/gen/literal/clamp/23aa4f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/clamp/23aa4f.wgsl.expected.glsl new file mode 100644 index 0000000000..745c8d9039 --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/23aa4f.wgsl.expected.glsl @@ -0,0 +1,49 @@ +#version 310 es + +void clamp_23aa4f() { + int res = 1; +} + +vec4 vertex_main() { + clamp_23aa4f(); + 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 clamp_23aa4f() { + int res = 1; +} + +void fragment_main() { + clamp_23aa4f(); +} + +void main() { + fragment_main(); + return; +} +#version 310 es + +void clamp_23aa4f() { + int res = 1; +} + +void compute_main() { + clamp_23aa4f(); +} + +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/clamp/23aa4f.wgsl.expected.msl b/test/tint/builtins/gen/literal/clamp/23aa4f.wgsl.expected.msl new file mode 100644 index 0000000000..e6b476f7e2 --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/23aa4f.wgsl.expected.msl @@ -0,0 +1,33 @@ +#include + +using namespace metal; +void clamp_23aa4f() { + int res = 1; +} + +struct tint_symbol { + float4 value [[position]]; +}; + +float4 vertex_main_inner() { + clamp_23aa4f(); + 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() { + clamp_23aa4f(); + return; +} + +kernel void compute_main() { + clamp_23aa4f(); + return; +} + diff --git a/test/tint/builtins/gen/literal/clamp/23aa4f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/clamp/23aa4f.wgsl.expected.spvasm new file mode 100644 index 0000000000..9e7f69b6f4 --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/23aa4f.wgsl.expected.spvasm @@ -0,0 +1,66 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 32 +; 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 %clamp_23aa4f "clamp_23aa4f" + 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 + %18 = OpTypeFunction %v4float + %float_1 = OpConstant %float 1 +%clamp_23aa4f = OpFunction %void None %9 + %12 = OpLabel + %res = OpVariable %_ptr_Function_int Function %17 + OpStore %res %int_1 + OpReturn + OpFunctionEnd +%vertex_main_inner = OpFunction %v4float None %18 + %20 = OpLabel + %21 = OpFunctionCall %void %clamp_23aa4f + 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 %clamp_23aa4f + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %9 + %30 = OpLabel + %31 = OpFunctionCall %void %clamp_23aa4f + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/clamp/23aa4f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/clamp/23aa4f.wgsl.expected.wgsl new file mode 100644 index 0000000000..8750791981 --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/23aa4f.wgsl.expected.wgsl @@ -0,0 +1,19 @@ +fn clamp_23aa4f() { + var res = clamp(1, 1, 1); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + clamp_23aa4f(); + return vec4(); +} + +@fragment +fn fragment_main() { + clamp_23aa4f(); +} + +@compute @workgroup_size(1) +fn compute_main() { + clamp_23aa4f(); +} diff --git a/test/tint/builtins/gen/literal/clamp/2bd567.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/clamp/2bd567.wgsl.expected.dxc.hlsl index 7a02612ae6..8b0b0c6609 100644 --- a/test/tint/builtins/gen/literal/clamp/2bd567.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/clamp/2bd567.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void clamp_2bd567() { - float res = clamp(1.0f, 1.0f, 1.0f); + float res = 1.0f; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/2bd567.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/clamp/2bd567.wgsl.expected.fxc.hlsl index 7a02612ae6..8b0b0c6609 100644 --- a/test/tint/builtins/gen/literal/clamp/2bd567.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/clamp/2bd567.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void clamp_2bd567() { - float res = clamp(1.0f, 1.0f, 1.0f); + float res = 1.0f; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/2bd567.wgsl.expected.glsl b/test/tint/builtins/gen/literal/clamp/2bd567.wgsl.expected.glsl index 378d4011c1..406dade6b8 100644 --- a/test/tint/builtins/gen/literal/clamp/2bd567.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/clamp/2bd567.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void clamp_2bd567() { - float res = clamp(1.0f, 1.0f, 1.0f); + float res = 1.0f; } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void clamp_2bd567() { - float res = clamp(1.0f, 1.0f, 1.0f); + float res = 1.0f; } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void clamp_2bd567() { - float res = clamp(1.0f, 1.0f, 1.0f); + float res = 1.0f; } void compute_main() { diff --git a/test/tint/builtins/gen/literal/clamp/2bd567.wgsl.expected.msl b/test/tint/builtins/gen/literal/clamp/2bd567.wgsl.expected.msl index 338e4386c3..0fae76a6c9 100644 --- a/test/tint/builtins/gen/literal/clamp/2bd567.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/clamp/2bd567.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void clamp_2bd567() { - float res = clamp(1.0f, 1.0f, 1.0f); + float res = 1.0f; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/2bd567.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/clamp/2bd567.wgsl.expected.spvasm index df43e84e47..fe56eaa122 100644 --- a/test/tint/builtins/gen/literal/clamp/2bd567.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/clamp/2bd567.wgsl.expected.spvasm @@ -1,10 +1,9 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 29 ; 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" @@ -33,33 +32,32 @@ %9 = OpTypeFunction %void %float_1 = OpConstant %float 1 %_ptr_Function_float = OpTypePointer Function %float - %18 = OpTypeFunction %v4float + %16 = OpTypeFunction %v4float %clamp_2bd567 = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 - %13 = OpExtInst %float %14 NClamp %float_1 %float_1 %float_1 - OpStore %res %13 + OpStore %res %float_1 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %18 - %20 = OpLabel - %21 = OpFunctionCall %void %clamp_2bd567 +%vertex_main_inner = OpFunction %v4float None %16 + %18 = OpLabel + %19 = OpFunctionCall %void %clamp_2bd567 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %23 = OpLabel - %24 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %24 + %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 - %26 = OpLabel - %27 = OpFunctionCall %void %clamp_2bd567 + %24 = OpLabel + %25 = OpFunctionCall %void %clamp_2bd567 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %clamp_2bd567 + %27 = OpLabel + %28 = OpFunctionCall %void %clamp_2bd567 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/clamp/2bde41.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/clamp/2bde41.wgsl.expected.dxc.hlsl index fd00ee5780..9379a36452 100644 --- a/test/tint/builtins/gen/literal/clamp/2bde41.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/clamp/2bde41.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void clamp_2bde41() { - float4 res = clamp((1.0f).xxxx, (1.0f).xxxx, (1.0f).xxxx); + float4 res = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/2bde41.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/clamp/2bde41.wgsl.expected.fxc.hlsl index fd00ee5780..9379a36452 100644 --- a/test/tint/builtins/gen/literal/clamp/2bde41.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/clamp/2bde41.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void clamp_2bde41() { - float4 res = clamp((1.0f).xxxx, (1.0f).xxxx, (1.0f).xxxx); + float4 res = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/2bde41.wgsl.expected.glsl b/test/tint/builtins/gen/literal/clamp/2bde41.wgsl.expected.glsl index c09a4d4a6c..eb8354b962 100644 --- a/test/tint/builtins/gen/literal/clamp/2bde41.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/clamp/2bde41.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void clamp_2bde41() { - vec4 res = clamp(vec4(1.0f), vec4(1.0f), vec4(1.0f)); + vec4 res = vec4(1.0f); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void clamp_2bde41() { - vec4 res = clamp(vec4(1.0f), vec4(1.0f), vec4(1.0f)); + vec4 res = vec4(1.0f); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void clamp_2bde41() { - vec4 res = clamp(vec4(1.0f), vec4(1.0f), vec4(1.0f)); + vec4 res = vec4(1.0f); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/clamp/2bde41.wgsl.expected.msl b/test/tint/builtins/gen/literal/clamp/2bde41.wgsl.expected.msl index 99dad26f8b..adf4ea4039 100644 --- a/test/tint/builtins/gen/literal/clamp/2bde41.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/clamp/2bde41.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void clamp_2bde41() { - float4 res = clamp(float4(1.0f), float4(1.0f), float4(1.0f)); + float4 res = float4(1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/2bde41.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/clamp/2bde41.wgsl.expected.spvasm index d280181d2c..0b1234a43e 100644 --- a/test/tint/builtins/gen/literal/clamp/2bde41.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/clamp/2bde41.wgsl.expected.spvasm @@ -1,10 +1,9 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; 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" @@ -32,35 +31,34 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %float_1 = OpConstant %float 1 - %16 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %19 = OpTypeFunction %v4float + %17 = OpTypeFunction %v4float %clamp_2bde41 = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 - %13 = OpExtInst %v4float %14 NClamp %16 %16 %16 - OpStore %res %13 + OpStore %res %14 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %clamp_2bde41 +%vertex_main_inner = OpFunction %v4float None %17 + %19 = OpLabel + %20 = OpFunctionCall %void %clamp_2bde41 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %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 - %27 = OpLabel - %28 = OpFunctionCall %void %clamp_2bde41 + %25 = OpLabel + %26 = OpFunctionCall %void %clamp_2bde41 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %clamp_2bde41 + %28 = OpLabel + %29 = OpFunctionCall %void %clamp_2bde41 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/clamp/548fc7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/clamp/548fc7.wgsl.expected.dxc.hlsl index c82f956962..158ed1cf98 100644 --- a/test/tint/builtins/gen/literal/clamp/548fc7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/clamp/548fc7.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void clamp_548fc7() { - uint3 res = clamp((1u).xxx, (1u).xxx, (1u).xxx); + uint3 res = (1u).xxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/548fc7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/clamp/548fc7.wgsl.expected.fxc.hlsl index c82f956962..158ed1cf98 100644 --- a/test/tint/builtins/gen/literal/clamp/548fc7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/clamp/548fc7.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void clamp_548fc7() { - uint3 res = clamp((1u).xxx, (1u).xxx, (1u).xxx); + uint3 res = (1u).xxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/548fc7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/clamp/548fc7.wgsl.expected.glsl index 1bdba35984..30f8c4af91 100644 --- a/test/tint/builtins/gen/literal/clamp/548fc7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/clamp/548fc7.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void clamp_548fc7() { - uvec3 res = clamp(uvec3(1u), uvec3(1u), uvec3(1u)); + uvec3 res = uvec3(1u); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void clamp_548fc7() { - uvec3 res = clamp(uvec3(1u), uvec3(1u), uvec3(1u)); + uvec3 res = uvec3(1u); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void clamp_548fc7() { - uvec3 res = clamp(uvec3(1u), uvec3(1u), uvec3(1u)); + uvec3 res = uvec3(1u); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/clamp/548fc7.wgsl.expected.msl b/test/tint/builtins/gen/literal/clamp/548fc7.wgsl.expected.msl index b4fac8a9dc..ccea18c030 100644 --- a/test/tint/builtins/gen/literal/clamp/548fc7.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/clamp/548fc7.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void clamp_548fc7() { - uint3 res = clamp(uint3(1u), uint3(1u), uint3(1u)); + uint3 res = uint3(1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/548fc7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/clamp/548fc7.wgsl.expected.spvasm index 1870f99b9c..2e160d3168 100644 --- a/test/tint/builtins/gen/literal/clamp/548fc7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/clamp/548fc7.wgsl.expected.spvasm @@ -1,10 +1,9 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 34 ; Schema: 0 OpCapability Shader - %16 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -34,37 +33,36 @@ %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 %uint_1 = OpConstant %uint 1 - %18 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 + %16 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %_ptr_Function_v3uint = OpTypePointer Function %v3uint - %21 = OpConstantNull %v3uint - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v3uint + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %clamp_548fc7 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3uint Function %21 - %13 = OpExtInst %v3uint %16 UClamp %18 %18 %18 - OpStore %res %13 + %res = OpVariable %_ptr_Function_v3uint Function %19 + OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %clamp_548fc7 +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %clamp_548fc7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %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 - %31 = OpLabel - %32 = OpFunctionCall %void %clamp_548fc7 + %29 = OpLabel + %30 = OpFunctionCall %void %clamp_548fc7 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %clamp_548fc7 + %32 = OpLabel + %33 = OpFunctionCall %void %clamp_548fc7 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/clamp/5cf700.wgsl b/test/tint/builtins/gen/literal/clamp/5cf700.wgsl new file mode 100644 index 0000000000..4127bb8129 --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/5cf700.wgsl @@ -0,0 +1,43 @@ +// Copyright 2021 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 clamp(vec<3, fa>, vec<3, fa>, vec<3, fa>) -> vec<3, fa> +fn clamp_5cf700() { + var res = clamp(vec3(1), vec3(1), vec3(1)); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + clamp_5cf700(); + return vec4(); +} + +@fragment +fn fragment_main() { + clamp_5cf700(); +} + +@compute @workgroup_size(1) +fn compute_main() { + clamp_5cf700(); +} diff --git a/test/tint/builtins/gen/literal/clamp/5cf700.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/clamp/5cf700.wgsl.expected.dxc.hlsl new file mode 100644 index 0000000000..06d6121193 --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/5cf700.wgsl.expected.dxc.hlsl @@ -0,0 +1,30 @@ +void clamp_5cf700() { + int3 res = (1).xxx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + clamp_5cf700(); + 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() { + clamp_5cf700(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + clamp_5cf700(); + return; +} diff --git a/test/tint/builtins/gen/literal/clamp/5cf700.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/clamp/5cf700.wgsl.expected.fxc.hlsl new file mode 100644 index 0000000000..06d6121193 --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/5cf700.wgsl.expected.fxc.hlsl @@ -0,0 +1,30 @@ +void clamp_5cf700() { + int3 res = (1).xxx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + clamp_5cf700(); + 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() { + clamp_5cf700(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + clamp_5cf700(); + return; +} diff --git a/test/tint/builtins/gen/literal/clamp/5cf700.wgsl.expected.glsl b/test/tint/builtins/gen/literal/clamp/5cf700.wgsl.expected.glsl new file mode 100644 index 0000000000..a1ce57531a --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/5cf700.wgsl.expected.glsl @@ -0,0 +1,49 @@ +#version 310 es + +void clamp_5cf700() { + ivec3 res = ivec3(1); +} + +vec4 vertex_main() { + clamp_5cf700(); + 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 clamp_5cf700() { + ivec3 res = ivec3(1); +} + +void fragment_main() { + clamp_5cf700(); +} + +void main() { + fragment_main(); + return; +} +#version 310 es + +void clamp_5cf700() { + ivec3 res = ivec3(1); +} + +void compute_main() { + clamp_5cf700(); +} + +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/clamp/5cf700.wgsl.expected.msl b/test/tint/builtins/gen/literal/clamp/5cf700.wgsl.expected.msl new file mode 100644 index 0000000000..55c384c198 --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/5cf700.wgsl.expected.msl @@ -0,0 +1,33 @@ +#include + +using namespace metal; +void clamp_5cf700() { + int3 res = int3(1); +} + +struct tint_symbol { + float4 value [[position]]; +}; + +float4 vertex_main_inner() { + clamp_5cf700(); + 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() { + clamp_5cf700(); + return; +} + +kernel void compute_main() { + clamp_5cf700(); + return; +} + diff --git a/test/tint/builtins/gen/literal/clamp/5cf700.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/clamp/5cf700.wgsl.expected.spvasm new file mode 100644 index 0000000000..3b26acae61 --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/5cf700.wgsl.expected.spvasm @@ -0,0 +1,68 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 34 +; 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 %clamp_5cf700 "clamp_5cf700" + 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 + %20 = OpTypeFunction %v4float + %float_1 = OpConstant %float 1 +%clamp_5cf700 = OpFunction %void None %9 + %12 = OpLabel + %res = OpVariable %_ptr_Function_v3int Function %19 + OpStore %res %16 + OpReturn + OpFunctionEnd +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %clamp_5cf700 + 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 %clamp_5cf700 + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %9 + %32 = OpLabel + %33 = OpFunctionCall %void %clamp_5cf700 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/clamp/5cf700.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/clamp/5cf700.wgsl.expected.wgsl new file mode 100644 index 0000000000..c7f5c1e3a4 --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/5cf700.wgsl.expected.wgsl @@ -0,0 +1,19 @@ +fn clamp_5cf700() { + var res = clamp(vec3(1), vec3(1), vec3(1)); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + clamp_5cf700(); + return vec4(); +} + +@fragment +fn fragment_main() { + clamp_5cf700(); +} + +@compute @workgroup_size(1) +fn compute_main() { + clamp_5cf700(); +} diff --git a/test/tint/builtins/gen/literal/clamp/5f0819.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/clamp/5f0819.wgsl.expected.dxc.hlsl index dff0c45f3c..f1d83d574c 100644 --- a/test/tint/builtins/gen/literal/clamp/5f0819.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/clamp/5f0819.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void clamp_5f0819() { - int3 res = clamp((1).xxx, (1).xxx, (1).xxx); + int3 res = (1).xxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/5f0819.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/clamp/5f0819.wgsl.expected.fxc.hlsl index dff0c45f3c..f1d83d574c 100644 --- a/test/tint/builtins/gen/literal/clamp/5f0819.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/clamp/5f0819.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void clamp_5f0819() { - int3 res = clamp((1).xxx, (1).xxx, (1).xxx); + int3 res = (1).xxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/5f0819.wgsl.expected.glsl b/test/tint/builtins/gen/literal/clamp/5f0819.wgsl.expected.glsl index 24f7c6cfe4..1f50eddcb7 100644 --- a/test/tint/builtins/gen/literal/clamp/5f0819.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/clamp/5f0819.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void clamp_5f0819() { - ivec3 res = clamp(ivec3(1), ivec3(1), ivec3(1)); + ivec3 res = ivec3(1); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void clamp_5f0819() { - ivec3 res = clamp(ivec3(1), ivec3(1), ivec3(1)); + ivec3 res = ivec3(1); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void clamp_5f0819() { - ivec3 res = clamp(ivec3(1), ivec3(1), ivec3(1)); + ivec3 res = ivec3(1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/clamp/5f0819.wgsl.expected.msl b/test/tint/builtins/gen/literal/clamp/5f0819.wgsl.expected.msl index cf5f95996c..724945fda2 100644 --- a/test/tint/builtins/gen/literal/clamp/5f0819.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/clamp/5f0819.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void clamp_5f0819() { - int3 res = clamp(int3(1), int3(1), int3(1)); + int3 res = int3(1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/5f0819.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/clamp/5f0819.wgsl.expected.spvasm index aae96e8d85..e57ec12a36 100644 --- a/test/tint/builtins/gen/literal/clamp/5f0819.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/clamp/5f0819.wgsl.expected.spvasm @@ -1,10 +1,9 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 34 ; Schema: 0 OpCapability Shader - %16 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -34,37 +33,36 @@ %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 %int_1 = OpConstant %int 1 - %18 = OpConstantComposite %v3int %int_1 %int_1 %int_1 + %16 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v3int = OpTypePointer Function %v3int - %21 = OpConstantNull %v3int - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v3int + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %clamp_5f0819 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3int Function %21 - %13 = OpExtInst %v3int %16 SClamp %18 %18 %18 - OpStore %res %13 + %res = OpVariable %_ptr_Function_v3int Function %19 + OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %clamp_5f0819 +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %clamp_5f0819 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %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 - %31 = OpLabel - %32 = OpFunctionCall %void %clamp_5f0819 + %29 = OpLabel + %30 = OpFunctionCall %void %clamp_5f0819 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %clamp_5f0819 + %32 = OpLabel + %33 = OpFunctionCall %void %clamp_5f0819 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/clamp/6c1749.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/clamp/6c1749.wgsl.expected.dxc.hlsl index c34c61239c..7178ef5f93 100644 --- a/test/tint/builtins/gen/literal/clamp/6c1749.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/clamp/6c1749.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void clamp_6c1749() { - int2 res = clamp((1).xx, (1).xx, (1).xx); + int2 res = (1).xx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/6c1749.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/clamp/6c1749.wgsl.expected.fxc.hlsl index c34c61239c..7178ef5f93 100644 --- a/test/tint/builtins/gen/literal/clamp/6c1749.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/clamp/6c1749.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void clamp_6c1749() { - int2 res = clamp((1).xx, (1).xx, (1).xx); + int2 res = (1).xx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/6c1749.wgsl.expected.glsl b/test/tint/builtins/gen/literal/clamp/6c1749.wgsl.expected.glsl index c13cd39758..3d0bb2561b 100644 --- a/test/tint/builtins/gen/literal/clamp/6c1749.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/clamp/6c1749.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void clamp_6c1749() { - ivec2 res = clamp(ivec2(1), ivec2(1), ivec2(1)); + ivec2 res = ivec2(1); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void clamp_6c1749() { - ivec2 res = clamp(ivec2(1), ivec2(1), ivec2(1)); + ivec2 res = ivec2(1); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void clamp_6c1749() { - ivec2 res = clamp(ivec2(1), ivec2(1), ivec2(1)); + ivec2 res = ivec2(1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/clamp/6c1749.wgsl.expected.msl b/test/tint/builtins/gen/literal/clamp/6c1749.wgsl.expected.msl index 6c3904a1d7..37c4764599 100644 --- a/test/tint/builtins/gen/literal/clamp/6c1749.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/clamp/6c1749.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void clamp_6c1749() { - int2 res = clamp(int2(1), int2(1), int2(1)); + int2 res = int2(1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/6c1749.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/clamp/6c1749.wgsl.expected.spvasm index c309f64ad9..bbcb3c313e 100644 --- a/test/tint/builtins/gen/literal/clamp/6c1749.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/clamp/6c1749.wgsl.expected.spvasm @@ -1,10 +1,9 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 34 ; Schema: 0 OpCapability Shader - %16 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -34,37 +33,36 @@ %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 %int_1 = OpConstant %int 1 - %18 = OpConstantComposite %v2int %int_1 %int_1 + %16 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int - %21 = OpConstantNull %v2int - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v2int + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %clamp_6c1749 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2int Function %21 - %13 = OpExtInst %v2int %16 SClamp %18 %18 %18 - OpStore %res %13 + %res = OpVariable %_ptr_Function_v2int Function %19 + OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %clamp_6c1749 +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %clamp_6c1749 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %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 - %31 = OpLabel - %32 = OpFunctionCall %void %clamp_6c1749 + %29 = OpLabel + %30 = OpFunctionCall %void %clamp_6c1749 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %clamp_6c1749 + %32 = OpLabel + %33 = OpFunctionCall %void %clamp_6c1749 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/clamp/7706d7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/clamp/7706d7.wgsl.expected.dxc.hlsl index c97d2a3735..039fbeae65 100644 --- a/test/tint/builtins/gen/literal/clamp/7706d7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/clamp/7706d7.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void clamp_7706d7() { - uint2 res = clamp((1u).xx, (1u).xx, (1u).xx); + uint2 res = (1u).xx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/7706d7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/clamp/7706d7.wgsl.expected.fxc.hlsl index c97d2a3735..039fbeae65 100644 --- a/test/tint/builtins/gen/literal/clamp/7706d7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/clamp/7706d7.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void clamp_7706d7() { - uint2 res = clamp((1u).xx, (1u).xx, (1u).xx); + uint2 res = (1u).xx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/7706d7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/clamp/7706d7.wgsl.expected.glsl index f682c662ec..170b7d0b42 100644 --- a/test/tint/builtins/gen/literal/clamp/7706d7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/clamp/7706d7.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void clamp_7706d7() { - uvec2 res = clamp(uvec2(1u), uvec2(1u), uvec2(1u)); + uvec2 res = uvec2(1u); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void clamp_7706d7() { - uvec2 res = clamp(uvec2(1u), uvec2(1u), uvec2(1u)); + uvec2 res = uvec2(1u); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void clamp_7706d7() { - uvec2 res = clamp(uvec2(1u), uvec2(1u), uvec2(1u)); + uvec2 res = uvec2(1u); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/clamp/7706d7.wgsl.expected.msl b/test/tint/builtins/gen/literal/clamp/7706d7.wgsl.expected.msl index d842f6d686..33e531ede9 100644 --- a/test/tint/builtins/gen/literal/clamp/7706d7.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/clamp/7706d7.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void clamp_7706d7() { - uint2 res = clamp(uint2(1u), uint2(1u), uint2(1u)); + uint2 res = uint2(1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/7706d7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/clamp/7706d7.wgsl.expected.spvasm index 47b0b39f83..5d73e0afac 100644 --- a/test/tint/builtins/gen/literal/clamp/7706d7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/clamp/7706d7.wgsl.expected.spvasm @@ -1,10 +1,9 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 34 ; Schema: 0 OpCapability Shader - %16 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -34,37 +33,36 @@ %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 %uint_1 = OpConstant %uint 1 - %18 = OpConstantComposite %v2uint %uint_1 %uint_1 + %16 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint - %21 = OpConstantNull %v2uint - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v2uint + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %clamp_7706d7 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2uint Function %21 - %13 = OpExtInst %v2uint %16 UClamp %18 %18 %18 - OpStore %res %13 + %res = OpVariable %_ptr_Function_v2uint Function %19 + OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %clamp_7706d7 +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %clamp_7706d7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %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 - %31 = OpLabel - %32 = OpFunctionCall %void %clamp_7706d7 + %29 = OpLabel + %30 = OpFunctionCall %void %clamp_7706d7 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %clamp_7706d7 + %32 = OpLabel + %33 = OpFunctionCall %void %clamp_7706d7 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/clamp/867397.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/clamp/867397.wgsl.expected.dxc.hlsl index 7ba11abb56..80c2bd0a33 100644 --- a/test/tint/builtins/gen/literal/clamp/867397.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/clamp/867397.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void clamp_867397() { - float3 res = clamp((1.0f).xxx, (1.0f).xxx, (1.0f).xxx); + float3 res = (1.0f).xxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/867397.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/clamp/867397.wgsl.expected.fxc.hlsl index 7ba11abb56..80c2bd0a33 100644 --- a/test/tint/builtins/gen/literal/clamp/867397.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/clamp/867397.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void clamp_867397() { - float3 res = clamp((1.0f).xxx, (1.0f).xxx, (1.0f).xxx); + float3 res = (1.0f).xxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/867397.wgsl.expected.glsl b/test/tint/builtins/gen/literal/clamp/867397.wgsl.expected.glsl index 3eed556179..63fb7a8b35 100644 --- a/test/tint/builtins/gen/literal/clamp/867397.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/clamp/867397.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void clamp_867397() { - vec3 res = clamp(vec3(1.0f), vec3(1.0f), vec3(1.0f)); + vec3 res = vec3(1.0f); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void clamp_867397() { - vec3 res = clamp(vec3(1.0f), vec3(1.0f), vec3(1.0f)); + vec3 res = vec3(1.0f); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void clamp_867397() { - vec3 res = clamp(vec3(1.0f), vec3(1.0f), vec3(1.0f)); + vec3 res = vec3(1.0f); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/clamp/867397.wgsl.expected.msl b/test/tint/builtins/gen/literal/clamp/867397.wgsl.expected.msl index 88c885b4d1..a3567726f7 100644 --- a/test/tint/builtins/gen/literal/clamp/867397.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/clamp/867397.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void clamp_867397() { - float3 res = clamp(float3(1.0f), float3(1.0f), float3(1.0f)); + float3 res = float3(1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/867397.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/clamp/867397.wgsl.expected.spvasm index 98dd02e349..cadd95452c 100644 --- a/test/tint/builtins/gen/literal/clamp/867397.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/clamp/867397.wgsl.expected.spvasm @@ -1,10 +1,9 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 32 ; 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" @@ -33,36 +32,35 @@ %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 %float_1 = OpConstant %float 1 - %17 = OpConstantComposite %v3float %float_1 %float_1 %float_1 + %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float - %20 = OpConstantNull %v3float - %21 = OpTypeFunction %v4float + %18 = OpConstantNull %v3float + %19 = OpTypeFunction %v4float %clamp_867397 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %20 - %13 = OpExtInst %v3float %15 NClamp %17 %17 %17 - OpStore %res %13 + %res = OpVariable %_ptr_Function_v3float Function %18 + OpStore %res %15 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %clamp_867397 +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %clamp_867397 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %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 - %29 = OpLabel - %30 = OpFunctionCall %void %clamp_867397 + %27 = OpLabel + %28 = OpFunctionCall %void %clamp_867397 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %clamp_867397 + %30 = OpLabel + %31 = OpFunctionCall %void %clamp_867397 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/clamp/87df46.wgsl b/test/tint/builtins/gen/literal/clamp/87df46.wgsl new file mode 100644 index 0000000000..e24da63eee --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/87df46.wgsl @@ -0,0 +1,43 @@ +// Copyright 2021 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 clamp(vec<4, fa>, vec<4, fa>, vec<4, fa>) -> vec<4, fa> +fn clamp_87df46() { + var res = clamp(vec4(1), vec4(1), vec4(1)); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + clamp_87df46(); + return vec4(); +} + +@fragment +fn fragment_main() { + clamp_87df46(); +} + +@compute @workgroup_size(1) +fn compute_main() { + clamp_87df46(); +} diff --git a/test/tint/builtins/gen/literal/clamp/87df46.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/clamp/87df46.wgsl.expected.dxc.hlsl new file mode 100644 index 0000000000..8af196a973 --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/87df46.wgsl.expected.dxc.hlsl @@ -0,0 +1,30 @@ +void clamp_87df46() { + int4 res = (1).xxxx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + clamp_87df46(); + 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() { + clamp_87df46(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + clamp_87df46(); + return; +} diff --git a/test/tint/builtins/gen/literal/clamp/87df46.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/clamp/87df46.wgsl.expected.fxc.hlsl new file mode 100644 index 0000000000..8af196a973 --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/87df46.wgsl.expected.fxc.hlsl @@ -0,0 +1,30 @@ +void clamp_87df46() { + int4 res = (1).xxxx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + clamp_87df46(); + 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() { + clamp_87df46(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + clamp_87df46(); + return; +} diff --git a/test/tint/builtins/gen/literal/clamp/87df46.wgsl.expected.glsl b/test/tint/builtins/gen/literal/clamp/87df46.wgsl.expected.glsl new file mode 100644 index 0000000000..b3db98f4e6 --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/87df46.wgsl.expected.glsl @@ -0,0 +1,49 @@ +#version 310 es + +void clamp_87df46() { + ivec4 res = ivec4(1); +} + +vec4 vertex_main() { + clamp_87df46(); + 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 clamp_87df46() { + ivec4 res = ivec4(1); +} + +void fragment_main() { + clamp_87df46(); +} + +void main() { + fragment_main(); + return; +} +#version 310 es + +void clamp_87df46() { + ivec4 res = ivec4(1); +} + +void compute_main() { + clamp_87df46(); +} + +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/clamp/87df46.wgsl.expected.msl b/test/tint/builtins/gen/literal/clamp/87df46.wgsl.expected.msl new file mode 100644 index 0000000000..62aa4bb0a3 --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/87df46.wgsl.expected.msl @@ -0,0 +1,33 @@ +#include + +using namespace metal; +void clamp_87df46() { + int4 res = int4(1); +} + +struct tint_symbol { + float4 value [[position]]; +}; + +float4 vertex_main_inner() { + clamp_87df46(); + 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() { + clamp_87df46(); + return; +} + +kernel void compute_main() { + clamp_87df46(); + return; +} + diff --git a/test/tint/builtins/gen/literal/clamp/87df46.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/clamp/87df46.wgsl.expected.spvasm new file mode 100644 index 0000000000..0e036506bf --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/87df46.wgsl.expected.spvasm @@ -0,0 +1,68 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 34 +; 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 %clamp_87df46 "clamp_87df46" + 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 + %20 = OpTypeFunction %v4float + %float_1 = OpConstant %float 1 +%clamp_87df46 = OpFunction %void None %9 + %12 = OpLabel + %res = OpVariable %_ptr_Function_v4int Function %19 + OpStore %res %16 + OpReturn + OpFunctionEnd +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %clamp_87df46 + 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 %clamp_87df46 + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %9 + %32 = OpLabel + %33 = OpFunctionCall %void %clamp_87df46 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/clamp/87df46.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/clamp/87df46.wgsl.expected.wgsl new file mode 100644 index 0000000000..eeb22ce017 --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/87df46.wgsl.expected.wgsl @@ -0,0 +1,19 @@ +fn clamp_87df46() { + var res = clamp(vec4(1), vec4(1), vec4(1)); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + clamp_87df46(); + return vec4(); +} + +@fragment +fn fragment_main() { + clamp_87df46(); +} + +@compute @workgroup_size(1) +fn compute_main() { + clamp_87df46(); +} diff --git a/test/tint/builtins/gen/literal/clamp/8b1eaa.wgsl b/test/tint/builtins/gen/literal/clamp/8b1eaa.wgsl new file mode 100644 index 0000000000..e849cc843e --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/8b1eaa.wgsl @@ -0,0 +1,43 @@ +// Copyright 2021 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 clamp(vec<3, ia>, vec<3, ia>, vec<3, ia>) -> vec<3, ia> +fn clamp_8b1eaa() { + var res = clamp(vec3(1.0), vec3(1.0), vec3(1.0)); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + clamp_8b1eaa(); + return vec4(); +} + +@fragment +fn fragment_main() { + clamp_8b1eaa(); +} + +@compute @workgroup_size(1) +fn compute_main() { + clamp_8b1eaa(); +} diff --git a/test/tint/builtins/gen/literal/clamp/8b1eaa.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/clamp/8b1eaa.wgsl.expected.dxc.hlsl new file mode 100644 index 0000000000..8270dd1e8a --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/8b1eaa.wgsl.expected.dxc.hlsl @@ -0,0 +1,30 @@ +void clamp_8b1eaa() { + float3 res = (1.0f).xxx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + clamp_8b1eaa(); + 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() { + clamp_8b1eaa(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + clamp_8b1eaa(); + return; +} diff --git a/test/tint/builtins/gen/literal/clamp/8b1eaa.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/clamp/8b1eaa.wgsl.expected.fxc.hlsl new file mode 100644 index 0000000000..8270dd1e8a --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/8b1eaa.wgsl.expected.fxc.hlsl @@ -0,0 +1,30 @@ +void clamp_8b1eaa() { + float3 res = (1.0f).xxx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + clamp_8b1eaa(); + 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() { + clamp_8b1eaa(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + clamp_8b1eaa(); + return; +} diff --git a/test/tint/builtins/gen/literal/clamp/8b1eaa.wgsl.expected.glsl b/test/tint/builtins/gen/literal/clamp/8b1eaa.wgsl.expected.glsl new file mode 100644 index 0000000000..6729165a11 --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/8b1eaa.wgsl.expected.glsl @@ -0,0 +1,49 @@ +#version 310 es + +void clamp_8b1eaa() { + vec3 res = vec3(1.0f); +} + +vec4 vertex_main() { + clamp_8b1eaa(); + 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 clamp_8b1eaa() { + vec3 res = vec3(1.0f); +} + +void fragment_main() { + clamp_8b1eaa(); +} + +void main() { + fragment_main(); + return; +} +#version 310 es + +void clamp_8b1eaa() { + vec3 res = vec3(1.0f); +} + +void compute_main() { + clamp_8b1eaa(); +} + +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/clamp/8b1eaa.wgsl.expected.msl b/test/tint/builtins/gen/literal/clamp/8b1eaa.wgsl.expected.msl new file mode 100644 index 0000000000..786aaaa128 --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/8b1eaa.wgsl.expected.msl @@ -0,0 +1,33 @@ +#include + +using namespace metal; +void clamp_8b1eaa() { + float3 res = float3(1.0f); +} + +struct tint_symbol { + float4 value [[position]]; +}; + +float4 vertex_main_inner() { + clamp_8b1eaa(); + 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() { + clamp_8b1eaa(); + return; +} + +kernel void compute_main() { + clamp_8b1eaa(); + return; +} + diff --git a/test/tint/builtins/gen/literal/clamp/8b1eaa.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/clamp/8b1eaa.wgsl.expected.spvasm new file mode 100644 index 0000000000..faa36f5c9e --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/8b1eaa.wgsl.expected.spvasm @@ -0,0 +1,66 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 32 +; 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 %clamp_8b1eaa "clamp_8b1eaa" + 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 + %19 = OpTypeFunction %v4float +%clamp_8b1eaa = 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 %clamp_8b1eaa + 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 + %27 = OpLabel + %28 = OpFunctionCall %void %clamp_8b1eaa + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %9 + %30 = OpLabel + %31 = OpFunctionCall %void %clamp_8b1eaa + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/clamp/8b1eaa.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/clamp/8b1eaa.wgsl.expected.wgsl new file mode 100644 index 0000000000..bda46e9db4 --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/8b1eaa.wgsl.expected.wgsl @@ -0,0 +1,19 @@ +fn clamp_8b1eaa() { + var res = clamp(vec3(1.0), vec3(1.0), vec3(1.0)); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + clamp_8b1eaa(); + return vec4(); +} + +@fragment +fn fragment_main() { + clamp_8b1eaa(); +} + +@compute @workgroup_size(1) +fn compute_main() { + clamp_8b1eaa(); +} diff --git a/test/tint/builtins/gen/literal/clamp/96e56a.wgsl b/test/tint/builtins/gen/literal/clamp/96e56a.wgsl new file mode 100644 index 0000000000..1babcf7a30 --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/96e56a.wgsl @@ -0,0 +1,43 @@ +// Copyright 2021 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 clamp(ia, ia, ia) -> ia +fn clamp_96e56a() { + var res = clamp(1.0, 1.0, 1.0); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + clamp_96e56a(); + return vec4(); +} + +@fragment +fn fragment_main() { + clamp_96e56a(); +} + +@compute @workgroup_size(1) +fn compute_main() { + clamp_96e56a(); +} diff --git a/test/tint/builtins/gen/literal/clamp/96e56a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/clamp/96e56a.wgsl.expected.dxc.hlsl new file mode 100644 index 0000000000..6231928d78 --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/96e56a.wgsl.expected.dxc.hlsl @@ -0,0 +1,30 @@ +void clamp_96e56a() { + float res = 1.0f; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + clamp_96e56a(); + 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() { + clamp_96e56a(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + clamp_96e56a(); + return; +} diff --git a/test/tint/builtins/gen/literal/clamp/96e56a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/clamp/96e56a.wgsl.expected.fxc.hlsl new file mode 100644 index 0000000000..6231928d78 --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/96e56a.wgsl.expected.fxc.hlsl @@ -0,0 +1,30 @@ +void clamp_96e56a() { + float res = 1.0f; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + clamp_96e56a(); + 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() { + clamp_96e56a(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + clamp_96e56a(); + return; +} diff --git a/test/tint/builtins/gen/literal/clamp/96e56a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/clamp/96e56a.wgsl.expected.glsl new file mode 100644 index 0000000000..c7dbb9bdc3 --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/96e56a.wgsl.expected.glsl @@ -0,0 +1,49 @@ +#version 310 es + +void clamp_96e56a() { + float res = 1.0f; +} + +vec4 vertex_main() { + clamp_96e56a(); + 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 clamp_96e56a() { + float res = 1.0f; +} + +void fragment_main() { + clamp_96e56a(); +} + +void main() { + fragment_main(); + return; +} +#version 310 es + +void clamp_96e56a() { + float res = 1.0f; +} + +void compute_main() { + clamp_96e56a(); +} + +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/clamp/96e56a.wgsl.expected.msl b/test/tint/builtins/gen/literal/clamp/96e56a.wgsl.expected.msl new file mode 100644 index 0000000000..a28781ca2c --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/96e56a.wgsl.expected.msl @@ -0,0 +1,33 @@ +#include + +using namespace metal; +void clamp_96e56a() { + float res = 1.0f; +} + +struct tint_symbol { + float4 value [[position]]; +}; + +float4 vertex_main_inner() { + clamp_96e56a(); + 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() { + clamp_96e56a(); + return; +} + +kernel void compute_main() { + clamp_96e56a(); + return; +} + diff --git a/test/tint/builtins/gen/literal/clamp/96e56a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/clamp/96e56a.wgsl.expected.spvasm new file mode 100644 index 0000000000..07544da303 --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/96e56a.wgsl.expected.spvasm @@ -0,0 +1,63 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 29 +; 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 %clamp_96e56a "clamp_96e56a" + 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 + %16 = OpTypeFunction %v4float +%clamp_96e56a = OpFunction %void None %9 + %12 = OpLabel + %res = OpVariable %_ptr_Function_float Function %8 + OpStore %res %float_1 + OpReturn + OpFunctionEnd +%vertex_main_inner = OpFunction %v4float None %16 + %18 = OpLabel + %19 = OpFunctionCall %void %clamp_96e56a + 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 + %24 = OpLabel + %25 = OpFunctionCall %void %clamp_96e56a + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %9 + %27 = OpLabel + %28 = OpFunctionCall %void %clamp_96e56a + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/clamp/96e56a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/clamp/96e56a.wgsl.expected.wgsl new file mode 100644 index 0000000000..20f3055098 --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/96e56a.wgsl.expected.wgsl @@ -0,0 +1,19 @@ +fn clamp_96e56a() { + var res = clamp(1.0, 1.0, 1.0); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + clamp_96e56a(); + return vec4(); +} + +@fragment +fn fragment_main() { + clamp_96e56a(); +} + +@compute @workgroup_size(1) +fn compute_main() { + clamp_96e56a(); +} diff --git a/test/tint/builtins/gen/literal/clamp/9d731c.wgsl b/test/tint/builtins/gen/literal/clamp/9d731c.wgsl new file mode 100644 index 0000000000..b766bbfa3a --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/9d731c.wgsl @@ -0,0 +1,43 @@ +// Copyright 2021 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 clamp(vec<2, fa>, vec<2, fa>, vec<2, fa>) -> vec<2, fa> +fn clamp_9d731c() { + var res = clamp(vec2(1), vec2(1), vec2(1)); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + clamp_9d731c(); + return vec4(); +} + +@fragment +fn fragment_main() { + clamp_9d731c(); +} + +@compute @workgroup_size(1) +fn compute_main() { + clamp_9d731c(); +} diff --git a/test/tint/builtins/gen/literal/clamp/9d731c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/clamp/9d731c.wgsl.expected.dxc.hlsl new file mode 100644 index 0000000000..25efa1a8e9 --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/9d731c.wgsl.expected.dxc.hlsl @@ -0,0 +1,30 @@ +void clamp_9d731c() { + int2 res = (1).xx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + clamp_9d731c(); + 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() { + clamp_9d731c(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + clamp_9d731c(); + return; +} diff --git a/test/tint/builtins/gen/literal/clamp/9d731c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/clamp/9d731c.wgsl.expected.fxc.hlsl new file mode 100644 index 0000000000..25efa1a8e9 --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/9d731c.wgsl.expected.fxc.hlsl @@ -0,0 +1,30 @@ +void clamp_9d731c() { + int2 res = (1).xx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + clamp_9d731c(); + 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() { + clamp_9d731c(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + clamp_9d731c(); + return; +} diff --git a/test/tint/builtins/gen/literal/clamp/9d731c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/clamp/9d731c.wgsl.expected.glsl new file mode 100644 index 0000000000..8f283b5ee4 --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/9d731c.wgsl.expected.glsl @@ -0,0 +1,49 @@ +#version 310 es + +void clamp_9d731c() { + ivec2 res = ivec2(1); +} + +vec4 vertex_main() { + clamp_9d731c(); + 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 clamp_9d731c() { + ivec2 res = ivec2(1); +} + +void fragment_main() { + clamp_9d731c(); +} + +void main() { + fragment_main(); + return; +} +#version 310 es + +void clamp_9d731c() { + ivec2 res = ivec2(1); +} + +void compute_main() { + clamp_9d731c(); +} + +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/clamp/9d731c.wgsl.expected.msl b/test/tint/builtins/gen/literal/clamp/9d731c.wgsl.expected.msl new file mode 100644 index 0000000000..5a78c71ece --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/9d731c.wgsl.expected.msl @@ -0,0 +1,33 @@ +#include + +using namespace metal; +void clamp_9d731c() { + int2 res = int2(1); +} + +struct tint_symbol { + float4 value [[position]]; +}; + +float4 vertex_main_inner() { + clamp_9d731c(); + 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() { + clamp_9d731c(); + return; +} + +kernel void compute_main() { + clamp_9d731c(); + return; +} + diff --git a/test/tint/builtins/gen/literal/clamp/9d731c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/clamp/9d731c.wgsl.expected.spvasm new file mode 100644 index 0000000000..533a9b057d --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/9d731c.wgsl.expected.spvasm @@ -0,0 +1,68 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 34 +; 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 %clamp_9d731c "clamp_9d731c" + 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 + %20 = OpTypeFunction %v4float + %float_1 = OpConstant %float 1 +%clamp_9d731c = OpFunction %void None %9 + %12 = OpLabel + %res = OpVariable %_ptr_Function_v2int Function %19 + OpStore %res %16 + OpReturn + OpFunctionEnd +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %clamp_9d731c + 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 %clamp_9d731c + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %9 + %32 = OpLabel + %33 = OpFunctionCall %void %clamp_9d731c + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/clamp/9d731c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/clamp/9d731c.wgsl.expected.wgsl new file mode 100644 index 0000000000..d4da0fb4b1 --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/9d731c.wgsl.expected.wgsl @@ -0,0 +1,19 @@ +fn clamp_9d731c() { + var res = clamp(vec2(1), vec2(1), vec2(1)); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + clamp_9d731c(); + return vec4(); +} + +@fragment +fn fragment_main() { + clamp_9d731c(); +} + +@compute @workgroup_size(1) +fn compute_main() { + clamp_9d731c(); +} diff --git a/test/tint/builtins/gen/literal/clamp/a2de25.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/clamp/a2de25.wgsl.expected.dxc.hlsl index e0e3c6d9bd..f28586f638 100644 --- a/test/tint/builtins/gen/literal/clamp/a2de25.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/clamp/a2de25.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void clamp_a2de25() { - uint res = clamp(1u, 1u, 1u); + uint res = 1u; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/a2de25.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/clamp/a2de25.wgsl.expected.fxc.hlsl index e0e3c6d9bd..f28586f638 100644 --- a/test/tint/builtins/gen/literal/clamp/a2de25.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/clamp/a2de25.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void clamp_a2de25() { - uint res = clamp(1u, 1u, 1u); + uint res = 1u; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/a2de25.wgsl.expected.glsl b/test/tint/builtins/gen/literal/clamp/a2de25.wgsl.expected.glsl index 002c0bda59..bcd4b44d45 100644 --- a/test/tint/builtins/gen/literal/clamp/a2de25.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/clamp/a2de25.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void clamp_a2de25() { - uint res = clamp(1u, 1u, 1u); + uint res = 1u; } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void clamp_a2de25() { - uint res = clamp(1u, 1u, 1u); + uint res = 1u; } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void clamp_a2de25() { - uint res = clamp(1u, 1u, 1u); + uint res = 1u; } void compute_main() { diff --git a/test/tint/builtins/gen/literal/clamp/a2de25.wgsl.expected.msl b/test/tint/builtins/gen/literal/clamp/a2de25.wgsl.expected.msl index 0669039624..49c396ad88 100644 --- a/test/tint/builtins/gen/literal/clamp/a2de25.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/clamp/a2de25.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void clamp_a2de25() { - uint res = clamp(1u, 1u, 1u); + uint res = 1u; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/a2de25.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/clamp/a2de25.wgsl.expected.spvasm index 3fc18abe29..3b4ab71ab8 100644 --- a/test/tint/builtins/gen/literal/clamp/a2de25.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/clamp/a2de25.wgsl.expected.spvasm @@ -1,10 +1,9 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 32 ; 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" @@ -34,35 +33,34 @@ %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %19 = OpConstantNull %uint - %20 = OpTypeFunction %v4float + %17 = OpConstantNull %uint + %18 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %clamp_a2de25 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_uint Function %19 - %13 = OpExtInst %uint %15 UClamp %uint_1 %uint_1 %uint_1 - OpStore %res %13 + %res = OpVariable %_ptr_Function_uint Function %17 + OpStore %res %uint_1 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %clamp_a2de25 +%vertex_main_inner = OpFunction %v4float None %18 + %20 = OpLabel + %21 = OpFunctionCall %void %clamp_a2de25 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %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 - %29 = OpLabel - %30 = OpFunctionCall %void %clamp_a2de25 + %27 = OpLabel + %28 = OpFunctionCall %void %clamp_a2de25 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %clamp_a2de25 + %30 = OpLabel + %31 = OpFunctionCall %void %clamp_a2de25 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/clamp/b07c65.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/clamp/b07c65.wgsl.expected.dxc.hlsl index cecad0a8d6..bcf06731b4 100644 --- a/test/tint/builtins/gen/literal/clamp/b07c65.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/clamp/b07c65.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void clamp_b07c65() { - int res = clamp(1, 1, 1); + int res = 1; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/b07c65.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/clamp/b07c65.wgsl.expected.fxc.hlsl index cecad0a8d6..bcf06731b4 100644 --- a/test/tint/builtins/gen/literal/clamp/b07c65.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/clamp/b07c65.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void clamp_b07c65() { - int res = clamp(1, 1, 1); + int res = 1; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/b07c65.wgsl.expected.glsl b/test/tint/builtins/gen/literal/clamp/b07c65.wgsl.expected.glsl index 1f7e91e197..a6dba0376e 100644 --- a/test/tint/builtins/gen/literal/clamp/b07c65.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/clamp/b07c65.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void clamp_b07c65() { - int res = clamp(1, 1, 1); + int res = 1; } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void clamp_b07c65() { - int res = clamp(1, 1, 1); + int res = 1; } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void clamp_b07c65() { - int res = clamp(1, 1, 1); + int res = 1; } void compute_main() { diff --git a/test/tint/builtins/gen/literal/clamp/b07c65.wgsl.expected.msl b/test/tint/builtins/gen/literal/clamp/b07c65.wgsl.expected.msl index ab1978cc40..ad20dc67eb 100644 --- a/test/tint/builtins/gen/literal/clamp/b07c65.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/clamp/b07c65.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void clamp_b07c65() { - int res = clamp(1, 1, 1); + int res = 1; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/b07c65.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/clamp/b07c65.wgsl.expected.spvasm index bdd8cb8c9c..6e55cb9b76 100644 --- a/test/tint/builtins/gen/literal/clamp/b07c65.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/clamp/b07c65.wgsl.expected.spvasm @@ -1,10 +1,9 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 32 ; 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" @@ -34,35 +33,34 @@ %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %19 = OpConstantNull %int - %20 = OpTypeFunction %v4float + %17 = OpConstantNull %int + %18 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %clamp_b07c65 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_int Function %19 - %13 = OpExtInst %int %15 SClamp %int_1 %int_1 %int_1 - OpStore %res %13 + %res = OpVariable %_ptr_Function_int Function %17 + OpStore %res %int_1 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %clamp_b07c65 +%vertex_main_inner = OpFunction %v4float None %18 + %20 = OpLabel + %21 = OpFunctionCall %void %clamp_b07c65 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %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 - %29 = OpLabel - %30 = OpFunctionCall %void %clamp_b07c65 + %27 = OpLabel + %28 = OpFunctionCall %void %clamp_b07c65 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %clamp_b07c65 + %30 = OpLabel + %31 = OpFunctionCall %void %clamp_b07c65 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl.expected.dxc.hlsl index e93fe0068b..948d108cc9 100644 --- a/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void clamp_bd43ce() { - uint4 res = clamp((1u).xxxx, (1u).xxxx, (1u).xxxx); + uint4 res = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl.expected.fxc.hlsl index e93fe0068b..948d108cc9 100644 --- a/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void clamp_bd43ce() { - uint4 res = clamp((1u).xxxx, (1u).xxxx, (1u).xxxx); + uint4 res = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl.expected.glsl b/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl.expected.glsl index 76aebae975..863d7125be 100644 --- a/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void clamp_bd43ce() { - uvec4 res = clamp(uvec4(1u), uvec4(1u), uvec4(1u)); + uvec4 res = uvec4(1u); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void clamp_bd43ce() { - uvec4 res = clamp(uvec4(1u), uvec4(1u), uvec4(1u)); + uvec4 res = uvec4(1u); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void clamp_bd43ce() { - uvec4 res = clamp(uvec4(1u), uvec4(1u), uvec4(1u)); + uvec4 res = uvec4(1u); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl.expected.msl b/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl.expected.msl index c9c7bc5f47..de1f5a6588 100644 --- a/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void clamp_bd43ce() { - uint4 res = clamp(uint4(1u), uint4(1u), uint4(1u)); + uint4 res = uint4(1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl.expected.spvasm index 984b292933..f08dc7b719 100644 --- a/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl.expected.spvasm @@ -1,10 +1,9 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 34 ; Schema: 0 OpCapability Shader - %16 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -34,37 +33,36 @@ %uint = OpTypeInt 32 0 %v4uint = OpTypeVector %uint 4 %uint_1 = OpConstant %uint 1 - %18 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %16 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %21 = OpConstantNull %v4uint - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v4uint + %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %clamp_bd43ce = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %21 - %13 = OpExtInst %v4uint %16 UClamp %18 %18 %18 - OpStore %res %13 + %res = OpVariable %_ptr_Function_v4uint Function %19 + OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %clamp_bd43ce +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %clamp_bd43ce OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %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 - %31 = OpLabel - %32 = OpFunctionCall %void %clamp_bd43ce + %29 = OpLabel + %30 = OpFunctionCall %void %clamp_bd43ce OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %clamp_bd43ce + %32 = OpLabel + %33 = OpFunctionCall %void %clamp_bd43ce OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/clamp/d396af.wgsl b/test/tint/builtins/gen/literal/clamp/d396af.wgsl new file mode 100644 index 0000000000..de2b9e51bf --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/d396af.wgsl @@ -0,0 +1,43 @@ +// Copyright 2021 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 clamp(vec<4, ia>, vec<4, ia>, vec<4, ia>) -> vec<4, ia> +fn clamp_d396af() { + var res = clamp(vec4(1.0), vec4(1.0), vec4(1.0)); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + clamp_d396af(); + return vec4(); +} + +@fragment +fn fragment_main() { + clamp_d396af(); +} + +@compute @workgroup_size(1) +fn compute_main() { + clamp_d396af(); +} diff --git a/test/tint/builtins/gen/literal/clamp/d396af.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/clamp/d396af.wgsl.expected.dxc.hlsl new file mode 100644 index 0000000000..1f04061838 --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/d396af.wgsl.expected.dxc.hlsl @@ -0,0 +1,30 @@ +void clamp_d396af() { + float4 res = (1.0f).xxxx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + clamp_d396af(); + 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() { + clamp_d396af(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + clamp_d396af(); + return; +} diff --git a/test/tint/builtins/gen/literal/clamp/d396af.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/clamp/d396af.wgsl.expected.fxc.hlsl new file mode 100644 index 0000000000..1f04061838 --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/d396af.wgsl.expected.fxc.hlsl @@ -0,0 +1,30 @@ +void clamp_d396af() { + float4 res = (1.0f).xxxx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + clamp_d396af(); + 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() { + clamp_d396af(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + clamp_d396af(); + return; +} diff --git a/test/tint/builtins/gen/literal/clamp/d396af.wgsl.expected.glsl b/test/tint/builtins/gen/literal/clamp/d396af.wgsl.expected.glsl new file mode 100644 index 0000000000..57aa0178bd --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/d396af.wgsl.expected.glsl @@ -0,0 +1,49 @@ +#version 310 es + +void clamp_d396af() { + vec4 res = vec4(1.0f); +} + +vec4 vertex_main() { + clamp_d396af(); + 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 clamp_d396af() { + vec4 res = vec4(1.0f); +} + +void fragment_main() { + clamp_d396af(); +} + +void main() { + fragment_main(); + return; +} +#version 310 es + +void clamp_d396af() { + vec4 res = vec4(1.0f); +} + +void compute_main() { + clamp_d396af(); +} + +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/clamp/d396af.wgsl.expected.msl b/test/tint/builtins/gen/literal/clamp/d396af.wgsl.expected.msl new file mode 100644 index 0000000000..3a1316e8a3 --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/d396af.wgsl.expected.msl @@ -0,0 +1,33 @@ +#include + +using namespace metal; +void clamp_d396af() { + float4 res = float4(1.0f); +} + +struct tint_symbol { + float4 value [[position]]; +}; + +float4 vertex_main_inner() { + clamp_d396af(); + 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() { + clamp_d396af(); + return; +} + +kernel void compute_main() { + clamp_d396af(); + return; +} + diff --git a/test/tint/builtins/gen/literal/clamp/d396af.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/clamp/d396af.wgsl.expected.spvasm new file mode 100644 index 0000000000..4403ee445a --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/d396af.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 %clamp_d396af "clamp_d396af" + 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 + %17 = OpTypeFunction %v4float +%clamp_d396af = 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 %clamp_d396af + 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 + %25 = OpLabel + %26 = OpFunctionCall %void %clamp_d396af + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %9 + %28 = OpLabel + %29 = OpFunctionCall %void %clamp_d396af + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/clamp/d396af.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/clamp/d396af.wgsl.expected.wgsl new file mode 100644 index 0000000000..973eb90b3d --- /dev/null +++ b/test/tint/builtins/gen/literal/clamp/d396af.wgsl.expected.wgsl @@ -0,0 +1,19 @@ +fn clamp_d396af() { + var res = clamp(vec4(1.0), vec4(1.0), vec4(1.0)); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + clamp_d396af(); + return vec4(); +} + +@fragment +fn fragment_main() { + clamp_d396af(); +} + +@compute @workgroup_size(1) +fn compute_main() { + clamp_d396af(); +} diff --git a/test/tint/builtins/gen/var/clamp/177548.wgsl b/test/tint/builtins/gen/var/clamp/177548.wgsl new file mode 100644 index 0000000000..8a92059fee --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/177548.wgsl @@ -0,0 +1,46 @@ +// Copyright 2021 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 clamp(vec<2, ia>, vec<2, ia>, vec<2, ia>) -> vec<2, ia> +fn clamp_177548() { + const arg_0 = vec2(1.0); + const arg_1 = vec2(1.0); + const arg_2 = vec2(1.0); + var res = clamp(arg_0, arg_1, arg_2); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + clamp_177548(); + return vec4(); +} + +@fragment +fn fragment_main() { + clamp_177548(); +} + +@compute @workgroup_size(1) +fn compute_main() { + clamp_177548(); +} diff --git a/test/tint/builtins/gen/var/clamp/177548.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/clamp/177548.wgsl.expected.dxc.hlsl new file mode 100644 index 0000000000..e6db476c70 --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/177548.wgsl.expected.dxc.hlsl @@ -0,0 +1,30 @@ +void clamp_177548() { + float2 res = (1.0f).xx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + clamp_177548(); + 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() { + clamp_177548(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + clamp_177548(); + return; +} diff --git a/test/tint/builtins/gen/var/clamp/177548.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/clamp/177548.wgsl.expected.fxc.hlsl new file mode 100644 index 0000000000..e6db476c70 --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/177548.wgsl.expected.fxc.hlsl @@ -0,0 +1,30 @@ +void clamp_177548() { + float2 res = (1.0f).xx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + clamp_177548(); + 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() { + clamp_177548(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + clamp_177548(); + return; +} diff --git a/test/tint/builtins/gen/var/clamp/177548.wgsl.expected.glsl b/test/tint/builtins/gen/var/clamp/177548.wgsl.expected.glsl new file mode 100644 index 0000000000..aef0c70f7c --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/177548.wgsl.expected.glsl @@ -0,0 +1,49 @@ +#version 310 es + +void clamp_177548() { + vec2 res = vec2(1.0f); +} + +vec4 vertex_main() { + clamp_177548(); + 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 clamp_177548() { + vec2 res = vec2(1.0f); +} + +void fragment_main() { + clamp_177548(); +} + +void main() { + fragment_main(); + return; +} +#version 310 es + +void clamp_177548() { + vec2 res = vec2(1.0f); +} + +void compute_main() { + clamp_177548(); +} + +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/clamp/177548.wgsl.expected.msl b/test/tint/builtins/gen/var/clamp/177548.wgsl.expected.msl new file mode 100644 index 0000000000..7c91b67871 --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/177548.wgsl.expected.msl @@ -0,0 +1,33 @@ +#include + +using namespace metal; +void clamp_177548() { + float2 res = float2(1.0f); +} + +struct tint_symbol { + float4 value [[position]]; +}; + +float4 vertex_main_inner() { + clamp_177548(); + 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() { + clamp_177548(); + return; +} + +kernel void compute_main() { + clamp_177548(); + return; +} + diff --git a/test/tint/builtins/gen/var/clamp/177548.wgsl.expected.spvasm b/test/tint/builtins/gen/var/clamp/177548.wgsl.expected.spvasm new file mode 100644 index 0000000000..2b2e5dc76e --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/177548.wgsl.expected.spvasm @@ -0,0 +1,66 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 32 +; 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 %clamp_177548 "clamp_177548" + 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 + %19 = OpTypeFunction %v4float +%clamp_177548 = 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 %clamp_177548 + 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 + %27 = OpLabel + %28 = OpFunctionCall %void %clamp_177548 + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %9 + %30 = OpLabel + %31 = OpFunctionCall %void %clamp_177548 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/clamp/177548.wgsl.expected.wgsl b/test/tint/builtins/gen/var/clamp/177548.wgsl.expected.wgsl new file mode 100644 index 0000000000..0562596b9f --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/177548.wgsl.expected.wgsl @@ -0,0 +1,22 @@ +fn clamp_177548() { + const arg_0 = vec2(1.0); + const arg_1 = vec2(1.0); + const arg_2 = vec2(1.0); + var res = clamp(arg_0, arg_1, arg_2); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + clamp_177548(); + return vec4(); +} + +@fragment +fn fragment_main() { + clamp_177548(); +} + +@compute @workgroup_size(1) +fn compute_main() { + clamp_177548(); +} diff --git a/test/tint/builtins/gen/var/clamp/23aa4f.wgsl b/test/tint/builtins/gen/var/clamp/23aa4f.wgsl new file mode 100644 index 0000000000..fee18f2f54 --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/23aa4f.wgsl @@ -0,0 +1,46 @@ +// Copyright 2021 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 clamp(fa, fa, fa) -> fa +fn clamp_23aa4f() { + const arg_0 = 1; + const arg_1 = 1; + const arg_2 = 1; + var res = clamp(arg_0, arg_1, arg_2); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + clamp_23aa4f(); + return vec4(); +} + +@fragment +fn fragment_main() { + clamp_23aa4f(); +} + +@compute @workgroup_size(1) +fn compute_main() { + clamp_23aa4f(); +} diff --git a/test/tint/builtins/gen/var/clamp/23aa4f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/clamp/23aa4f.wgsl.expected.dxc.hlsl new file mode 100644 index 0000000000..95967c6565 --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/23aa4f.wgsl.expected.dxc.hlsl @@ -0,0 +1,30 @@ +void clamp_23aa4f() { + int res = 1; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + clamp_23aa4f(); + 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() { + clamp_23aa4f(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + clamp_23aa4f(); + return; +} diff --git a/test/tint/builtins/gen/var/clamp/23aa4f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/clamp/23aa4f.wgsl.expected.fxc.hlsl new file mode 100644 index 0000000000..95967c6565 --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/23aa4f.wgsl.expected.fxc.hlsl @@ -0,0 +1,30 @@ +void clamp_23aa4f() { + int res = 1; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + clamp_23aa4f(); + 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() { + clamp_23aa4f(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + clamp_23aa4f(); + return; +} diff --git a/test/tint/builtins/gen/var/clamp/23aa4f.wgsl.expected.glsl b/test/tint/builtins/gen/var/clamp/23aa4f.wgsl.expected.glsl new file mode 100644 index 0000000000..745c8d9039 --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/23aa4f.wgsl.expected.glsl @@ -0,0 +1,49 @@ +#version 310 es + +void clamp_23aa4f() { + int res = 1; +} + +vec4 vertex_main() { + clamp_23aa4f(); + 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 clamp_23aa4f() { + int res = 1; +} + +void fragment_main() { + clamp_23aa4f(); +} + +void main() { + fragment_main(); + return; +} +#version 310 es + +void clamp_23aa4f() { + int res = 1; +} + +void compute_main() { + clamp_23aa4f(); +} + +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/clamp/23aa4f.wgsl.expected.msl b/test/tint/builtins/gen/var/clamp/23aa4f.wgsl.expected.msl new file mode 100644 index 0000000000..e6b476f7e2 --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/23aa4f.wgsl.expected.msl @@ -0,0 +1,33 @@ +#include + +using namespace metal; +void clamp_23aa4f() { + int res = 1; +} + +struct tint_symbol { + float4 value [[position]]; +}; + +float4 vertex_main_inner() { + clamp_23aa4f(); + 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() { + clamp_23aa4f(); + return; +} + +kernel void compute_main() { + clamp_23aa4f(); + return; +} + diff --git a/test/tint/builtins/gen/var/clamp/23aa4f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/clamp/23aa4f.wgsl.expected.spvasm new file mode 100644 index 0000000000..9e7f69b6f4 --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/23aa4f.wgsl.expected.spvasm @@ -0,0 +1,66 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 32 +; 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 %clamp_23aa4f "clamp_23aa4f" + 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 + %18 = OpTypeFunction %v4float + %float_1 = OpConstant %float 1 +%clamp_23aa4f = OpFunction %void None %9 + %12 = OpLabel + %res = OpVariable %_ptr_Function_int Function %17 + OpStore %res %int_1 + OpReturn + OpFunctionEnd +%vertex_main_inner = OpFunction %v4float None %18 + %20 = OpLabel + %21 = OpFunctionCall %void %clamp_23aa4f + 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 %clamp_23aa4f + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %9 + %30 = OpLabel + %31 = OpFunctionCall %void %clamp_23aa4f + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/clamp/23aa4f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/clamp/23aa4f.wgsl.expected.wgsl new file mode 100644 index 0000000000..4024be1627 --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/23aa4f.wgsl.expected.wgsl @@ -0,0 +1,22 @@ +fn clamp_23aa4f() { + const arg_0 = 1; + const arg_1 = 1; + const arg_2 = 1; + var res = clamp(arg_0, arg_1, arg_2); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + clamp_23aa4f(); + return vec4(); +} + +@fragment +fn fragment_main() { + clamp_23aa4f(); +} + +@compute @workgroup_size(1) +fn compute_main() { + clamp_23aa4f(); +} diff --git a/test/tint/builtins/gen/var/clamp/5cf700.wgsl b/test/tint/builtins/gen/var/clamp/5cf700.wgsl new file mode 100644 index 0000000000..d39f7096e1 --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/5cf700.wgsl @@ -0,0 +1,46 @@ +// Copyright 2021 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 clamp(vec<3, fa>, vec<3, fa>, vec<3, fa>) -> vec<3, fa> +fn clamp_5cf700() { + const arg_0 = vec3(1); + const arg_1 = vec3(1); + const arg_2 = vec3(1); + var res = clamp(arg_0, arg_1, arg_2); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + clamp_5cf700(); + return vec4(); +} + +@fragment +fn fragment_main() { + clamp_5cf700(); +} + +@compute @workgroup_size(1) +fn compute_main() { + clamp_5cf700(); +} diff --git a/test/tint/builtins/gen/var/clamp/5cf700.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/clamp/5cf700.wgsl.expected.dxc.hlsl new file mode 100644 index 0000000000..06d6121193 --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/5cf700.wgsl.expected.dxc.hlsl @@ -0,0 +1,30 @@ +void clamp_5cf700() { + int3 res = (1).xxx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + clamp_5cf700(); + 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() { + clamp_5cf700(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + clamp_5cf700(); + return; +} diff --git a/test/tint/builtins/gen/var/clamp/5cf700.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/clamp/5cf700.wgsl.expected.fxc.hlsl new file mode 100644 index 0000000000..06d6121193 --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/5cf700.wgsl.expected.fxc.hlsl @@ -0,0 +1,30 @@ +void clamp_5cf700() { + int3 res = (1).xxx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + clamp_5cf700(); + 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() { + clamp_5cf700(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + clamp_5cf700(); + return; +} diff --git a/test/tint/builtins/gen/var/clamp/5cf700.wgsl.expected.glsl b/test/tint/builtins/gen/var/clamp/5cf700.wgsl.expected.glsl new file mode 100644 index 0000000000..a1ce57531a --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/5cf700.wgsl.expected.glsl @@ -0,0 +1,49 @@ +#version 310 es + +void clamp_5cf700() { + ivec3 res = ivec3(1); +} + +vec4 vertex_main() { + clamp_5cf700(); + 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 clamp_5cf700() { + ivec3 res = ivec3(1); +} + +void fragment_main() { + clamp_5cf700(); +} + +void main() { + fragment_main(); + return; +} +#version 310 es + +void clamp_5cf700() { + ivec3 res = ivec3(1); +} + +void compute_main() { + clamp_5cf700(); +} + +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/clamp/5cf700.wgsl.expected.msl b/test/tint/builtins/gen/var/clamp/5cf700.wgsl.expected.msl new file mode 100644 index 0000000000..55c384c198 --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/5cf700.wgsl.expected.msl @@ -0,0 +1,33 @@ +#include + +using namespace metal; +void clamp_5cf700() { + int3 res = int3(1); +} + +struct tint_symbol { + float4 value [[position]]; +}; + +float4 vertex_main_inner() { + clamp_5cf700(); + 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() { + clamp_5cf700(); + return; +} + +kernel void compute_main() { + clamp_5cf700(); + return; +} + diff --git a/test/tint/builtins/gen/var/clamp/5cf700.wgsl.expected.spvasm b/test/tint/builtins/gen/var/clamp/5cf700.wgsl.expected.spvasm new file mode 100644 index 0000000000..3b26acae61 --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/5cf700.wgsl.expected.spvasm @@ -0,0 +1,68 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 34 +; 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 %clamp_5cf700 "clamp_5cf700" + 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 + %20 = OpTypeFunction %v4float + %float_1 = OpConstant %float 1 +%clamp_5cf700 = OpFunction %void None %9 + %12 = OpLabel + %res = OpVariable %_ptr_Function_v3int Function %19 + OpStore %res %16 + OpReturn + OpFunctionEnd +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %clamp_5cf700 + 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 %clamp_5cf700 + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %9 + %32 = OpLabel + %33 = OpFunctionCall %void %clamp_5cf700 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/clamp/5cf700.wgsl.expected.wgsl b/test/tint/builtins/gen/var/clamp/5cf700.wgsl.expected.wgsl new file mode 100644 index 0000000000..d0f4e504fd --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/5cf700.wgsl.expected.wgsl @@ -0,0 +1,22 @@ +fn clamp_5cf700() { + const arg_0 = vec3(1); + const arg_1 = vec3(1); + const arg_2 = vec3(1); + var res = clamp(arg_0, arg_1, arg_2); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + clamp_5cf700(); + return vec4(); +} + +@fragment +fn fragment_main() { + clamp_5cf700(); +} + +@compute @workgroup_size(1) +fn compute_main() { + clamp_5cf700(); +} diff --git a/test/tint/builtins/gen/var/clamp/87df46.wgsl b/test/tint/builtins/gen/var/clamp/87df46.wgsl new file mode 100644 index 0000000000..8b27e0f52d --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/87df46.wgsl @@ -0,0 +1,46 @@ +// Copyright 2021 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 clamp(vec<4, fa>, vec<4, fa>, vec<4, fa>) -> vec<4, fa> +fn clamp_87df46() { + const arg_0 = vec4(1); + const arg_1 = vec4(1); + const arg_2 = vec4(1); + var res = clamp(arg_0, arg_1, arg_2); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + clamp_87df46(); + return vec4(); +} + +@fragment +fn fragment_main() { + clamp_87df46(); +} + +@compute @workgroup_size(1) +fn compute_main() { + clamp_87df46(); +} diff --git a/test/tint/builtins/gen/var/clamp/87df46.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/clamp/87df46.wgsl.expected.dxc.hlsl new file mode 100644 index 0000000000..8af196a973 --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/87df46.wgsl.expected.dxc.hlsl @@ -0,0 +1,30 @@ +void clamp_87df46() { + int4 res = (1).xxxx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + clamp_87df46(); + 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() { + clamp_87df46(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + clamp_87df46(); + return; +} diff --git a/test/tint/builtins/gen/var/clamp/87df46.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/clamp/87df46.wgsl.expected.fxc.hlsl new file mode 100644 index 0000000000..8af196a973 --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/87df46.wgsl.expected.fxc.hlsl @@ -0,0 +1,30 @@ +void clamp_87df46() { + int4 res = (1).xxxx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + clamp_87df46(); + 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() { + clamp_87df46(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + clamp_87df46(); + return; +} diff --git a/test/tint/builtins/gen/var/clamp/87df46.wgsl.expected.glsl b/test/tint/builtins/gen/var/clamp/87df46.wgsl.expected.glsl new file mode 100644 index 0000000000..b3db98f4e6 --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/87df46.wgsl.expected.glsl @@ -0,0 +1,49 @@ +#version 310 es + +void clamp_87df46() { + ivec4 res = ivec4(1); +} + +vec4 vertex_main() { + clamp_87df46(); + 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 clamp_87df46() { + ivec4 res = ivec4(1); +} + +void fragment_main() { + clamp_87df46(); +} + +void main() { + fragment_main(); + return; +} +#version 310 es + +void clamp_87df46() { + ivec4 res = ivec4(1); +} + +void compute_main() { + clamp_87df46(); +} + +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/clamp/87df46.wgsl.expected.msl b/test/tint/builtins/gen/var/clamp/87df46.wgsl.expected.msl new file mode 100644 index 0000000000..62aa4bb0a3 --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/87df46.wgsl.expected.msl @@ -0,0 +1,33 @@ +#include + +using namespace metal; +void clamp_87df46() { + int4 res = int4(1); +} + +struct tint_symbol { + float4 value [[position]]; +}; + +float4 vertex_main_inner() { + clamp_87df46(); + 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() { + clamp_87df46(); + return; +} + +kernel void compute_main() { + clamp_87df46(); + return; +} + diff --git a/test/tint/builtins/gen/var/clamp/87df46.wgsl.expected.spvasm b/test/tint/builtins/gen/var/clamp/87df46.wgsl.expected.spvasm new file mode 100644 index 0000000000..0e036506bf --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/87df46.wgsl.expected.spvasm @@ -0,0 +1,68 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 34 +; 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 %clamp_87df46 "clamp_87df46" + 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 + %20 = OpTypeFunction %v4float + %float_1 = OpConstant %float 1 +%clamp_87df46 = OpFunction %void None %9 + %12 = OpLabel + %res = OpVariable %_ptr_Function_v4int Function %19 + OpStore %res %16 + OpReturn + OpFunctionEnd +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %clamp_87df46 + 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 %clamp_87df46 + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %9 + %32 = OpLabel + %33 = OpFunctionCall %void %clamp_87df46 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/clamp/87df46.wgsl.expected.wgsl b/test/tint/builtins/gen/var/clamp/87df46.wgsl.expected.wgsl new file mode 100644 index 0000000000..ae5d00e8e0 --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/87df46.wgsl.expected.wgsl @@ -0,0 +1,22 @@ +fn clamp_87df46() { + const arg_0 = vec4(1); + const arg_1 = vec4(1); + const arg_2 = vec4(1); + var res = clamp(arg_0, arg_1, arg_2); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + clamp_87df46(); + return vec4(); +} + +@fragment +fn fragment_main() { + clamp_87df46(); +} + +@compute @workgroup_size(1) +fn compute_main() { + clamp_87df46(); +} diff --git a/test/tint/builtins/gen/var/clamp/8b1eaa.wgsl b/test/tint/builtins/gen/var/clamp/8b1eaa.wgsl new file mode 100644 index 0000000000..6ffecf3c27 --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/8b1eaa.wgsl @@ -0,0 +1,46 @@ +// Copyright 2021 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 clamp(vec<3, ia>, vec<3, ia>, vec<3, ia>) -> vec<3, ia> +fn clamp_8b1eaa() { + const arg_0 = vec3(1.0); + const arg_1 = vec3(1.0); + const arg_2 = vec3(1.0); + var res = clamp(arg_0, arg_1, arg_2); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + clamp_8b1eaa(); + return vec4(); +} + +@fragment +fn fragment_main() { + clamp_8b1eaa(); +} + +@compute @workgroup_size(1) +fn compute_main() { + clamp_8b1eaa(); +} diff --git a/test/tint/builtins/gen/var/clamp/8b1eaa.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/clamp/8b1eaa.wgsl.expected.dxc.hlsl new file mode 100644 index 0000000000..8270dd1e8a --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/8b1eaa.wgsl.expected.dxc.hlsl @@ -0,0 +1,30 @@ +void clamp_8b1eaa() { + float3 res = (1.0f).xxx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + clamp_8b1eaa(); + 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() { + clamp_8b1eaa(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + clamp_8b1eaa(); + return; +} diff --git a/test/tint/builtins/gen/var/clamp/8b1eaa.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/clamp/8b1eaa.wgsl.expected.fxc.hlsl new file mode 100644 index 0000000000..8270dd1e8a --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/8b1eaa.wgsl.expected.fxc.hlsl @@ -0,0 +1,30 @@ +void clamp_8b1eaa() { + float3 res = (1.0f).xxx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + clamp_8b1eaa(); + 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() { + clamp_8b1eaa(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + clamp_8b1eaa(); + return; +} diff --git a/test/tint/builtins/gen/var/clamp/8b1eaa.wgsl.expected.glsl b/test/tint/builtins/gen/var/clamp/8b1eaa.wgsl.expected.glsl new file mode 100644 index 0000000000..6729165a11 --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/8b1eaa.wgsl.expected.glsl @@ -0,0 +1,49 @@ +#version 310 es + +void clamp_8b1eaa() { + vec3 res = vec3(1.0f); +} + +vec4 vertex_main() { + clamp_8b1eaa(); + 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 clamp_8b1eaa() { + vec3 res = vec3(1.0f); +} + +void fragment_main() { + clamp_8b1eaa(); +} + +void main() { + fragment_main(); + return; +} +#version 310 es + +void clamp_8b1eaa() { + vec3 res = vec3(1.0f); +} + +void compute_main() { + clamp_8b1eaa(); +} + +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/clamp/8b1eaa.wgsl.expected.msl b/test/tint/builtins/gen/var/clamp/8b1eaa.wgsl.expected.msl new file mode 100644 index 0000000000..786aaaa128 --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/8b1eaa.wgsl.expected.msl @@ -0,0 +1,33 @@ +#include + +using namespace metal; +void clamp_8b1eaa() { + float3 res = float3(1.0f); +} + +struct tint_symbol { + float4 value [[position]]; +}; + +float4 vertex_main_inner() { + clamp_8b1eaa(); + 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() { + clamp_8b1eaa(); + return; +} + +kernel void compute_main() { + clamp_8b1eaa(); + return; +} + diff --git a/test/tint/builtins/gen/var/clamp/8b1eaa.wgsl.expected.spvasm b/test/tint/builtins/gen/var/clamp/8b1eaa.wgsl.expected.spvasm new file mode 100644 index 0000000000..faa36f5c9e --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/8b1eaa.wgsl.expected.spvasm @@ -0,0 +1,66 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 32 +; 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 %clamp_8b1eaa "clamp_8b1eaa" + 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 + %19 = OpTypeFunction %v4float +%clamp_8b1eaa = 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 %clamp_8b1eaa + 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 + %27 = OpLabel + %28 = OpFunctionCall %void %clamp_8b1eaa + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %9 + %30 = OpLabel + %31 = OpFunctionCall %void %clamp_8b1eaa + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/clamp/8b1eaa.wgsl.expected.wgsl b/test/tint/builtins/gen/var/clamp/8b1eaa.wgsl.expected.wgsl new file mode 100644 index 0000000000..f61ad358c1 --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/8b1eaa.wgsl.expected.wgsl @@ -0,0 +1,22 @@ +fn clamp_8b1eaa() { + const arg_0 = vec3(1.0); + const arg_1 = vec3(1.0); + const arg_2 = vec3(1.0); + var res = clamp(arg_0, arg_1, arg_2); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + clamp_8b1eaa(); + return vec4(); +} + +@fragment +fn fragment_main() { + clamp_8b1eaa(); +} + +@compute @workgroup_size(1) +fn compute_main() { + clamp_8b1eaa(); +} diff --git a/test/tint/builtins/gen/var/clamp/96e56a.wgsl b/test/tint/builtins/gen/var/clamp/96e56a.wgsl new file mode 100644 index 0000000000..e53292c7dc --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/96e56a.wgsl @@ -0,0 +1,46 @@ +// Copyright 2021 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 clamp(ia, ia, ia) -> ia +fn clamp_96e56a() { + const arg_0 = 1.0; + const arg_1 = 1.0; + const arg_2 = 1.0; + var res = clamp(arg_0, arg_1, arg_2); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + clamp_96e56a(); + return vec4(); +} + +@fragment +fn fragment_main() { + clamp_96e56a(); +} + +@compute @workgroup_size(1) +fn compute_main() { + clamp_96e56a(); +} diff --git a/test/tint/builtins/gen/var/clamp/96e56a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/clamp/96e56a.wgsl.expected.dxc.hlsl new file mode 100644 index 0000000000..6231928d78 --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/96e56a.wgsl.expected.dxc.hlsl @@ -0,0 +1,30 @@ +void clamp_96e56a() { + float res = 1.0f; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + clamp_96e56a(); + 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() { + clamp_96e56a(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + clamp_96e56a(); + return; +} diff --git a/test/tint/builtins/gen/var/clamp/96e56a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/clamp/96e56a.wgsl.expected.fxc.hlsl new file mode 100644 index 0000000000..6231928d78 --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/96e56a.wgsl.expected.fxc.hlsl @@ -0,0 +1,30 @@ +void clamp_96e56a() { + float res = 1.0f; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + clamp_96e56a(); + 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() { + clamp_96e56a(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + clamp_96e56a(); + return; +} diff --git a/test/tint/builtins/gen/var/clamp/96e56a.wgsl.expected.glsl b/test/tint/builtins/gen/var/clamp/96e56a.wgsl.expected.glsl new file mode 100644 index 0000000000..c7dbb9bdc3 --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/96e56a.wgsl.expected.glsl @@ -0,0 +1,49 @@ +#version 310 es + +void clamp_96e56a() { + float res = 1.0f; +} + +vec4 vertex_main() { + clamp_96e56a(); + 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 clamp_96e56a() { + float res = 1.0f; +} + +void fragment_main() { + clamp_96e56a(); +} + +void main() { + fragment_main(); + return; +} +#version 310 es + +void clamp_96e56a() { + float res = 1.0f; +} + +void compute_main() { + clamp_96e56a(); +} + +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/clamp/96e56a.wgsl.expected.msl b/test/tint/builtins/gen/var/clamp/96e56a.wgsl.expected.msl new file mode 100644 index 0000000000..a28781ca2c --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/96e56a.wgsl.expected.msl @@ -0,0 +1,33 @@ +#include + +using namespace metal; +void clamp_96e56a() { + float res = 1.0f; +} + +struct tint_symbol { + float4 value [[position]]; +}; + +float4 vertex_main_inner() { + clamp_96e56a(); + 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() { + clamp_96e56a(); + return; +} + +kernel void compute_main() { + clamp_96e56a(); + return; +} + diff --git a/test/tint/builtins/gen/var/clamp/96e56a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/clamp/96e56a.wgsl.expected.spvasm new file mode 100644 index 0000000000..07544da303 --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/96e56a.wgsl.expected.spvasm @@ -0,0 +1,63 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 29 +; 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 %clamp_96e56a "clamp_96e56a" + 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 + %16 = OpTypeFunction %v4float +%clamp_96e56a = OpFunction %void None %9 + %12 = OpLabel + %res = OpVariable %_ptr_Function_float Function %8 + OpStore %res %float_1 + OpReturn + OpFunctionEnd +%vertex_main_inner = OpFunction %v4float None %16 + %18 = OpLabel + %19 = OpFunctionCall %void %clamp_96e56a + 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 + %24 = OpLabel + %25 = OpFunctionCall %void %clamp_96e56a + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %9 + %27 = OpLabel + %28 = OpFunctionCall %void %clamp_96e56a + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/clamp/96e56a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/clamp/96e56a.wgsl.expected.wgsl new file mode 100644 index 0000000000..d6007ca80f --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/96e56a.wgsl.expected.wgsl @@ -0,0 +1,22 @@ +fn clamp_96e56a() { + const arg_0 = 1.0; + const arg_1 = 1.0; + const arg_2 = 1.0; + var res = clamp(arg_0, arg_1, arg_2); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + clamp_96e56a(); + return vec4(); +} + +@fragment +fn fragment_main() { + clamp_96e56a(); +} + +@compute @workgroup_size(1) +fn compute_main() { + clamp_96e56a(); +} diff --git a/test/tint/builtins/gen/var/clamp/9d731c.wgsl b/test/tint/builtins/gen/var/clamp/9d731c.wgsl new file mode 100644 index 0000000000..c86c2689a3 --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/9d731c.wgsl @@ -0,0 +1,46 @@ +// Copyright 2021 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 clamp(vec<2, fa>, vec<2, fa>, vec<2, fa>) -> vec<2, fa> +fn clamp_9d731c() { + const arg_0 = vec2(1); + const arg_1 = vec2(1); + const arg_2 = vec2(1); + var res = clamp(arg_0, arg_1, arg_2); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + clamp_9d731c(); + return vec4(); +} + +@fragment +fn fragment_main() { + clamp_9d731c(); +} + +@compute @workgroup_size(1) +fn compute_main() { + clamp_9d731c(); +} diff --git a/test/tint/builtins/gen/var/clamp/9d731c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/clamp/9d731c.wgsl.expected.dxc.hlsl new file mode 100644 index 0000000000..25efa1a8e9 --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/9d731c.wgsl.expected.dxc.hlsl @@ -0,0 +1,30 @@ +void clamp_9d731c() { + int2 res = (1).xx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + clamp_9d731c(); + 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() { + clamp_9d731c(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + clamp_9d731c(); + return; +} diff --git a/test/tint/builtins/gen/var/clamp/9d731c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/clamp/9d731c.wgsl.expected.fxc.hlsl new file mode 100644 index 0000000000..25efa1a8e9 --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/9d731c.wgsl.expected.fxc.hlsl @@ -0,0 +1,30 @@ +void clamp_9d731c() { + int2 res = (1).xx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + clamp_9d731c(); + 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() { + clamp_9d731c(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + clamp_9d731c(); + return; +} diff --git a/test/tint/builtins/gen/var/clamp/9d731c.wgsl.expected.glsl b/test/tint/builtins/gen/var/clamp/9d731c.wgsl.expected.glsl new file mode 100644 index 0000000000..8f283b5ee4 --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/9d731c.wgsl.expected.glsl @@ -0,0 +1,49 @@ +#version 310 es + +void clamp_9d731c() { + ivec2 res = ivec2(1); +} + +vec4 vertex_main() { + clamp_9d731c(); + 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 clamp_9d731c() { + ivec2 res = ivec2(1); +} + +void fragment_main() { + clamp_9d731c(); +} + +void main() { + fragment_main(); + return; +} +#version 310 es + +void clamp_9d731c() { + ivec2 res = ivec2(1); +} + +void compute_main() { + clamp_9d731c(); +} + +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/clamp/9d731c.wgsl.expected.msl b/test/tint/builtins/gen/var/clamp/9d731c.wgsl.expected.msl new file mode 100644 index 0000000000..5a78c71ece --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/9d731c.wgsl.expected.msl @@ -0,0 +1,33 @@ +#include + +using namespace metal; +void clamp_9d731c() { + int2 res = int2(1); +} + +struct tint_symbol { + float4 value [[position]]; +}; + +float4 vertex_main_inner() { + clamp_9d731c(); + 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() { + clamp_9d731c(); + return; +} + +kernel void compute_main() { + clamp_9d731c(); + return; +} + diff --git a/test/tint/builtins/gen/var/clamp/9d731c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/clamp/9d731c.wgsl.expected.spvasm new file mode 100644 index 0000000000..533a9b057d --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/9d731c.wgsl.expected.spvasm @@ -0,0 +1,68 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 34 +; 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 %clamp_9d731c "clamp_9d731c" + 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 + %20 = OpTypeFunction %v4float + %float_1 = OpConstant %float 1 +%clamp_9d731c = OpFunction %void None %9 + %12 = OpLabel + %res = OpVariable %_ptr_Function_v2int Function %19 + OpStore %res %16 + OpReturn + OpFunctionEnd +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %clamp_9d731c + 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 %clamp_9d731c + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %9 + %32 = OpLabel + %33 = OpFunctionCall %void %clamp_9d731c + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/clamp/9d731c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/clamp/9d731c.wgsl.expected.wgsl new file mode 100644 index 0000000000..54adf9a63c --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/9d731c.wgsl.expected.wgsl @@ -0,0 +1,22 @@ +fn clamp_9d731c() { + const arg_0 = vec2(1); + const arg_1 = vec2(1); + const arg_2 = vec2(1); + var res = clamp(arg_0, arg_1, arg_2); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + clamp_9d731c(); + return vec4(); +} + +@fragment +fn fragment_main() { + clamp_9d731c(); +} + +@compute @workgroup_size(1) +fn compute_main() { + clamp_9d731c(); +} diff --git a/test/tint/builtins/gen/var/clamp/d396af.wgsl b/test/tint/builtins/gen/var/clamp/d396af.wgsl new file mode 100644 index 0000000000..6c43a0ccca --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/d396af.wgsl @@ -0,0 +1,46 @@ +// Copyright 2021 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 clamp(vec<4, ia>, vec<4, ia>, vec<4, ia>) -> vec<4, ia> +fn clamp_d396af() { + const arg_0 = vec4(1.0); + const arg_1 = vec4(1.0); + const arg_2 = vec4(1.0); + var res = clamp(arg_0, arg_1, arg_2); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + clamp_d396af(); + return vec4(); +} + +@fragment +fn fragment_main() { + clamp_d396af(); +} + +@compute @workgroup_size(1) +fn compute_main() { + clamp_d396af(); +} diff --git a/test/tint/builtins/gen/var/clamp/d396af.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/clamp/d396af.wgsl.expected.dxc.hlsl new file mode 100644 index 0000000000..1f04061838 --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/d396af.wgsl.expected.dxc.hlsl @@ -0,0 +1,30 @@ +void clamp_d396af() { + float4 res = (1.0f).xxxx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + clamp_d396af(); + 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() { + clamp_d396af(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + clamp_d396af(); + return; +} diff --git a/test/tint/builtins/gen/var/clamp/d396af.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/clamp/d396af.wgsl.expected.fxc.hlsl new file mode 100644 index 0000000000..1f04061838 --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/d396af.wgsl.expected.fxc.hlsl @@ -0,0 +1,30 @@ +void clamp_d396af() { + float4 res = (1.0f).xxxx; +} + +struct tint_symbol { + float4 value : SV_Position; +}; + +float4 vertex_main_inner() { + clamp_d396af(); + 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() { + clamp_d396af(); + return; +} + +[numthreads(1, 1, 1)] +void compute_main() { + clamp_d396af(); + return; +} diff --git a/test/tint/builtins/gen/var/clamp/d396af.wgsl.expected.glsl b/test/tint/builtins/gen/var/clamp/d396af.wgsl.expected.glsl new file mode 100644 index 0000000000..57aa0178bd --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/d396af.wgsl.expected.glsl @@ -0,0 +1,49 @@ +#version 310 es + +void clamp_d396af() { + vec4 res = vec4(1.0f); +} + +vec4 vertex_main() { + clamp_d396af(); + 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 clamp_d396af() { + vec4 res = vec4(1.0f); +} + +void fragment_main() { + clamp_d396af(); +} + +void main() { + fragment_main(); + return; +} +#version 310 es + +void clamp_d396af() { + vec4 res = vec4(1.0f); +} + +void compute_main() { + clamp_d396af(); +} + +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/clamp/d396af.wgsl.expected.msl b/test/tint/builtins/gen/var/clamp/d396af.wgsl.expected.msl new file mode 100644 index 0000000000..3a1316e8a3 --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/d396af.wgsl.expected.msl @@ -0,0 +1,33 @@ +#include + +using namespace metal; +void clamp_d396af() { + float4 res = float4(1.0f); +} + +struct tint_symbol { + float4 value [[position]]; +}; + +float4 vertex_main_inner() { + clamp_d396af(); + 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() { + clamp_d396af(); + return; +} + +kernel void compute_main() { + clamp_d396af(); + return; +} + diff --git a/test/tint/builtins/gen/var/clamp/d396af.wgsl.expected.spvasm b/test/tint/builtins/gen/var/clamp/d396af.wgsl.expected.spvasm new file mode 100644 index 0000000000..4403ee445a --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/d396af.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 %clamp_d396af "clamp_d396af" + 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 + %17 = OpTypeFunction %v4float +%clamp_d396af = 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 %clamp_d396af + 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 + %25 = OpLabel + %26 = OpFunctionCall %void %clamp_d396af + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %9 + %28 = OpLabel + %29 = OpFunctionCall %void %clamp_d396af + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/clamp/d396af.wgsl.expected.wgsl b/test/tint/builtins/gen/var/clamp/d396af.wgsl.expected.wgsl new file mode 100644 index 0000000000..fd665f6fb6 --- /dev/null +++ b/test/tint/builtins/gen/var/clamp/d396af.wgsl.expected.wgsl @@ -0,0 +1,22 @@ +fn clamp_d396af() { + const arg_0 = vec4(1.0); + const arg_1 = vec4(1.0); + const arg_2 = vec4(1.0); + var res = clamp(arg_0, arg_1, arg_2); +} + +@vertex +fn vertex_main() -> @builtin(position) vec4 { + clamp_d396af(); + return vec4(); +} + +@fragment +fn fragment_main() { + clamp_d396af(); +} + +@compute @workgroup_size(1) +fn compute_main() { + clamp_d396af(); +}