Add const-eval for atanh.

This CL adds const-eval for the `atanh` operator.

Bug: tint:1581
Change-Id: I7d8989a348ad1d8ca463dae90233fd82d6faf2d9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/106849
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
dan sinclair
2022-10-25 18:03:56 +00:00
committed by Dawn LUCI CQ
parent 19c761ffe5
commit 4c8401f33c
63 changed files with 2283 additions and 23 deletions

View File

@@ -0,0 +1,43 @@
// Copyright 2022 The Tint Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
////////////////////////////////////////////////////////////////////////////////
// File generated by tools/src/cmd/gen
// using the template:
// test/tint/builtins/gen/gen.wgsl.tmpl
//
// Do not modify this file directly
////////////////////////////////////////////////////////////////////////////////
// fn atanh(vec<2, fa>) -> vec<2, fa>
fn atanh_70d5bd() {
var res = atanh(vec2(0.5));
}
@vertex
fn vertex_main() -> @builtin(position) vec4<f32> {
atanh_70d5bd();
return vec4<f32>();
}
@fragment
fn fragment_main() {
atanh_70d5bd();
}
@compute @workgroup_size(1)
fn compute_main() {
atanh_70d5bd();
}

View File

@@ -0,0 +1,30 @@
void atanh_70d5bd() {
float2 res = (0.549306154f).xx;
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
atanh_70d5bd();
return (0.0f).xxxx;
}
tint_symbol vertex_main() {
const float4 inner_result = vertex_main_inner();
tint_symbol wrapper_result = (tint_symbol)0;
wrapper_result.value = inner_result;
return wrapper_result;
}
void fragment_main() {
atanh_70d5bd();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
atanh_70d5bd();
return;
}

View File

@@ -0,0 +1,30 @@
void atanh_70d5bd() {
float2 res = (0.549306154f).xx;
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
atanh_70d5bd();
return (0.0f).xxxx;
}
tint_symbol vertex_main() {
const float4 inner_result = vertex_main_inner();
tint_symbol wrapper_result = (tint_symbol)0;
wrapper_result.value = inner_result;
return wrapper_result;
}
void fragment_main() {
atanh_70d5bd();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
atanh_70d5bd();
return;
}

View File

@@ -0,0 +1,49 @@
#version 310 es
void atanh_70d5bd() {
vec2 res = vec2(0.549306154f);
}
vec4 vertex_main() {
atanh_70d5bd();
return vec4(0.0f);
}
void main() {
gl_PointSize = 1.0;
vec4 inner_result = vertex_main();
gl_Position = inner_result;
gl_Position.y = -(gl_Position.y);
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
return;
}
#version 310 es
precision mediump float;
void atanh_70d5bd() {
vec2 res = vec2(0.549306154f);
}
void fragment_main() {
atanh_70d5bd();
}
void main() {
fragment_main();
return;
}
#version 310 es
void atanh_70d5bd() {
vec2 res = vec2(0.549306154f);
}
void compute_main() {
atanh_70d5bd();
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
compute_main();
return;
}

View File

@@ -0,0 +1,33 @@
#include <metal_stdlib>
using namespace metal;
void atanh_70d5bd() {
float2 res = float2(0.549306154f);
}
struct tint_symbol {
float4 value [[position]];
};
float4 vertex_main_inner() {
atanh_70d5bd();
return float4(0.0f);
}
vertex tint_symbol vertex_main() {
float4 const inner_result = vertex_main_inner();
tint_symbol wrapper_result = {};
wrapper_result.value = inner_result;
return wrapper_result;
}
fragment void fragment_main() {
atanh_70d5bd();
return;
}
kernel void compute_main() {
atanh_70d5bd();
return;
}

View File

@@ -0,0 +1,67 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 33
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
OpEntryPoint Fragment %fragment_main "fragment_main"
OpEntryPoint GLCompute %compute_main "compute_main"
OpExecutionMode %fragment_main OriginUpperLeft
OpExecutionMode %compute_main LocalSize 1 1 1
OpName %value "value"
OpName %vertex_point_size "vertex_point_size"
OpName %atanh_70d5bd "atanh_70d5bd"
OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner"
OpName %vertex_main "vertex_main"
OpName %fragment_main "fragment_main"
OpName %compute_main "compute_main"
OpDecorate %value BuiltIn Position
OpDecorate %vertex_point_size BuiltIn PointSize
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%5 = OpConstantNull %v4float
%value = OpVariable %_ptr_Output_v4float Output %5
%_ptr_Output_float = OpTypePointer Output %float
%8 = OpConstantNull %float
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
%void = OpTypeVoid
%9 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
%float_0_549306154 = OpConstant %float 0.549306154
%15 = OpConstantComposite %v2float %float_0_549306154 %float_0_549306154
%_ptr_Function_v2float = OpTypePointer Function %v2float
%18 = OpConstantNull %v2float
%19 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%atanh_70d5bd = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_v2float Function %18
OpStore %res %15
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %19
%21 = OpLabel
%22 = OpFunctionCall %void %atanh_70d5bd
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %9
%24 = OpLabel
%25 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %25
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %9
%28 = OpLabel
%29 = OpFunctionCall %void %atanh_70d5bd
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%31 = OpLabel
%32 = OpFunctionCall %void %atanh_70d5bd
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,19 @@
fn atanh_70d5bd() {
var res = atanh(vec2(0.5));
}
@vertex
fn vertex_main() -> @builtin(position) vec4<f32> {
atanh_70d5bd();
return vec4<f32>();
}
@fragment
fn fragment_main() {
atanh_70d5bd();
}
@compute @workgroup_size(1)
fn compute_main() {
atanh_70d5bd();
}

