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 <jrprice@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
James Price 2023-02-24 18:57:39 +00:00 committed by Dawn LUCI CQ
parent 1a1b5278d5
commit 66d487395d
162 changed files with 320 additions and 328 deletions

View File

@ -661,8 +661,8 @@ match workgroup
@must_use @const("select_boolvec") fn select<N: num, T: scalar>(vec<N, T>, vec<N, T>, vec<N, bool>) -> vec<N, T>
@must_use @const fn sign<T: fia_fi32_f16>(T) -> T
@must_use @const fn sign<N: num, T: fia_fi32_f16>(vec<N, T>) -> vec<N, T>
@must_use @const fn sin<T: fa_f32_f16>(T) -> T
@must_use @const fn sin<N: num, T: fa_f32_f16>(vec<N, T>) -> vec<N, T>
@must_use @const fn sin<T: fa_f32_f16>(@test_value(1.57079632679) T) -> T
@must_use @const fn sin<N: num, T: fa_f32_f16>(@test_value(1.57079632679) vec<N, T>) -> vec<N, T>
@must_use @const fn sinh<T: fa_f32_f16>(T) -> T
@must_use @const fn sinh<N: num, T: fa_f32_f16>(vec<N, T>) -> vec<N, T>
@must_use @const fn smoothstep<T: fa_f32_f16>(@test_value(2) T, @test_value(4) T, @test_value(3) T) -> T

View File

@ -14502,8 +14502,8 @@ constexpr IntrinsicInfo kBuiltins[] = {
},
{
/* [70] */
/* fn sin<T : fa_f32_f16>(T) -> T */
/* fn sin<N : num, T : fa_f32_f16>(vec<N, T>) -> vec<N, T> */
/* fn sin<T : fa_f32_f16>(@test_value(1.57079632679) T) -> T */
/* fn sin<N : num, T : fa_f32_f16>(@test_value(1.57079632679) vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
/* overloads */ &kOverloads[389],
},

View File

@ -23,7 +23,7 @@
// fn sin(vec<3, f32>) -> vec<3, f32>
fn sin_01f241() {
var res: vec3<f32> = sin(vec3<f32>(1.f));
var res: vec3<f32> = sin(vec3<f32>(1.57079632679f));
}
@vertex

View File

