From fd1b5a893d822c79d1038e688f6e0113c1d3d631 Mon Sep 17 00:00:00 2001 From: dan sinclair Date: Fri, 28 Oct 2022 12:31:08 +0000 Subject: [PATCH] Set specific test value for asin test cases. The value of 1 for the `asin` is providing a slightly different result on OSX compared to the Windows and Linux results. This CL updates the test case to use asin(0.479425538604) = 0.5 Bug: tint:1581 Change-Id: Ibf7a921d1476c0d24da696eb6cc2b491c1ca1516 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/107541 Commit-Queue: Dan Sinclair Kokoro: Kokoro Reviewed-by: Antonio Maiorano --- src/tint/intrinsics.def | 4 ++-- src/tint/resolver/intrinsic_table.inl | 4 ++-- test/tint/builtins/gen/literal/asin/064953.wgsl | 2 +- .../literal/asin/064953.wgsl.expected.dxc.hlsl | 2 +- .../literal/asin/064953.wgsl.expected.fxc.hlsl | 2 +- .../gen/literal/asin/064953.wgsl.expected.glsl | 6 +++--- .../gen/literal/asin/064953.wgsl.expected.msl | 2 +- .../gen/literal/asin/064953.wgsl.expected.spvasm | 4 ++-- .../gen/literal/asin/064953.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/literal/asin/0bac07.wgsl | 2 +- .../literal/asin/0bac07.wgsl.expected.dxc.hlsl | 2 +- .../literal/asin/0bac07.wgsl.expected.fxc.hlsl | 2 +- .../gen/literal/asin/0bac07.wgsl.expected.glsl | 6 +++--- .../gen/literal/asin/0bac07.wgsl.expected.msl | 2 +- .../gen/literal/asin/0bac07.wgsl.expected.spvasm | 4 ++-- .../gen/literal/asin/0bac07.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/literal/asin/64bb1f.wgsl | 2 +- .../literal/asin/64bb1f.wgsl.expected.dxc.hlsl | 2 +- .../literal/asin/64bb1f.wgsl.expected.fxc.hlsl | 2 +- .../gen/literal/asin/64bb1f.wgsl.expected.glsl | 6 +++--- .../gen/literal/asin/64bb1f.wgsl.expected.msl | 2 +- .../gen/literal/asin/64bb1f.wgsl.expected.spvasm | 4 ++-- .../gen/literal/asin/64bb1f.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/literal/asin/7b6a44.wgsl | 2 +- .../literal/asin/7b6a44.wgsl.expected.dxc.hlsl | 2 +- .../literal/asin/7b6a44.wgsl.expected.fxc.hlsl | 2 +- .../gen/literal/asin/7b6a44.wgsl.expected.glsl | 6 +++--- .../gen/literal/asin/7b6a44.wgsl.expected.msl | 2 +- .../gen/literal/asin/7b6a44.wgsl.expected.spvasm | 4 ++-- .../gen/literal/asin/7b6a44.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/literal/asin/8cd9c9.wgsl | 2 +- .../literal/asin/8cd9c9.wgsl.expected.dxc.hlsl | 2 +- .../literal/asin/8cd9c9.wgsl.expected.fxc.hlsl | 2 +- .../gen/literal/asin/8cd9c9.wgsl.expected.glsl | 6 +++--- .../gen/literal/asin/8cd9c9.wgsl.expected.msl | 2 +- .../gen/literal/asin/8cd9c9.wgsl.expected.spvasm | 4 ++-- .../gen/literal/asin/8cd9c9.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/literal/asin/a5dd88.wgsl | 2 +- .../literal/asin/a5dd88.wgsl.expected.dxc.hlsl | 2 +- .../literal/asin/a5dd88.wgsl.expected.fxc.hlsl | 2 +- .../gen/literal/asin/a5dd88.wgsl.expected.glsl | 6 +++--- .../gen/literal/asin/a5dd88.wgsl.expected.msl | 2 +- .../gen/literal/asin/a5dd88.wgsl.expected.spvasm | 4 ++-- .../gen/literal/asin/a5dd88.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/literal/asin/a6d73a.wgsl | 2 +- .../literal/asin/a6d73a.wgsl.expected.dxc.hlsl | 2 +- .../literal/asin/a6d73a.wgsl.expected.fxc.hlsl | 2 +- .../gen/literal/asin/a6d73a.wgsl.expected.glsl | 6 +++--- .../gen/literal/asin/a6d73a.wgsl.expected.msl | 2 +- .../gen/literal/asin/a6d73a.wgsl.expected.spvasm | 4 ++-- .../gen/literal/asin/a6d73a.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/literal/asin/c0c272.wgsl | 2 +- .../literal/asin/c0c272.wgsl.expected.dxc.hlsl | 2 +- .../literal/asin/c0c272.wgsl.expected.fxc.hlsl | 2 +- .../gen/literal/asin/c0c272.wgsl.expected.glsl | 6 +++--- .../gen/literal/asin/c0c272.wgsl.expected.msl | 2 +- .../gen/literal/asin/c0c272.wgsl.expected.spvasm | 4 ++-- .../gen/literal/asin/c0c272.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/asin/064953.wgsl | 2 +- .../gen/var/asin/064953.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/asin/064953.wgsl.expected.fxc.hlsl | 2 +- .../gen/var/asin/064953.wgsl.expected.glsl | 6 +++--- .../gen/var/asin/064953.wgsl.expected.msl | 2 +- .../gen/var/asin/064953.wgsl.expected.spvasm | 15 ++++++++------- .../gen/var/asin/064953.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/asin/0bac07.wgsl | 2 +- .../gen/var/asin/0bac07.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/asin/0bac07.wgsl.expected.fxc.hlsl | 2 +- .../gen/var/asin/0bac07.wgsl.expected.glsl | 6 +++--- .../gen/var/asin/0bac07.wgsl.expected.msl | 2 +- .../gen/var/asin/0bac07.wgsl.expected.spvasm | 4 ++-- .../gen/var/asin/0bac07.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/asin/64bb1f.wgsl | 2 +- .../gen/var/asin/64bb1f.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/asin/64bb1f.wgsl.expected.fxc.hlsl | 2 +- .../gen/var/asin/64bb1f.wgsl.expected.glsl | 6 +++--- .../gen/var/asin/64bb1f.wgsl.expected.msl | 2 +- .../gen/var/asin/64bb1f.wgsl.expected.spvasm | 4 ++-- .../gen/var/asin/64bb1f.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/asin/7b6a44.wgsl | 2 +- .../gen/var/asin/7b6a44.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/asin/7b6a44.wgsl.expected.fxc.hlsl | 2 +- .../gen/var/asin/7b6a44.wgsl.expected.glsl | 6 +++--- .../gen/var/asin/7b6a44.wgsl.expected.msl | 2 +- .../gen/var/asin/7b6a44.wgsl.expected.spvasm | 15 ++++++++------- .../gen/var/asin/7b6a44.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/asin/8cd9c9.wgsl | 2 +- .../gen/var/asin/8cd9c9.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/asin/8cd9c9.wgsl.expected.fxc.hlsl | 2 +- .../gen/var/asin/8cd9c9.wgsl.expected.glsl | 6 +++--- .../gen/var/asin/8cd9c9.wgsl.expected.msl | 2 +- .../gen/var/asin/8cd9c9.wgsl.expected.spvasm | 15 ++++++++------- .../gen/var/asin/8cd9c9.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/asin/a5dd88.wgsl | 2 +- .../gen/var/asin/a5dd88.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/asin/a5dd88.wgsl.expected.fxc.hlsl | 2 +- .../gen/var/asin/a5dd88.wgsl.expected.glsl | 6 +++--- .../gen/var/asin/a5dd88.wgsl.expected.msl | 2 +- .../gen/var/asin/a5dd88.wgsl.expected.spvasm | 4 ++-- .../gen/var/asin/a5dd88.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/asin/a6d73a.wgsl | 2 +- .../gen/var/asin/a6d73a.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/asin/a6d73a.wgsl.expected.fxc.hlsl | 2 +- .../gen/var/asin/a6d73a.wgsl.expected.glsl | 6 +++--- .../gen/var/asin/a6d73a.wgsl.expected.msl | 2 +- .../gen/var/asin/a6d73a.wgsl.expected.spvasm | 4 ++-- .../gen/var/asin/a6d73a.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/asin/c0c272.wgsl | 2 +- .../gen/var/asin/c0c272.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/asin/c0c272.wgsl.expected.fxc.hlsl | 2 +- .../gen/var/asin/c0c272.wgsl.expected.glsl | 6 +++--- .../gen/var/asin/c0c272.wgsl.expected.msl | 2 +- .../gen/var/asin/c0c272.wgsl.expected.spvasm | 15 ++++++++------- .../gen/var/asin/c0c272.wgsl.expected.wgsl | 2 +- 114 files changed, 188 insertions(+), 184 deletions(-) diff --git a/src/tint/intrinsics.def b/src/tint/intrinsics.def index 90766ccdca..45e718651c 100644 --- a/src/tint/intrinsics.def +++ b/src/tint/intrinsics.def @@ -415,8 +415,8 @@ fn all(vec) -> bool fn any(bool) -> bool fn any(vec) -> bool fn arrayLength(ptr, A>) -> u32 -@const fn asin(T) -> T -@const fn asin(vec) -> vec +@const fn asin(@test_value(0.479425538604) T) -> T +@const fn asin(@test_value(0.479425538604) vec) -> vec @const fn asinh(T) -> T @const fn asinh(vec) -> vec @const fn atan(T) -> T diff --git a/src/tint/resolver/intrinsic_table.inl b/src/tint/resolver/intrinsic_table.inl index 826307dc33..f2c9bdf07c 100644 --- a/src/tint/resolver/intrinsic_table.inl +++ b/src/tint/resolver/intrinsic_table.inl @@ -14020,8 +14020,8 @@ constexpr IntrinsicInfo kBuiltins[] = { }, { /* [6] */ - /* fn asin(T) -> T */ - /* fn asin(vec) -> vec */ + /* fn asin(@test_value(0.479425538604) T) -> T */ + /* fn asin(@test_value(0.479425538604) vec) -> vec */ /* num overloads */ 2, /* overloads */ &kOverloads[324], }, diff --git a/test/tint/builtins/gen/literal/asin/064953.wgsl b/test/tint/builtins/gen/literal/asin/064953.wgsl index 46e87dd277..cf8e2401d2 100644 --- a/test/tint/builtins/gen/literal/asin/064953.wgsl +++ b/test/tint/builtins/gen/literal/asin/064953.wgsl @@ -23,7 +23,7 @@ // fn asin(vec<4, f32>) -> vec<4, f32> fn asin_064953() { - var res: vec4 = asin(vec4(1.f)); + var res: vec4 = asin(vec4(0.479425538604f)); } @vertex diff --git a/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.dxc.hlsl index 2d4408745c..4ae1669a15 100644 --- a/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void asin_064953() { - float4 res = (1.570796371f).xxxx; + float4 res = (0.5f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.fxc.hlsl index 2d4408745c..4ae1669a15 100644 --- a/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void asin_064953() { - float4 res = (1.570796371f).xxxx; + float4 res = (0.5f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.glsl b/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.glsl index bcc19a9399..d1f38acb32 100644 --- a/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void asin_064953() { - vec4 res = vec4(1.570796371f); + vec4 res = vec4(0.5f); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void asin_064953() { - vec4 res = vec4(1.570796371f); + vec4 res = vec4(0.5f); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void asin_064953() { - vec4 res = vec4(1.570796371f); + vec4 res = vec4(0.5f); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.msl b/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.msl index 36ee242516..b395eeb2e4 100644 --- a/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void asin_064953() { - float4 res = float4(1.570796371f); + float4 res = float4(0.5f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.spvasm index c8f3ca524b..764a9dfd84 100644 --- a/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.spvasm @@ -30,8 +30,8 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%float_1_57079637 = OpConstant %float 1.57079637 - %14 = OpConstantComposite %v4float %float_1_57079637 %float_1_57079637 %float_1_57079637 %float_1_57079637 + %float_0_5 = OpConstant %float 0.5 + %14 = OpConstantComposite %v4float %float_0_5 %float_0_5 %float_0_5 %float_0_5 %_ptr_Function_v4float = OpTypePointer Function %v4float %17 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 diff --git a/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.wgsl index 319b1fca53..bc5d1dc4b6 100644 --- a/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn asin_064953() { - var res : vec4 = asin(vec4(1.0f)); + var res : vec4 = asin(vec4(0.47942555f)); } @vertex diff --git a/test/tint/builtins/gen/literal/asin/0bac07.wgsl b/test/tint/builtins/gen/literal/asin/0bac07.wgsl index 86c89745c1..49508dba38 100644 --- a/test/tint/builtins/gen/literal/asin/0bac07.wgsl +++ b/test/tint/builtins/gen/literal/asin/0bac07.wgsl @@ -23,7 +23,7 @@ // fn asin(vec<3, fa>) -> vec<3, fa> fn asin_0bac07() { - var res = asin(vec3(1)); + var res = asin(vec3(0.479425538604)); } @vertex diff --git a/test/tint/builtins/gen/literal/asin/0bac07.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/asin/0bac07.wgsl.expected.dxc.hlsl index 608f09a6e7..96bd88a4e5 100644 --- a/test/tint/builtins/gen/literal/asin/0bac07.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/asin/0bac07.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void asin_0bac07() { - float3 res = (1.570796371f).xxx; + float3 res = (0.5f).xxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asin/0bac07.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/asin/0bac07.wgsl.expected.fxc.hlsl index 608f09a6e7..96bd88a4e5 100644 --- a/test/tint/builtins/gen/literal/asin/0bac07.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/asin/0bac07.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void asin_0bac07() { - float3 res = (1.570796371f).xxx; + float3 res = (0.5f).xxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asin/0bac07.wgsl.expected.glsl b/test/tint/builtins/gen/literal/asin/0bac07.wgsl.expected.glsl index 9e69859336..5efe56078d 100644 --- a/test/tint/builtins/gen/literal/asin/0bac07.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/asin/0bac07.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void asin_0bac07() { - vec3 res = vec3(1.570796371f); + vec3 res = vec3(0.5f); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void asin_0bac07() { - vec3 res = vec3(1.570796371f); + vec3 res = vec3(0.5f); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void asin_0bac07() { - vec3 res = vec3(1.570796371f); + vec3 res = vec3(0.5f); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/asin/0bac07.wgsl.expected.msl b/test/tint/builtins/gen/literal/asin/0bac07.wgsl.expected.msl index e0cbee7bcf..6ac2e667e7 100644 --- a/test/tint/builtins/gen/literal/asin/0bac07.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/asin/0bac07.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void asin_0bac07() { - float3 res = float3(1.570796371f); + float3 res = float3(0.5f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asin/0bac07.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/asin/0bac07.wgsl.expected.spvasm index cfd553c2cd..fa761dffd0 100644 --- a/test/tint/builtins/gen/literal/asin/0bac07.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/asin/0bac07.wgsl.expected.spvasm @@ -31,8 +31,8 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 -%float_1_57079637 = OpConstant %float 1.57079637 - %15 = OpConstantComposite %v3float %float_1_57079637 %float_1_57079637 %float_1_57079637 + %float_0_5 = OpConstant %float 0.5 + %15 = OpConstantComposite %v3float %float_0_5 %float_0_5 %float_0_5 %_ptr_Function_v3float = OpTypePointer Function %v3float %18 = OpConstantNull %v3float %19 = OpTypeFunction %v4float diff --git a/test/tint/builtins/gen/literal/asin/0bac07.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/asin/0bac07.wgsl.expected.wgsl index 16dfa03689..a283860b72 100644 --- a/test/tint/builtins/gen/literal/asin/0bac07.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/asin/0bac07.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn asin_0bac07() { - var res = asin(vec3(1)); + var res = asin(vec3(0.479425538604)); } @vertex diff --git a/test/tint/builtins/gen/literal/asin/64bb1f.wgsl b/test/tint/builtins/gen/literal/asin/64bb1f.wgsl index 7203359a65..650172c1bf 100644 --- a/test/tint/builtins/gen/literal/asin/64bb1f.wgsl +++ b/test/tint/builtins/gen/literal/asin/64bb1f.wgsl @@ -23,7 +23,7 @@ // fn asin(vec<4, fa>) -> vec<4, fa> fn asin_64bb1f() { - var res = asin(vec4(1)); + var res = asin(vec4(0.479425538604)); } @vertex diff --git a/test/tint/builtins/gen/literal/asin/64bb1f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/asin/64bb1f.wgsl.expected.dxc.hlsl index b0ffa27305..1ee8601f70 100644 --- a/test/tint/builtins/gen/literal/asin/64bb1f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/asin/64bb1f.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void asin_64bb1f() { - float4 res = (1.570796371f).xxxx; + float4 res = (0.5f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asin/64bb1f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/asin/64bb1f.wgsl.expected.fxc.hlsl index b0ffa27305..1ee8601f70 100644 --- a/test/tint/builtins/gen/literal/asin/64bb1f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/asin/64bb1f.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void asin_64bb1f() { - float4 res = (1.570796371f).xxxx; + float4 res = (0.5f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asin/64bb1f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/asin/64bb1f.wgsl.expected.glsl index e0df06789b..9483665e11 100644 --- a/test/tint/builtins/gen/literal/asin/64bb1f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/asin/64bb1f.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void asin_64bb1f() { - vec4 res = vec4(1.570796371f); + vec4 res = vec4(0.5f); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void asin_64bb1f() { - vec4 res = vec4(1.570796371f); + vec4 res = vec4(0.5f); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void asin_64bb1f() { - vec4 res = vec4(1.570796371f); + vec4 res = vec4(0.5f); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/asin/64bb1f.wgsl.expected.msl b/test/tint/builtins/gen/literal/asin/64bb1f.wgsl.expected.msl index 16110b42c4..5f0a2a91fa 100644 --- a/test/tint/builtins/gen/literal/asin/64bb1f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/asin/64bb1f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void asin_64bb1f() { - float4 res = float4(1.570796371f); + float4 res = float4(0.5f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asin/64bb1f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/asin/64bb1f.wgsl.expected.spvasm index d6923f333a..a85e0e25c6 100644 --- a/test/tint/builtins/gen/literal/asin/64bb1f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/asin/64bb1f.wgsl.expected.spvasm @@ -30,8 +30,8 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%float_1_57079637 = OpConstant %float 1.57079637 - %14 = OpConstantComposite %v4float %float_1_57079637 %float_1_57079637 %float_1_57079637 %float_1_57079637 + %float_0_5 = OpConstant %float 0.5 + %14 = OpConstantComposite %v4float %float_0_5 %float_0_5 %float_0_5 %float_0_5 %_ptr_Function_v4float = OpTypePointer Function %v4float %17 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 diff --git a/test/tint/builtins/gen/literal/asin/64bb1f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/asin/64bb1f.wgsl.expected.wgsl index 4c3b363938..f6ce56f561 100644 --- a/test/tint/builtins/gen/literal/asin/64bb1f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/asin/64bb1f.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn asin_64bb1f() { - var res = asin(vec4(1)); + var res = asin(vec4(0.479425538604)); } @vertex diff --git a/test/tint/builtins/gen/literal/asin/7b6a44.wgsl b/test/tint/builtins/gen/literal/asin/7b6a44.wgsl index 95988bb1bb..83a95903c3 100644 --- a/test/tint/builtins/gen/literal/asin/7b6a44.wgsl +++ b/test/tint/builtins/gen/literal/asin/7b6a44.wgsl @@ -23,7 +23,7 @@ // fn asin(vec<2, f32>) -> vec<2, f32> fn asin_7b6a44() { - var res: vec2 = asin(vec2(1.f)); + var res: vec2 = asin(vec2(0.479425538604f)); } @vertex diff --git a/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.dxc.hlsl index 9eee3279a5..53e20d3c6f 100644 --- a/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void asin_7b6a44() { - float2 res = (1.570796371f).xx; + float2 res = (0.5f).xx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.fxc.hlsl index 9eee3279a5..53e20d3c6f 100644 --- a/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void asin_7b6a44() { - float2 res = (1.570796371f).xx; + float2 res = (0.5f).xx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.glsl b/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.glsl index 84f8769bdb..2a7d93d191 100644 --- a/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void asin_7b6a44() { - vec2 res = vec2(1.570796371f); + vec2 res = vec2(0.5f); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void asin_7b6a44() { - vec2 res = vec2(1.570796371f); + vec2 res = vec2(0.5f); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void asin_7b6a44() { - vec2 res = vec2(1.570796371f); + vec2 res = vec2(0.5f); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.msl b/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.msl index 5dcdbd6082..bd3f1467fc 100644 --- a/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void asin_7b6a44() { - float2 res = float2(1.570796371f); + float2 res = float2(0.5f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.spvasm index 01384cafae..9d65d1ef6d 100644 --- a/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.spvasm @@ -31,8 +31,8 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 -%float_1_57079637 = OpConstant %float 1.57079637 - %15 = OpConstantComposite %v2float %float_1_57079637 %float_1_57079637 + %float_0_5 = OpConstant %float 0.5 + %15 = OpConstantComposite %v2float %float_0_5 %float_0_5 %_ptr_Function_v2float = OpTypePointer Function %v2float %18 = OpConstantNull %v2float %19 = OpTypeFunction %v4float diff --git a/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.wgsl index c1c0a65868..77b8ae2ade 100644 --- a/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn asin_7b6a44() { - var res : vec2 = asin(vec2(1.0f)); + var res : vec2 = asin(vec2(0.47942555f)); } @vertex diff --git a/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl b/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl index 2ddafc176f..4e43588947 100644 --- a/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl +++ b/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl @@ -23,7 +23,7 @@ // fn asin(vec<3, f32>) -> vec<3, f32> fn asin_8cd9c9() { - var res: vec3 = asin(vec3(1.f)); + var res: vec3 = asin(vec3(0.479425538604f)); } @vertex diff --git a/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.dxc.hlsl index 75d4553313..3d16011515 100644 --- a/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void asin_8cd9c9() { - float3 res = (1.570796371f).xxx; + float3 res = (0.5f).xxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.fxc.hlsl index 75d4553313..3d16011515 100644 --- a/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void asin_8cd9c9() { - float3 res = (1.570796371f).xxx; + float3 res = (0.5f).xxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.glsl b/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.glsl index 0bdddba0a0..605d90c048 100644 --- a/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void asin_8cd9c9() { - vec3 res = vec3(1.570796371f); + vec3 res = vec3(0.5f); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void asin_8cd9c9() { - vec3 res = vec3(1.570796371f); + vec3 res = vec3(0.5f); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void asin_8cd9c9() { - vec3 res = vec3(1.570796371f); + vec3 res = vec3(0.5f); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.msl b/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.msl index f16f510443..c9bf2ec4f5 100644 --- a/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void asin_8cd9c9() { - float3 res = float3(1.570796371f); + float3 res = float3(0.5f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.spvasm index 29deb8f046..ae006428e4 100644 --- a/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.spvasm @@ -31,8 +31,8 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 -%float_1_57079637 = OpConstant %float 1.57079637 - %15 = OpConstantComposite %v3float %float_1_57079637 %float_1_57079637 %float_1_57079637 + %float_0_5 = OpConstant %float 0.5 + %15 = OpConstantComposite %v3float %float_0_5 %float_0_5 %float_0_5 %_ptr_Function_v3float = OpTypePointer Function %v3float %18 = OpConstantNull %v3float %19 = OpTypeFunction %v4float diff --git a/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.wgsl index 5000fc053a..8d19bf594b 100644 --- a/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn asin_8cd9c9() { - var res : vec3 = asin(vec3(1.0f)); + var res : vec3 = asin(vec3(0.47942555f)); } @vertex diff --git a/test/tint/builtins/gen/literal/asin/a5dd88.wgsl b/test/tint/builtins/gen/literal/asin/a5dd88.wgsl index 979cbc1e8c..be8c51f53f 100644 --- a/test/tint/builtins/gen/literal/asin/a5dd88.wgsl +++ b/test/tint/builtins/gen/literal/asin/a5dd88.wgsl @@ -23,7 +23,7 @@ // fn asin(vec<2, fa>) -> vec<2, fa> fn asin_a5dd88() { - var res = asin(vec2(1)); + var res = asin(vec2(0.479425538604)); } @vertex diff --git a/test/tint/builtins/gen/literal/asin/a5dd88.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/asin/a5dd88.wgsl.expected.dxc.hlsl index 4c2a5a83e6..d910dc9781 100644 --- a/test/tint/builtins/gen/literal/asin/a5dd88.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/asin/a5dd88.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void asin_a5dd88() { - float2 res = (1.570796371f).xx; + float2 res = (0.5f).xx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asin/a5dd88.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/asin/a5dd88.wgsl.expected.fxc.hlsl index 4c2a5a83e6..d910dc9781 100644 --- a/test/tint/builtins/gen/literal/asin/a5dd88.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/asin/a5dd88.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void asin_a5dd88() { - float2 res = (1.570796371f).xx; + float2 res = (0.5f).xx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asin/a5dd88.wgsl.expected.glsl b/test/tint/builtins/gen/literal/asin/a5dd88.wgsl.expected.glsl index f1b5b4b6d2..6b8eb2f68c 100644 --- a/test/tint/builtins/gen/literal/asin/a5dd88.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/asin/a5dd88.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void asin_a5dd88() { - vec2 res = vec2(1.570796371f); + vec2 res = vec2(0.5f); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void asin_a5dd88() { - vec2 res = vec2(1.570796371f); + vec2 res = vec2(0.5f); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void asin_a5dd88() { - vec2 res = vec2(1.570796371f); + vec2 res = vec2(0.5f); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/asin/a5dd88.wgsl.expected.msl b/test/tint/builtins/gen/literal/asin/a5dd88.wgsl.expected.msl index 2657d372d6..11e4d2d8cf 100644 --- a/test/tint/builtins/gen/literal/asin/a5dd88.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/asin/a5dd88.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void asin_a5dd88() { - float2 res = float2(1.570796371f); + float2 res = float2(0.5f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asin/a5dd88.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/asin/a5dd88.wgsl.expected.spvasm index 23301204c7..a30cfac1b7 100644 --- a/test/tint/builtins/gen/literal/asin/a5dd88.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/asin/a5dd88.wgsl.expected.spvasm @@ -31,8 +31,8 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 -%float_1_57079637 = OpConstant %float 1.57079637 - %15 = OpConstantComposite %v2float %float_1_57079637 %float_1_57079637 + %float_0_5 = OpConstant %float 0.5 + %15 = OpConstantComposite %v2float %float_0_5 %float_0_5 %_ptr_Function_v2float = OpTypePointer Function %v2float %18 = OpConstantNull %v2float %19 = OpTypeFunction %v4float diff --git a/test/tint/builtins/gen/literal/asin/a5dd88.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/asin/a5dd88.wgsl.expected.wgsl index 224b65fff9..e7aacdae7a 100644 --- a/test/tint/builtins/gen/literal/asin/a5dd88.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/asin/a5dd88.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn asin_a5dd88() { - var res = asin(vec2(1)); + var res = asin(vec2(0.479425538604)); } @vertex diff --git a/test/tint/builtins/gen/literal/asin/a6d73a.wgsl b/test/tint/builtins/gen/literal/asin/a6d73a.wgsl index cc4f936dbf..2f613037d0 100644 --- a/test/tint/builtins/gen/literal/asin/a6d73a.wgsl +++ b/test/tint/builtins/gen/literal/asin/a6d73a.wgsl @@ -23,7 +23,7 @@ // fn asin(fa) -> fa fn asin_a6d73a() { - var res = asin(1); + var res = asin(0.479425538604); } @vertex diff --git a/test/tint/builtins/gen/literal/asin/a6d73a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/asin/a6d73a.wgsl.expected.dxc.hlsl index 980100b840..5e01eb0509 100644 --- a/test/tint/builtins/gen/literal/asin/a6d73a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/asin/a6d73a.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void asin_a6d73a() { - float res = 1.570796371f; + float res = 0.5f; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asin/a6d73a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/asin/a6d73a.wgsl.expected.fxc.hlsl index 980100b840..5e01eb0509 100644 --- a/test/tint/builtins/gen/literal/asin/a6d73a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/asin/a6d73a.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void asin_a6d73a() { - float res = 1.570796371f; + float res = 0.5f; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asin/a6d73a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/asin/a6d73a.wgsl.expected.glsl index 8a6632d37a..4afa665600 100644 --- a/test/tint/builtins/gen/literal/asin/a6d73a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/asin/a6d73a.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void asin_a6d73a() { - float res = 1.570796371f; + float res = 0.5f; } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void asin_a6d73a() { - float res = 1.570796371f; + float res = 0.5f; } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void asin_a6d73a() { - float res = 1.570796371f; + float res = 0.5f; } void compute_main() { diff --git a/test/tint/builtins/gen/literal/asin/a6d73a.wgsl.expected.msl b/test/tint/builtins/gen/literal/asin/a6d73a.wgsl.expected.msl index 8f04a36a30..49fbf73aca 100644 --- a/test/tint/builtins/gen/literal/asin/a6d73a.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/asin/a6d73a.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void asin_a6d73a() { - float res = 1.570796371f; + float res = 0.5f; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asin/a6d73a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/asin/a6d73a.wgsl.expected.spvasm index 75f8434e9e..c325ec148d 100644 --- a/test/tint/builtins/gen/literal/asin/a6d73a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/asin/a6d73a.wgsl.expected.spvasm @@ -30,14 +30,14 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%float_1_57079637 = OpConstant %float 1.57079637 + %float_0_5 = OpConstant %float 0.5 %_ptr_Function_float = OpTypePointer Function %float %16 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %asin_a6d73a = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 - OpStore %res %float_1_57079637 + OpStore %res %float_0_5 OpReturn OpFunctionEnd %vertex_main_inner = OpFunction %v4float None %16 diff --git a/test/tint/builtins/gen/literal/asin/a6d73a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/asin/a6d73a.wgsl.expected.wgsl index 802db5e815..09cf49a2e7 100644 --- a/test/tint/builtins/gen/literal/asin/a6d73a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/asin/a6d73a.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn asin_a6d73a() { - var res = asin(1); + var res = asin(0.479425538604); } @vertex diff --git a/test/tint/builtins/gen/literal/asin/c0c272.wgsl b/test/tint/builtins/gen/literal/asin/c0c272.wgsl index c97c13f183..5739918fb8 100644 --- a/test/tint/builtins/gen/literal/asin/c0c272.wgsl +++ b/test/tint/builtins/gen/literal/asin/c0c272.wgsl @@ -23,7 +23,7 @@ // fn asin(f32) -> f32 fn asin_c0c272() { - var res: f32 = asin(1.f); + var res: f32 = asin(0.479425538604f); } @vertex diff --git a/test/tint/builtins/gen/literal/asin/c0c272.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/asin/c0c272.wgsl.expected.dxc.hlsl index ba3e33916e..6020151421 100644 --- a/test/tint/builtins/gen/literal/asin/c0c272.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/asin/c0c272.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void asin_c0c272() { - float res = 1.570796371f; + float res = 0.5f; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asin/c0c272.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/asin/c0c272.wgsl.expected.fxc.hlsl index ba3e33916e..6020151421 100644 --- a/test/tint/builtins/gen/literal/asin/c0c272.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/asin/c0c272.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void asin_c0c272() { - float res = 1.570796371f; + float res = 0.5f; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asin/c0c272.wgsl.expected.glsl b/test/tint/builtins/gen/literal/asin/c0c272.wgsl.expected.glsl index c27baffc29..34eb102447 100644 --- a/test/tint/builtins/gen/literal/asin/c0c272.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/asin/c0c272.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void asin_c0c272() { - float res = 1.570796371f; + float res = 0.5f; } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void asin_c0c272() { - float res = 1.570796371f; + float res = 0.5f; } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void asin_c0c272() { - float res = 1.570796371f; + float res = 0.5f; } void compute_main() { diff --git a/test/tint/builtins/gen/literal/asin/c0c272.wgsl.expected.msl b/test/tint/builtins/gen/literal/asin/c0c272.wgsl.expected.msl index bd5cb2e61d..58374bef6d 100644 --- a/test/tint/builtins/gen/literal/asin/c0c272.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/asin/c0c272.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void asin_c0c272() { - float res = 1.570796371f; + float res = 0.5f; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asin/c0c272.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/asin/c0c272.wgsl.expected.spvasm index c5c51b768b..37dd8735da 100644 --- a/test/tint/builtins/gen/literal/asin/c0c272.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/asin/c0c272.wgsl.expected.spvasm @@ -30,14 +30,14 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%float_1_57079637 = OpConstant %float 1.57079637 + %float_0_5 = OpConstant %float 0.5 %_ptr_Function_float = OpTypePointer Function %float %16 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %asin_c0c272 = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 - OpStore %res %float_1_57079637 + OpStore %res %float_0_5 OpReturn OpFunctionEnd %vertex_main_inner = OpFunction %v4float None %16 diff --git a/test/tint/builtins/gen/literal/asin/c0c272.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/asin/c0c272.wgsl.expected.wgsl index d7dc41ef17..7e36cce91c 100644 --- a/test/tint/builtins/gen/literal/asin/c0c272.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/asin/c0c272.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn asin_c0c272() { - var res : f32 = asin(1.0f); + var res : f32 = asin(0.47942555f); } @vertex diff --git a/test/tint/builtins/gen/var/asin/064953.wgsl b/test/tint/builtins/gen/var/asin/064953.wgsl index dc35b202bd..07deb1498e 100644 --- a/test/tint/builtins/gen/var/asin/064953.wgsl +++ b/test/tint/builtins/gen/var/asin/064953.wgsl @@ -23,7 +23,7 @@ // fn asin(vec<4, f32>) -> vec<4, f32> fn asin_064953() { - var arg_0 = vec4(1.f); + var arg_0 = vec4(0.479425538604f); var res: vec4 = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/064953.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/asin/064953.wgsl.expected.dxc.hlsl index 932c5da428..67d9bd33d7 100644 --- a/test/tint/builtins/gen/var/asin/064953.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/asin/064953.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void asin_064953() { - float4 arg_0 = (1.0f).xxxx; + float4 arg_0 = (0.47942555f).xxxx; float4 res = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/064953.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/asin/064953.wgsl.expected.fxc.hlsl index 932c5da428..67d9bd33d7 100644 --- a/test/tint/builtins/gen/var/asin/064953.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/asin/064953.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void asin_064953() { - float4 arg_0 = (1.0f).xxxx; + float4 arg_0 = (0.47942555f).xxxx; float4 res = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/064953.wgsl.expected.glsl b/test/tint/builtins/gen/var/asin/064953.wgsl.expected.glsl index 26c0c37a14..68495fb089 100644 --- a/test/tint/builtins/gen/var/asin/064953.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/asin/064953.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void asin_064953() { - vec4 arg_0 = vec4(1.0f); + vec4 arg_0 = vec4(0.47942555f); vec4 res = asin(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void asin_064953() { - vec4 arg_0 = vec4(1.0f); + vec4 arg_0 = vec4(0.47942555f); vec4 res = asin(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void asin_064953() { - vec4 arg_0 = vec4(1.0f); + vec4 arg_0 = vec4(0.47942555f); vec4 res = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/064953.wgsl.expected.msl b/test/tint/builtins/gen/var/asin/064953.wgsl.expected.msl index 481b8b1d6e..91f3fe3cdf 100644 --- a/test/tint/builtins/gen/var/asin/064953.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/asin/064953.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void asin_064953() { - float4 arg_0 = float4(1.0f); + float4 arg_0 = float4(0.47942555f); float4 res = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/064953.wgsl.expected.spvasm b/test/tint/builtins/gen/var/asin/064953.wgsl.expected.spvasm index d5813cdc79..0b9824cbb1 100644 --- a/test/tint/builtins/gen/var/asin/064953.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/asin/064953.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 35 ; Schema: 0 OpCapability Shader %18 = OpExtInstImport "GLSL.std.450" @@ -32,10 +32,11 @@ %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 +%float_0_47942555 = OpConstant %float 0.47942555 + %14 = OpConstantComposite %v4float %float_0_47942555 %float_0_47942555 %float_0_47942555 %float_0_47942555 %_ptr_Function_v4float = OpTypePointer Function %v4float %21 = OpTypeFunction %v4float + %float_1 = OpConstant %float 1 %asin_064953 = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 @@ -59,12 +60,12 @@ OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %asin_064953 + %30 = OpLabel + %31 = OpFunctionCall %void %asin_064953 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %asin_064953 + %33 = OpLabel + %34 = OpFunctionCall %void %asin_064953 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/asin/064953.wgsl.expected.wgsl b/test/tint/builtins/gen/var/asin/064953.wgsl.expected.wgsl index 205c94de61..61347d7ed5 100644 --- a/test/tint/builtins/gen/var/asin/064953.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/asin/064953.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn asin_064953() { - var arg_0 = vec4(1.0f); + var arg_0 = vec4(0.47942555f); var res : vec4 = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/0bac07.wgsl b/test/tint/builtins/gen/var/asin/0bac07.wgsl index 75109aa0e8..d1555eb316 100644 --- a/test/tint/builtins/gen/var/asin/0bac07.wgsl +++ b/test/tint/builtins/gen/var/asin/0bac07.wgsl @@ -23,7 +23,7 @@ // fn asin(vec<3, fa>) -> vec<3, fa> fn asin_0bac07() { - const arg_0 = vec3(1); + const arg_0 = vec3(0.479425538604); var res = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/0bac07.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/asin/0bac07.wgsl.expected.dxc.hlsl index 608f09a6e7..96bd88a4e5 100644 --- a/test/tint/builtins/gen/var/asin/0bac07.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/asin/0bac07.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void asin_0bac07() { - float3 res = (1.570796371f).xxx; + float3 res = (0.5f).xxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/asin/0bac07.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/asin/0bac07.wgsl.expected.fxc.hlsl index 608f09a6e7..96bd88a4e5 100644 --- a/test/tint/builtins/gen/var/asin/0bac07.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/asin/0bac07.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void asin_0bac07() { - float3 res = (1.570796371f).xxx; + float3 res = (0.5f).xxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/asin/0bac07.wgsl.expected.glsl b/test/tint/builtins/gen/var/asin/0bac07.wgsl.expected.glsl index 9e69859336..5efe56078d 100644 --- a/test/tint/builtins/gen/var/asin/0bac07.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/asin/0bac07.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void asin_0bac07() { - vec3 res = vec3(1.570796371f); + vec3 res = vec3(0.5f); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void asin_0bac07() { - vec3 res = vec3(1.570796371f); + vec3 res = vec3(0.5f); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void asin_0bac07() { - vec3 res = vec3(1.570796371f); + vec3 res = vec3(0.5f); } void compute_main() { diff --git a/test/tint/builtins/gen/var/asin/0bac07.wgsl.expected.msl b/test/tint/builtins/gen/var/asin/0bac07.wgsl.expected.msl index e0cbee7bcf..6ac2e667e7 100644 --- a/test/tint/builtins/gen/var/asin/0bac07.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/asin/0bac07.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void asin_0bac07() { - float3 res = float3(1.570796371f); + float3 res = float3(0.5f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/asin/0bac07.wgsl.expected.spvasm b/test/tint/builtins/gen/var/asin/0bac07.wgsl.expected.spvasm index cfd553c2cd..fa761dffd0 100644 --- a/test/tint/builtins/gen/var/asin/0bac07.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/asin/0bac07.wgsl.expected.spvasm @@ -31,8 +31,8 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 -%float_1_57079637 = OpConstant %float 1.57079637 - %15 = OpConstantComposite %v3float %float_1_57079637 %float_1_57079637 %float_1_57079637 + %float_0_5 = OpConstant %float 0.5 + %15 = OpConstantComposite %v3float %float_0_5 %float_0_5 %float_0_5 %_ptr_Function_v3float = OpTypePointer Function %v3float %18 = OpConstantNull %v3float %19 = OpTypeFunction %v4float diff --git a/test/tint/builtins/gen/var/asin/0bac07.wgsl.expected.wgsl b/test/tint/builtins/gen/var/asin/0bac07.wgsl.expected.wgsl index 2389250217..a90be4ac2d 100644 --- a/test/tint/builtins/gen/var/asin/0bac07.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/asin/0bac07.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn asin_0bac07() { - const arg_0 = vec3(1); + const arg_0 = vec3(0.479425538604); var res = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/64bb1f.wgsl b/test/tint/builtins/gen/var/asin/64bb1f.wgsl index dbebb4e10d..acc71e25dc 100644 --- a/test/tint/builtins/gen/var/asin/64bb1f.wgsl +++ b/test/tint/builtins/gen/var/asin/64bb1f.wgsl @@ -23,7 +23,7 @@ // fn asin(vec<4, fa>) -> vec<4, fa> fn asin_64bb1f() { - const arg_0 = vec4(1); + const arg_0 = vec4(0.479425538604); var res = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/64bb1f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/asin/64bb1f.wgsl.expected.dxc.hlsl index b0ffa27305..1ee8601f70 100644 --- a/test/tint/builtins/gen/var/asin/64bb1f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/asin/64bb1f.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void asin_64bb1f() { - float4 res = (1.570796371f).xxxx; + float4 res = (0.5f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/asin/64bb1f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/asin/64bb1f.wgsl.expected.fxc.hlsl index b0ffa27305..1ee8601f70 100644 --- a/test/tint/builtins/gen/var/asin/64bb1f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/asin/64bb1f.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void asin_64bb1f() { - float4 res = (1.570796371f).xxxx; + float4 res = (0.5f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/asin/64bb1f.wgsl.expected.glsl b/test/tint/builtins/gen/var/asin/64bb1f.wgsl.expected.glsl index e0df06789b..9483665e11 100644 --- a/test/tint/builtins/gen/var/asin/64bb1f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/asin/64bb1f.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void asin_64bb1f() { - vec4 res = vec4(1.570796371f); + vec4 res = vec4(0.5f); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void asin_64bb1f() { - vec4 res = vec4(1.570796371f); + vec4 res = vec4(0.5f); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void asin_64bb1f() { - vec4 res = vec4(1.570796371f); + vec4 res = vec4(0.5f); } void compute_main() { diff --git a/test/tint/builtins/gen/var/asin/64bb1f.wgsl.expected.msl b/test/tint/builtins/gen/var/asin/64bb1f.wgsl.expected.msl index 16110b42c4..5f0a2a91fa 100644 --- a/test/tint/builtins/gen/var/asin/64bb1f.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/asin/64bb1f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void asin_64bb1f() { - float4 res = float4(1.570796371f); + float4 res = float4(0.5f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/asin/64bb1f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/asin/64bb1f.wgsl.expected.spvasm index d6923f333a..a85e0e25c6 100644 --- a/test/tint/builtins/gen/var/asin/64bb1f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/asin/64bb1f.wgsl.expected.spvasm @@ -30,8 +30,8 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%float_1_57079637 = OpConstant %float 1.57079637 - %14 = OpConstantComposite %v4float %float_1_57079637 %float_1_57079637 %float_1_57079637 %float_1_57079637 + %float_0_5 = OpConstant %float 0.5 + %14 = OpConstantComposite %v4float %float_0_5 %float_0_5 %float_0_5 %float_0_5 %_ptr_Function_v4float = OpTypePointer Function %v4float %17 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 diff --git a/test/tint/builtins/gen/var/asin/64bb1f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/asin/64bb1f.wgsl.expected.wgsl index 2e7cbbce85..1a14db8cc8 100644 --- a/test/tint/builtins/gen/var/asin/64bb1f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/asin/64bb1f.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn asin_64bb1f() { - const arg_0 = vec4(1); + const arg_0 = vec4(0.479425538604); var res = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/7b6a44.wgsl b/test/tint/builtins/gen/var/asin/7b6a44.wgsl index 5c7a496c5c..b8b73484b2 100644 --- a/test/tint/builtins/gen/var/asin/7b6a44.wgsl +++ b/test/tint/builtins/gen/var/asin/7b6a44.wgsl @@ -23,7 +23,7 @@ // fn asin(vec<2, f32>) -> vec<2, f32> fn asin_7b6a44() { - var arg_0 = vec2(1.f); + var arg_0 = vec2(0.479425538604f); var res: vec2 = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.dxc.hlsl index 2491ebdaf6..ec5dc28292 100644 --- a/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void asin_7b6a44() { - float2 arg_0 = (1.0f).xx; + float2 arg_0 = (0.47942555f).xx; float2 res = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.fxc.hlsl index 2491ebdaf6..ec5dc28292 100644 --- a/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void asin_7b6a44() { - float2 arg_0 = (1.0f).xx; + float2 arg_0 = (0.47942555f).xx; float2 res = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.glsl b/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.glsl index 0604e88c9d..e98152a44c 100644 --- a/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void asin_7b6a44() { - vec2 arg_0 = vec2(1.0f); + vec2 arg_0 = vec2(0.47942555f); vec2 res = asin(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void asin_7b6a44() { - vec2 arg_0 = vec2(1.0f); + vec2 arg_0 = vec2(0.47942555f); vec2 res = asin(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void asin_7b6a44() { - vec2 arg_0 = vec2(1.0f); + vec2 arg_0 = vec2(0.47942555f); vec2 res = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.msl b/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.msl index 37b62137cc..8562a86daa 100644 --- a/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void asin_7b6a44() { - float2 arg_0 = float2(1.0f); + float2 arg_0 = float2(0.47942555f); float2 res = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.spvasm b/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.spvasm index 21aa1abc7d..05ddad50b4 100644 --- a/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 37 ; Schema: 0 OpCapability Shader %20 = OpExtInstImport "GLSL.std.450" @@ -33,11 +33,12 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %float_1 = OpConstant %float 1 - %15 = OpConstantComposite %v2float %float_1 %float_1 +%float_0_47942555 = OpConstant %float 0.47942555 + %15 = OpConstantComposite %v2float %float_0_47942555 %float_0_47942555 %_ptr_Function_v2float = OpTypePointer Function %v2float %18 = OpConstantNull %v2float %23 = OpTypeFunction %v4float + %float_1 = OpConstant %float 1 %asin_7b6a44 = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v2float Function %18 @@ -61,12 +62,12 @@ OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %asin_7b6a44 + %32 = OpLabel + %33 = OpFunctionCall %void %asin_7b6a44 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %asin_7b6a44 + %35 = OpLabel + %36 = OpFunctionCall %void %asin_7b6a44 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.wgsl b/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.wgsl index 4f0c2fd816..8adbc85c17 100644 --- a/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn asin_7b6a44() { - var arg_0 = vec2(1.0f); + var arg_0 = vec2(0.47942555f); var res : vec2 = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/8cd9c9.wgsl b/test/tint/builtins/gen/var/asin/8cd9c9.wgsl index 6460397a04..9ef585c1cf 100644 --- a/test/tint/builtins/gen/var/asin/8cd9c9.wgsl +++ b/test/tint/builtins/gen/var/asin/8cd9c9.wgsl @@ -23,7 +23,7 @@ // fn asin(vec<3, f32>) -> vec<3, f32> fn asin_8cd9c9() { - var arg_0 = vec3(1.f); + var arg_0 = vec3(0.479425538604f); var res: vec3 = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.dxc.hlsl index 96d0acac1c..6f5cc309d6 100644 --- a/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void asin_8cd9c9() { - float3 arg_0 = (1.0f).xxx; + float3 arg_0 = (0.47942555f).xxx; float3 res = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.fxc.hlsl index 96d0acac1c..6f5cc309d6 100644 --- a/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void asin_8cd9c9() { - float3 arg_0 = (1.0f).xxx; + float3 arg_0 = (0.47942555f).xxx; float3 res = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.glsl b/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.glsl index 95a2e1c272..5c76d6d935 100644 --- a/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void asin_8cd9c9() { - vec3 arg_0 = vec3(1.0f); + vec3 arg_0 = vec3(0.47942555f); vec3 res = asin(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void asin_8cd9c9() { - vec3 arg_0 = vec3(1.0f); + vec3 arg_0 = vec3(0.47942555f); vec3 res = asin(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void asin_8cd9c9() { - vec3 arg_0 = vec3(1.0f); + vec3 arg_0 = vec3(0.47942555f); vec3 res = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.msl b/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.msl index 8ff1ba728a..33a3914b5f 100644 --- a/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void asin_8cd9c9() { - float3 arg_0 = float3(1.0f); + float3 arg_0 = float3(0.47942555f); float3 res = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.spvasm index 734c4e8b6e..a3c46c6322 100644 --- a/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 37 ; Schema: 0 OpCapability Shader %20 = OpExtInstImport "GLSL.std.450" @@ -33,11 +33,12 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %float_1 = OpConstant %float 1 - %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%float_0_47942555 = OpConstant %float 0.47942555 + %15 = OpConstantComposite %v3float %float_0_47942555 %float_0_47942555 %float_0_47942555 %_ptr_Function_v3float = OpTypePointer Function %v3float %18 = OpConstantNull %v3float %23 = OpTypeFunction %v4float + %float_1 = OpConstant %float 1 %asin_8cd9c9 = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v3float Function %18 @@ -61,12 +62,12 @@ OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %asin_8cd9c9 + %32 = OpLabel + %33 = OpFunctionCall %void %asin_8cd9c9 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %asin_8cd9c9 + %35 = OpLabel + %36 = OpFunctionCall %void %asin_8cd9c9 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.wgsl index db757e53ba..a63fc5cb7c 100644 --- a/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn asin_8cd9c9() { - var arg_0 = vec3(1.0f); + var arg_0 = vec3(0.47942555f); var res : vec3 = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/a5dd88.wgsl b/test/tint/builtins/gen/var/asin/a5dd88.wgsl index 703f93ad2f..bee2ee256e 100644 --- a/test/tint/builtins/gen/var/asin/a5dd88.wgsl +++ b/test/tint/builtins/gen/var/asin/a5dd88.wgsl @@ -23,7 +23,7 @@ // fn asin(vec<2, fa>) -> vec<2, fa> fn asin_a5dd88() { - const arg_0 = vec2(1); + const arg_0 = vec2(0.479425538604); var res = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/a5dd88.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/asin/a5dd88.wgsl.expected.dxc.hlsl index 4c2a5a83e6..d910dc9781 100644 --- a/test/tint/builtins/gen/var/asin/a5dd88.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/asin/a5dd88.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void asin_a5dd88() { - float2 res = (1.570796371f).xx; + float2 res = (0.5f).xx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/asin/a5dd88.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/asin/a5dd88.wgsl.expected.fxc.hlsl index 4c2a5a83e6..d910dc9781 100644 --- a/test/tint/builtins/gen/var/asin/a5dd88.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/asin/a5dd88.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void asin_a5dd88() { - float2 res = (1.570796371f).xx; + float2 res = (0.5f).xx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/asin/a5dd88.wgsl.expected.glsl b/test/tint/builtins/gen/var/asin/a5dd88.wgsl.expected.glsl index f1b5b4b6d2..6b8eb2f68c 100644 --- a/test/tint/builtins/gen/var/asin/a5dd88.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/asin/a5dd88.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void asin_a5dd88() { - vec2 res = vec2(1.570796371f); + vec2 res = vec2(0.5f); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void asin_a5dd88() { - vec2 res = vec2(1.570796371f); + vec2 res = vec2(0.5f); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void asin_a5dd88() { - vec2 res = vec2(1.570796371f); + vec2 res = vec2(0.5f); } void compute_main() { diff --git a/test/tint/builtins/gen/var/asin/a5dd88.wgsl.expected.msl b/test/tint/builtins/gen/var/asin/a5dd88.wgsl.expected.msl index 2657d372d6..11e4d2d8cf 100644 --- a/test/tint/builtins/gen/var/asin/a5dd88.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/asin/a5dd88.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void asin_a5dd88() { - float2 res = float2(1.570796371f); + float2 res = float2(0.5f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/asin/a5dd88.wgsl.expected.spvasm b/test/tint/builtins/gen/var/asin/a5dd88.wgsl.expected.spvasm index 23301204c7..a30cfac1b7 100644 --- a/test/tint/builtins/gen/var/asin/a5dd88.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/asin/a5dd88.wgsl.expected.spvasm @@ -31,8 +31,8 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 -%float_1_57079637 = OpConstant %float 1.57079637 - %15 = OpConstantComposite %v2float %float_1_57079637 %float_1_57079637 + %float_0_5 = OpConstant %float 0.5 + %15 = OpConstantComposite %v2float %float_0_5 %float_0_5 %_ptr_Function_v2float = OpTypePointer Function %v2float %18 = OpConstantNull %v2float %19 = OpTypeFunction %v4float diff --git a/test/tint/builtins/gen/var/asin/a5dd88.wgsl.expected.wgsl b/test/tint/builtins/gen/var/asin/a5dd88.wgsl.expected.wgsl index caf66d953a..c6040e90e7 100644 --- a/test/tint/builtins/gen/var/asin/a5dd88.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/asin/a5dd88.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn asin_a5dd88() { - const arg_0 = vec2(1); + const arg_0 = vec2(0.479425538604); var res = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/a6d73a.wgsl b/test/tint/builtins/gen/var/asin/a6d73a.wgsl index 8045fdbcb1..f4b8390200 100644 --- a/test/tint/builtins/gen/var/asin/a6d73a.wgsl +++ b/test/tint/builtins/gen/var/asin/a6d73a.wgsl @@ -23,7 +23,7 @@ // fn asin(fa) -> fa fn asin_a6d73a() { - const arg_0 = 1; + const arg_0 = 0.479425538604; var res = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/a6d73a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/asin/a6d73a.wgsl.expected.dxc.hlsl index 980100b840..5e01eb0509 100644 --- a/test/tint/builtins/gen/var/asin/a6d73a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/asin/a6d73a.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void asin_a6d73a() { - float res = 1.570796371f; + float res = 0.5f; } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/asin/a6d73a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/asin/a6d73a.wgsl.expected.fxc.hlsl index 980100b840..5e01eb0509 100644 --- a/test/tint/builtins/gen/var/asin/a6d73a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/asin/a6d73a.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void asin_a6d73a() { - float res = 1.570796371f; + float res = 0.5f; } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/asin/a6d73a.wgsl.expected.glsl b/test/tint/builtins/gen/var/asin/a6d73a.wgsl.expected.glsl index 8a6632d37a..4afa665600 100644 --- a/test/tint/builtins/gen/var/asin/a6d73a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/asin/a6d73a.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void asin_a6d73a() { - float res = 1.570796371f; + float res = 0.5f; } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void asin_a6d73a() { - float res = 1.570796371f; + float res = 0.5f; } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void asin_a6d73a() { - float res = 1.570796371f; + float res = 0.5f; } void compute_main() { diff --git a/test/tint/builtins/gen/var/asin/a6d73a.wgsl.expected.msl b/test/tint/builtins/gen/var/asin/a6d73a.wgsl.expected.msl index 8f04a36a30..49fbf73aca 100644 --- a/test/tint/builtins/gen/var/asin/a6d73a.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/asin/a6d73a.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void asin_a6d73a() { - float res = 1.570796371f; + float res = 0.5f; } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/asin/a6d73a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/asin/a6d73a.wgsl.expected.spvasm index 75f8434e9e..c325ec148d 100644 --- a/test/tint/builtins/gen/var/asin/a6d73a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/asin/a6d73a.wgsl.expected.spvasm @@ -30,14 +30,14 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%float_1_57079637 = OpConstant %float 1.57079637 + %float_0_5 = OpConstant %float 0.5 %_ptr_Function_float = OpTypePointer Function %float %16 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %asin_a6d73a = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 - OpStore %res %float_1_57079637 + OpStore %res %float_0_5 OpReturn OpFunctionEnd %vertex_main_inner = OpFunction %v4float None %16 diff --git a/test/tint/builtins/gen/var/asin/a6d73a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/asin/a6d73a.wgsl.expected.wgsl index aedf811d29..c26749ca5c 100644 --- a/test/tint/builtins/gen/var/asin/a6d73a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/asin/a6d73a.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn asin_a6d73a() { - const arg_0 = 1; + const arg_0 = 0.479425538604; var res = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/c0c272.wgsl b/test/tint/builtins/gen/var/asin/c0c272.wgsl index 3c73f52505..1acc09ec69 100644 --- a/test/tint/builtins/gen/var/asin/c0c272.wgsl +++ b/test/tint/builtins/gen/var/asin/c0c272.wgsl @@ -23,7 +23,7 @@ // fn asin(f32) -> f32 fn asin_c0c272() { - var arg_0 = 1.f; + var arg_0 = 0.479425538604f; var res: f32 = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/c0c272.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/asin/c0c272.wgsl.expected.dxc.hlsl index ad66315d46..ce1128b5b9 100644 --- a/test/tint/builtins/gen/var/asin/c0c272.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/asin/c0c272.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void asin_c0c272() { - float arg_0 = 1.0f; + float arg_0 = 0.47942555f; float res = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/c0c272.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/asin/c0c272.wgsl.expected.fxc.hlsl index ad66315d46..ce1128b5b9 100644 --- a/test/tint/builtins/gen/var/asin/c0c272.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/asin/c0c272.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void asin_c0c272() { - float arg_0 = 1.0f; + float arg_0 = 0.47942555f; float res = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/c0c272.wgsl.expected.glsl b/test/tint/builtins/gen/var/asin/c0c272.wgsl.expected.glsl index 9869bdbc05..8b7c97e6c4 100644 --- a/test/tint/builtins/gen/var/asin/c0c272.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/asin/c0c272.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void asin_c0c272() { - float arg_0 = 1.0f; + float arg_0 = 0.47942555f; float res = asin(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void asin_c0c272() { - float arg_0 = 1.0f; + float arg_0 = 0.47942555f; float res = asin(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void asin_c0c272() { - float arg_0 = 1.0f; + float arg_0 = 0.47942555f; float res = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/c0c272.wgsl.expected.msl b/test/tint/builtins/gen/var/asin/c0c272.wgsl.expected.msl index c8dc4da358..c907ded3bc 100644 --- a/test/tint/builtins/gen/var/asin/c0c272.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/asin/c0c272.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void asin_c0c272() { - float arg_0 = 1.0f; + float arg_0 = 0.47942555f; float res = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/c0c272.wgsl.expected.spvasm b/test/tint/builtins/gen/var/asin/c0c272.wgsl.expected.spvasm index 6ee3f4a9cb..0f46bd68f3 100644 --- a/test/tint/builtins/gen/var/asin/c0c272.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/asin/c0c272.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %17 = OpExtInstImport "GLSL.std.450" @@ -32,14 +32,15 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void - %float_1 = OpConstant %float 1 +%float_0_47942555 = OpConstant %float 0.47942555 %_ptr_Function_float = OpTypePointer Function %float %20 = OpTypeFunction %v4float + %float_1 = OpConstant %float 1 %asin_c0c272 = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_float Function %8 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_0 %float_1 + OpStore %arg_0 %float_0_47942555 %18 = OpLoad %float %arg_0 %16 = OpExtInst %float %17 Asin %18 OpStore %res %16 @@ -58,12 +59,12 @@ OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %asin_c0c272 + %29 = OpLabel + %30 = OpFunctionCall %void %asin_c0c272 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %asin_c0c272 + %32 = OpLabel + %33 = OpFunctionCall %void %asin_c0c272 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/asin/c0c272.wgsl.expected.wgsl b/test/tint/builtins/gen/var/asin/c0c272.wgsl.expected.wgsl index c9af00fcff..e31ccd9fe6 100644 --- a/test/tint/builtins/gen/var/asin/c0c272.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/asin/c0c272.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn asin_c0c272() { - var arg_0 = 1.0f; + var arg_0 = 0.47942555f; var res : f32 = asin(arg_0); }