View File

@@ -0,0 +1,43 @@
// Copyright 2022 The Tint Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
////////////////////////////////////////////////////////////////////////////////
// File generated by tools/src/cmd/gen
// using the template:
// test/tint/builtins/gen/gen.wgsl.tmpl
//
// Do not modify this file directly
////////////////////////////////////////////////////////////////////////////////
// fn atanh(vec<3, fa>) -> vec<3, fa>
fn atanh_7f2874() {
var res = atanh(vec3(0.5));
}
@vertex
fn vertex_main() -> @builtin(position) vec4<f32> {
atanh_7f2874();
return vec4<f32>();
}
@fragment
fn fragment_main() {
atanh_7f2874();
}
@compute @workgroup_size(1)
fn compute_main() {
atanh_7f2874();
}

View File

@@ -0,0 +1,30 @@
void atanh_7f2874() {
float3 res = (0.549306154f).xxx;
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
atanh_7f2874();
return (0.0f).xxxx;
}
tint_symbol vertex_main() {
const float4 inner_result = vertex_main_inner();
tint_symbol wrapper_result = (tint_symbol)0;
wrapper_result.value = inner_result;
return wrapper_result;
}
void fragment_main() {
atanh_7f2874();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
atanh_7f2874();
return;
}

View File

@@ -0,0 +1,30 @@
void atanh_7f2874() {
float3 res = (0.549306154f).xxx;
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
atanh_7f2874();
return (0.0f).xxxx;
}
tint_symbol vertex_main() {
const float4 inner_result = vertex_main_inner();
tint_symbol wrapper_result = (tint_symbol)0;
wrapper_result.value = inner_result;
return wrapper_result;
}
void fragment_main() {
atanh_7f2874();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
atanh_7f2874();
return;
}

View File

@@ -0,0 +1,49 @@
#version 310 es
void atanh_7f2874() {
vec3 res = vec3(0.549306154f);
}
vec4 vertex_main() {
atanh_7f2874();
return vec4(0.0f);
}
void main() {
gl_PointSize = 1.0;
vec4 inner_result = vertex_main();
gl_Position = inner_result;
gl_Position.y = -(gl_Position.y);
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
return;
}
#version 310 es
precision mediump float;
void atanh_7f2874() {
vec3 res = vec3(0.549306154f);
}
void fragment_main() {
atanh_7f2874();
}
void main() {
fragment_main();
return;
}
#version 310 es
void atanh_7f2874() {
vec3 res = vec3(0.549306154f);
}
void compute_main() {
atanh_7f2874();
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
compute_main();
return;
}

View File

@@ -0,0 +1,33 @@
#include <metal_stdlib>
using namespace metal;
void atanh_7f2874() {
float3 res = float3(0.549306154f);
}
struct tint_symbol {
float4 value [[position]];
};
float4 vertex_main_inner() {
atanh_7f2874();
return float4(0.0f);
}
vertex tint_symbol vertex_main() {
float4 const inner_result = vertex_main_inner();
tint_symbol wrapper_result = {};
wrapper_result.value = inner_result;
return wrapper_result;
}
fragment void fragment_main() {
atanh_7f2874();
return;
}
kernel void compute_main() {
atanh_7f2874();
return;
}

View File

@@ -0,0 +1,67 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 33
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
OpEntryPoint Fragment %fragment_main "fragment_main"
OpEntryPoint GLCompute %compute_main "compute_main"
OpExecutionMode %fragment_main OriginUpperLeft
OpExecutionMode %compute_main LocalSize 1 1 1
OpName %value "value"
OpName %vertex_point_size "vertex_point_size"
OpName %atanh_7f2874 "atanh_7f2874"
OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner"
OpName %vertex_main "vertex_main"
OpName %fragment_main "fragment_main"
OpName %compute_main "compute_main"
OpDecorate %value BuiltIn Position
OpDecorate %vertex_point_size BuiltIn PointSize
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%5 = OpConstantNull %v4float
%value = OpVariable %_ptr_Output_v4float Output %5
%_ptr_Output_float = OpTypePointer Output %float
%8 = OpConstantNull %float
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
%void = OpTypeVoid
%9 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
%float_0_549306154 = OpConstant %float 0.549306154
%15 = OpConstantComposite %v3float %float_0_549306154 %float_0_549306154 %float_0_549306154
%_ptr_Function_v3float = OpTypePointer Function %v3float
%18 = OpConstantNull %v3float
%19 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%atanh_7f2874 = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_v3float Function %18
OpStore %res %15
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %19
%21 = OpLabel
%22 = OpFunctionCall %void %atanh_7f2874
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %9
%24 = OpLabel
%25 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %25
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %9
%28 = OpLabel
%29 = OpFunctionCall %void %atanh_7f2874
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%31 = OpLabel
%32 = OpFunctionCall %void %atanh_7f2874
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,19 @@
fn atanh_7f2874() {
var res = atanh(vec3(0.5));
}
@vertex
fn vertex_main() -> @builtin(position) vec4<f32> {
atanh_7f2874();
return vec4<f32>();
}
@fragment
fn fragment_main() {
atanh_7f2874();
}
@compute @workgroup_size(1)
fn compute_main() {
atanh_7f2874();
}

