tint: Implement acosh, asinh, atanh

Polyfill them completely for HLSL.

For the other backends, just add range checks for acosh and atanh.

Fixed: tint:1465
Change-Id: I3abda99b474d9f5ba09abf400381467dc28ea0bd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/94380
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Auto-Submit: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
dan sinclair
2022-06-28 15:27:44 +00:00
committed by Dawn LUCI CQ
parent 6058882d4b
commit d23f296a9a
157 changed files with 11784 additions and 4686 deletions

View File

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

View File

@@ -0,0 +1,61 @@
#version 310 es
vec2 tint_acosh(vec2 x) {
return mix(acosh(x), vec2(0.0f), lessThan(x, vec2(1.0f)));
}
void acosh_640883() {
vec2 res = tint_acosh(vec2(0.0f));
}
vec4 vertex_main() {
acosh_640883();
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;
vec2 tint_acosh(vec2 x) {
return mix(acosh(x), vec2(0.0f), lessThan(x, vec2(1.0f)));
}
void acosh_640883() {
vec2 res = tint_acosh(vec2(0.0f));
}
void fragment_main() {
acosh_640883();
}
void main() {
fragment_main();
return;
}
#version 310 es
vec2 tint_acosh(vec2 x) {
return mix(acosh(x), vec2(0.0f), lessThan(x, vec2(1.0f)));
}
void acosh_640883() {
vec2 res = tint_acosh(vec2(0.0f));
}
void compute_main() {
acosh_640883();
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
compute_main();
return;
}

View File

@@ -0,0 +1,34 @@
float2 tint_acosh(float2 x) {
return log((x + sqrt(((x * x) - 1.0f))));
}
void acosh_640883() {
float2 res = tint_acosh((0.0f).xx);
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
acosh_640883();
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() {
acosh_640883();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
acosh_640883();
return;
}

View File

@@ -0,0 +1,37 @@
#include <metal_stdlib>
using namespace metal;
float2 tint_acosh(float2 x) {
return select(acosh(x), float2(0.0f), (x < float2(1.0f)));
}
void acosh_640883() {
float2 res = tint_acosh(float2(0.0f));
}
struct tint_symbol {
float4 value [[position]];
};
float4 vertex_main_inner() {
acosh_640883();
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() {
acosh_640883();
return;
}
kernel void compute_main() {
acosh_640883();
return;
}

View File

@@ -0,0 +1,81 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 43
; Schema: 0
OpCapability Shader
%22 = OpExtInstImport "GLSL.std.450"
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 %tint_acosh "tint_acosh"
OpName %x "x"
OpName %acosh_640883 "acosh_640883"
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
%v2float = OpTypeVector %float 2
%9 = OpTypeFunction %v2float %v2float
%float_1 = OpConstant %float 1
%16 = OpConstantComposite %v2float %float_1 %float_1
%bool = OpTypeBool
%v2bool = OpTypeVector %bool 2
%20 = OpConstantNull %v2float
%void = OpTypeVoid
%23 = OpTypeFunction %void
%_ptr_Function_v2float = OpTypePointer Function %v2float
%30 = OpTypeFunction %v4float
%tint_acosh = OpFunction %v2float None %9
%x = OpFunctionParameter %v2float
%13 = OpLabel
%17 = OpFOrdLessThan %v2bool %x %16
%21 = OpExtInst %v2float %22 Acosh %x
%14 = OpSelect %v2float %17 %20 %21
OpReturnValue %14
OpFunctionEnd
%acosh_640883 = OpFunction %void None %23
%26 = OpLabel
%res = OpVariable %_ptr_Function_v2float Function %20
%27 = OpFunctionCall %v2float %tint_acosh %20
OpStore %res %27
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %30
%32 = OpLabel
%33 = OpFunctionCall %void %acosh_640883
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %23
%35 = OpLabel
%36 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %36
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %23
%38 = OpLabel
%39 = OpFunctionCall %void %acosh_640883
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %23
%41 = OpLabel
%42 = OpFunctionCall %void %acosh_640883
OpReturn
OpFunctionEnd

View File

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

View File

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

View File

@@ -0,0 +1,61 @@
#version 310 es
vec4 tint_acosh(vec4 x) {
return mix(acosh(x), vec4(0.0f), lessThan(x, vec4(1.0f)));
}
void acosh_d51ccb() {
vec4 res = tint_acosh(vec4(0.0f));
}
vec4 vertex_main() {
acosh_d51ccb();
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;
vec4 tint_acosh(vec4 x) {
return mix(acosh(x), vec4(0.0f), lessThan(x, vec4(1.0f)));
}
void acosh_d51ccb() {
vec4 res = tint_acosh(vec4(0.0f));
}
void fragment_main() {
acosh_d51ccb();
}
void main() {
fragment_main();
return;
}
#version 310 es
vec4 tint_acosh(vec4 x) {
return mix(acosh(x), vec4(0.0f), lessThan(x, vec4(1.0f)));
}
void acosh_d51ccb() {
vec4 res = tint_acosh(vec4(0.0f));
}
void compute_main() {
acosh_d51ccb();
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
compute_main();
return;
}

View File

@@ -0,0 +1,34 @@
float4 tint_acosh(float4 x) {
return log((x + sqrt(((x * x) - 1.0f))));
}
void acosh_d51ccb() {
float4 res = tint_acosh((0.0f).xxxx);
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
acosh_d51ccb();
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() {
acosh_d51ccb();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
acosh_d51ccb();
return;
}

View File

@@ -0,0 +1,37 @@
#include <metal_stdlib>
using namespace metal;
float4 tint_acosh(float4 x) {
return select(acosh(x), float4(0.0f), (x < float4(1.0f)));
}
void acosh_d51ccb() {
float4 res = tint_acosh(float4(0.0f));
}
struct tint_symbol {
float4 value [[position]];
};
float4 vertex_main_inner() {
acosh_d51ccb();
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() {
acosh_d51ccb();
return;
}
kernel void compute_main() {
acosh_d51ccb();
return;
}

View File

@@ -0,0 +1,79 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 41
; Schema: 0
OpCapability Shader
%20 = OpExtInstImport "GLSL.std.450"
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 %tint_acosh "tint_acosh"
OpName %x "x"
OpName %acosh_d51ccb "acosh_d51ccb"
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
%9 = OpTypeFunction %v4float %v4float
%float_1 = OpConstant %float 1
%15 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
%bool = OpTypeBool
%v4bool = OpTypeVector %bool 4
%void = OpTypeVoid
%21 = OpTypeFunction %void
%_ptr_Function_v4float = OpTypePointer Function %v4float
%28 = OpTypeFunction %v4float
%tint_acosh = OpFunction %v4float None %9
%x = OpFunctionParameter %v4float
%12 = OpLabel
%16 = OpFOrdLessThan %v4bool %x %15
%19 = OpExtInst %v4float %20 Acosh %x
%13 = OpSelect %v4float %16 %5 %19
OpReturnValue %13
OpFunctionEnd
%acosh_d51ccb = OpFunction %void None %21
%24 = OpLabel
%res = OpVariable %_ptr_Function_v4float Function %5
%25 = OpFunctionCall %v4float %tint_acosh %5
OpStore %res %25
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %28
%30 = OpLabel
%31 = OpFunctionCall %void %acosh_d51ccb
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %21
%33 = OpLabel
%34 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %34
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %21
%36 = OpLabel
%37 = OpFunctionCall %void %acosh_d51ccb
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %21
%39 = OpLabel
%40 = OpFunctionCall %void %acosh_d51ccb
OpReturn
OpFunctionEnd

View File

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

View File

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

View File

@@ -0,0 +1,61 @@
#version 310 es
vec3 tint_acosh(vec3 x) {
return mix(acosh(x), vec3(0.0f), lessThan(x, vec3(1.0f)));
}
void acosh_e38f5c() {
vec3 res = tint_acosh(vec3(0.0f));
}
vec4 vertex_main() {
acosh_e38f5c();
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;
vec3 tint_acosh(vec3 x) {
return mix(acosh(x), vec3(0.0f), lessThan(x, vec3(1.0f)));
}
void acosh_e38f5c() {
vec3 res = tint_acosh(vec3(0.0f));
}
void fragment_main() {
acosh_e38f5c();
}
void main() {
fragment_main();
return;
}
#version 310 es
vec3 tint_acosh(vec3 x) {
return mix(acosh(x), vec3(0.0f), lessThan(x, vec3(1.0f)));
}
void acosh_e38f5c() {
vec3 res = tint_acosh(vec3(0.0f));
}
void compute_main() {
acosh_e38f5c();
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
compute_main();
return;
}

View File

@@ -0,0 +1,34 @@
float3 tint_acosh(float3 x) {
return log((x + sqrt(((x * x) - 1.0f))));
}
void acosh_e38f5c() {
float3 res = tint_acosh((0.0f).xxx);
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
acosh_e38f5c();
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() {
acosh_e38f5c();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
acosh_e38f5c();
return;
}

View File

@@ -0,0 +1,37 @@
#include <metal_stdlib>
using namespace metal;
float3 tint_acosh(float3 x) {
return select(acosh(x), float3(0.0f), (x < float3(1.0f)));
}
void acosh_e38f5c() {
float3 res = tint_acosh(float3(0.0f));
}
struct tint_symbol {
float4 value [[position]];
};
float4 vertex_main_inner() {
acosh_e38f5c();
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() {
acosh_e38f5c();
return;
}
kernel void compute_main() {
acosh_e38f5c();
return;
}

View File

@@ -0,0 +1,81 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 43
; Schema: 0
OpCapability Shader
%22 = OpExtInstImport "GLSL.std.450"
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 %tint_acosh "tint_acosh"
OpName %x "x"
OpName %acosh_e38f5c "acosh_e38f5c"
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
%v3float = OpTypeVector %float 3
%9 = OpTypeFunction %v3float %v3float
%float_1 = OpConstant %float 1
%16 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%bool = OpTypeBool
%v3bool = OpTypeVector %bool 3
%20 = OpConstantNull %v3float
%void = OpTypeVoid
%23 = OpTypeFunction %void
%_ptr_Function_v3float = OpTypePointer Function %v3float
%30 = OpTypeFunction %v4float
%tint_acosh = OpFunction %v3float None %9
%x = OpFunctionParameter %v3float
%13 = OpLabel
%17 = OpFOrdLessThan %v3bool %x %16
%21 = OpExtInst %v3float %22 Acosh %x
%14 = OpSelect %v3float %17 %20 %21
OpReturnValue %14
OpFunctionEnd
%acosh_e38f5c = OpFunction %void None %23
%26 = OpLabel
%res = OpVariable %_ptr_Function_v3float Function %20
%27 = OpFunctionCall %v3float %tint_acosh %20
OpStore %res %27
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %30
%32 = OpLabel
%33 = OpFunctionCall %void %acosh_e38f5c
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %23
%35 = OpLabel
%36 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %36
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %23
%38 = OpLabel
%39 = OpFunctionCall %void %acosh_e38f5c
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %23
%41 = OpLabel
%42 = OpFunctionCall %void %acosh_e38f5c
OpReturn
OpFunctionEnd

View File

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

View File

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

View File

@@ -0,0 +1,61 @@
#version 310 es
float tint_acosh(float x) {
return ((x < 1.0f) ? 0.0f : acosh(x));
}
void acosh_ecf2d1() {
float res = tint_acosh(1.0f);
}
vec4 vertex_main() {
acosh_ecf2d1();
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;
float tint_acosh(float x) {
return ((x < 1.0f) ? 0.0f : acosh(x));
}
void acosh_ecf2d1() {
float res = tint_acosh(1.0f);
}
void fragment_main() {
acosh_ecf2d1();
}
void main() {
fragment_main();
return;
}
#version 310 es
float tint_acosh(float x) {
return ((x < 1.0f) ? 0.0f : acosh(x));
}
void acosh_ecf2d1() {
float res = tint_acosh(1.0f);
}
void compute_main() {
acosh_ecf2d1();
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
compute_main();
return;
}

View File

@@ -0,0 +1,34 @@
float tint_acosh(float x) {
return log((x + sqrt(((x * x) - 1.0f))));
}
void acosh_ecf2d1() {
float res = tint_acosh(1.0f);
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
acosh_ecf2d1();
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() {
acosh_ecf2d1();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
acosh_ecf2d1();
return;
}

View File

@@ -0,0 +1,37 @@
#include <metal_stdlib>
using namespace metal;
float tint_acosh(float x) {
return select(acosh(x), 0.0f, (x < 1.0f));
}
void acosh_ecf2d1() {
float res = tint_acosh(1.0f);
}
struct tint_symbol {
float4 value [[position]];
};
float4 vertex_main_inner() {
acosh_ecf2d1();
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() {
acosh_ecf2d1();
return;
}
kernel void compute_main() {
acosh_ecf2d1();
return;
}

View File

@@ -0,0 +1,77 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 39
; Schema: 0
OpCapability Shader
%18 = OpExtInstImport "GLSL.std.450"
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 %tint_acosh "tint_acosh"
OpName %x "x"
OpName %acosh_ecf2d1 "acosh_ecf2d1"
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
%9 = OpTypeFunction %float %float
%float_1 = OpConstant %float 1
%bool = OpTypeBool
%void = OpTypeVoid
%19 = OpTypeFunction %void
%_ptr_Function_float = OpTypePointer Function %float
%26 = OpTypeFunction %v4float
%tint_acosh = OpFunction %float None %9
%x = OpFunctionParameter %float
%12 = OpLabel
%15 = OpFOrdLessThan %bool %x %float_1
%17 = OpExtInst %float %18 Acosh %x
%13 = OpSelect %float %15 %8 %17
OpReturnValue %13
OpFunctionEnd
%acosh_ecf2d1 = OpFunction %void None %19
%22 = OpLabel
%res = OpVariable %_ptr_Function_float Function %8
%23 = OpFunctionCall %float %tint_acosh %float_1
OpStore %res %23
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %26
%28 = OpLabel
%29 = OpFunctionCall %void %acosh_ecf2d1
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %19
%31 = OpLabel
%32 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %32
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %19
%34 = OpLabel
%35 = OpFunctionCall %void %acosh_ecf2d1
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %19
%37 = OpLabel
%38 = OpFunctionCall %void %acosh_ecf2d1
OpReturn
OpFunctionEnd

View File

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

View File

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

View File

@@ -0,0 +1,49 @@
#version 310 es
void asinh_157447() {
float res = asinh(1.0f);
}
vec4 vertex_main() {
asinh_157447();
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 asinh_157447() {
float res = asinh(1.0f);
}
void fragment_main() {
asinh_157447();
}
void main() {
fragment_main();
return;
}
#version 310 es
void asinh_157447() {
float res = asinh(1.0f);
}
void compute_main() {
asinh_157447();
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
compute_main();
return;
}

View File

@@ -0,0 +1,34 @@
float tint_sinh(float x) {
return log((x + sqrt(((x * x) + 1.0f))));
}
void asinh_157447() {
float res = tint_sinh(1.0f);
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
asinh_157447();
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() {
asinh_157447();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
asinh_157447();
return;
}

View File

@@ -0,0 +1,33 @@
#include <metal_stdlib>
using namespace metal;
void asinh_157447() {
float res = asinh(1.0f);
}
struct tint_symbol {
float4 value [[position]];
};
float4 vertex_main_inner() {
asinh_157447();
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() {
asinh_157447();
return;
}
kernel void compute_main() {
asinh_157447();
return;
}

View File

@@ -0,0 +1,65 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 31
; Schema: 0
OpCapability Shader
%14 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
OpEntryPoint Fragment %fragment_main "fragment_main"
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 %asinh_157447 "asinh_157447"
OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner"
OpName %vertex_main "vertex_main"
OpName %fragment_main "fragment_main"
OpName %compute_main "compute_main"
OpDecorate %value BuiltIn Position
OpDecorate %vertex_point_size BuiltIn PointSize
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%5 = OpConstantNull %v4float
%value = OpVariable %_ptr_Output_v4float Output %5
%_ptr_Output_float = OpTypePointer Output %float
%8 = OpConstantNull %float
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
%void = OpTypeVoid
%9 = OpTypeFunction %void
%float_1 = OpConstant %float 1
%_ptr_Function_float = OpTypePointer Function %float
%18 = OpTypeFunction %v4float
%asinh_157447 = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_float Function %8
%13 = OpExtInst %float %14 Asinh %float_1
OpStore %res %13
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %18
%20 = OpLabel
%21 = OpFunctionCall %void %asinh_157447
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %9
%23 = OpLabel
%24 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %24
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %9
%26 = OpLabel
%27 = OpFunctionCall %void %asinh_157447
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%29 = OpLabel
%30 = OpFunctionCall %void %asinh_157447
OpReturn
OpFunctionEnd

View File

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

View File

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

View File

@@ -0,0 +1,49 @@
#version 310 es
void asinh_2265ee() {
vec3 res = asinh(vec3(0.0f));
}
vec4 vertex_main() {
asinh_2265ee();
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 asinh_2265ee() {
vec3 res = asinh(vec3(0.0f));
}
void fragment_main() {
asinh_2265ee();
}
void main() {
fragment_main();
return;
}
#version 310 es
void asinh_2265ee() {
vec3 res = asinh(vec3(0.0f));
}
void compute_main() {
asinh_2265ee();
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
compute_main();
return;
}

View File

@@ -0,0 +1,34 @@
float3 tint_sinh(float3 x) {
return log((x + sqrt(((x * x) + 1.0f))));
}
void asinh_2265ee() {
float3 res = tint_sinh((0.0f).xxx);
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
asinh_2265ee();
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() {
asinh_2265ee();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
asinh_2265ee();
return;
}

View File

@@ -0,0 +1,33 @@
#include <metal_stdlib>
using namespace metal;
void asinh_2265ee() {
float3 res = asinh(float3(0.0f));
}
struct tint_symbol {
float4 value [[position]];
};
float4 vertex_main_inner() {
asinh_2265ee();
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() {
asinh_2265ee();
return;
}
kernel void compute_main() {
asinh_2265ee();
return;
}

View File

@@ -0,0 +1,67 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 33
; Schema: 0
OpCapability Shader
%15 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
OpEntryPoint Fragment %fragment_main "fragment_main"
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 %asinh_2265ee "asinh_2265ee"
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
%16 = OpConstantNull %v3float
%_ptr_Function_v3float = OpTypePointer Function %v3float
%19 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%asinh_2265ee = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_v3float Function %16
%13 = OpExtInst %v3float %15 Asinh %16
OpStore %res %13
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %19
%21 = OpLabel
%22 = OpFunctionCall %void %asinh_2265ee
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 %asinh_2265ee
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%31 = OpLabel
%32 = OpFunctionCall %void %asinh_2265ee
OpReturn
OpFunctionEnd

View File

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

View File

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

View File

@@ -0,0 +1,49 @@
#version 310 es
void asinh_4a2226() {
vec2 res = asinh(vec2(0.0f));
}
vec4 vertex_main() {
asinh_4a2226();
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 asinh_4a2226() {
vec2 res = asinh(vec2(0.0f));
}
void fragment_main() {
asinh_4a2226();
}
void main() {
fragment_main();
return;
}
#version 310 es
void asinh_4a2226() {
vec2 res = asinh(vec2(0.0f));
}
void compute_main() {
asinh_4a2226();
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
compute_main();
return;
}

View File

@@ -0,0 +1,34 @@
float2 tint_sinh(float2 x) {
return log((x + sqrt(((x * x) + 1.0f))));
}
void asinh_4a2226() {
float2 res = tint_sinh((0.0f).xx);
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
asinh_4a2226();
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() {
asinh_4a2226();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
asinh_4a2226();
return;
}

View File

@@ -0,0 +1,33 @@
#include <metal_stdlib>
using namespace metal;
void asinh_4a2226() {
float2 res = asinh(float2(0.0f));
}
struct tint_symbol {
float4 value [[position]];
};
float4 vertex_main_inner() {
asinh_4a2226();
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() {
asinh_4a2226();
return;
}
kernel void compute_main() {
asinh_4a2226();
return;
}

View File

@@ -0,0 +1,67 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 33
; Schema: 0
OpCapability Shader
%15 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
OpEntryPoint Fragment %fragment_main "fragment_main"
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 %asinh_4a2226 "asinh_4a2226"
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
%16 = OpConstantNull %v2float
%_ptr_Function_v2float = OpTypePointer Function %v2float
%19 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%asinh_4a2226 = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_v2float Function %16
%13 = OpExtInst %v2float %15 Asinh %16
OpStore %res %13
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %19
%21 = OpLabel
%22 = OpFunctionCall %void %asinh_4a2226
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 %asinh_4a2226
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%31 = OpLabel
%32 = OpFunctionCall %void %asinh_4a2226
OpReturn
OpFunctionEnd

View File

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

View File

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

View File

@@ -0,0 +1,49 @@
#version 310 es
void asinh_8d2e51() {
vec4 res = asinh(vec4(0.0f));
}
vec4 vertex_main() {
asinh_8d2e51();
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 asinh_8d2e51() {
vec4 res = asinh(vec4(0.0f));
}
void fragment_main() {
asinh_8d2e51();
}
void main() {
fragment_main();
return;
}
#version 310 es
void asinh_8d2e51() {
vec4 res = asinh(vec4(0.0f));
}
void compute_main() {
asinh_8d2e51();
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
compute_main();
return;
}

View File

@@ -0,0 +1,34 @@
float4 tint_sinh(float4 x) {
return log((x + sqrt(((x * x) + 1.0f))));
}
void asinh_8d2e51() {
float4 res = tint_sinh((0.0f).xxxx);
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
asinh_8d2e51();
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() {
asinh_8d2e51();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
asinh_8d2e51();
return;
}

View File

@@ -0,0 +1,33 @@
#include <metal_stdlib>
using namespace metal;
void asinh_8d2e51() {
float4 res = asinh(float4(0.0f));
}
struct tint_symbol {
float4 value [[position]];
};
float4 vertex_main_inner() {
asinh_8d2e51();
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() {
asinh_8d2e51();
return;
}
kernel void compute_main() {
asinh_8d2e51();
return;
}

View File

@@ -0,0 +1,65 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 31
; Schema: 0
OpCapability Shader
%14 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
OpEntryPoint Fragment %fragment_main "fragment_main"
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 %asinh_8d2e51 "asinh_8d2e51"
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
%_ptr_Function_v4float = OpTypePointer Function %v4float
%17 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%asinh_8d2e51 = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_v4float Function %5
%13 = OpExtInst %v4float %14 Asinh %5
OpStore %res %13
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %17
%19 = OpLabel
%20 = OpFunctionCall %void %asinh_8d2e51
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 %asinh_8d2e51
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%29 = OpLabel
%30 = OpFunctionCall %void %asinh_8d2e51
OpReturn
OpFunctionEnd

View File

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

View File

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

View File

@@ -0,0 +1,61 @@
#version 310 es
vec3 tint_atanh(vec3 x) {
return mix(atanh(x), vec3(0.0f), greaterThanEqual(x, vec3(1.0f)));
}
void atanh_440cca() {
vec3 res = tint_atanh(vec3(0.0f));
}
vec4 vertex_main() {
atanh_440cca();
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;
vec3 tint_atanh(vec3 x) {
return mix(atanh(x), vec3(0.0f), greaterThanEqual(x, vec3(1.0f)));
}
void atanh_440cca() {
vec3 res = tint_atanh(vec3(0.0f));
}
void fragment_main() {
atanh_440cca();
}
void main() {
fragment_main();
return;
}
#version 310 es
vec3 tint_atanh(vec3 x) {
return mix(atanh(x), vec3(0.0f), greaterThanEqual(x, vec3(1.0f)));
}
void atanh_440cca() {
vec3 res = tint_atanh(vec3(0.0f));
}
void compute_main() {
atanh_440cca();
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
compute_main();
return;
}

View File

@@ -0,0 +1,34 @@
float3 tint_atanh(float3 x) {
return (log(((1.0f + x) / (1.0f - x))) * 0.5f);
}
void atanh_440cca() {
float3 res = tint_atanh((0.0f).xxx);
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
atanh_440cca();
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_440cca();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
atanh_440cca();
return;
}

View File

@@ -0,0 +1,37 @@
#include <metal_stdlib>
using namespace metal;
float3 tint_atanh(float3 x) {
return select(atanh(x), float3(0.0f), (x >= float3(1.0f)));
}
void atanh_440cca() {
float3 res = tint_atanh(float3(0.0f));
}
struct tint_symbol {
float4 value [[position]];
};
float4 vertex_main_inner() {
atanh_440cca();
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_440cca();
return;
}
kernel void compute_main() {
atanh_440cca();
return;
}

View File

@@ -0,0 +1,81 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 43
; Schema: 0
OpCapability Shader
%22 = OpExtInstImport "GLSL.std.450"
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 %tint_atanh "tint_atanh"
OpName %x "x"
OpName %atanh_440cca "atanh_440cca"
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
%v3float = OpTypeVector %float 3
%9 = OpTypeFunction %v3float %v3float
%float_1 = OpConstant %float 1
%16 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%bool = OpTypeBool
%v3bool = OpTypeVector %bool 3
%20 = OpConstantNull %v3float
%void = OpTypeVoid
%23 = OpTypeFunction %void
%_ptr_Function_v3float = OpTypePointer Function %v3float
%30 = OpTypeFunction %v4float
%tint_atanh = OpFunction %v3float None %9
%x = OpFunctionParameter %v3float
%13 = OpLabel
%17 = OpFOrdGreaterThanEqual %v3bool %x %16
%21 = OpExtInst %v3float %22 Atanh %x
%14 = OpSelect %v3float %17 %20 %21
OpReturnValue %14
OpFunctionEnd
%atanh_440cca = OpFunction %void None %23
%26 = OpLabel
%res = OpVariable %_ptr_Function_v3float Function %20
%27 = OpFunctionCall %v3float %tint_atanh %20
OpStore %res %27
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %30
%32 = OpLabel
%33 = OpFunctionCall %void %atanh_440cca
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %23
%35 = OpLabel
%36 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %36
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %23
%38 = OpLabel
%39 = OpFunctionCall %void %atanh_440cca
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %23
%41 = OpLabel
%42 = OpFunctionCall %void %atanh_440cca
OpReturn
OpFunctionEnd

View File

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

View File

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

View File

@@ -0,0 +1,61 @@
#version 310 es
float tint_atanh(float x) {
return ((x >= 1.0f) ? 0.0f : atanh(x));
}
void atanh_7997d8() {
float res = tint_atanh(1.0f);
}
vec4 vertex_main() {
atanh_7997d8();
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;
float tint_atanh(float x) {
return ((x >= 1.0f) ? 0.0f : atanh(x));
}
void atanh_7997d8() {
float res = tint_atanh(1.0f);
}
void fragment_main() {
atanh_7997d8();
}
void main() {
fragment_main();
return;
}
#version 310 es
float tint_atanh(float x) {
return ((x >= 1.0f) ? 0.0f : atanh(x));
}
void atanh_7997d8() {
float res = tint_atanh(1.0f);
}
void compute_main() {
atanh_7997d8();
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
compute_main();
return;
}

View File

@@ -0,0 +1,34 @@
float tint_atanh(float x) {
return (log(((1.0f + x) / (1.0f - x))) * 0.5f);
}
void atanh_7997d8() {
float res = tint_atanh(1.0f);
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
atanh_7997d8();
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_7997d8();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
atanh_7997d8();
return;
}

View File

@@ -0,0 +1,37 @@
#include <metal_stdlib>
using namespace metal;
float tint_atanh(float x) {
return select(atanh(x), 0.0f, (x >= 1.0f));
}
void atanh_7997d8() {
float res = tint_atanh(1.0f);
}
struct tint_symbol {
float4 value [[position]];
};
float4 vertex_main_inner() {
atanh_7997d8();
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_7997d8();
return;
}
kernel void compute_main() {
atanh_7997d8();
return;
}

View File

@@ -0,0 +1,77 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 39
; Schema: 0
OpCapability Shader
%18 = OpExtInstImport "GLSL.std.450"
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 %tint_atanh "tint_atanh"
OpName %x "x"
OpName %atanh_7997d8 "atanh_7997d8"
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
%9 = OpTypeFunction %float %float
%float_1 = OpConstant %float 1
%bool = OpTypeBool
%void = OpTypeVoid
%19 = OpTypeFunction %void
%_ptr_Function_float = OpTypePointer Function %float
%26 = OpTypeFunction %v4float
%tint_atanh = OpFunction %float None %9
%x = OpFunctionParameter %float
%12 = OpLabel
%15 = OpFOrdGreaterThanEqual %bool %x %float_1
%17 = OpExtInst %float %18 Atanh %x
%13 = OpSelect %float %15 %8 %17
OpReturnValue %13
OpFunctionEnd
%atanh_7997d8 = OpFunction %void None %19
%22 = OpLabel
%res = OpVariable %_ptr_Function_float Function %8
%23 = OpFunctionCall %float %tint_atanh %float_1
OpStore %res %23
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %26
%28 = OpLabel
%29 = OpFunctionCall %void %atanh_7997d8
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %19
%31 = OpLabel
%32 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %32
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %19
%34 = OpLabel
%35 = OpFunctionCall %void %atanh_7997d8
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %19
%37 = OpLabel
%38 = OpFunctionCall %void %atanh_7997d8
OpReturn
OpFunctionEnd

View File

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

View File

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

View File

@@ -0,0 +1,61 @@
#version 310 es
vec2 tint_atanh(vec2 x) {
return mix(atanh(x), vec2(0.0f), greaterThanEqual(x, vec2(1.0f)));
}
void atanh_c0e634() {
vec2 res = tint_atanh(vec2(0.0f));
}
vec4 vertex_main() {
atanh_c0e634();
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;
vec2 tint_atanh(vec2 x) {
return mix(atanh(x), vec2(0.0f), greaterThanEqual(x, vec2(1.0f)));
}
void atanh_c0e634() {
vec2 res = tint_atanh(vec2(0.0f));
}
void fragment_main() {
atanh_c0e634();
}
void main() {
fragment_main();
return;
}
#version 310 es
vec2 tint_atanh(vec2 x) {
return mix(atanh(x), vec2(0.0f), greaterThanEqual(x, vec2(1.0f)));
}
void atanh_c0e634() {
vec2 res = tint_atanh(vec2(0.0f));
}
void compute_main() {
atanh_c0e634();
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
compute_main();
return;
}

View File

@@ -0,0 +1,34 @@
float2 tint_atanh(float2 x) {
return (log(((1.0f + x) / (1.0f - x))) * 0.5f);
}
void atanh_c0e634() {
float2 res = tint_atanh((0.0f).xx);
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
atanh_c0e634();
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_c0e634();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
atanh_c0e634();
return;
}

View File

@@ -0,0 +1,37 @@
#include <metal_stdlib>
using namespace metal;
float2 tint_atanh(float2 x) {
return select(atanh(x), float2(0.0f), (x >= float2(1.0f)));
}
void atanh_c0e634() {
float2 res = tint_atanh(float2(0.0f));
}
struct tint_symbol {
float4 value [[position]];
};
float4 vertex_main_inner() {
atanh_c0e634();
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_c0e634();
return;
}
kernel void compute_main() {
atanh_c0e634();
return;
}

View File

@@ -0,0 +1,81 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 43
; Schema: 0
OpCapability Shader
%22 = OpExtInstImport "GLSL.std.450"
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 %tint_atanh "tint_atanh"
OpName %x "x"
OpName %atanh_c0e634 "atanh_c0e634"
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
%v2float = OpTypeVector %float 2
%9 = OpTypeFunction %v2float %v2float
%float_1 = OpConstant %float 1
%16 = OpConstantComposite %v2float %float_1 %float_1
%bool = OpTypeBool
%v2bool = OpTypeVector %bool 2
%20 = OpConstantNull %v2float
%void = OpTypeVoid
%23 = OpTypeFunction %void
%_ptr_Function_v2float = OpTypePointer Function %v2float
%30 = OpTypeFunction %v4float
%tint_atanh = OpFunction %v2float None %9
%x = OpFunctionParameter %v2float
%13 = OpLabel
%17 = OpFOrdGreaterThanEqual %v2bool %x %16
%21 = OpExtInst %v2float %22 Atanh %x
%14 = OpSelect %v2float %17 %20 %21
OpReturnValue %14
OpFunctionEnd
%atanh_c0e634 = OpFunction %void None %23
%26 = OpLabel
%res = OpVariable %_ptr_Function_v2float Function %20
%27 = OpFunctionCall %v2float %tint_atanh %20
OpStore %res %27
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %30
%32 = OpLabel
%33 = OpFunctionCall %void %atanh_c0e634
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %23
%35 = OpLabel
%36 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %36
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %23
%38 = OpLabel
%39 = OpFunctionCall %void %atanh_c0e634
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %23
%41 = OpLabel
%42 = OpFunctionCall %void %atanh_c0e634
OpReturn
OpFunctionEnd

View File

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

View File

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

View File

@@ -0,0 +1,61 @@
#version 310 es
vec4 tint_atanh(vec4 x) {
return mix(atanh(x), vec4(0.0f), greaterThanEqual(x, vec4(1.0f)));
}
void atanh_f3e01b() {
vec4 res = tint_atanh(vec4(0.0f));
}
vec4 vertex_main() {
atanh_f3e01b();
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;
vec4 tint_atanh(vec4 x) {
return mix(atanh(x), vec4(0.0f), greaterThanEqual(x, vec4(1.0f)));
}
void atanh_f3e01b() {
vec4 res = tint_atanh(vec4(0.0f));
}
void fragment_main() {
atanh_f3e01b();
}
void main() {
fragment_main();
return;
}
#version 310 es
vec4 tint_atanh(vec4 x) {
return mix(atanh(x), vec4(0.0f), greaterThanEqual(x, vec4(1.0f)));
}
void atanh_f3e01b() {
vec4 res = tint_atanh(vec4(0.0f));
}
void compute_main() {
atanh_f3e01b();
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
compute_main();
return;
}

View File

@@ -0,0 +1,34 @@
float4 tint_atanh(float4 x) {
return (log(((1.0f + x) / (1.0f - x))) * 0.5f);
}
void atanh_f3e01b() {
float4 res = tint_atanh((0.0f).xxxx);
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
atanh_f3e01b();
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_f3e01b();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
atanh_f3e01b();
return;
}

View File

@@ -0,0 +1,37 @@
#include <metal_stdlib>
using namespace metal;
float4 tint_atanh(float4 x) {
return select(atanh(x), float4(0.0f), (x >= float4(1.0f)));
}
void atanh_f3e01b() {
float4 res = tint_atanh(float4(0.0f));
}
struct tint_symbol {
float4 value [[position]];
};
float4 vertex_main_inner() {
atanh_f3e01b();
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_f3e01b();
return;
}
kernel void compute_main() {
atanh_f3e01b();
return;
}

View File

@@ -0,0 +1,79 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 41
; Schema: 0
OpCapability Shader
%20 = OpExtInstImport "GLSL.std.450"
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 %tint_atanh "tint_atanh"
OpName %x "x"
OpName %atanh_f3e01b "atanh_f3e01b"
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
%9 = OpTypeFunction %v4float %v4float
%float_1 = OpConstant %float 1
%15 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
%bool = OpTypeBool
%v4bool = OpTypeVector %bool 4
%void = OpTypeVoid
%21 = OpTypeFunction %void
%_ptr_Function_v4float = OpTypePointer Function %v4float
%28 = OpTypeFunction %v4float
%tint_atanh = OpFunction %v4float None %9
%x = OpFunctionParameter %v4float
%12 = OpLabel
%16 = OpFOrdGreaterThanEqual %v4bool %x %15
%19 = OpExtInst %v4float %20 Atanh %x
%13 = OpSelect %v4float %16 %5 %19
OpReturnValue %13
OpFunctionEnd
%atanh_f3e01b = OpFunction %void None %21
%24 = OpLabel
%res = OpVariable %_ptr_Function_v4float Function %5
%25 = OpFunctionCall %v4float %tint_atanh %5
OpStore %res %25
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %28
%30 = OpLabel
%31 = OpFunctionCall %void %atanh_f3e01b
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %21
%33 = OpLabel
%34 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %34
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %21
%36 = OpLabel
%37 = OpFunctionCall %void %atanh_f3e01b
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %21
%39 = OpLabel
%40 = OpFunctionCall %void %atanh_f3e01b
OpReturn
OpFunctionEnd

View File

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

View File

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

View File

@@ -0,0 +1,64 @@
#version 310 es
vec2 tint_acosh(vec2 x) {
return mix(acosh(x), vec2(0.0f), lessThan(x, vec2(1.0f)));
}
void acosh_640883() {
vec2 arg_0 = vec2(0.0f);
vec2 res = tint_acosh(arg_0);
}
vec4 vertex_main() {
acosh_640883();
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;
vec2 tint_acosh(vec2 x) {
return mix(acosh(x), vec2(0.0f), lessThan(x, vec2(1.0f)));
}
void acosh_640883() {
vec2 arg_0 = vec2(0.0f);
vec2 res = tint_acosh(arg_0);
}
void fragment_main() {
acosh_640883();
}
void main() {
fragment_main();
return;
}
#version 310 es
vec2 tint_acosh(vec2 x) {
return mix(acosh(x), vec2(0.0f), lessThan(x, vec2(1.0f)));
}
void acosh_640883() {
vec2 arg_0 = vec2(0.0f);
vec2 res = tint_acosh(arg_0);
}
void compute_main() {
acosh_640883();
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
compute_main();
return;
}

View File

@@ -0,0 +1,35 @@
float2 tint_acosh(float2 x) {
return log((x + sqrt(((x * x) - 1.0f))));
}
void acosh_640883() {
float2 arg_0 = (0.0f).xx;
float2 res = tint_acosh(arg_0);
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
acosh_640883();
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() {
acosh_640883();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
acosh_640883();
return;
}

View File

@@ -0,0 +1,38 @@
#include <metal_stdlib>
using namespace metal;
float2 tint_acosh(float2 x) {
return select(acosh(x), float2(0.0f), (x < float2(1.0f)));
}
void acosh_640883() {
float2 arg_0 = float2(0.0f);
float2 res = tint_acosh(arg_0);
}
struct tint_symbol {
float4 value [[position]];
};
float4 vertex_main_inner() {
acosh_640883();
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() {
acosh_640883();
return;
}
kernel void compute_main() {
acosh_640883();
return;
}

View File

@@ -0,0 +1,85 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 45
; Schema: 0
OpCapability Shader
%22 = OpExtInstImport "GLSL.std.450"
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 %tint_acosh "tint_acosh"
OpName %x "x"
OpName %acosh_640883 "acosh_640883"
OpName %arg_0 "arg_0"
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
%v2float = OpTypeVector %float 2
%9 = OpTypeFunction %v2float %v2float
%float_1 = OpConstant %float 1
%16 = OpConstantComposite %v2float %float_1 %float_1
%bool = OpTypeBool
%v2bool = OpTypeVector %bool 2
%20 = OpConstantNull %v2float
%void = OpTypeVoid
%23 = OpTypeFunction %void
%_ptr_Function_v2float = OpTypePointer Function %v2float
%32 = OpTypeFunction %v4float
%tint_acosh = OpFunction %v2float None %9
%x = OpFunctionParameter %v2float
%13 = OpLabel
%17 = OpFOrdLessThan %v2bool %x %16
%21 = OpExtInst %v2float %22 Acosh %x
%14 = OpSelect %v2float %17 %20 %21
OpReturnValue %14
OpFunctionEnd
%acosh_640883 = OpFunction %void None %23
%26 = OpLabel
%arg_0 = OpVariable %_ptr_Function_v2float Function %20
%res = OpVariable %_ptr_Function_v2float Function %20
OpStore %arg_0 %20
%30 = OpLoad %v2float %arg_0
%29 = OpFunctionCall %v2float %tint_acosh %30
OpStore %res %29
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %32
%34 = OpLabel
%35 = OpFunctionCall %void %acosh_640883
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %23
%37 = OpLabel
%38 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %38
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %23
%40 = OpLabel
%41 = OpFunctionCall %void %acosh_640883
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %23
%43 = OpLabel
%44 = OpFunctionCall %void %acosh_640883
OpReturn
OpFunctionEnd

View File

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

View File

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

View File

@@ -0,0 +1,64 @@
#version 310 es
vec4 tint_acosh(vec4 x) {
return mix(acosh(x), vec4(0.0f), lessThan(x, vec4(1.0f)));
}
void acosh_d51ccb() {
vec4 arg_0 = vec4(0.0f);
vec4 res = tint_acosh(arg_0);
}
vec4 vertex_main() {
acosh_d51ccb();
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;
vec4 tint_acosh(vec4 x) {
return mix(acosh(x), vec4(0.0f), lessThan(x, vec4(1.0f)));
}
void acosh_d51ccb() {
vec4 arg_0 = vec4(0.0f);
vec4 res = tint_acosh(arg_0);
}
void fragment_main() {
acosh_d51ccb();
}
void main() {
fragment_main();
return;
}
#version 310 es
vec4 tint_acosh(vec4 x) {
return mix(acosh(x), vec4(0.0f), lessThan(x, vec4(1.0f)));
}
void acosh_d51ccb() {
vec4 arg_0 = vec4(0.0f);
vec4 res = tint_acosh(arg_0);
}
void compute_main() {
acosh_d51ccb();
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
compute_main();
return;
}

View File

@@ -0,0 +1,35 @@
float4 tint_acosh(float4 x) {
return log((x + sqrt(((x * x) - 1.0f))));
}
void acosh_d51ccb() {
float4 arg_0 = (0.0f).xxxx;
float4 res = tint_acosh(arg_0);
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
acosh_d51ccb();
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() {
acosh_d51ccb();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
acosh_d51ccb();
return;
}

View File

@@ -0,0 +1,38 @@
#include <metal_stdlib>
using namespace metal;
float4 tint_acosh(float4 x) {
return select(acosh(x), float4(0.0f), (x < float4(1.0f)));
}
void acosh_d51ccb() {
float4 arg_0 = float4(0.0f);
float4 res = tint_acosh(arg_0);
}
struct tint_symbol {
float4 value [[position]];
};
float4 vertex_main_inner() {
acosh_d51ccb();
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() {
acosh_d51ccb();
return;
}
kernel void compute_main() {
acosh_d51ccb();
return;
}

View File

@@ -0,0 +1,83 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 43
; Schema: 0
OpCapability Shader
%20 = OpExtInstImport "GLSL.std.450"
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 %tint_acosh "tint_acosh"
OpName %x "x"
OpName %acosh_d51ccb "acosh_d51ccb"
OpName %arg_0 "arg_0"
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
%9 = OpTypeFunction %v4float %v4float
%float_1 = OpConstant %float 1
%15 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
%bool = OpTypeBool
%v4bool = OpTypeVector %bool 4
%void = OpTypeVoid
%21 = OpTypeFunction %void
%_ptr_Function_v4float = OpTypePointer Function %v4float
%30 = OpTypeFunction %v4float
%tint_acosh = OpFunction %v4float None %9
%x = OpFunctionParameter %v4float
%12 = OpLabel
%16 = OpFOrdLessThan %v4bool %x %15
%19 = OpExtInst %v4float %20 Acosh %x
%13 = OpSelect %v4float %16 %5 %19
OpReturnValue %13
OpFunctionEnd
%acosh_d51ccb = OpFunction %void None %21
%24 = OpLabel
%arg_0 = OpVariable %_ptr_Function_v4float Function %5
%res = OpVariable %_ptr_Function_v4float Function %5
OpStore %arg_0 %5
%28 = OpLoad %v4float %arg_0
%27 = OpFunctionCall %v4float %tint_acosh %28
OpStore %res %27
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %30
%32 = OpLabel
%33 = OpFunctionCall %void %acosh_d51ccb
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %21
%35 = OpLabel
%36 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %36
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %21
%38 = OpLabel
%39 = OpFunctionCall %void %acosh_d51ccb
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %21
%41 = OpLabel
%42 = OpFunctionCall %void %acosh_d51ccb
OpReturn
OpFunctionEnd

View File

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

View File

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

View File

@@ -0,0 +1,64 @@
#version 310 es
vec3 tint_acosh(vec3 x) {
return mix(acosh(x), vec3(0.0f), lessThan(x, vec3(1.0f)));
}
void acosh_e38f5c() {
vec3 arg_0 = vec3(0.0f);
vec3 res = tint_acosh(arg_0);
}
vec4 vertex_main() {
acosh_e38f5c();
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;
vec3 tint_acosh(vec3 x) {
return mix(acosh(x), vec3(0.0f), lessThan(x, vec3(1.0f)));
}
void acosh_e38f5c() {
vec3 arg_0 = vec3(0.0f);
vec3 res = tint_acosh(arg_0);
}
void fragment_main() {
acosh_e38f5c();
}
void main() {
fragment_main();
return;
}
#version 310 es
vec3 tint_acosh(vec3 x) {
return mix(acosh(x), vec3(0.0f), lessThan(x, vec3(1.0f)));
}
void acosh_e38f5c() {
vec3 arg_0 = vec3(0.0f);
vec3 res = tint_acosh(arg_0);
}
void compute_main() {
acosh_e38f5c();
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
compute_main();
return;
}

View File

@@ -0,0 +1,35 @@
float3 tint_acosh(float3 x) {
return log((x + sqrt(((x * x) - 1.0f))));
}
void acosh_e38f5c() {
float3 arg_0 = (0.0f).xxx;
float3 res = tint_acosh(arg_0);
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
acosh_e38f5c();
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() {
acosh_e38f5c();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
acosh_e38f5c();
return;
}

View File

@@ -0,0 +1,38 @@
#include <metal_stdlib>
using namespace metal;
float3 tint_acosh(float3 x) {
return select(acosh(x), float3(0.0f), (x < float3(1.0f)));
}
void acosh_e38f5c() {
float3 arg_0 = float3(0.0f);
float3 res = tint_acosh(arg_0);
}
struct tint_symbol {
float4 value [[position]];
};
float4 vertex_main_inner() {
acosh_e38f5c();
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() {
acosh_e38f5c();
return;
}
kernel void compute_main() {
acosh_e38f5c();
return;
}

View File

@@ -0,0 +1,85 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 45
; Schema: 0
OpCapability Shader
%22 = OpExtInstImport "GLSL.std.450"
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 %tint_acosh "tint_acosh"
OpName %x "x"
OpName %acosh_e38f5c "acosh_e38f5c"
OpName %arg_0 "arg_0"
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
%v3float = OpTypeVector %float 3
%9 = OpTypeFunction %v3float %v3float
%float_1 = OpConstant %float 1
%16 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%bool = OpTypeBool
%v3bool = OpTypeVector %bool 3
%20 = OpConstantNull %v3float
%void = OpTypeVoid
%23 = OpTypeFunction %void
%_ptr_Function_v3float = OpTypePointer Function %v3float
%32 = OpTypeFunction %v4float
%tint_acosh = OpFunction %v3float None %9
%x = OpFunctionParameter %v3float
%13 = OpLabel
%17 = OpFOrdLessThan %v3bool %x %16
%21 = OpExtInst %v3float %22 Acosh %x
%14 = OpSelect %v3float %17 %20 %21
OpReturnValue %14
OpFunctionEnd
%acosh_e38f5c = OpFunction %void None %23
%26 = OpLabel
%arg_0 = OpVariable %_ptr_Function_v3float Function %20
%res = OpVariable %_ptr_Function_v3float Function %20
OpStore %arg_0 %20
%30 = OpLoad %v3float %arg_0
%29 = OpFunctionCall %v3float %tint_acosh %30
OpStore %res %29
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %32
%34 = OpLabel
%35 = OpFunctionCall %void %acosh_e38f5c
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %23
%37 = OpLabel
%38 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %38
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %23
%40 = OpLabel
%41 = OpFunctionCall %void %acosh_e38f5c
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %23
%43 = OpLabel
%44 = OpFunctionCall %void %acosh_e38f5c
OpReturn
OpFunctionEnd

View File

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

View File

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

View File

@@ -0,0 +1,64 @@
#version 310 es
float tint_acosh(float x) {
return ((x < 1.0f) ? 0.0f : acosh(x));
}
void acosh_ecf2d1() {
float arg_0 = 1.0f;
float res = tint_acosh(arg_0);
}
vec4 vertex_main() {
acosh_ecf2d1();
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;
float tint_acosh(float x) {
return ((x < 1.0f) ? 0.0f : acosh(x));
}
void acosh_ecf2d1() {
float arg_0 = 1.0f;
float res = tint_acosh(arg_0);
}
void fragment_main() {
acosh_ecf2d1();
}
void main() {
fragment_main();
return;
}
#version 310 es
float tint_acosh(float x) {
return ((x < 1.0f) ? 0.0f : acosh(x));
}
void acosh_ecf2d1() {
float arg_0 = 1.0f;
float res = tint_acosh(arg_0);
}
void compute_main() {
acosh_ecf2d1();
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
compute_main();
return;
}

View File

@@ -0,0 +1,35 @@
float tint_acosh(float x) {
return log((x + sqrt(((x * x) - 1.0f))));
}
void acosh_ecf2d1() {
float arg_0 = 1.0f;
float res = tint_acosh(arg_0);
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
acosh_ecf2d1();
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() {
acosh_ecf2d1();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
acosh_ecf2d1();
return;
}

View File

@@ -0,0 +1,38 @@
#include <metal_stdlib>
using namespace metal;
float tint_acosh(float x) {
return select(acosh(x), 0.0f, (x < 1.0f));
}
void acosh_ecf2d1() {
float arg_0 = 1.0f;
float res = tint_acosh(arg_0);
}
struct tint_symbol {
float4 value [[position]];
};
float4 vertex_main_inner() {
acosh_ecf2d1();
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() {
acosh_ecf2d1();
return;
}
kernel void compute_main() {
acosh_ecf2d1();
return;
}

View File

@@ -0,0 +1,81 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 41
; Schema: 0
OpCapability Shader
%18 = OpExtInstImport "GLSL.std.450"
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 %tint_acosh "tint_acosh"
OpName %x "x"
OpName %acosh_ecf2d1 "acosh_ecf2d1"
OpName %arg_0 "arg_0"
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
%9 = OpTypeFunction %float %float
%float_1 = OpConstant %float 1
%bool = OpTypeBool
%void = OpTypeVoid
%19 = OpTypeFunction %void
%_ptr_Function_float = OpTypePointer Function %float
%28 = OpTypeFunction %v4float
%tint_acosh = OpFunction %float None %9
%x = OpFunctionParameter %float
%12 = OpLabel
%15 = OpFOrdLessThan %bool %x %float_1
%17 = OpExtInst %float %18 Acosh %x
%13 = OpSelect %float %15 %8 %17
OpReturnValue %13
OpFunctionEnd
%acosh_ecf2d1 = OpFunction %void None %19
%22 = OpLabel
%arg_0 = OpVariable %_ptr_Function_float Function %8
%res = OpVariable %_ptr_Function_float Function %8
OpStore %arg_0 %float_1
%26 = OpLoad %float %arg_0
%25 = OpFunctionCall %float %tint_acosh %26
OpStore %res %25
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %28
%30 = OpLabel
%31 = OpFunctionCall %void %acosh_ecf2d1
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %19
%33 = OpLabel
%34 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %34
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %19
%36 = OpLabel
%37 = OpFunctionCall %void %acosh_ecf2d1
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %19
%39 = OpLabel
%40 = OpFunctionCall %void %acosh_ecf2d1
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,20 @@
fn acosh_ecf2d1() {
var arg_0 = 1.0;
var res : f32 = acosh(arg_0);
}
@vertex
fn vertex_main() -> @builtin(position) vec4<f32> {
acosh_ecf2d1();
return vec4<f32>();
}
@fragment
fn fragment_main() {
acosh_ecf2d1();
}
@compute @workgroup_size(1)
fn compute_main() {
acosh_ecf2d1();
}

View File

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

View File

@@ -0,0 +1,52 @@
#version 310 es
void asinh_157447() {
float arg_0 = 1.0f;
float res = asinh(arg_0);
}
vec4 vertex_main() {
asinh_157447();
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 asinh_157447() {
float arg_0 = 1.0f;
float res = asinh(arg_0);
}
void fragment_main() {
asinh_157447();
}
void main() {
fragment_main();
return;
}
#version 310 es
void asinh_157447() {
float arg_0 = 1.0f;
float res = asinh(arg_0);
}
void compute_main() {
asinh_157447();
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
compute_main();
return;
}

View File

@@ -0,0 +1,35 @@
float tint_sinh(float x) {
return log((x + sqrt(((x * x) + 1.0f))));
}
void asinh_157447() {
float arg_0 = 1.0f;
float res = tint_sinh(arg_0);
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
asinh_157447();
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() {
asinh_157447();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
asinh_157447();
return;
}

View File

@@ -0,0 +1,34 @@
#include <metal_stdlib>
using namespace metal;
void asinh_157447() {
float arg_0 = 1.0f;
float res = asinh(arg_0);
}
struct tint_symbol {
float4 value [[position]];
};
float4 vertex_main_inner() {
asinh_157447();
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() {
asinh_157447();
return;
}
kernel void compute_main() {
asinh_157447();
return;
}

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