@ -1,5 +1,5 @@
void sin_01f241() {
float3 res = (0.841470957f).xxx;
float3 res = (1.0f).xxx;
}
struct tint_symbol {

View File

@ -1,5 +1,5 @@
void sin_01f241() {
float3 res = (0.841470957f).xxx;
float3 res = (1.0f).xxx;
}
struct tint_symbol {

View File

@ -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() {

View File

@ -2,7 +2,7 @@
using namespace metal;
void sin_01f241() {
float3 res = float3(0.841470957f);
float3 res = float3(1.0f);
}
struct tint_symbol {

View File

@ -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

View File

@ -1,5 +1,5 @@
fn sin_01f241() {
var res : vec3<f32> = sin(vec3<f32>(1.0f));
var res : vec3<f32> = sin(vec3<f32>(1.570796371f));
}
@vertex

View File

@ -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

View File

@ -1,5 +1,5 @@
void sin_15b2c6() {
float4 res = (0.841470957f).xxxx;
float4 res = (1.0f).xxxx;
}
struct tint_symbol {

View File

@ -1,5 +1,5 @@
void sin_15b2c6() {
float4 res = (0.841470957f).xxxx;
float4 res = (1.0f).xxxx;
}
struct tint_symbol {

View File

@ -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() {

View File

@ -2,7 +2,7 @@
using namespace metal;
void sin_15b2c6() {
float4 res = float4(0.841470957f);
float4 res = float4(1.0f);
}
struct tint_symbol {

View File

@ -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

View File

@ -1,5 +1,5 @@
fn sin_15b2c6() {
var res = sin(vec4(1.0));
var res = sin(vec4(1.57079632679));
}
@vertex

View File

@ -25,7 +25,7 @@ enable f16;
// fn sin(vec<3, f16>) -> vec<3, f16>
fn sin_2c903b() {
var res: vec3<f16> = sin(vec3<f16>(1.h));
var res: vec3<f16> = sin(vec3<f16>(1.57079632679h));
}
@vertex

View File

@ -1,5 +1,5 @@
void sin_2c903b() {
vector<float16_t, 3> res = (float16_t(0.841308594h)).xxx;
vector<float16_t, 3> res = (float16_t(0.999511719h)).xxx;
}
struct tint_symbol {

View File

@ -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() {

View File

@ -2,7 +2,7 @@
using namespace metal;
void sin_2c903b() {
half3 res = half3(0.841308594h);
half3 res = half3(0.999511719h);
}
struct tint_symbol {

View File

@ -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

View File

@ -1,7 +1,7 @@
enable f16;
fn sin_2c903b() {
var res : vec3<f16> = sin(vec3<f16>(1.0h));
var res : vec3<f16> = sin(vec3<f16>(1.5703125h));
}
@vertex

View File

@ -25,7 +25,7 @@ enable f16;
// fn sin(vec<2, f16>) -> vec<2, f16>
fn sin_3cca11() {
var res: vec2<f16> = sin(vec2<f16>(1.h));
var res: vec2<f16> = sin(vec2<f16>(1.57079632679h));
}
@vertex

View File

@ -1,5 +1,5 @@
void sin_3cca11() {
vector<float16_t, 2> res = (float16_t(0.841308594h)).xx;
vector<float16_t, 2> res = (float16_t(0.999511719h)).xx;
}
struct tint_symbol {

View File

@ -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() {

View File

@ -2,7 +2,7 @@
using namespace metal;
void sin_3cca11() {
half2 res = half2(0.841308594h);
half2 res = half2(0.999511719h);
}
struct tint_symbol {

View File

@ -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

View File

@ -1,7 +1,7 @@
enable f16;
fn sin_3cca11() {
var res : vec2<f16> = sin(vec2<f16>(1.0h));
var res : vec2<f16> = sin(vec2<f16>(1.5703125h));
}
@vertex

View File

@ -23,7 +23,7 @@
// fn sin(vec<4, f32>) -> vec<4, f32>
fn sin_4e3979() {
var res: vec4<f32> = sin(vec4<f32>(1.f));
var res: vec4<f32> = sin(vec4<f32>(1.57079632679f));
}
@vertex

View File

@ -1,5 +1,5 @@
void sin_4e3979() {
float4 res = (0.841470957f).xxxx;
float4 res = (1.0f).xxxx;
}
struct tint_symbol {

View File

@ -1,5 +1,5 @@
void sin_4e3979() {
float4 res = (0.841470957f).xxxx;
float4 res = (1.0f).xxxx;
}
struct tint_symbol {

View File

@ -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() {

View File

@ -2,7 +2,7 @@
using namespace metal;
void sin_4e3979() {
float4 res = float4(0.841470957f);
float4 res = float4(1.0f);
}
struct tint_symbol {

View File

@ -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

View File

@ -1,5 +1,5 @@
fn sin_4e3979() {
var res : vec4<f32> = sin(vec4<f32>(1.0f));
var res : vec4<f32> = sin(vec4<f32>(1.570796371f));
}
@vertex

View File

@ -25,7 +25,7 @@ enable f16;
// fn sin(vec<4, f16>) -> vec<4, f16>
fn sin_5c0712() {
var res: vec4<f16> = sin(vec4<f16>(1.h));
var res: vec4<f16> = sin(vec4<f16>(1.57079632679h));
}
@vertex

View File

@ -1,5 +1,5 @@
void sin_5c0712() {
vector<float16_t, 4> res = (float16_t(0.841308594h)).xxxx;
vector<float16_t, 4> res = (float16_t(0.999511719h)).xxxx;
}
struct tint_symbol {

View File

@ -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() {

View File

@ -2,7 +2,7 @@
using namespace metal;
void sin_5c0712() {
half4 res = half4(0.841308594h);
half4 res = half4(0.999511719h);
}
struct tint_symbol {

View File

@ -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

View File

@ -1,7 +1,7 @@
enable f16;
fn sin_5c0712() {
var res : vec4<f16> = sin(vec4<f16>(1.0h));
var res : vec4<f16> = sin(vec4<f16>(1.5703125h));
}
@vertex

View File

@ -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

View File

@ -1,5 +1,5 @@
void sin_66a59f() {
float16_t res = float16_t(0.841308594h);
float16_t res = float16_t(0.999511719h);
}
struct tint_symbol {

View File

@ -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() {

View File

@ -2,7 +2,7 @@
using namespace metal;
void sin_66a59f() {
half res = 0.841308594h;
half res = 0.999511719h;
}
struct tint_symbol {

View File

@ -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

View File

@ -1,7 +1,7 @@
enable f16;
fn sin_66a59f() {
var res : f16 = sin(1.0h);
var res : f16 = sin(1.5703125h);
}
@vertex

View File

@ -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

View File

@ -1,5 +1,5 @@
void sin_67b03c() {
float3 res = (0.841470957f).xxx;
float3 res = (1.0f).xxx;
}
struct tint_symbol {

View File

@ -1,5 +1,5 @@
void sin_67b03c() {
float3 res = (0.841470957f).xxx;
float3 res = (1.0f).xxx;
}
struct tint_symbol {

View File

@ -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() {

View File

@ -2,7 +2,7 @@
using namespace metal;
void sin_67b03c() {
float3 res = float3(0.841470957f);
float3 res = float3(1.0f);
}
struct tint_symbol {

View File

@ -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

View File

@ -1,5 +1,5 @@
fn sin_67b03c() {
var res = sin(vec3(1.0));
var res = sin(vec3(1.57079632679));
}
@vertex

View File

@ -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

View File

@ -1,5 +1,5 @@
void sin_68d3ab() {
float2 res = (0.841470957f).xx;
float2 res = (1.0f).xx;
}
struct tint_symbol {

View File

@ -1,5 +1,5 @@
void sin_68d3ab() {
float2 res = (0.841470957f).xx;
float2 res = (1.0f).xx;
}
struct tint_symbol {

View File

@ -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() {

View File

@ -2,7 +2,7 @@
using namespace metal;
void sin_68d3ab() {
float2 res = float2(0.841470957f);
float2 res = float2(1.0f);
}
struct tint_symbol {

View File

@ -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

View File

@ -1,5 +1,5 @@
fn sin_68d3ab() {
var res = sin(vec2(1.0));
var res = sin(vec2(1.57079632679));
}
@vertex

View File

@ -23,7 +23,7 @@
// fn sin(fa) -> fa
fn sin_a9ab19() {
var res = sin(1.);
var res = sin(1.57079632679);
}
@vertex

View File

@ -1,5 +1,5 @@
void sin_a9ab19() {
float res = 0.841470957f;
float res = 1.0f;
}
struct tint_symbol {

View File

@ -1,5 +1,5 @@
void sin_a9ab19() {
float res = 0.841470957f;
float res = 1.0f;
}
struct tint_symbol {

View File

@ -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() {

View File

@ -2,7 +2,7 @@
using namespace metal;
void sin_a9ab19() {
float res = 0.841470957f;
float res = 1.0f;
}
struct tint_symbol {

View File

@ -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

View File

@ -1,5 +1,5 @@
fn sin_a9ab19() {
var res = sin(1.0);
var res = sin(1.57079632679);
}
@vertex

View File

@ -23,7 +23,7 @@
// fn sin(f32) -> f32
fn sin_b78c91() {
var res: f32 = sin(1.f);
var res: f32 = sin(1.57079632679f);
}
@vertex

View File

@ -1,5 +1,5 @@
void sin_b78c91() {
float res = 0.841470957f;
float res = 1.0f;
}
struct tint_symbol {

View File

@ -1,5 +1,5 @@
void sin_b78c91() {
float res = 0.841470957f;
float res = 1.0f;
}
struct tint_symbol {

View File

@ -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() {

View File

@ -2,7 +2,7 @@
using namespace metal;
void sin_b78c91() {
float res = 0.841470957f;
float res = 1.0f;
}
struct tint_symbol {

View File

@ -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

View File

@ -1,5 +1,5 @@
fn sin_b78c91() {
var res : f32 = sin(1.0f);
var res : f32 = sin(1.570796371f);
}
@vertex

View File

@ -23,7 +23,7 @@
// fn sin(vec<2, f32>) -> vec<2, f32>
fn sin_fc8bc4() {
var res: vec2<f32> = sin(vec2<f32>(1.f));
var res: vec2<f32> = sin(vec2<f32>(1.57079632679f));
}
@vertex

View File

@ -1,5 +1,5 @@
void sin_fc8bc4() {
float2 res = (0.841470957f).xx;
float2 res = (1.0f).xx;
}
struct tint_symbol {

View File

@ -1,5 +1,5 @@
void sin_fc8bc4() {
float2 res = (0.841470957f).xx;
float2 res = (1.0f).xx;
}
struct tint_symbol {

View File

@ -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() {

View File

@ -2,7 +2,7 @@
using namespace metal;
void sin_fc8bc4() {
float2 res = float2(0.841470957f);
float2 res = float2(1.0f);
}
struct tint_symbol {

View File

@ -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

View File

@ -1,5 +1,5 @@
fn sin_fc8bc4() {
var res : vec2<f32> = sin(vec2<f32>(1.0f));
var res : vec2<f32> = sin(vec2<f32>(1.570796371f));
}
@vertex

View File

@ -23,7 +23,7 @@
// fn sin(vec<3, f32>) -> vec<3, f32>
fn sin_01f241() {
var arg_0 = vec3<f32>(1.f);
var arg_0 = vec3<f32>(1.57079632679f);
var res: vec3<f32> = sin(arg_0);
}

View File

@ -1,5 +1,5 @@
void sin_01f241() {
float3 arg_0 = (1.0f).xxx;
float3 arg_0 = (1.570796371f).xxx;
float3 res = sin(arg_0);
}

View File

@ -1,5 +1,5 @@
void sin_01f241() {
float3 arg_0 = (1.0f).xxx;
float3 arg_0 = (1.570796371f).xxx;
float3 res = sin(arg_0);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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

View File

@ -1,5 +1,5 @@
fn sin_01f241() {
var arg_0 = vec3<f32>(1.0f);
var arg_0 = vec3<f32>(1.570796371f);
var res : vec3<f32> = sin(arg_0);
}

View File

@ -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);
}

View File

@ -1,5 +1,5 @@
void sin_15b2c6() {
float4 res = (0.841470957f).xxxx;
float4 res = (1.0f).xxxx;
}
struct tint_symbol {

View File

@ -1,5 +1,5 @@
void sin_15b2c6() {
float4 res = (0.841470957f).xxxx;
float4 res = (1.0f).xxxx;
}
struct tint_symbol {

View File

@ -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() {

View File

@ -2,7 +2,7 @@
using namespace metal;
void sin_15b2c6() {
float4 res = float4(0.841470957f);
float4 res = float4(1.0f);
}
struct tint_symbol {

View File

@ -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

View File

@ -1,5 +1,5 @@
fn sin_15b2c6() {
const arg_0 = vec4(1.0);
const arg_0 = vec4(1.57079632679);
var res = sin(arg_0);
}

View File

@ -25,7 +25,7 @@ enable f16;
// fn sin(vec<3, f16>) -> vec<3, f16>
fn sin_2c903b() {
var arg_0 = vec3<f16>(1.h);
var arg_0 = vec3<f16>(1.57079632679h);
var res: vec3<f16> = sin(arg_0);
}

View File

@ -1,5 +1,5 @@
void sin_2c903b() {
vector<float16_t, 3> arg_0 = (float16_t(1.0h)).xxx;
vector<float16_t, 3> arg_0 = (float16_t(1.5703125h)).xxx;
vector<float16_t, 3> res = sin(arg_0);
}

View File

@ -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);
}

View File

@ -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);
}

Some files were not shown because too many files have changed in this diff Show More