View File

@@ -0,0 +1,43 @@
// Copyright 2022 The Tint Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
////////////////////////////////////////////////////////////////////////////////
// File generated by tools/src/cmd/gen
// using the template:
// test/tint/builtins/gen/gen.wgsl.tmpl
//
// Do not modify this file directly
////////////////////////////////////////////////////////////////////////////////
// fn atanh(fa) -> fa
fn atanh_c5dc32() {
var res = atanh(0.5);
}
@vertex
fn vertex_main() -> @builtin(position) vec4<f32> {
atanh_c5dc32();
return vec4<f32>();
}
@fragment
fn fragment_main() {
atanh_c5dc32();
}
@compute @workgroup_size(1)
fn compute_main() {
atanh_c5dc32();
}

View File

@@ -0,0 +1,30 @@
void atanh_c5dc32() {
float res = 0.549306154f;
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
atanh_c5dc32();
return (0.0f).xxxx;
}
tint_symbol vertex_main() {
const float4 inner_result = vertex_main_inner();
tint_symbol wrapper_result = (tint_symbol)0;
wrapper_result.value = inner_result;
return wrapper_result;
}
void fragment_main() {
atanh_c5dc32();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
atanh_c5dc32();
return;
}

View File

@@ -0,0 +1,30 @@
void atanh_c5dc32() {
float res = 0.549306154f;
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
atanh_c5dc32();
return (0.0f).xxxx;
}
tint_symbol vertex_main() {
const float4 inner_result = vertex_main_inner();
tint_symbol wrapper_result = (tint_symbol)0;
wrapper_result.value = inner_result;
return wrapper_result;
}
void fragment_main() {
atanh_c5dc32();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
atanh_c5dc32();
return;
}

View File

@@ -0,0 +1,49 @@
#version 310 es
void atanh_c5dc32() {
float res = 0.549306154f;
}
vec4 vertex_main() {
atanh_c5dc32();
return vec4(0.0f);
}
void main() {
gl_PointSize = 1.0;
vec4 inner_result = vertex_main();
gl_Position = inner_result;
gl_Position.y = -(gl_Position.y);
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
return;
}
#version 310 es
precision mediump float;
void atanh_c5dc32() {
float res = 0.549306154f;
}
void fragment_main() {
atanh_c5dc32();
}
void main() {
fragment_main();
return;
}
#version 310 es
void atanh_c5dc32() {
float res = 0.549306154f;
}
void compute_main() {
atanh_c5dc32();
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
compute_main();
return;
}

View File

@@ -0,0 +1,33 @@
#include <metal_stdlib>
using namespace metal;
void atanh_c5dc32() {
float res = 0.549306154f;
}
struct tint_symbol {
float4 value [[position]];
};
float4 vertex_main_inner() {
atanh_c5dc32();
return float4(0.0f);
}
vertex tint_symbol vertex_main() {
float4 const inner_result = vertex_main_inner();
tint_symbol wrapper_result = {};
wrapper_result.value = inner_result;
return wrapper_result;
}
fragment void fragment_main() {
atanh_c5dc32();
return;
}
kernel void compute_main() {
atanh_c5dc32();
return;
}

View File

@@ -0,0 +1,64 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 30
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
OpEntryPoint Fragment %fragment_main "fragment_main"
OpEntryPoint GLCompute %compute_main "compute_main"
OpExecutionMode %fragment_main OriginUpperLeft
OpExecutionMode %compute_main LocalSize 1 1 1
OpName %value "value"
OpName %vertex_point_size "vertex_point_size"
OpName %atanh_c5dc32 "atanh_c5dc32"
OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner"
OpName %vertex_main "vertex_main"
OpName %fragment_main "fragment_main"
OpName %compute_main "compute_main"
OpDecorate %value BuiltIn Position
OpDecorate %vertex_point_size BuiltIn PointSize
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%5 = OpConstantNull %v4float
%value = OpVariable %_ptr_Output_v4float Output %5
%_ptr_Output_float = OpTypePointer Output %float
%8 = OpConstantNull %float
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
%void = OpTypeVoid
%9 = OpTypeFunction %void
%float_0_549306154 = OpConstant %float 0.549306154
%_ptr_Function_float = OpTypePointer Function %float
%16 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%atanh_c5dc32 = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_float Function %8
OpStore %res %float_0_549306154
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %16
%18 = OpLabel
%19 = OpFunctionCall %void %atanh_c5dc32
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %9
%21 = OpLabel
%22 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %22
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %9
%25 = OpLabel
%26 = OpFunctionCall %void %atanh_c5dc32
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%28 = OpLabel
%29 = OpFunctionCall %void %atanh_c5dc32
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,19 @@
fn atanh_c5dc32() {
var res = atanh(0.5);
}
@vertex
fn vertex_main() -> @builtin(position) vec4<f32> {
atanh_c5dc32();
return vec4<f32>();
}
@fragment
fn fragment_main() {
atanh_c5dc32();
}
@compute @workgroup_size(1)
fn compute_main() {
atanh_c5dc32();
}

