From 66d487395d293c983bde13e14709df6eb2bb01e4 Mon Sep 17 00:00:00 2001 From: James Price Date: Fri, 24 Feb 2023 18:57:39 +0000 Subject: [PATCH] tint: Use PI/2 as the input value for sin tests This makes the output value consistent between different platforms. Change-Id: I4f94da4deac6998c4b809b03ed3b8f58d32bb1b0 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/121501 Commit-Queue: James Price Reviewed-by: Ben Clayton Kokoro: Kokoro --- src/tint/intrinsics.def | 4 ++-- src/tint/resolver/intrinsic_table.inl | 4 ++-- test/tint/builtins/gen/literal/sin/01f241.wgsl | 2 +- .../gen/literal/sin/01f241.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/sin/01f241.wgsl.expected.fxc.hlsl | 2 +- .../gen/literal/sin/01f241.wgsl.expected.glsl | 6 +++--- .../gen/literal/sin/01f241.wgsl.expected.msl | 2 +- .../gen/literal/sin/01f241.wgsl.expected.spvasm | 15 +++++++-------- .../gen/literal/sin/01f241.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/literal/sin/15b2c6.wgsl | 2 +- .../gen/literal/sin/15b2c6.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/sin/15b2c6.wgsl.expected.fxc.hlsl | 2 +- .../gen/literal/sin/15b2c6.wgsl.expected.glsl | 6 +++--- .../gen/literal/sin/15b2c6.wgsl.expected.msl | 2 +- .../gen/literal/sin/15b2c6.wgsl.expected.spvasm | 15 +++++++-------- .../gen/literal/sin/15b2c6.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/literal/sin/2c903b.wgsl | 2 +- .../gen/literal/sin/2c903b.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/sin/2c903b.wgsl.expected.glsl | 6 +++--- .../gen/literal/sin/2c903b.wgsl.expected.msl | 2 +- .../gen/literal/sin/2c903b.wgsl.expected.spvasm | 4 ++-- .../gen/literal/sin/2c903b.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/literal/sin/3cca11.wgsl | 2 +- .../gen/literal/sin/3cca11.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/sin/3cca11.wgsl.expected.glsl | 6 +++--- .../gen/literal/sin/3cca11.wgsl.expected.msl | 2 +- .../gen/literal/sin/3cca11.wgsl.expected.spvasm | 4 ++-- .../gen/literal/sin/3cca11.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/literal/sin/4e3979.wgsl | 2 +- .../gen/literal/sin/4e3979.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/sin/4e3979.wgsl.expected.fxc.hlsl | 2 +- .../gen/literal/sin/4e3979.wgsl.expected.glsl | 6 +++--- .../gen/literal/sin/4e3979.wgsl.expected.msl | 2 +- .../gen/literal/sin/4e3979.wgsl.expected.spvasm | 15 +++++++-------- .../gen/literal/sin/4e3979.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/literal/sin/5c0712.wgsl | 2 +- .../gen/literal/sin/5c0712.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/sin/5c0712.wgsl.expected.glsl | 6 +++--- .../gen/literal/sin/5c0712.wgsl.expected.msl | 2 +- .../gen/literal/sin/5c0712.wgsl.expected.spvasm | 4 ++-- .../gen/literal/sin/5c0712.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/literal/sin/66a59f.wgsl | 2 +- .../gen/literal/sin/66a59f.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/sin/66a59f.wgsl.expected.glsl | 6 +++--- .../gen/literal/sin/66a59f.wgsl.expected.msl | 2 +- .../gen/literal/sin/66a59f.wgsl.expected.spvasm | 4 ++-- .../gen/literal/sin/66a59f.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/literal/sin/67b03c.wgsl | 2 +- .../gen/literal/sin/67b03c.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/sin/67b03c.wgsl.expected.fxc.hlsl | 2 +- .../gen/literal/sin/67b03c.wgsl.expected.glsl | 6 +++--- .../gen/literal/sin/67b03c.wgsl.expected.msl | 2 +- .../gen/literal/sin/67b03c.wgsl.expected.spvasm | 15 +++++++-------- .../gen/literal/sin/67b03c.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/literal/sin/68d3ab.wgsl | 2 +- .../gen/literal/sin/68d3ab.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/sin/68d3ab.wgsl.expected.fxc.hlsl | 2 +- .../gen/literal/sin/68d3ab.wgsl.expected.glsl | 6 +++--- .../gen/literal/sin/68d3ab.wgsl.expected.msl | 2 +- .../gen/literal/sin/68d3ab.wgsl.expected.spvasm | 15 +++++++-------- .../gen/literal/sin/68d3ab.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/literal/sin/a9ab19.wgsl | 2 +- .../gen/literal/sin/a9ab19.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/sin/a9ab19.wgsl.expected.fxc.hlsl | 2 +- .../gen/literal/sin/a9ab19.wgsl.expected.glsl | 6 +++--- .../gen/literal/sin/a9ab19.wgsl.expected.msl | 2 +- .../gen/literal/sin/a9ab19.wgsl.expected.spvasm | 15 +++++++-------- .../gen/literal/sin/a9ab19.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/literal/sin/b78c91.wgsl | 2 +- .../gen/literal/sin/b78c91.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/sin/b78c91.wgsl.expected.fxc.hlsl | 2 +- .../gen/literal/sin/b78c91.wgsl.expected.glsl | 6 +++--- .../gen/literal/sin/b78c91.wgsl.expected.msl | 2 +- .../gen/literal/sin/b78c91.wgsl.expected.spvasm | 15 +++++++-------- .../gen/literal/sin/b78c91.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/literal/sin/fc8bc4.wgsl | 2 +- .../gen/literal/sin/fc8bc4.wgsl.expected.dxc.hlsl | 2 +- .../gen/literal/sin/fc8bc4.wgsl.expected.fxc.hlsl | 2 +- .../gen/literal/sin/fc8bc4.wgsl.expected.glsl | 6 +++--- .../gen/literal/sin/fc8bc4.wgsl.expected.msl | 2 +- .../gen/literal/sin/fc8bc4.wgsl.expected.spvasm | 15 +++++++-------- .../gen/literal/sin/fc8bc4.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/sin/01f241.wgsl | 2 +- .../gen/var/sin/01f241.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/sin/01f241.wgsl.expected.fxc.hlsl | 2 +- .../gen/var/sin/01f241.wgsl.expected.glsl | 6 +++--- .../builtins/gen/var/sin/01f241.wgsl.expected.msl | 2 +- .../gen/var/sin/01f241.wgsl.expected.spvasm | 15 ++++++++------- .../gen/var/sin/01f241.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/sin/15b2c6.wgsl | 2 +- .../gen/var/sin/15b2c6.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/sin/15b2c6.wgsl.expected.fxc.hlsl | 2 +- .../gen/var/sin/15b2c6.wgsl.expected.glsl | 6 +++--- .../builtins/gen/var/sin/15b2c6.wgsl.expected.msl | 2 +- .../gen/var/sin/15b2c6.wgsl.expected.spvasm | 15 +++++++-------- .../gen/var/sin/15b2c6.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/sin/2c903b.wgsl | 2 +- .../gen/var/sin/2c903b.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/sin/2c903b.wgsl.expected.glsl | 6 +++--- .../builtins/gen/var/sin/2c903b.wgsl.expected.msl | 2 +- .../gen/var/sin/2c903b.wgsl.expected.spvasm | 4 ++-- .../gen/var/sin/2c903b.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/sin/3cca11.wgsl | 2 +- .../gen/var/sin/3cca11.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/sin/3cca11.wgsl.expected.glsl | 6 +++--- .../builtins/gen/var/sin/3cca11.wgsl.expected.msl | 2 +- .../gen/var/sin/3cca11.wgsl.expected.spvasm | 4 ++-- .../gen/var/sin/3cca11.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/sin/4e3979.wgsl | 2 +- .../gen/var/sin/4e3979.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/sin/4e3979.wgsl.expected.fxc.hlsl | 2 +- .../gen/var/sin/4e3979.wgsl.expected.glsl | 6 +++--- .../builtins/gen/var/sin/4e3979.wgsl.expected.msl | 2 +- .../gen/var/sin/4e3979.wgsl.expected.spvasm | 15 ++++++++------- .../gen/var/sin/4e3979.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/sin/5c0712.wgsl | 2 +- .../gen/var/sin/5c0712.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/sin/5c0712.wgsl.expected.glsl | 6 +++--- .../builtins/gen/var/sin/5c0712.wgsl.expected.msl | 2 +- .../gen/var/sin/5c0712.wgsl.expected.spvasm | 4 ++-- .../gen/var/sin/5c0712.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/sin/66a59f.wgsl | 2 +- .../gen/var/sin/66a59f.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/sin/66a59f.wgsl.expected.glsl | 6 +++--- .../builtins/gen/var/sin/66a59f.wgsl.expected.msl | 2 +- .../gen/var/sin/66a59f.wgsl.expected.spvasm | 4 ++-- .../gen/var/sin/66a59f.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/sin/67b03c.wgsl | 2 +- .../gen/var/sin/67b03c.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/sin/67b03c.wgsl.expected.fxc.hlsl | 2 +- .../gen/var/sin/67b03c.wgsl.expected.glsl | 6 +++--- .../builtins/gen/var/sin/67b03c.wgsl.expected.msl | 2 +- .../gen/var/sin/67b03c.wgsl.expected.spvasm | 15 +++++++-------- .../gen/var/sin/67b03c.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/sin/68d3ab.wgsl | 2 +- .../gen/var/sin/68d3ab.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/sin/68d3ab.wgsl.expected.fxc.hlsl | 2 +- .../gen/var/sin/68d3ab.wgsl.expected.glsl | 6 +++--- .../builtins/gen/var/sin/68d3ab.wgsl.expected.msl | 2 +- .../gen/var/sin/68d3ab.wgsl.expected.spvasm | 15 +++++++-------- .../gen/var/sin/68d3ab.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/sin/a9ab19.wgsl | 2 +- .../gen/var/sin/a9ab19.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/sin/a9ab19.wgsl.expected.fxc.hlsl | 2 +- .../gen/var/sin/a9ab19.wgsl.expected.glsl | 6 +++--- .../builtins/gen/var/sin/a9ab19.wgsl.expected.msl | 2 +- .../gen/var/sin/a9ab19.wgsl.expected.spvasm | 15 +++++++-------- .../gen/var/sin/a9ab19.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/sin/b78c91.wgsl | 2 +- .../gen/var/sin/b78c91.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/sin/b78c91.wgsl.expected.fxc.hlsl | 2 +- .../gen/var/sin/b78c91.wgsl.expected.glsl | 6 +++--- .../builtins/gen/var/sin/b78c91.wgsl.expected.msl | 2 +- .../gen/var/sin/b78c91.wgsl.expected.spvasm | 15 ++++++++------- .../gen/var/sin/b78c91.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/sin/fc8bc4.wgsl | 2 +- .../gen/var/sin/fc8bc4.wgsl.expected.dxc.hlsl | 2 +- .../gen/var/sin/fc8bc4.wgsl.expected.fxc.hlsl | 2 +- .../gen/var/sin/fc8bc4.wgsl.expected.glsl | 6 +++--- .../builtins/gen/var/sin/fc8bc4.wgsl.expected.msl | 2 +- .../gen/var/sin/fc8bc4.wgsl.expected.spvasm | 15 ++++++++------- .../gen/var/sin/fc8bc4.wgsl.expected.wgsl | 2 +- 162 files changed, 320 insertions(+), 328 deletions(-) diff --git a/src/tint/intrinsics.def b/src/tint/intrinsics.def index a89eab5cc5..826a667416 100644 --- a/src/tint/intrinsics.def +++ b/src/tint/intrinsics.def @@ -661,8 +661,8 @@ match workgroup @must_use @const("select_boolvec") fn select(vec, vec, vec) -> vec @must_use @const fn sign(T) -> T @must_use @const fn sign(vec) -> vec -@must_use @const fn sin(T) -> T -@must_use @const fn sin(vec) -> vec +@must_use @const fn sin(@test_value(1.57079632679) T) -> T +@must_use @const fn sin(@test_value(1.57079632679) vec) -> vec @must_use @const fn sinh(T) -> T @must_use @const fn sinh(vec) -> vec @must_use @const fn smoothstep(@test_value(2) T, @test_value(4) T, @test_value(3) T) -> T diff --git a/src/tint/resolver/intrinsic_table.inl b/src/tint/resolver/intrinsic_table.inl index 3d15e1f133..a4b5e14e91 100644 --- a/src/tint/resolver/intrinsic_table.inl +++ b/src/tint/resolver/intrinsic_table.inl @@ -14502,8 +14502,8 @@ constexpr IntrinsicInfo kBuiltins[] = { }, { /* [70] */ - /* fn sin(T) -> T */ - /* fn sin(vec) -> vec */ + /* fn sin(@test_value(1.57079632679) T) -> T */ + /* fn sin(@test_value(1.57079632679) vec) -> vec */ /* num overloads */ 2, /* overloads */ &kOverloads[389], }, diff --git a/test/tint/builtins/gen/literal/sin/01f241.wgsl b/test/tint/builtins/gen/literal/sin/01f241.wgsl index 3c1c150a42..3b6816fa0b 100644 --- a/test/tint/builtins/gen/literal/sin/01f241.wgsl +++ b/test/tint/builtins/gen/literal/sin/01f241.wgsl @@ -23,7 +23,7 @@ // fn sin(vec<3, f32>) -> vec<3, f32> fn sin_01f241() { - var res: vec3 = sin(vec3(1.f)); + var res: vec3 = sin(vec3(1.57079632679f)); } @vertex diff --git a/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.dxc.hlsl index 399d93486e..d5f4b443cd 100644 --- a/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sin_01f241() { - float3 res = (0.841470957f).xxx; + float3 res = (1.0f).xxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.fxc.hlsl index 399d93486e..d5f4b443cd 100644 --- a/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void sin_01f241() { - float3 res = (0.841470957f).xxx; + float3 res = (1.0f).xxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.glsl index 56aae66a1b..fc446ee332 100644 --- a/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void sin_01f241() { - vec3 res = vec3(0.841470957f); + vec3 res = vec3(1.0f); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void sin_01f241() { - vec3 res = vec3(0.841470957f); + vec3 res = vec3(1.0f); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void sin_01f241() { - vec3 res = vec3(0.841470957f); + vec3 res = vec3(1.0f); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.msl b/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.msl index ac708b61b8..762d763269 100644 --- a/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sin_01f241() { - float3 res = float3(0.841470957f); + float3 res = float3(1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.spvasm index 403f714a59..eb8f71ec1a 100644 --- a/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 32 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -31,12 +31,11 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 -%float_0_841470957 = OpConstant %float 0.841470957 - %15 = OpConstantComposite %v3float %float_0_841470957 %float_0_841470957 %float_0_841470957 + %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 - %float_1 = OpConstant %float 1 %sin_01f241 = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_v3float Function %18 @@ -56,12 +55,12 @@ OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %sin_01f241 + %27 = OpLabel + %28 = OpFunctionCall %void %sin_01f241 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %sin_01f241 + %30 = OpLabel + %31 = OpFunctionCall %void %sin_01f241 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.wgsl index cbbca228ac..21eef61c75 100644 --- a/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn sin_01f241() { - var res : vec3 = sin(vec3(1.0f)); + var res : vec3 = sin(vec3(1.570796371f)); } @vertex diff --git a/test/tint/builtins/gen/literal/sin/15b2c6.wgsl b/test/tint/builtins/gen/literal/sin/15b2c6.wgsl index 999bfaa2b3..eee9561d67 100644 --- a/test/tint/builtins/gen/literal/sin/15b2c6.wgsl +++ b/test/tint/builtins/gen/literal/sin/15b2c6.wgsl @@ -23,7 +23,7 @@ // fn sin(vec<4, fa>) -> vec<4, fa> fn sin_15b2c6() { - var res = sin(vec4(1.)); + var res = sin(vec4(1.57079632679)); } @vertex diff --git a/test/tint/builtins/gen/literal/sin/15b2c6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sin/15b2c6.wgsl.expected.dxc.hlsl index 8b97a9db31..ecc1d7fc63 100644 --- a/test/tint/builtins/gen/literal/sin/15b2c6.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/sin/15b2c6.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sin_15b2c6() { - float4 res = (0.841470957f).xxxx; + float4 res = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sin/15b2c6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sin/15b2c6.wgsl.expected.fxc.hlsl index 8b97a9db31..ecc1d7fc63 100644 --- a/test/tint/builtins/gen/literal/sin/15b2c6.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/sin/15b2c6.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void sin_15b2c6() { - float4 res = (0.841470957f).xxxx; + float4 res = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sin/15b2c6.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sin/15b2c6.wgsl.expected.glsl index 2ba8b10dbd..0010c8021d 100644 --- a/test/tint/builtins/gen/literal/sin/15b2c6.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/sin/15b2c6.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void sin_15b2c6() { - vec4 res = vec4(0.841470957f); + vec4 res = vec4(1.0f); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void sin_15b2c6() { - vec4 res = vec4(0.841470957f); + vec4 res = vec4(1.0f); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void sin_15b2c6() { - vec4 res = vec4(0.841470957f); + vec4 res = vec4(1.0f); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/sin/15b2c6.wgsl.expected.msl b/test/tint/builtins/gen/literal/sin/15b2c6.wgsl.expected.msl index 4f69b5b296..7783cbb1bc 100644 --- a/test/tint/builtins/gen/literal/sin/15b2c6.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/sin/15b2c6.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sin_15b2c6() { - float4 res = float4(0.841470957f); + float4 res = float4(1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sin/15b2c6.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sin/15b2c6.wgsl.expected.spvasm index 7e73f04a67..0fdaae6bdd 100644 --- a/test/tint/builtins/gen/literal/sin/15b2c6.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/sin/15b2c6.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 30 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -30,11 +30,10 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%float_0_841470957 = OpConstant %float 0.841470957 - %14 = OpConstantComposite %v4float %float_0_841470957 %float_0_841470957 %float_0_841470957 %float_0_841470957 + %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 - %float_1 = OpConstant %float 1 %sin_15b2c6 = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 @@ -54,12 +53,12 @@ OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %sin_15b2c6 + %25 = OpLabel + %26 = OpFunctionCall %void %sin_15b2c6 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %sin_15b2c6 + %28 = OpLabel + %29 = OpFunctionCall %void %sin_15b2c6 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/sin/15b2c6.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sin/15b2c6.wgsl.expected.wgsl index 813a57962e..ac0d7a34a0 100644 --- a/test/tint/builtins/gen/literal/sin/15b2c6.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/sin/15b2c6.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn sin_15b2c6() { - var res = sin(vec4(1.0)); + var res = sin(vec4(1.57079632679)); } @vertex diff --git a/test/tint/builtins/gen/literal/sin/2c903b.wgsl b/test/tint/builtins/gen/literal/sin/2c903b.wgsl index 6b149103c9..88a85dc000 100644 --- a/test/tint/builtins/gen/literal/sin/2c903b.wgsl +++ b/test/tint/builtins/gen/literal/sin/2c903b.wgsl @@ -25,7 +25,7 @@ enable f16; // fn sin(vec<3, f16>) -> vec<3, f16> fn sin_2c903b() { - var res: vec3 = sin(vec3(1.h)); + var res: vec3 = sin(vec3(1.57079632679h)); } @vertex diff --git a/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.dxc.hlsl index 7992f1d65f..f1f266547d 100644 --- a/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sin_2c903b() { - vector res = (float16_t(0.841308594h)).xxx; + vector res = (float16_t(0.999511719h)).xxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.glsl index 88e3bc9959..dafd096123 100644 --- a/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void sin_2c903b() { - f16vec3 res = f16vec3(0.841308594hf); + f16vec3 res = f16vec3(0.999511719hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void sin_2c903b() { - f16vec3 res = f16vec3(0.841308594hf); + f16vec3 res = f16vec3(0.999511719hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void sin_2c903b() { - f16vec3 res = f16vec3(0.841308594hf); + f16vec3 res = f16vec3(0.999511719hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.msl b/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.msl index ee6759b118..48e1f49596 100644 --- a/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sin_2c903b() { - half3 res = half3(0.841308594h); + half3 res = half3(0.999511719h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.spvasm index b33742ada6..e88aa02b85 100644 --- a/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.spvasm @@ -36,8 +36,8 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 -%half_0x1_aecpn1 = OpConstant %half 0x1.aecp-1 - %16 = OpConstantComposite %v3half %half_0x1_aecpn1 %half_0x1_aecpn1 %half_0x1_aecpn1 +%half_0x1_ffcpn1 = OpConstant %half 0x1.ffcp-1 + %16 = OpConstantComposite %v3half %half_0x1_ffcpn1 %half_0x1_ffcpn1 %half_0x1_ffcpn1 %_ptr_Function_v3half = OpTypePointer Function %v3half %19 = OpConstantNull %v3half %20 = OpTypeFunction %v4float diff --git a/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.wgsl index 9eaacf0028..77e5c4a241 100644 --- a/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn sin_2c903b() { - var res : vec3 = sin(vec3(1.0h)); + var res : vec3 = sin(vec3(1.5703125h)); } @vertex diff --git a/test/tint/builtins/gen/literal/sin/3cca11.wgsl b/test/tint/builtins/gen/literal/sin/3cca11.wgsl index edc4cf43ab..7c83bbc60c 100644 --- a/test/tint/builtins/gen/literal/sin/3cca11.wgsl +++ b/test/tint/builtins/gen/literal/sin/3cca11.wgsl @@ -25,7 +25,7 @@ enable f16; // fn sin(vec<2, f16>) -> vec<2, f16> fn sin_3cca11() { - var res: vec2 = sin(vec2(1.h)); + var res: vec2 = sin(vec2(1.57079632679h)); } @vertex diff --git a/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.dxc.hlsl index f203c729fd..54efd9406e 100644 --- a/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sin_3cca11() { - vector res = (float16_t(0.841308594h)).xx; + vector res = (float16_t(0.999511719h)).xx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.glsl index b76cc11676..1fb265d894 100644 --- a/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void sin_3cca11() { - f16vec2 res = f16vec2(0.841308594hf); + f16vec2 res = f16vec2(0.999511719hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void sin_3cca11() { - f16vec2 res = f16vec2(0.841308594hf); + f16vec2 res = f16vec2(0.999511719hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void sin_3cca11() { - f16vec2 res = f16vec2(0.841308594hf); + f16vec2 res = f16vec2(0.999511719hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.msl b/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.msl index ea8f224d06..f4e66e779d 100644 --- a/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sin_3cca11() { - half2 res = half2(0.841308594h); + half2 res = half2(0.999511719h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.spvasm index d048b86ed2..6fd2e30c64 100644 --- a/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.spvasm @@ -36,8 +36,8 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 -%half_0x1_aecpn1 = OpConstant %half 0x1.aecp-1 - %16 = OpConstantComposite %v2half %half_0x1_aecpn1 %half_0x1_aecpn1 +%half_0x1_ffcpn1 = OpConstant %half 0x1.ffcp-1 + %16 = OpConstantComposite %v2half %half_0x1_ffcpn1 %half_0x1_ffcpn1 %_ptr_Function_v2half = OpTypePointer Function %v2half %19 = OpConstantNull %v2half %20 = OpTypeFunction %v4float diff --git a/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.wgsl index 4f84e034c3..053b1982e4 100644 --- a/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn sin_3cca11() { - var res : vec2 = sin(vec2(1.0h)); + var res : vec2 = sin(vec2(1.5703125h)); } @vertex diff --git a/test/tint/builtins/gen/literal/sin/4e3979.wgsl b/test/tint/builtins/gen/literal/sin/4e3979.wgsl index aa9d887aad..3ec5efb4df 100644 --- a/test/tint/builtins/gen/literal/sin/4e3979.wgsl +++ b/test/tint/builtins/gen/literal/sin/4e3979.wgsl @@ -23,7 +23,7 @@ // fn sin(vec<4, f32>) -> vec<4, f32> fn sin_4e3979() { - var res: vec4 = sin(vec4(1.f)); + var res: vec4 = sin(vec4(1.57079632679f)); } @vertex diff --git a/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.dxc.hlsl index a047b7ea88..0212c7c7a1 100644 --- a/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sin_4e3979() { - float4 res = (0.841470957f).xxxx; + float4 res = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.fxc.hlsl index a047b7ea88..0212c7c7a1 100644 --- a/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void sin_4e3979() { - float4 res = (0.841470957f).xxxx; + float4 res = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.glsl index 18cdaba8e2..34173b065b 100644 --- a/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void sin_4e3979() { - vec4 res = vec4(0.841470957f); + vec4 res = vec4(1.0f); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void sin_4e3979() { - vec4 res = vec4(0.841470957f); + vec4 res = vec4(1.0f); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void sin_4e3979() { - vec4 res = vec4(0.841470957f); + vec4 res = vec4(1.0f); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.msl b/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.msl index 49514f3f5d..c95d9a7bf9 100644 --- a/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sin_4e3979() { - float4 res = float4(0.841470957f); + float4 res = float4(1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.spvasm index dbb70fbd23..c8791d999d 100644 --- a/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 30 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -30,11 +30,10 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%float_0_841470957 = OpConstant %float 0.841470957 - %14 = OpConstantComposite %v4float %float_0_841470957 %float_0_841470957 %float_0_841470957 %float_0_841470957 + %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 - %float_1 = OpConstant %float 1 %sin_4e3979 = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 @@ -54,12 +53,12 @@ OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %sin_4e3979 + %25 = OpLabel + %26 = OpFunctionCall %void %sin_4e3979 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %sin_4e3979 + %28 = OpLabel + %29 = OpFunctionCall %void %sin_4e3979 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.wgsl index de883118e1..b34cd5064d 100644 --- a/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn sin_4e3979() { - var res : vec4 = sin(vec4(1.0f)); + var res : vec4 = sin(vec4(1.570796371f)); } @vertex diff --git a/test/tint/builtins/gen/literal/sin/5c0712.wgsl b/test/tint/builtins/gen/literal/sin/5c0712.wgsl index 5c11b0887e..63b0abc3f9 100644 --- a/test/tint/builtins/gen/literal/sin/5c0712.wgsl +++ b/test/tint/builtins/gen/literal/sin/5c0712.wgsl @@ -25,7 +25,7 @@ enable f16; // fn sin(vec<4, f16>) -> vec<4, f16> fn sin_5c0712() { - var res: vec4 = sin(vec4(1.h)); + var res: vec4 = sin(vec4(1.57079632679h)); } @vertex diff --git a/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.dxc.hlsl index 157c610eae..3bc3e1a012 100644 --- a/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sin_5c0712() { - vector res = (float16_t(0.841308594h)).xxxx; + vector res = (float16_t(0.999511719h)).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.glsl index f62212d712..7062bc71b0 100644 --- a/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void sin_5c0712() { - f16vec4 res = f16vec4(0.841308594hf); + f16vec4 res = f16vec4(0.999511719hf); } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void sin_5c0712() { - f16vec4 res = f16vec4(0.841308594hf); + f16vec4 res = f16vec4(0.999511719hf); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void sin_5c0712() { - f16vec4 res = f16vec4(0.841308594hf); + f16vec4 res = f16vec4(0.999511719hf); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.msl b/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.msl index 5ba7f1e648..d391468feb 100644 --- a/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sin_5c0712() { - half4 res = half4(0.841308594h); + half4 res = half4(0.999511719h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.spvasm index c0f21df6a1..98d07ed67f 100644 --- a/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.spvasm @@ -36,8 +36,8 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 -%half_0x1_aecpn1 = OpConstant %half 0x1.aecp-1 - %16 = OpConstantComposite %v4half %half_0x1_aecpn1 %half_0x1_aecpn1 %half_0x1_aecpn1 %half_0x1_aecpn1 +%half_0x1_ffcpn1 = OpConstant %half 0x1.ffcp-1 + %16 = OpConstantComposite %v4half %half_0x1_ffcpn1 %half_0x1_ffcpn1 %half_0x1_ffcpn1 %half_0x1_ffcpn1 %_ptr_Function_v4half = OpTypePointer Function %v4half %19 = OpConstantNull %v4half %20 = OpTypeFunction %v4float diff --git a/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.wgsl index 43fc5bcc57..5f1ec6fbfa 100644 --- a/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn sin_5c0712() { - var res : vec4 = sin(vec4(1.0h)); + var res : vec4 = sin(vec4(1.5703125h)); } @vertex diff --git a/test/tint/builtins/gen/literal/sin/66a59f.wgsl b/test/tint/builtins/gen/literal/sin/66a59f.wgsl index 874c051f88..3e3af8a647 100644 --- a/test/tint/builtins/gen/literal/sin/66a59f.wgsl +++ b/test/tint/builtins/gen/literal/sin/66a59f.wgsl @@ -25,7 +25,7 @@ enable f16; // fn sin(f16) -> f16 fn sin_66a59f() { - var res: f16 = sin(1.h); + var res: f16 = sin(1.57079632679h); } @vertex diff --git a/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.dxc.hlsl index 4309c66507..2b4a4863ef 100644 --- a/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sin_66a59f() { - float16_t res = float16_t(0.841308594h); + float16_t res = float16_t(0.999511719h); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.glsl index ab2032d916..7f38b05560 100644 --- a/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void sin_66a59f() { - float16_t res = 0.841308594hf; + float16_t res = 0.999511719hf; } vec4 vertex_main() { @@ -23,7 +23,7 @@ void main() { precision mediump float; void sin_66a59f() { - float16_t res = 0.841308594hf; + float16_t res = 0.999511719hf; } void fragment_main() { @@ -38,7 +38,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void sin_66a59f() { - float16_t res = 0.841308594hf; + float16_t res = 0.999511719hf; } void compute_main() { diff --git a/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.msl b/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.msl index 0eb26eb8e3..25b572f23e 100644 --- a/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sin_66a59f() { - half res = 0.841308594h; + half res = 0.999511719h; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.spvasm index 3084682ac0..5b659b5c63 100644 --- a/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.spvasm @@ -35,7 +35,7 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 -%half_0x1_aecpn1 = OpConstant %half 0x1.aecp-1 +%half_0x1_ffcpn1 = OpConstant %half 0x1.ffcp-1 %_ptr_Function_half = OpTypePointer Function %half %17 = OpConstantNull %half %18 = OpTypeFunction %v4float @@ -43,7 +43,7 @@ %sin_66a59f = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_half Function %17 - OpStore %res %half_0x1_aecpn1 + OpStore %res %half_0x1_ffcpn1 OpReturn OpFunctionEnd %vertex_main_inner = OpFunction %v4float None %18 diff --git a/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.wgsl index 78e208584f..c3681d9f0d 100644 --- a/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn sin_66a59f() { - var res : f16 = sin(1.0h); + var res : f16 = sin(1.5703125h); } @vertex diff --git a/test/tint/builtins/gen/literal/sin/67b03c.wgsl b/test/tint/builtins/gen/literal/sin/67b03c.wgsl index 7d7a15a31a..a576cad099 100644 --- a/test/tint/builtins/gen/literal/sin/67b03c.wgsl +++ b/test/tint/builtins/gen/literal/sin/67b03c.wgsl @@ -23,7 +23,7 @@ // fn sin(vec<3, fa>) -> vec<3, fa> fn sin_67b03c() { - var res = sin(vec3(1.)); + var res = sin(vec3(1.57079632679)); } @vertex diff --git a/test/tint/builtins/gen/literal/sin/67b03c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sin/67b03c.wgsl.expected.dxc.hlsl index 90603d178f..bf66046e58 100644 --- a/test/tint/builtins/gen/literal/sin/67b03c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/sin/67b03c.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sin_67b03c() { - float3 res = (0.841470957f).xxx; + float3 res = (1.0f).xxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sin/67b03c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sin/67b03c.wgsl.expected.fxc.hlsl index 90603d178f..bf66046e58 100644 --- a/test/tint/builtins/gen/literal/sin/67b03c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/sin/67b03c.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void sin_67b03c() { - float3 res = (0.841470957f).xxx; + float3 res = (1.0f).xxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sin/67b03c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sin/67b03c.wgsl.expected.glsl index aa3e311f89..efc102b2af 100644 --- a/test/tint/builtins/gen/literal/sin/67b03c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/sin/67b03c.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void sin_67b03c() { - vec3 res = vec3(0.841470957f); + vec3 res = vec3(1.0f); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void sin_67b03c() { - vec3 res = vec3(0.841470957f); + vec3 res = vec3(1.0f); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void sin_67b03c() { - vec3 res = vec3(0.841470957f); + vec3 res = vec3(1.0f); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/sin/67b03c.wgsl.expected.msl b/test/tint/builtins/gen/literal/sin/67b03c.wgsl.expected.msl index 8b83077dad..4259105d9e 100644 --- a/test/tint/builtins/gen/literal/sin/67b03c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/sin/67b03c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sin_67b03c() { - float3 res = float3(0.841470957f); + float3 res = float3(1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sin/67b03c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sin/67b03c.wgsl.expected.spvasm index 78483fe1bf..92f2307d9f 100644 --- a/test/tint/builtins/gen/literal/sin/67b03c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/sin/67b03c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 32 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -31,12 +31,11 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 -%float_0_841470957 = OpConstant %float 0.841470957 - %15 = OpConstantComposite %v3float %float_0_841470957 %float_0_841470957 %float_0_841470957 + %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 - %float_1 = OpConstant %float 1 %sin_67b03c = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_v3float Function %18 @@ -56,12 +55,12 @@ OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %sin_67b03c + %27 = OpLabel + %28 = OpFunctionCall %void %sin_67b03c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %sin_67b03c + %30 = OpLabel + %31 = OpFunctionCall %void %sin_67b03c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/sin/67b03c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sin/67b03c.wgsl.expected.wgsl index 16abcc6fce..66c7133d28 100644 --- a/test/tint/builtins/gen/literal/sin/67b03c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/sin/67b03c.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn sin_67b03c() { - var res = sin(vec3(1.0)); + var res = sin(vec3(1.57079632679)); } @vertex diff --git a/test/tint/builtins/gen/literal/sin/68d3ab.wgsl b/test/tint/builtins/gen/literal/sin/68d3ab.wgsl index 365edfe868..d99efea7dd 100644 --- a/test/tint/builtins/gen/literal/sin/68d3ab.wgsl +++ b/test/tint/builtins/gen/literal/sin/68d3ab.wgsl @@ -23,7 +23,7 @@ // fn sin(vec<2, fa>) -> vec<2, fa> fn sin_68d3ab() { - var res = sin(vec2(1.)); + var res = sin(vec2(1.57079632679)); } @vertex diff --git a/test/tint/builtins/gen/literal/sin/68d3ab.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sin/68d3ab.wgsl.expected.dxc.hlsl index e6a7d5a825..0d3ff428b6 100644 --- a/test/tint/builtins/gen/literal/sin/68d3ab.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/sin/68d3ab.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sin_68d3ab() { - float2 res = (0.841470957f).xx; + float2 res = (1.0f).xx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sin/68d3ab.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sin/68d3ab.wgsl.expected.fxc.hlsl index e6a7d5a825..0d3ff428b6 100644 --- a/test/tint/builtins/gen/literal/sin/68d3ab.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/sin/68d3ab.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void sin_68d3ab() { - float2 res = (0.841470957f).xx; + float2 res = (1.0f).xx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sin/68d3ab.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sin/68d3ab.wgsl.expected.glsl index 6735f51941..497f2b9352 100644 --- a/test/tint/builtins/gen/literal/sin/68d3ab.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/sin/68d3ab.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void sin_68d3ab() { - vec2 res = vec2(0.841470957f); + vec2 res = vec2(1.0f); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void sin_68d3ab() { - vec2 res = vec2(0.841470957f); + vec2 res = vec2(1.0f); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void sin_68d3ab() { - vec2 res = vec2(0.841470957f); + vec2 res = vec2(1.0f); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/sin/68d3ab.wgsl.expected.msl b/test/tint/builtins/gen/literal/sin/68d3ab.wgsl.expected.msl index e10514f093..09e83baa73 100644 --- a/test/tint/builtins/gen/literal/sin/68d3ab.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/sin/68d3ab.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sin_68d3ab() { - float2 res = float2(0.841470957f); + float2 res = float2(1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sin/68d3ab.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sin/68d3ab.wgsl.expected.spvasm index 32dd535a1f..3570bbb627 100644 --- a/test/tint/builtins/gen/literal/sin/68d3ab.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/sin/68d3ab.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 32 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -31,12 +31,11 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 -%float_0_841470957 = OpConstant %float 0.841470957 - %15 = OpConstantComposite %v2float %float_0_841470957 %float_0_841470957 + %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float %18 = OpConstantNull %v2float %19 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 %sin_68d3ab = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_v2float Function %18 @@ -56,12 +55,12 @@ OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %sin_68d3ab + %27 = OpLabel + %28 = OpFunctionCall %void %sin_68d3ab OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %sin_68d3ab + %30 = OpLabel + %31 = OpFunctionCall %void %sin_68d3ab OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/sin/68d3ab.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sin/68d3ab.wgsl.expected.wgsl index 2411b26b80..c5dc6fbf7a 100644 --- a/test/tint/builtins/gen/literal/sin/68d3ab.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/sin/68d3ab.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn sin_68d3ab() { - var res = sin(vec2(1.0)); + var res = sin(vec2(1.57079632679)); } @vertex diff --git a/test/tint/builtins/gen/literal/sin/a9ab19.wgsl b/test/tint/builtins/gen/literal/sin/a9ab19.wgsl index 029bb4830c..ae6110a6b6 100644 --- a/test/tint/builtins/gen/literal/sin/a9ab19.wgsl +++ b/test/tint/builtins/gen/literal/sin/a9ab19.wgsl @@ -23,7 +23,7 @@ // fn sin(fa) -> fa fn sin_a9ab19() { - var res = sin(1.); + var res = sin(1.57079632679); } @vertex diff --git a/test/tint/builtins/gen/literal/sin/a9ab19.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sin/a9ab19.wgsl.expected.dxc.hlsl index f36fe78a52..1565ebc3e9 100644 --- a/test/tint/builtins/gen/literal/sin/a9ab19.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/sin/a9ab19.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sin_a9ab19() { - float res = 0.841470957f; + float res = 1.0f; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sin/a9ab19.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sin/a9ab19.wgsl.expected.fxc.hlsl index f36fe78a52..1565ebc3e9 100644 --- a/test/tint/builtins/gen/literal/sin/a9ab19.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/sin/a9ab19.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void sin_a9ab19() { - float res = 0.841470957f; + float res = 1.0f; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sin/a9ab19.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sin/a9ab19.wgsl.expected.glsl index f6a5e5a376..1a38190870 100644 --- a/test/tint/builtins/gen/literal/sin/a9ab19.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/sin/a9ab19.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void sin_a9ab19() { - float res = 0.841470957f; + float res = 1.0f; } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void sin_a9ab19() { - float res = 0.841470957f; + float res = 1.0f; } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void sin_a9ab19() { - float res = 0.841470957f; + float res = 1.0f; } void compute_main() { diff --git a/test/tint/builtins/gen/literal/sin/a9ab19.wgsl.expected.msl b/test/tint/builtins/gen/literal/sin/a9ab19.wgsl.expected.msl index 3c5cb44dcf..0e408a0202 100644 --- a/test/tint/builtins/gen/literal/sin/a9ab19.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/sin/a9ab19.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sin_a9ab19() { - float res = 0.841470957f; + float res = 1.0f; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sin/a9ab19.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sin/a9ab19.wgsl.expected.spvasm index f34059772e..ccf3764438 100644 --- a/test/tint/builtins/gen/literal/sin/a9ab19.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/sin/a9ab19.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 30 +; Bound: 29 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -30,14 +30,13 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%float_0_841470957 = OpConstant %float 0.841470957 + %float_1 = OpConstant %float 1 %_ptr_Function_float = OpTypePointer Function %float %16 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 %sin_a9ab19 = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 - OpStore %res %float_0_841470957 + OpStore %res %float_1 OpReturn OpFunctionEnd %vertex_main_inner = OpFunction %v4float None %16 @@ -53,12 +52,12 @@ OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %void %sin_a9ab19 + %24 = OpLabel + %25 = OpFunctionCall %void %sin_a9ab19 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %sin_a9ab19 + %27 = OpLabel + %28 = OpFunctionCall %void %sin_a9ab19 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/sin/a9ab19.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sin/a9ab19.wgsl.expected.wgsl index 5e8b038f26..ee62525156 100644 --- a/test/tint/builtins/gen/literal/sin/a9ab19.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/sin/a9ab19.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn sin_a9ab19() { - var res = sin(1.0); + var res = sin(1.57079632679); } @vertex diff --git a/test/tint/builtins/gen/literal/sin/b78c91.wgsl b/test/tint/builtins/gen/literal/sin/b78c91.wgsl index 590c6dacd5..e14a7c4be2 100644 --- a/test/tint/builtins/gen/literal/sin/b78c91.wgsl +++ b/test/tint/builtins/gen/literal/sin/b78c91.wgsl @@ -23,7 +23,7 @@ // fn sin(f32) -> f32 fn sin_b78c91() { - var res: f32 = sin(1.f); + var res: f32 = sin(1.57079632679f); } @vertex diff --git a/test/tint/builtins/gen/literal/sin/b78c91.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sin/b78c91.wgsl.expected.dxc.hlsl index e7d7d5bb4e..fd1ee0d797 100644 --- a/test/tint/builtins/gen/literal/sin/b78c91.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/sin/b78c91.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sin_b78c91() { - float res = 0.841470957f; + float res = 1.0f; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sin/b78c91.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sin/b78c91.wgsl.expected.fxc.hlsl index e7d7d5bb4e..fd1ee0d797 100644 --- a/test/tint/builtins/gen/literal/sin/b78c91.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/sin/b78c91.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void sin_b78c91() { - float res = 0.841470957f; + float res = 1.0f; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sin/b78c91.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sin/b78c91.wgsl.expected.glsl index f4b82c9db9..21a146c596 100644 --- a/test/tint/builtins/gen/literal/sin/b78c91.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/sin/b78c91.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void sin_b78c91() { - float res = 0.841470957f; + float res = 1.0f; } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void sin_b78c91() { - float res = 0.841470957f; + float res = 1.0f; } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void sin_b78c91() { - float res = 0.841470957f; + float res = 1.0f; } void compute_main() { diff --git a/test/tint/builtins/gen/literal/sin/b78c91.wgsl.expected.msl b/test/tint/builtins/gen/literal/sin/b78c91.wgsl.expected.msl index 6bfccd08a5..502aa676ef 100644 --- a/test/tint/builtins/gen/literal/sin/b78c91.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/sin/b78c91.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sin_b78c91() { - float res = 0.841470957f; + float res = 1.0f; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sin/b78c91.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sin/b78c91.wgsl.expected.spvasm index 354c0be2b6..09685b220b 100644 --- a/test/tint/builtins/gen/literal/sin/b78c91.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/sin/b78c91.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 30 +; Bound: 29 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -30,14 +30,13 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%float_0_841470957 = OpConstant %float 0.841470957 + %float_1 = OpConstant %float 1 %_ptr_Function_float = OpTypePointer Function %float %16 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 %sin_b78c91 = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 - OpStore %res %float_0_841470957 + OpStore %res %float_1 OpReturn OpFunctionEnd %vertex_main_inner = OpFunction %v4float None %16 @@ -53,12 +52,12 @@ OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %void %sin_b78c91 + %24 = OpLabel + %25 = OpFunctionCall %void %sin_b78c91 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %sin_b78c91 + %27 = OpLabel + %28 = OpFunctionCall %void %sin_b78c91 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/sin/b78c91.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sin/b78c91.wgsl.expected.wgsl index ed5914c907..e2ee40dea2 100644 --- a/test/tint/builtins/gen/literal/sin/b78c91.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/sin/b78c91.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn sin_b78c91() { - var res : f32 = sin(1.0f); + var res : f32 = sin(1.570796371f); } @vertex diff --git a/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl b/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl index 8c14832fa0..4f40970f77 100644 --- a/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl +++ b/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl @@ -23,7 +23,7 @@ // fn sin(vec<2, f32>) -> vec<2, f32> fn sin_fc8bc4() { - var res: vec2 = sin(vec2(1.f)); + var res: vec2 = sin(vec2(1.57079632679f)); } @vertex diff --git a/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.dxc.hlsl index f3522fa503..a3f5f5efb6 100644 --- a/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sin_fc8bc4() { - float2 res = (0.841470957f).xx; + float2 res = (1.0f).xx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.fxc.hlsl index f3522fa503..a3f5f5efb6 100644 --- a/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void sin_fc8bc4() { - float2 res = (0.841470957f).xx; + float2 res = (1.0f).xx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.glsl index 07a0e81049..ea6ce7a592 100644 --- a/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void sin_fc8bc4() { - vec2 res = vec2(0.841470957f); + vec2 res = vec2(1.0f); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void sin_fc8bc4() { - vec2 res = vec2(0.841470957f); + vec2 res = vec2(1.0f); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void sin_fc8bc4() { - vec2 res = vec2(0.841470957f); + vec2 res = vec2(1.0f); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.msl b/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.msl index 20e905e368..3e6d8b68c5 100644 --- a/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sin_fc8bc4() { - float2 res = float2(0.841470957f); + float2 res = float2(1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.spvasm index abba39868c..d4d1dd086f 100644 --- a/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 32 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -31,12 +31,11 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 -%float_0_841470957 = OpConstant %float 0.841470957 - %15 = OpConstantComposite %v2float %float_0_841470957 %float_0_841470957 + %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float %18 = OpConstantNull %v2float %19 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 %sin_fc8bc4 = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_v2float Function %18 @@ -56,12 +55,12 @@ OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %sin_fc8bc4 + %27 = OpLabel + %28 = OpFunctionCall %void %sin_fc8bc4 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %sin_fc8bc4 + %30 = OpLabel + %31 = OpFunctionCall %void %sin_fc8bc4 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.wgsl index 62f5f13f3a..f51b8526a9 100644 --- a/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn sin_fc8bc4() { - var res : vec2 = sin(vec2(1.0f)); + var res : vec2 = sin(vec2(1.570796371f)); } @vertex diff --git a/test/tint/builtins/gen/var/sin/01f241.wgsl b/test/tint/builtins/gen/var/sin/01f241.wgsl index 01345bdfe5..b20e8a66ea 100644 --- a/test/tint/builtins/gen/var/sin/01f241.wgsl +++ b/test/tint/builtins/gen/var/sin/01f241.wgsl @@ -23,7 +23,7 @@ // fn sin(vec<3, f32>) -> vec<3, f32> fn sin_01f241() { - var arg_0 = vec3(1.f); + var arg_0 = vec3(1.57079632679f); var res: vec3 = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/01f241.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sin/01f241.wgsl.expected.dxc.hlsl index e8ff0a806b..17f3c9bd0e 100644 --- a/test/tint/builtins/gen/var/sin/01f241.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/sin/01f241.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sin_01f241() { - float3 arg_0 = (1.0f).xxx; + float3 arg_0 = (1.570796371f).xxx; float3 res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/01f241.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sin/01f241.wgsl.expected.fxc.hlsl index e8ff0a806b..17f3c9bd0e 100644 --- a/test/tint/builtins/gen/var/sin/01f241.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/sin/01f241.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void sin_01f241() { - float3 arg_0 = (1.0f).xxx; + float3 arg_0 = (1.570796371f).xxx; float3 res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/01f241.wgsl.expected.glsl b/test/tint/builtins/gen/var/sin/01f241.wgsl.expected.glsl index 9f99f43209..8ef7f1c820 100644 --- a/test/tint/builtins/gen/var/sin/01f241.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/sin/01f241.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void sin_01f241() { - vec3 arg_0 = vec3(1.0f); + vec3 arg_0 = vec3(1.570796371f); vec3 res = sin(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void sin_01f241() { - vec3 arg_0 = vec3(1.0f); + vec3 arg_0 = vec3(1.570796371f); vec3 res = sin(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void sin_01f241() { - vec3 arg_0 = vec3(1.0f); + vec3 arg_0 = vec3(1.570796371f); vec3 res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/01f241.wgsl.expected.msl b/test/tint/builtins/gen/var/sin/01f241.wgsl.expected.msl index d36e8b06c9..f5b43ae2f5 100644 --- a/test/tint/builtins/gen/var/sin/01f241.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/sin/01f241.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sin_01f241() { - float3 arg_0 = float3(1.0f); + float3 arg_0 = float3(1.570796371f); float3 res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/01f241.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sin/01f241.wgsl.expected.spvasm index 14c4afcd67..851e12ca20 100644 --- a/test/tint/builtins/gen/var/sin/01f241.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/sin/01f241.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_1_57079637 = OpConstant %float 1.57079637 + %15 = OpConstantComposite %v3float %float_1_57079637 %float_1_57079637 %float_1_57079637 %_ptr_Function_v3float = OpTypePointer Function %v3float %18 = OpConstantNull %v3float %23 = OpTypeFunction %v4float + %float_1 = OpConstant %float 1 %sin_01f241 = 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 %sin_01f241 + %32 = OpLabel + %33 = OpFunctionCall %void %sin_01f241 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %sin_01f241 + %35 = OpLabel + %36 = OpFunctionCall %void %sin_01f241 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/sin/01f241.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sin/01f241.wgsl.expected.wgsl index 41822a417a..edf3cbe0fe 100644 --- a/test/tint/builtins/gen/var/sin/01f241.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/sin/01f241.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn sin_01f241() { - var arg_0 = vec3(1.0f); + var arg_0 = vec3(1.570796371f); var res : vec3 = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/15b2c6.wgsl b/test/tint/builtins/gen/var/sin/15b2c6.wgsl index 8d53440d62..dffbdc12ca 100644 --- a/test/tint/builtins/gen/var/sin/15b2c6.wgsl +++ b/test/tint/builtins/gen/var/sin/15b2c6.wgsl @@ -23,7 +23,7 @@ // fn sin(vec<4, fa>) -> vec<4, fa> fn sin_15b2c6() { - const arg_0 = vec4(1.); + const arg_0 = vec4(1.57079632679); var res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/15b2c6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sin/15b2c6.wgsl.expected.dxc.hlsl index 8b97a9db31..ecc1d7fc63 100644 --- a/test/tint/builtins/gen/var/sin/15b2c6.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/sin/15b2c6.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sin_15b2c6() { - float4 res = (0.841470957f).xxxx; + float4 res = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/sin/15b2c6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sin/15b2c6.wgsl.expected.fxc.hlsl index 8b97a9db31..ecc1d7fc63 100644 --- a/test/tint/builtins/gen/var/sin/15b2c6.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/sin/15b2c6.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void sin_15b2c6() { - float4 res = (0.841470957f).xxxx; + float4 res = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/sin/15b2c6.wgsl.expected.glsl b/test/tint/builtins/gen/var/sin/15b2c6.wgsl.expected.glsl index 2ba8b10dbd..0010c8021d 100644 --- a/test/tint/builtins/gen/var/sin/15b2c6.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/sin/15b2c6.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void sin_15b2c6() { - vec4 res = vec4(0.841470957f); + vec4 res = vec4(1.0f); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void sin_15b2c6() { - vec4 res = vec4(0.841470957f); + vec4 res = vec4(1.0f); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void sin_15b2c6() { - vec4 res = vec4(0.841470957f); + vec4 res = vec4(1.0f); } void compute_main() { diff --git a/test/tint/builtins/gen/var/sin/15b2c6.wgsl.expected.msl b/test/tint/builtins/gen/var/sin/15b2c6.wgsl.expected.msl index 4f69b5b296..7783cbb1bc 100644 --- a/test/tint/builtins/gen/var/sin/15b2c6.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/sin/15b2c6.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sin_15b2c6() { - float4 res = float4(0.841470957f); + float4 res = float4(1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/sin/15b2c6.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sin/15b2c6.wgsl.expected.spvasm index 7e73f04a67..0fdaae6bdd 100644 --- a/test/tint/builtins/gen/var/sin/15b2c6.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/sin/15b2c6.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 30 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -30,11 +30,10 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%float_0_841470957 = OpConstant %float 0.841470957 - %14 = OpConstantComposite %v4float %float_0_841470957 %float_0_841470957 %float_0_841470957 %float_0_841470957 + %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 - %float_1 = OpConstant %float 1 %sin_15b2c6 = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 @@ -54,12 +53,12 @@ OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %sin_15b2c6 + %25 = OpLabel + %26 = OpFunctionCall %void %sin_15b2c6 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %sin_15b2c6 + %28 = OpLabel + %29 = OpFunctionCall %void %sin_15b2c6 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/sin/15b2c6.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sin/15b2c6.wgsl.expected.wgsl index bf5e782f6f..e4e645397b 100644 --- a/test/tint/builtins/gen/var/sin/15b2c6.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/sin/15b2c6.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn sin_15b2c6() { - const arg_0 = vec4(1.0); + const arg_0 = vec4(1.57079632679); var res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/2c903b.wgsl b/test/tint/builtins/gen/var/sin/2c903b.wgsl index 5524188b00..29c7c1b9ad 100644 --- a/test/tint/builtins/gen/var/sin/2c903b.wgsl +++ b/test/tint/builtins/gen/var/sin/2c903b.wgsl @@ -25,7 +25,7 @@ enable f16; // fn sin(vec<3, f16>) -> vec<3, f16> fn sin_2c903b() { - var arg_0 = vec3(1.h); + var arg_0 = vec3(1.57079632679h); var res: vec3 = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.dxc.hlsl index 7e377b06d5..685aeb2156 100644 --- a/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sin_2c903b() { - vector arg_0 = (float16_t(1.0h)).xxx; + vector arg_0 = (float16_t(1.5703125h)).xxx; vector res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.glsl b/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.glsl index 4e80fbf4d9..243c457f17 100644 --- a/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void sin_2c903b() { - f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_0 = f16vec3(1.5703125hf); f16vec3 res = sin(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void sin_2c903b() { - f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_0 = f16vec3(1.5703125hf); f16vec3 res = sin(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void sin_2c903b() { - f16vec3 arg_0 = f16vec3(1.0hf); + f16vec3 arg_0 = f16vec3(1.5703125hf); f16vec3 res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.msl b/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.msl index 04bcb866ff..22dc935924 100644 --- a/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sin_2c903b() { - half3 arg_0 = half3(1.0h); + half3 arg_0 = half3(1.5703125h); half3 res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.spvasm index 696db23ab4..4623ceec7c 100644 --- a/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.spvasm @@ -38,8 +38,8 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v3half = OpTypeVector %half 3 -%half_0x1p_0 = OpConstant %half 0x1p+0 - %16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 +%half_0x1_92p_0 = OpConstant %half 0x1.92p+0 + %16 = OpConstantComposite %v3half %half_0x1_92p_0 %half_0x1_92p_0 %half_0x1_92p_0 %_ptr_Function_v3half = OpTypePointer Function %v3half %19 = OpConstantNull %v3half %24 = OpTypeFunction %v4float diff --git a/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.wgsl index 381278f202..3481568283 100644 --- a/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn sin_2c903b() { - var arg_0 = vec3(1.0h); + var arg_0 = vec3(1.5703125h); var res : vec3 = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/3cca11.wgsl b/test/tint/builtins/gen/var/sin/3cca11.wgsl index 80b7c53032..c84fa1ef36 100644 --- a/test/tint/builtins/gen/var/sin/3cca11.wgsl +++ b/test/tint/builtins/gen/var/sin/3cca11.wgsl @@ -25,7 +25,7 @@ enable f16; // fn sin(vec<2, f16>) -> vec<2, f16> fn sin_3cca11() { - var arg_0 = vec2(1.h); + var arg_0 = vec2(1.57079632679h); var res: vec2 = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.dxc.hlsl index d3d875a232..747798bab4 100644 --- a/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sin_3cca11() { - vector arg_0 = (float16_t(1.0h)).xx; + vector arg_0 = (float16_t(1.5703125h)).xx; vector res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.glsl b/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.glsl index ab019e2cf3..9b71f4f8f5 100644 --- a/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void sin_3cca11() { - f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_0 = f16vec2(1.5703125hf); f16vec2 res = sin(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void sin_3cca11() { - f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_0 = f16vec2(1.5703125hf); f16vec2 res = sin(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void sin_3cca11() { - f16vec2 arg_0 = f16vec2(1.0hf); + f16vec2 arg_0 = f16vec2(1.5703125hf); f16vec2 res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.msl b/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.msl index afa9a3804a..9f3711226a 100644 --- a/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sin_3cca11() { - half2 arg_0 = half2(1.0h); + half2 arg_0 = half2(1.5703125h); half2 res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.spvasm index b227acb9c1..db3abd2a9a 100644 --- a/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.spvasm @@ -38,8 +38,8 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v2half = OpTypeVector %half 2 -%half_0x1p_0 = OpConstant %half 0x1p+0 - %16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0 +%half_0x1_92p_0 = OpConstant %half 0x1.92p+0 + %16 = OpConstantComposite %v2half %half_0x1_92p_0 %half_0x1_92p_0 %_ptr_Function_v2half = OpTypePointer Function %v2half %19 = OpConstantNull %v2half %24 = OpTypeFunction %v4float diff --git a/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.wgsl index e5f5ea8e2e..29c6f7dce9 100644 --- a/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn sin_3cca11() { - var arg_0 = vec2(1.0h); + var arg_0 = vec2(1.5703125h); var res : vec2 = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/4e3979.wgsl b/test/tint/builtins/gen/var/sin/4e3979.wgsl index d4ef5016fe..74f0723616 100644 --- a/test/tint/builtins/gen/var/sin/4e3979.wgsl +++ b/test/tint/builtins/gen/var/sin/4e3979.wgsl @@ -23,7 +23,7 @@ // fn sin(vec<4, f32>) -> vec<4, f32> fn sin_4e3979() { - var arg_0 = vec4(1.f); + var arg_0 = vec4(1.57079632679f); var res: vec4 = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/4e3979.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sin/4e3979.wgsl.expected.dxc.hlsl index 32993b495e..035f41d618 100644 --- a/test/tint/builtins/gen/var/sin/4e3979.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/sin/4e3979.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sin_4e3979() { - float4 arg_0 = (1.0f).xxxx; + float4 arg_0 = (1.570796371f).xxxx; float4 res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/4e3979.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sin/4e3979.wgsl.expected.fxc.hlsl index 32993b495e..035f41d618 100644 --- a/test/tint/builtins/gen/var/sin/4e3979.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/sin/4e3979.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void sin_4e3979() { - float4 arg_0 = (1.0f).xxxx; + float4 arg_0 = (1.570796371f).xxxx; float4 res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/4e3979.wgsl.expected.glsl b/test/tint/builtins/gen/var/sin/4e3979.wgsl.expected.glsl index 0134e30c75..788ed7e4d5 100644 --- a/test/tint/builtins/gen/var/sin/4e3979.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/sin/4e3979.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void sin_4e3979() { - vec4 arg_0 = vec4(1.0f); + vec4 arg_0 = vec4(1.570796371f); vec4 res = sin(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void sin_4e3979() { - vec4 arg_0 = vec4(1.0f); + vec4 arg_0 = vec4(1.570796371f); vec4 res = sin(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void sin_4e3979() { - vec4 arg_0 = vec4(1.0f); + vec4 arg_0 = vec4(1.570796371f); vec4 res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/4e3979.wgsl.expected.msl b/test/tint/builtins/gen/var/sin/4e3979.wgsl.expected.msl index 5ea6144da0..90fe227c73 100644 --- a/test/tint/builtins/gen/var/sin/4e3979.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/sin/4e3979.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sin_4e3979() { - float4 arg_0 = float4(1.0f); + float4 arg_0 = float4(1.570796371f); float4 res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/4e3979.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sin/4e3979.wgsl.expected.spvasm index cb3457f908..13aab5be1f 100644 --- a/test/tint/builtins/gen/var/sin/4e3979.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/sin/4e3979.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_1_57079637 = OpConstant %float 1.57079637 + %14 = OpConstantComposite %v4float %float_1_57079637 %float_1_57079637 %float_1_57079637 %float_1_57079637 %_ptr_Function_v4float = OpTypePointer Function %v4float %21 = OpTypeFunction %v4float + %float_1 = OpConstant %float 1 %sin_4e3979 = 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 %sin_4e3979 + %30 = OpLabel + %31 = OpFunctionCall %void %sin_4e3979 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %sin_4e3979 + %33 = OpLabel + %34 = OpFunctionCall %void %sin_4e3979 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/sin/4e3979.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sin/4e3979.wgsl.expected.wgsl index d94d8d267d..ce0867c029 100644 --- a/test/tint/builtins/gen/var/sin/4e3979.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/sin/4e3979.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn sin_4e3979() { - var arg_0 = vec4(1.0f); + var arg_0 = vec4(1.570796371f); var res : vec4 = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/5c0712.wgsl b/test/tint/builtins/gen/var/sin/5c0712.wgsl index 8c273d45f6..8d1fa31026 100644 --- a/test/tint/builtins/gen/var/sin/5c0712.wgsl +++ b/test/tint/builtins/gen/var/sin/5c0712.wgsl @@ -25,7 +25,7 @@ enable f16; // fn sin(vec<4, f16>) -> vec<4, f16> fn sin_5c0712() { - var arg_0 = vec4(1.h); + var arg_0 = vec4(1.57079632679h); var res: vec4 = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.dxc.hlsl index 2693475843..3d2eb53560 100644 --- a/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sin_5c0712() { - vector arg_0 = (float16_t(1.0h)).xxxx; + vector arg_0 = (float16_t(1.5703125h)).xxxx; vector res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.glsl b/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.glsl index 1fc85ff05f..d959716c30 100644 --- a/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void sin_5c0712() { - f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_0 = f16vec4(1.5703125hf); f16vec4 res = sin(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void sin_5c0712() { - f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_0 = f16vec4(1.5703125hf); f16vec4 res = sin(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void sin_5c0712() { - f16vec4 arg_0 = f16vec4(1.0hf); + f16vec4 arg_0 = f16vec4(1.5703125hf); f16vec4 res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.msl b/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.msl index aa6f22dd1a..46e55c2046 100644 --- a/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sin_5c0712() { - half4 arg_0 = half4(1.0h); + half4 arg_0 = half4(1.5703125h); half4 res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.spvasm index 9a01bfee08..239747a396 100644 --- a/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.spvasm @@ -38,8 +38,8 @@ %9 = OpTypeFunction %void %half = OpTypeFloat 16 %v4half = OpTypeVector %half 4 -%half_0x1p_0 = OpConstant %half 0x1p+0 - %16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 +%half_0x1_92p_0 = OpConstant %half 0x1.92p+0 + %16 = OpConstantComposite %v4half %half_0x1_92p_0 %half_0x1_92p_0 %half_0x1_92p_0 %half_0x1_92p_0 %_ptr_Function_v4half = OpTypePointer Function %v4half %19 = OpConstantNull %v4half %24 = OpTypeFunction %v4float diff --git a/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.wgsl index 065cba4e03..a4cc20f0ea 100644 --- a/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn sin_5c0712() { - var arg_0 = vec4(1.0h); + var arg_0 = vec4(1.5703125h); var res : vec4 = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/66a59f.wgsl b/test/tint/builtins/gen/var/sin/66a59f.wgsl index 85c746694b..fb9be73b4e 100644 --- a/test/tint/builtins/gen/var/sin/66a59f.wgsl +++ b/test/tint/builtins/gen/var/sin/66a59f.wgsl @@ -25,7 +25,7 @@ enable f16; // fn sin(f16) -> f16 fn sin_66a59f() { - var arg_0 = 1.h; + var arg_0 = 1.57079632679h; var res: f16 = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.dxc.hlsl index 9de611f3d6..b91b44972e 100644 --- a/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sin_66a59f() { - float16_t arg_0 = float16_t(1.0h); + float16_t arg_0 = float16_t(1.5703125h); float16_t res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.glsl b/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.glsl index 4806e5fb32..8d25998b96 100644 --- a/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.glsl @@ -2,7 +2,7 @@ #extension GL_AMD_gpu_shader_half_float : require void sin_66a59f() { - float16_t arg_0 = 1.0hf; + float16_t arg_0 = 1.5703125hf; float16_t res = sin(arg_0); } @@ -24,7 +24,7 @@ void main() { precision mediump float; void sin_66a59f() { - float16_t arg_0 = 1.0hf; + float16_t arg_0 = 1.5703125hf; float16_t res = sin(arg_0); } @@ -40,7 +40,7 @@ void main() { #extension GL_AMD_gpu_shader_half_float : require void sin_66a59f() { - float16_t arg_0 = 1.0hf; + float16_t arg_0 = 1.5703125hf; float16_t res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.msl b/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.msl index b82b5599d1..e3c6ff4f90 100644 --- a/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sin_66a59f() { - half arg_0 = 1.0h; + half arg_0 = 1.5703125h; half res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.spvasm index c3a5f15565..89dc7a48ce 100644 --- a/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.spvasm @@ -37,7 +37,7 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %half = OpTypeFloat 16 -%half_0x1p_0 = OpConstant %half 0x1p+0 +%half_0x1_92p_0 = OpConstant %half 0x1.92p+0 %_ptr_Function_half = OpTypePointer Function %half %17 = OpConstantNull %half %22 = OpTypeFunction %v4float @@ -46,7 +46,7 @@ %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_half Function %17 %res = OpVariable %_ptr_Function_half Function %17 - OpStore %arg_0 %half_0x1p_0 + OpStore %arg_0 %half_0x1_92p_0 %20 = OpLoad %half %arg_0 %18 = OpExtInst %half %19 Sin %20 OpStore %res %18 diff --git a/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.wgsl index 1a0c77e4b2..41a2b0ce16 100644 --- a/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn sin_66a59f() { - var arg_0 = 1.0h; + var arg_0 = 1.5703125h; var res : f16 = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/67b03c.wgsl b/test/tint/builtins/gen/var/sin/67b03c.wgsl index da705d333e..f1699d343a 100644 --- a/test/tint/builtins/gen/var/sin/67b03c.wgsl +++ b/test/tint/builtins/gen/var/sin/67b03c.wgsl @@ -23,7 +23,7 @@ // fn sin(vec<3, fa>) -> vec<3, fa> fn sin_67b03c() { - const arg_0 = vec3(1.); + const arg_0 = vec3(1.57079632679); var res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/67b03c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sin/67b03c.wgsl.expected.dxc.hlsl index 90603d178f..bf66046e58 100644 --- a/test/tint/builtins/gen/var/sin/67b03c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/sin/67b03c.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sin_67b03c() { - float3 res = (0.841470957f).xxx; + float3 res = (1.0f).xxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/sin/67b03c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sin/67b03c.wgsl.expected.fxc.hlsl index 90603d178f..bf66046e58 100644 --- a/test/tint/builtins/gen/var/sin/67b03c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/sin/67b03c.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void sin_67b03c() { - float3 res = (0.841470957f).xxx; + float3 res = (1.0f).xxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/sin/67b03c.wgsl.expected.glsl b/test/tint/builtins/gen/var/sin/67b03c.wgsl.expected.glsl index aa3e311f89..efc102b2af 100644 --- a/test/tint/builtins/gen/var/sin/67b03c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/sin/67b03c.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void sin_67b03c() { - vec3 res = vec3(0.841470957f); + vec3 res = vec3(1.0f); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void sin_67b03c() { - vec3 res = vec3(0.841470957f); + vec3 res = vec3(1.0f); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void sin_67b03c() { - vec3 res = vec3(0.841470957f); + vec3 res = vec3(1.0f); } void compute_main() { diff --git a/test/tint/builtins/gen/var/sin/67b03c.wgsl.expected.msl b/test/tint/builtins/gen/var/sin/67b03c.wgsl.expected.msl index 8b83077dad..4259105d9e 100644 --- a/test/tint/builtins/gen/var/sin/67b03c.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/sin/67b03c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sin_67b03c() { - float3 res = float3(0.841470957f); + float3 res = float3(1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/sin/67b03c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sin/67b03c.wgsl.expected.spvasm index 78483fe1bf..92f2307d9f 100644 --- a/test/tint/builtins/gen/var/sin/67b03c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/sin/67b03c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 32 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -31,12 +31,11 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 -%float_0_841470957 = OpConstant %float 0.841470957 - %15 = OpConstantComposite %v3float %float_0_841470957 %float_0_841470957 %float_0_841470957 + %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 - %float_1 = OpConstant %float 1 %sin_67b03c = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_v3float Function %18 @@ -56,12 +55,12 @@ OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %sin_67b03c + %27 = OpLabel + %28 = OpFunctionCall %void %sin_67b03c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %sin_67b03c + %30 = OpLabel + %31 = OpFunctionCall %void %sin_67b03c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/sin/67b03c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sin/67b03c.wgsl.expected.wgsl index a7c2a90a86..90a59993ea 100644 --- a/test/tint/builtins/gen/var/sin/67b03c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/sin/67b03c.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn sin_67b03c() { - const arg_0 = vec3(1.0); + const arg_0 = vec3(1.57079632679); var res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/68d3ab.wgsl b/test/tint/builtins/gen/var/sin/68d3ab.wgsl index 4c1ee6b9af..c7dfb7e6fa 100644 --- a/test/tint/builtins/gen/var/sin/68d3ab.wgsl +++ b/test/tint/builtins/gen/var/sin/68d3ab.wgsl @@ -23,7 +23,7 @@ // fn sin(vec<2, fa>) -> vec<2, fa> fn sin_68d3ab() { - const arg_0 = vec2(1.); + const arg_0 = vec2(1.57079632679); var res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/68d3ab.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sin/68d3ab.wgsl.expected.dxc.hlsl index e6a7d5a825..0d3ff428b6 100644 --- a/test/tint/builtins/gen/var/sin/68d3ab.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/sin/68d3ab.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sin_68d3ab() { - float2 res = (0.841470957f).xx; + float2 res = (1.0f).xx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/sin/68d3ab.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sin/68d3ab.wgsl.expected.fxc.hlsl index e6a7d5a825..0d3ff428b6 100644 --- a/test/tint/builtins/gen/var/sin/68d3ab.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/sin/68d3ab.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void sin_68d3ab() { - float2 res = (0.841470957f).xx; + float2 res = (1.0f).xx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/sin/68d3ab.wgsl.expected.glsl b/test/tint/builtins/gen/var/sin/68d3ab.wgsl.expected.glsl index 6735f51941..497f2b9352 100644 --- a/test/tint/builtins/gen/var/sin/68d3ab.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/sin/68d3ab.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void sin_68d3ab() { - vec2 res = vec2(0.841470957f); + vec2 res = vec2(1.0f); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void sin_68d3ab() { - vec2 res = vec2(0.841470957f); + vec2 res = vec2(1.0f); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void sin_68d3ab() { - vec2 res = vec2(0.841470957f); + vec2 res = vec2(1.0f); } void compute_main() { diff --git a/test/tint/builtins/gen/var/sin/68d3ab.wgsl.expected.msl b/test/tint/builtins/gen/var/sin/68d3ab.wgsl.expected.msl index e10514f093..09e83baa73 100644 --- a/test/tint/builtins/gen/var/sin/68d3ab.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/sin/68d3ab.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sin_68d3ab() { - float2 res = float2(0.841470957f); + float2 res = float2(1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/sin/68d3ab.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sin/68d3ab.wgsl.expected.spvasm index 32dd535a1f..3570bbb627 100644 --- a/test/tint/builtins/gen/var/sin/68d3ab.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/sin/68d3ab.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 32 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -31,12 +31,11 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 -%float_0_841470957 = OpConstant %float 0.841470957 - %15 = OpConstantComposite %v2float %float_0_841470957 %float_0_841470957 + %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float %18 = OpConstantNull %v2float %19 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 %sin_68d3ab = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_v2float Function %18 @@ -56,12 +55,12 @@ OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %sin_68d3ab + %27 = OpLabel + %28 = OpFunctionCall %void %sin_68d3ab OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %sin_68d3ab + %30 = OpLabel + %31 = OpFunctionCall %void %sin_68d3ab OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/sin/68d3ab.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sin/68d3ab.wgsl.expected.wgsl index 26fc3f9e9e..3c50c9c512 100644 --- a/test/tint/builtins/gen/var/sin/68d3ab.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/sin/68d3ab.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn sin_68d3ab() { - const arg_0 = vec2(1.0); + const arg_0 = vec2(1.57079632679); var res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/a9ab19.wgsl b/test/tint/builtins/gen/var/sin/a9ab19.wgsl index 88e9aad270..ce2e9080d7 100644 --- a/test/tint/builtins/gen/var/sin/a9ab19.wgsl +++ b/test/tint/builtins/gen/var/sin/a9ab19.wgsl @@ -23,7 +23,7 @@ // fn sin(fa) -> fa fn sin_a9ab19() { - const arg_0 = 1.; + const arg_0 = 1.57079632679; var res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/a9ab19.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sin/a9ab19.wgsl.expected.dxc.hlsl index f36fe78a52..1565ebc3e9 100644 --- a/test/tint/builtins/gen/var/sin/a9ab19.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/sin/a9ab19.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sin_a9ab19() { - float res = 0.841470957f; + float res = 1.0f; } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/sin/a9ab19.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sin/a9ab19.wgsl.expected.fxc.hlsl index f36fe78a52..1565ebc3e9 100644 --- a/test/tint/builtins/gen/var/sin/a9ab19.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/sin/a9ab19.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void sin_a9ab19() { - float res = 0.841470957f; + float res = 1.0f; } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/sin/a9ab19.wgsl.expected.glsl b/test/tint/builtins/gen/var/sin/a9ab19.wgsl.expected.glsl index f6a5e5a376..1a38190870 100644 --- a/test/tint/builtins/gen/var/sin/a9ab19.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/sin/a9ab19.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void sin_a9ab19() { - float res = 0.841470957f; + float res = 1.0f; } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void sin_a9ab19() { - float res = 0.841470957f; + float res = 1.0f; } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void sin_a9ab19() { - float res = 0.841470957f; + float res = 1.0f; } void compute_main() { diff --git a/test/tint/builtins/gen/var/sin/a9ab19.wgsl.expected.msl b/test/tint/builtins/gen/var/sin/a9ab19.wgsl.expected.msl index 3c5cb44dcf..0e408a0202 100644 --- a/test/tint/builtins/gen/var/sin/a9ab19.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/sin/a9ab19.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sin_a9ab19() { - float res = 0.841470957f; + float res = 1.0f; } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/sin/a9ab19.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sin/a9ab19.wgsl.expected.spvasm index f34059772e..ccf3764438 100644 --- a/test/tint/builtins/gen/var/sin/a9ab19.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/sin/a9ab19.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 30 +; Bound: 29 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -30,14 +30,13 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%float_0_841470957 = OpConstant %float 0.841470957 + %float_1 = OpConstant %float 1 %_ptr_Function_float = OpTypePointer Function %float %16 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 %sin_a9ab19 = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 - OpStore %res %float_0_841470957 + OpStore %res %float_1 OpReturn OpFunctionEnd %vertex_main_inner = OpFunction %v4float None %16 @@ -53,12 +52,12 @@ OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %void %sin_a9ab19 + %24 = OpLabel + %25 = OpFunctionCall %void %sin_a9ab19 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %sin_a9ab19 + %27 = OpLabel + %28 = OpFunctionCall %void %sin_a9ab19 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/sin/a9ab19.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sin/a9ab19.wgsl.expected.wgsl index 1bcc2808f6..70823129e9 100644 --- a/test/tint/builtins/gen/var/sin/a9ab19.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/sin/a9ab19.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn sin_a9ab19() { - const arg_0 = 1.0; + const arg_0 = 1.57079632679; var res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/b78c91.wgsl b/test/tint/builtins/gen/var/sin/b78c91.wgsl index f33be1447f..1818cb0211 100644 --- a/test/tint/builtins/gen/var/sin/b78c91.wgsl +++ b/test/tint/builtins/gen/var/sin/b78c91.wgsl @@ -23,7 +23,7 @@ // fn sin(f32) -> f32 fn sin_b78c91() { - var arg_0 = 1.f; + var arg_0 = 1.57079632679f; var res: f32 = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/b78c91.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sin/b78c91.wgsl.expected.dxc.hlsl index 001dc1b9fd..3e57eaebb2 100644 --- a/test/tint/builtins/gen/var/sin/b78c91.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/sin/b78c91.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sin_b78c91() { - float arg_0 = 1.0f; + float arg_0 = 1.570796371f; float res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/b78c91.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sin/b78c91.wgsl.expected.fxc.hlsl index 001dc1b9fd..3e57eaebb2 100644 --- a/test/tint/builtins/gen/var/sin/b78c91.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/sin/b78c91.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void sin_b78c91() { - float arg_0 = 1.0f; + float arg_0 = 1.570796371f; float res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/b78c91.wgsl.expected.glsl b/test/tint/builtins/gen/var/sin/b78c91.wgsl.expected.glsl index 97f9d76d56..6ee0d9d843 100644 --- a/test/tint/builtins/gen/var/sin/b78c91.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/sin/b78c91.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void sin_b78c91() { - float arg_0 = 1.0f; + float arg_0 = 1.570796371f; float res = sin(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void sin_b78c91() { - float arg_0 = 1.0f; + float arg_0 = 1.570796371f; float res = sin(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void sin_b78c91() { - float arg_0 = 1.0f; + float arg_0 = 1.570796371f; float res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/b78c91.wgsl.expected.msl b/test/tint/builtins/gen/var/sin/b78c91.wgsl.expected.msl index 8aaa9f7787..7080b1400d 100644 --- a/test/tint/builtins/gen/var/sin/b78c91.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/sin/b78c91.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sin_b78c91() { - float arg_0 = 1.0f; + float arg_0 = 1.570796371f; float res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/b78c91.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sin/b78c91.wgsl.expected.spvasm index 4b311132f2..2dfccb7608 100644 --- a/test/tint/builtins/gen/var/sin/b78c91.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/sin/b78c91.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_1_57079637 = OpConstant %float 1.57079637 %_ptr_Function_float = OpTypePointer Function %float %20 = OpTypeFunction %v4float + %float_1 = OpConstant %float 1 %sin_b78c91 = 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_1_57079637 %18 = OpLoad %float %arg_0 %16 = OpExtInst %float %17 Sin %18 OpStore %res %16 @@ -58,12 +59,12 @@ OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %sin_b78c91 + %29 = OpLabel + %30 = OpFunctionCall %void %sin_b78c91 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %sin_b78c91 + %32 = OpLabel + %33 = OpFunctionCall %void %sin_b78c91 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/sin/b78c91.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sin/b78c91.wgsl.expected.wgsl index ea62dd311a..10619d153d 100644 --- a/test/tint/builtins/gen/var/sin/b78c91.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/sin/b78c91.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn sin_b78c91() { - var arg_0 = 1.0f; + var arg_0 = 1.570796371f; var res : f32 = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/fc8bc4.wgsl b/test/tint/builtins/gen/var/sin/fc8bc4.wgsl index fa779cc170..b04e5d7437 100644 --- a/test/tint/builtins/gen/var/sin/fc8bc4.wgsl +++ b/test/tint/builtins/gen/var/sin/fc8bc4.wgsl @@ -23,7 +23,7 @@ // fn sin(vec<2, f32>) -> vec<2, f32> fn sin_fc8bc4() { - var arg_0 = vec2(1.f); + var arg_0 = vec2(1.57079632679f); var res: vec2 = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/fc8bc4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sin/fc8bc4.wgsl.expected.dxc.hlsl index abef57b7a8..1bb1b5747d 100644 --- a/test/tint/builtins/gen/var/sin/fc8bc4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/sin/fc8bc4.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sin_fc8bc4() { - float2 arg_0 = (1.0f).xx; + float2 arg_0 = (1.570796371f).xx; float2 res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/fc8bc4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sin/fc8bc4.wgsl.expected.fxc.hlsl index abef57b7a8..1bb1b5747d 100644 --- a/test/tint/builtins/gen/var/sin/fc8bc4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/sin/fc8bc4.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void sin_fc8bc4() { - float2 arg_0 = (1.0f).xx; + float2 arg_0 = (1.570796371f).xx; float2 res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/fc8bc4.wgsl.expected.glsl b/test/tint/builtins/gen/var/sin/fc8bc4.wgsl.expected.glsl index e1341c0ae0..e7c081739c 100644 --- a/test/tint/builtins/gen/var/sin/fc8bc4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/sin/fc8bc4.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void sin_fc8bc4() { - vec2 arg_0 = vec2(1.0f); + vec2 arg_0 = vec2(1.570796371f); vec2 res = sin(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void sin_fc8bc4() { - vec2 arg_0 = vec2(1.0f); + vec2 arg_0 = vec2(1.570796371f); vec2 res = sin(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void sin_fc8bc4() { - vec2 arg_0 = vec2(1.0f); + vec2 arg_0 = vec2(1.570796371f); vec2 res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/fc8bc4.wgsl.expected.msl b/test/tint/builtins/gen/var/sin/fc8bc4.wgsl.expected.msl index d303ffe586..4371a516b8 100644 --- a/test/tint/builtins/gen/var/sin/fc8bc4.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/sin/fc8bc4.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sin_fc8bc4() { - float2 arg_0 = float2(1.0f); + float2 arg_0 = float2(1.570796371f); float2 res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/fc8bc4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sin/fc8bc4.wgsl.expected.spvasm index add6aea88d..68801e7d80 100644 --- a/test/tint/builtins/gen/var/sin/fc8bc4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/sin/fc8bc4.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_1_57079637 = OpConstant %float 1.57079637 + %15 = OpConstantComposite %v2float %float_1_57079637 %float_1_57079637 %_ptr_Function_v2float = OpTypePointer Function %v2float %18 = OpConstantNull %v2float %23 = OpTypeFunction %v4float + %float_1 = OpConstant %float 1 %sin_fc8bc4 = 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 %sin_fc8bc4 + %32 = OpLabel + %33 = OpFunctionCall %void %sin_fc8bc4 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %sin_fc8bc4 + %35 = OpLabel + %36 = OpFunctionCall %void %sin_fc8bc4 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/sin/fc8bc4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sin/fc8bc4.wgsl.expected.wgsl index ada801976c..8cfef1d717 100644 --- a/test/tint/builtins/gen/var/sin/fc8bc4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/sin/fc8bc4.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn sin_fc8bc4() { - var arg_0 = vec2(1.0f); + var arg_0 = vec2(1.570796371f); var res : vec2 = sin(arg_0); }