View File

@@ -0,0 +1,43 @@
// Copyright 2022 The Tint Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
////////////////////////////////////////////////////////////////////////////////
// File generated by tools/src/cmd/gen
// using the template:
// test/tint/builtins/gen/gen.wgsl.tmpl
//
// Do not modify this file directly
////////////////////////////////////////////////////////////////////////////////
// fn atanh(vec<4, fa>) -> vec<4, fa>
fn atanh_e431bb() {
var res = atanh(vec4(0.5));
}
@vertex
fn vertex_main() -> @builtin(position) vec4<f32> {
atanh_e431bb();
return vec4<f32>();
}
@fragment
fn fragment_main() {
atanh_e431bb();
}
@compute @workgroup_size(1)
fn compute_main() {
atanh_e431bb();
}

View File

@@ -0,0 +1,30 @@
void atanh_e431bb() {
float4 res = (0.549306154f).xxxx;
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
atanh_e431bb();
return (0.0f).xxxx;
}
tint_symbol vertex_main() {
const float4 inner_result = vertex_main_inner();
tint_symbol wrapper_result = (tint_symbol)0;
wrapper_result.value = inner_result;
return wrapper_result;
}
void fragment_main() {
atanh_e431bb();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
atanh_e431bb();
return;
}

View File

@@ -0,0 +1,30 @@
void atanh_e431bb() {
float4 res = (0.549306154f).xxxx;
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
atanh_e431bb();
return (0.0f).xxxx;
}
tint_symbol vertex_main() {
const float4 inner_result = vertex_main_inner();
tint_symbol wrapper_result = (tint_symbol)0;
wrapper_result.value = inner_result;
return wrapper_result;
}
void fragment_main() {
atanh_e431bb();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
atanh_e431bb();
return;
}

View File

@@ -0,0 +1,49 @@
#version 310 es
void atanh_e431bb() {
vec4 res = vec4(0.549306154f);
}
vec4 vertex_main() {
atanh_e431bb();
return vec4(0.0f);
}
void main() {
gl_PointSize = 1.0;
vec4 inner_result = vertex_main();
gl_Position = inner_result;
gl_Position.y = -(gl_Position.y);
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
return;
}
#version 310 es
precision mediump float;
void atanh_e431bb() {
vec4 res = vec4(0.549306154f);
}
void fragment_main() {
atanh_e431bb();
}
void main() {
fragment_main();
return;
}
#version 310 es
void atanh_e431bb() {
vec4 res = vec4(0.549306154f);
}
void compute_main() {
atanh_e431bb();
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
compute_main();
return;
}

View File

@@ -0,0 +1,33 @@
#include <metal_stdlib>
using namespace metal;
void atanh_e431bb() {
float4 res = float4(0.549306154f);
}
struct tint_symbol {
float4 value [[position]];
};
float4 vertex_main_inner() {
atanh_e431bb();
return float4(0.0f);
}
vertex tint_symbol vertex_main() {
float4 const inner_result = vertex_main_inner();
tint_symbol wrapper_result = {};
wrapper_result.value = inner_result;
return wrapper_result;
}
fragment void fragment_main() {
atanh_e431bb();
return;
}
kernel void compute_main() {
atanh_e431bb();
return;
}

View File

@@ -0,0 +1,65 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 31
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
OpEntryPoint Fragment %fragment_main "fragment_main"
OpEntryPoint GLCompute %compute_main "compute_main"
OpExecutionMode %fragment_main OriginUpperLeft
OpExecutionMode %compute_main LocalSize 1 1 1
OpName %value "value"
OpName %vertex_point_size "vertex_point_size"
OpName %atanh_e431bb "atanh_e431bb"
OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner"
OpName %vertex_main "vertex_main"
OpName %fragment_main "fragment_main"
OpName %compute_main "compute_main"
OpDecorate %value BuiltIn Position
OpDecorate %vertex_point_size BuiltIn PointSize
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%5 = OpConstantNull %v4float
%value = OpVariable %_ptr_Output_v4float Output %5
%_ptr_Output_float = OpTypePointer Output %float
%8 = OpConstantNull %float
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
%void = OpTypeVoid
%9 = OpTypeFunction %void
%float_0_549306154 = OpConstant %float 0.549306154
%14 = OpConstantComposite %v4float %float_0_549306154 %float_0_549306154 %float_0_549306154 %float_0_549306154
%_ptr_Function_v4float = OpTypePointer Function %v4float
%17 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%atanh_e431bb = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_v4float Function %5
OpStore %res %14
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %17
%19 = OpLabel
%20 = OpFunctionCall %void %atanh_e431bb
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %9
%22 = OpLabel
%23 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %23
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %9
%26 = OpLabel
%27 = OpFunctionCall %void %atanh_e431bb
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%29 = OpLabel
%30 = OpFunctionCall %void %atanh_e431bb
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,19 @@
fn atanh_e431bb() {
var res = atanh(vec4(0.5));
}
@vertex
fn vertex_main() -> @builtin(position) vec4<f32> {
atanh_e431bb();
return vec4<f32>();
}
@fragment
fn fragment_main() {
atanh_e431bb();
}
@compute @workgroup_size(1)
fn compute_main() {
atanh_e431bb();
}

View File

@@ -0,0 +1,44 @@
// Copyright 2022 The Tint Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
////////////////////////////////////////////////////////////////////////////////
// File generated by tools/src/cmd/gen
// using the template:
// test/tint/builtins/gen/gen.wgsl.tmpl
//
// Do not modify this file directly
////////////////////////////////////////////////////////////////////////////////
// fn atanh(vec<2, fa>) -> vec<2, fa>
fn atanh_70d5bd() {
const arg_0 = vec2(0.5);
var res = atanh(arg_0);
}
@vertex
fn vertex_main() -> @builtin(position) vec4<f32> {
atanh_70d5bd();
return vec4<f32>();
}
@fragment
fn fragment_main() {
atanh_70d5bd();
}
@compute @workgroup_size(1)
fn compute_main() {
atanh_70d5bd();
}

View File

@@ -0,0 +1,30 @@
void atanh_70d5bd() {
float2 res = (0.549306154f).xx;
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
atanh_70d5bd();
return (0.0f).xxxx;
}
tint_symbol vertex_main() {
const float4 inner_result = vertex_main_inner();
tint_symbol wrapper_result = (tint_symbol)0;
wrapper_result.value = inner_result;
return wrapper_result;
}
void fragment_main() {
atanh_70d5bd();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
atanh_70d5bd();
return;
}

View File

@@ -0,0 +1,30 @@
void atanh_70d5bd() {
float2 res = (0.549306154f).xx;
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
atanh_70d5bd();
return (0.0f).xxxx;
}
tint_symbol vertex_main() {
const float4 inner_result = vertex_main_inner();
tint_symbol wrapper_result = (tint_symbol)0;
wrapper_result.value = inner_result;
return wrapper_result;
}
void fragment_main() {
atanh_70d5bd();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
atanh_70d5bd();
return;
}

View File

@@ -0,0 +1,49 @@
#version 310 es
void atanh_70d5bd() {
vec2 res = vec2(0.549306154f);
}
vec4 vertex_main() {
atanh_70d5bd();
return vec4(0.0f);
}
void main() {
gl_PointSize = 1.0;
vec4 inner_result = vertex_main();
gl_Position = inner_result;
gl_Position.y = -(gl_Position.y);
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
return;
}
#version 310 es
precision mediump float;
void atanh_70d5bd() {
vec2 res = vec2(0.549306154f);
}
void fragment_main() {
atanh_70d5bd();
}
void main() {
fragment_main();
return;
}
#version 310 es
void atanh_70d5bd() {
vec2 res = vec2(0.549306154f);
}
void compute_main() {
atanh_70d5bd();
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
compute_main();
return;
}

View File

@@ -0,0 +1,33 @@
#include <metal_stdlib>
using namespace metal;
void atanh_70d5bd() {
float2 res = float2(0.549306154f);
}
struct tint_symbol {
float4 value [[position]];
};
float4 vertex_main_inner() {
atanh_70d5bd();
return float4(0.0f);
}
vertex tint_symbol vertex_main() {
float4 const inner_result = vertex_main_inner();
tint_symbol wrapper_result = {};
wrapper_result.value = inner_result;
return wrapper_result;
}
fragment void fragment_main() {
atanh_70d5bd();
return;
}
kernel void compute_main() {
atanh_70d5bd();
return;
}

View File

@@ -0,0 +1,67 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 33
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
OpEntryPoint Fragment %fragment_main "fragment_main"
OpEntryPoint GLCompute %compute_main "compute_main"
OpExecutionMode %fragment_main OriginUpperLeft
OpExecutionMode %compute_main LocalSize 1 1 1
OpName %value "value"
OpName %vertex_point_size "vertex_point_size"
OpName %atanh_70d5bd "atanh_70d5bd"
OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner"
OpName %vertex_main "vertex_main"
OpName %fragment_main "fragment_main"
OpName %compute_main "compute_main"
OpDecorate %value BuiltIn Position
OpDecorate %vertex_point_size BuiltIn PointSize
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%5 = OpConstantNull %v4float
%value = OpVariable %_ptr_Output_v4float Output %5
%_ptr_Output_float = OpTypePointer Output %float
%8 = OpConstantNull %float
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
%void = OpTypeVoid
%9 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
%float_0_549306154 = OpConstant %float 0.549306154
%15 = OpConstantComposite %v2float %float_0_549306154 %float_0_549306154
%_ptr_Function_v2float = OpTypePointer Function %v2float
%18 = OpConstantNull %v2float
%19 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%atanh_70d5bd = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_v2float Function %18
OpStore %res %15
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %19
%21 = OpLabel
%22 = OpFunctionCall %void %atanh_70d5bd
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %9
%24 = OpLabel
%25 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %25
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %9
%28 = OpLabel
%29 = OpFunctionCall %void %atanh_70d5bd
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%31 = OpLabel
%32 = OpFunctionCall %void %atanh_70d5bd
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,20 @@
fn atanh_70d5bd() {
const arg_0 = vec2(0.5);
var res = atanh(arg_0);
}
@vertex
fn vertex_main() -> @builtin(position) vec4<f32> {
atanh_70d5bd();
return vec4<f32>();
}
@fragment
fn fragment_main() {
atanh_70d5bd();
}
@compute @workgroup_size(1)
fn compute_main() {
atanh_70d5bd();
}

View File

@@ -0,0 +1,44 @@
// Copyright 2022 The Tint Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
////////////////////////////////////////////////////////////////////////////////
// File generated by tools/src/cmd/gen
// using the template:
// test/tint/builtins/gen/gen.wgsl.tmpl
//
// Do not modify this file directly
////////////////////////////////////////////////////////////////////////////////
// fn atanh(vec<3, fa>) -> vec<3, fa>
fn atanh_7f2874() {
const arg_0 = vec3(0.5);
var res = atanh(arg_0);
}
@vertex
fn vertex_main() -> @builtin(position) vec4<f32> {
atanh_7f2874();
return vec4<f32>();
}
@fragment
fn fragment_main() {
atanh_7f2874();
}
@compute @workgroup_size(1)
fn compute_main() {
atanh_7f2874();
}

View File

@@ -0,0 +1,30 @@
void atanh_7f2874() {
float3 res = (0.549306154f).xxx;
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
atanh_7f2874();
return (0.0f).xxxx;
}
tint_symbol vertex_main() {
const float4 inner_result = vertex_main_inner();
tint_symbol wrapper_result = (tint_symbol)0;
wrapper_result.value = inner_result;
return wrapper_result;
}
void fragment_main() {
atanh_7f2874();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
atanh_7f2874();
return;
}

View File

@@ -0,0 +1,30 @@
void atanh_7f2874() {
float3 res = (0.549306154f).xxx;
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
atanh_7f2874();
return (0.0f).xxxx;
}
tint_symbol vertex_main() {
const float4 inner_result = vertex_main_inner();
tint_symbol wrapper_result = (tint_symbol)0;
wrapper_result.value = inner_result;
return wrapper_result;
}
void fragment_main() {
atanh_7f2874();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
atanh_7f2874();
return;
}

View File

@@ -0,0 +1,49 @@
#version 310 es
void atanh_7f2874() {
vec3 res = vec3(0.549306154f);
}
vec4 vertex_main() {
atanh_7f2874();
return vec4(0.0f);
}
void main() {
gl_PointSize = 1.0;
vec4 inner_result = vertex_main();
gl_Position = inner_result;
gl_Position.y = -(gl_Position.y);
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
return;
}
#version 310 es
precision mediump float;
void atanh_7f2874() {
vec3 res = vec3(0.549306154f);
}
void fragment_main() {
atanh_7f2874();
}
void main() {
fragment_main();
return;
}
#version 310 es
void atanh_7f2874() {
vec3 res = vec3(0.549306154f);
}
void compute_main() {
atanh_7f2874();
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
compute_main();
return;
}

View File

@@ -0,0 +1,33 @@
#include <metal_stdlib>
using namespace metal;
void atanh_7f2874() {
float3 res = float3(0.549306154f);
}
struct tint_symbol {
float4 value [[position]];
};
float4 vertex_main_inner() {
atanh_7f2874();
return float4(0.0f);
}
vertex tint_symbol vertex_main() {
float4 const inner_result = vertex_main_inner();
tint_symbol wrapper_result = {};
wrapper_result.value = inner_result;
return wrapper_result;
}
fragment void fragment_main() {
atanh_7f2874();
return;
}
kernel void compute_main() {
atanh_7f2874();
return;
}

View File

@@ -0,0 +1,67 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 33
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
OpEntryPoint Fragment %fragment_main "fragment_main"
OpEntryPoint GLCompute %compute_main "compute_main"
OpExecutionMode %fragment_main OriginUpperLeft
OpExecutionMode %compute_main LocalSize 1 1 1
OpName %value "value"
OpName %vertex_point_size "vertex_point_size"
OpName %atanh_7f2874 "atanh_7f2874"
OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner"
OpName %vertex_main "vertex_main"
OpName %fragment_main "fragment_main"
OpName %compute_main "compute_main"
OpDecorate %value BuiltIn Position
OpDecorate %vertex_point_size BuiltIn PointSize
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%5 = OpConstantNull %v4float
%value = OpVariable %_ptr_Output_v4float Output %5
%_ptr_Output_float = OpTypePointer Output %float
%8 = OpConstantNull %float
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
%void = OpTypeVoid
%9 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
%float_0_549306154 = OpConstant %float 0.549306154
%15 = OpConstantComposite %v3float %float_0_549306154 %float_0_549306154 %float_0_549306154
%_ptr_Function_v3float = OpTypePointer Function %v3float
%18 = OpConstantNull %v3float
%19 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%atanh_7f2874 = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_v3float Function %18
OpStore %res %15
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %19
%21 = OpLabel
%22 = OpFunctionCall %void %atanh_7f2874
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %9
%24 = OpLabel
%25 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %25
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %9
%28 = OpLabel
%29 = OpFunctionCall %void %atanh_7f2874
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%31 = OpLabel
%32 = OpFunctionCall %void %atanh_7f2874
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,20 @@
fn atanh_7f2874() {
const arg_0 = vec3(0.5);
var res = atanh(arg_0);
}
@vertex
fn vertex_main() -> @builtin(position) vec4<f32> {
atanh_7f2874();
return vec4<f32>();
}
@fragment
fn fragment_main() {
atanh_7f2874();
}
@compute @workgroup_size(1)
fn compute_main() {
atanh_7f2874();
}

View File

@@ -0,0 +1,44 @@
// Copyright 2022 The Tint Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
////////////////////////////////////////////////////////////////////////////////
// File generated by tools/src/cmd/gen
// using the template:
// test/tint/builtins/gen/gen.wgsl.tmpl
//
// Do not modify this file directly
////////////////////////////////////////////////////////////////////////////////
// fn atanh(fa) -> fa
fn atanh_c5dc32() {
const arg_0 = 0.5;
var res = atanh(arg_0);
}
@vertex
fn vertex_main() -> @builtin(position) vec4<f32> {
atanh_c5dc32();
return vec4<f32>();
}
@fragment
fn fragment_main() {
atanh_c5dc32();
}
@compute @workgroup_size(1)
fn compute_main() {
atanh_c5dc32();
}

View File

@@ -0,0 +1,30 @@
void atanh_c5dc32() {
float res = 0.549306154f;
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
atanh_c5dc32();
return (0.0f).xxxx;
}
tint_symbol vertex_main() {
const float4 inner_result = vertex_main_inner();
tint_symbol wrapper_result = (tint_symbol)0;
wrapper_result.value = inner_result;
return wrapper_result;
}
void fragment_main() {
atanh_c5dc32();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
atanh_c5dc32();
return;
}

View File

@@ -0,0 +1,30 @@
void atanh_c5dc32() {
float res = 0.549306154f;
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
atanh_c5dc32();
return (0.0f).xxxx;
}
tint_symbol vertex_main() {
const float4 inner_result = vertex_main_inner();
tint_symbol wrapper_result = (tint_symbol)0;
wrapper_result.value = inner_result;
return wrapper_result;
}
void fragment_main() {
atanh_c5dc32();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
atanh_c5dc32();
return;
}

View File

@@ -0,0 +1,49 @@
#version 310 es
void atanh_c5dc32() {
float res = 0.549306154f;
}
vec4 vertex_main() {
atanh_c5dc32();
return vec4(0.0f);
}
void main() {
gl_PointSize = 1.0;
vec4 inner_result = vertex_main();
gl_Position = inner_result;
gl_Position.y = -(gl_Position.y);
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
return;
}
#version 310 es
precision mediump float;
void atanh_c5dc32() {
float res = 0.549306154f;
}
void fragment_main() {
atanh_c5dc32();
}
void main() {
fragment_main();
return;
}
#version 310 es
void atanh_c5dc32() {
float res = 0.549306154f;
}
void compute_main() {
atanh_c5dc32();
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
compute_main();
return;
}

View File

@@ -0,0 +1,33 @@
#include <metal_stdlib>
using namespace metal;
void atanh_c5dc32() {
float res = 0.549306154f;
}
struct tint_symbol {
float4 value [[position]];
};
float4 vertex_main_inner() {
atanh_c5dc32();
return float4(0.0f);
}
vertex tint_symbol vertex_main() {
float4 const inner_result = vertex_main_inner();
tint_symbol wrapper_result = {};
wrapper_result.value = inner_result;
return wrapper_result;
}
fragment void fragment_main() {
atanh_c5dc32();
return;
}
kernel void compute_main() {
atanh_c5dc32();
return;
}

View File

@@ -0,0 +1,64 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 30
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
OpEntryPoint Fragment %fragment_main "fragment_main"
OpEntryPoint GLCompute %compute_main "compute_main"
OpExecutionMode %fragment_main OriginUpperLeft
OpExecutionMode %compute_main LocalSize 1 1 1
OpName %value "value"
OpName %vertex_point_size "vertex_point_size"
OpName %atanh_c5dc32 "atanh_c5dc32"
OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner"
OpName %vertex_main "vertex_main"
OpName %fragment_main "fragment_main"
OpName %compute_main "compute_main"
OpDecorate %value BuiltIn Position
OpDecorate %vertex_point_size BuiltIn PointSize
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%5 = OpConstantNull %v4float
%value = OpVariable %_ptr_Output_v4float Output %5
%_ptr_Output_float = OpTypePointer Output %float
%8 = OpConstantNull %float
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
%void = OpTypeVoid
%9 = OpTypeFunction %void
%float_0_549306154 = OpConstant %float 0.549306154
%_ptr_Function_float = OpTypePointer Function %float
%16 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%atanh_c5dc32 = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_float Function %8
OpStore %res %float_0_549306154
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %16
%18 = OpLabel
%19 = OpFunctionCall %void %atanh_c5dc32
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %9
%21 = OpLabel
%22 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %22
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %9
%25 = OpLabel
%26 = OpFunctionCall %void %atanh_c5dc32
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%28 = OpLabel
%29 = OpFunctionCall %void %atanh_c5dc32
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,20 @@
fn atanh_c5dc32() {
const arg_0 = 0.5;
var res = atanh(arg_0);
}
@vertex
fn vertex_main() -> @builtin(position) vec4<f32> {
atanh_c5dc32();
return vec4<f32>();
}
@fragment
fn fragment_main() {
atanh_c5dc32();
}
@compute @workgroup_size(1)
fn compute_main() {
atanh_c5dc32();
}

View File

@@ -0,0 +1,44 @@
// Copyright 2022 The Tint Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
////////////////////////////////////////////////////////////////////////////////
// File generated by tools/src/cmd/gen
// using the template:
// test/tint/builtins/gen/gen.wgsl.tmpl
//
// Do not modify this file directly
////////////////////////////////////////////////////////////////////////////////
// fn atanh(vec<4, fa>) -> vec<4, fa>
fn atanh_e431bb() {
const arg_0 = vec4(0.5);
var res = atanh(arg_0);
}
@vertex
fn vertex_main() -> @builtin(position) vec4<f32> {
atanh_e431bb();
return vec4<f32>();
}
@fragment
fn fragment_main() {
atanh_e431bb();
}
@compute @workgroup_size(1)
fn compute_main() {
atanh_e431bb();
}

View File

@@ -0,0 +1,30 @@
void atanh_e431bb() {
float4 res = (0.549306154f).xxxx;
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
atanh_e431bb();
return (0.0f).xxxx;
}
tint_symbol vertex_main() {
const float4 inner_result = vertex_main_inner();
tint_symbol wrapper_result = (tint_symbol)0;
wrapper_result.value = inner_result;
return wrapper_result;
}
void fragment_main() {
atanh_e431bb();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
atanh_e431bb();
return;
}

View File

@@ -0,0 +1,30 @@
void atanh_e431bb() {
float4 res = (0.549306154f).xxxx;
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
atanh_e431bb();
return (0.0f).xxxx;
}
tint_symbol vertex_main() {
const float4 inner_result = vertex_main_inner();
tint_symbol wrapper_result = (tint_symbol)0;
wrapper_result.value = inner_result;
return wrapper_result;
}
void fragment_main() {
atanh_e431bb();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
atanh_e431bb();
return;
}

View File

@@ -0,0 +1,49 @@
#version 310 es
void atanh_e431bb() {
vec4 res = vec4(0.549306154f);
}
vec4 vertex_main() {
atanh_e431bb();
return vec4(0.0f);
}
void main() {
gl_PointSize = 1.0;
vec4 inner_result = vertex_main();
gl_Position = inner_result;
gl_Position.y = -(gl_Position.y);
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
return;
}
#version 310 es
precision mediump float;
void atanh_e431bb() {
vec4 res = vec4(0.549306154f);
}
void fragment_main() {
atanh_e431bb();
}
void main() {
fragment_main();
return;
}
#version 310 es
void atanh_e431bb() {
vec4 res = vec4(0.549306154f);
}
void compute_main() {
atanh_e431bb();
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
compute_main();
return;
}

View File

@@ -0,0 +1,33 @@
#include <metal_stdlib>
using namespace metal;
void atanh_e431bb() {
float4 res = float4(0.549306154f);
}
struct tint_symbol {
float4 value [[position]];
};
float4 vertex_main_inner() {
atanh_e431bb();
return float4(0.0f);
}
vertex tint_symbol vertex_main() {
float4 const inner_result = vertex_main_inner();
tint_symbol wrapper_result = {};
wrapper_result.value = inner_result;
return wrapper_result;
}
fragment void fragment_main() {
atanh_e431bb();
return;
}
kernel void compute_main() {
atanh_e431bb();
return;
}

View File

@@ -0,0 +1,65 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 31
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
OpEntryPoint Fragment %fragment_main "fragment_main"
OpEntryPoint GLCompute %compute_main "compute_main"
OpExecutionMode %fragment_main OriginUpperLeft
OpExecutionMode %compute_main LocalSize 1 1 1
OpName %value "value"
OpName %vertex_point_size "vertex_point_size"
OpName %atanh_e431bb "atanh_e431bb"
OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner"
OpName %vertex_main "vertex_main"
OpName %fragment_main "fragment_main"
OpName %compute_main "compute_main"
OpDecorate %value BuiltIn Position
OpDecorate %vertex_point_size BuiltIn PointSize
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%5 = OpConstantNull %v4float
%value = OpVariable %_ptr_Output_v4float Output %5
%_ptr_Output_float = OpTypePointer Output %float
%8 = OpConstantNull %float
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
%void = OpTypeVoid
%9 = OpTypeFunction %void
%float_0_549306154 = OpConstant %float 0.549306154
%14 = OpConstantComposite %v4float %float_0_549306154 %float_0_549306154 %float_0_549306154 %float_0_549306154
%_ptr_Function_v4float = OpTypePointer Function %v4float
%17 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%atanh_e431bb = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_v4float Function %5
OpStore %res %14
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %17
%19 = OpLabel
%20 = OpFunctionCall %void %atanh_e431bb
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %9
%22 = OpLabel
%23 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %23
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %9
%26 = OpLabel
%27 = OpFunctionCall %void %atanh_e431bb
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%29 = OpLabel
%30 = OpFunctionCall %void %atanh_e431bb
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,20 @@
fn atanh_e431bb() {
const arg_0 = vec4(0.5);
var res = atanh(arg_0);
}
@vertex
fn vertex_main() -> @builtin(position) vec4<f32> {
atanh_e431bb();
return vec4<f32>();
}
@fragment
fn fragment_main() {
atanh_e431bb();
}
@compute @workgroup_size(1)
fn compute_main() {
atanh_e431bb();
}