const eval of atan2

Bug: tint:1581

Change-Id: I6268e291540bc8c712f6925f0bcb82c5873359c7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/96902
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
Antonio Maiorano
2022-07-27 14:51:27 +00:00
committed by Dawn LUCI CQ
parent f8fb94d9e8
commit 4de90f0bb1
83 changed files with 3228 additions and 682 deletions

View File

@@ -0,0 +1,43 @@
// 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/src/cmd/gen
// using the template:
// test/tint/builtins/gen/gen.wgsl.tmpl
//
// Do not modify this file directly
////////////////////////////////////////////////////////////////////////////////
// fn atan2(fa, fa) -> fa
fn atan2_034ace() {
var res = atan2(1, 1);
}
@vertex
fn vertex_main() -> @builtin(position) vec4<f32> {
atan2_034ace();
return vec4<f32>();
}
@fragment
fn fragment_main() {
atan2_034ace();
}
@compute @workgroup_size(1)
fn compute_main() {
atan2_034ace();
}

View File

@@ -0,0 +1,30 @@
void atan2_034ace() {
float res = 0.785398185f;
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
atan2_034ace();
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() {
atan2_034ace();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
atan2_034ace();
return;
}

View File

@@ -0,0 +1,30 @@
void atan2_034ace() {
float res = 0.785398185f;
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
atan2_034ace();
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() {
atan2_034ace();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
atan2_034ace();
return;
}

View File

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,43 @@
// 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/src/cmd/gen
// using the template:
// test/tint/builtins/gen/gen.wgsl.tmpl
//
// Do not modify this file directly
////////////////////////////////////////////////////////////////////////////////
// fn atan2(vec<3, fa>, vec<3, fa>) -> vec<3, fa>
fn atan2_3c2865() {
var res = atan2(vec3(1), vec3(1));
}
@vertex
fn vertex_main() -> @builtin(position) vec4<f32> {
atan2_3c2865();
return vec4<f32>();
}
@fragment
fn fragment_main() {
atan2_3c2865();
}
@compute @workgroup_size(1)
fn compute_main() {
atan2_3c2865();
}

View File

@@ -0,0 +1,30 @@
void atan2_3c2865() {
float3 res = (0.785398185f).xxx;
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
atan2_3c2865();
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() {
atan2_3c2865();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
atan2_3c2865();
return;
}

View File

@@ -0,0 +1,30 @@
void atan2_3c2865() {
float3 res = (0.785398185f).xxx;
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
atan2_3c2865();
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() {
atan2_3c2865();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
atan2_3c2865();
return;
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,7 +1,7 @@
#version 310 es
void atan2_57fb13() {
vec2 res = atan(vec2(1.0f), vec2(1.0f));
vec2 res = vec2(0.785398185f);
}
vec4 vertex_main() {
@@ -21,7 +21,7 @@ void main() {
precision mediump float;
void atan2_57fb13() {
vec2 res = atan(vec2(1.0f), vec2(1.0f));
vec2 res = vec2(0.785398185f);
}
void fragment_main() {
@@ -35,7 +35,7 @@ void main() {
#version 310 es
void atan2_57fb13() {
vec2 res = atan(vec2(1.0f), vec2(1.0f));
vec2 res = vec2(0.785398185f);
}
void compute_main() {

View File

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

View File

@@ -1,10 +1,9 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 34
; 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"
@@ -32,37 +31,37 @@
%void = OpTypeVoid
%9 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
%float_1 = OpConstant %float 1
%17 = OpConstantComposite %v2float %float_1 %float_1
%float_0_785398185 = OpConstant %float 0.785398185
%15 = OpConstantComposite %v2float %float_0_785398185 %float_0_785398185
%_ptr_Function_v2float = OpTypePointer Function %v2float
%20 = OpConstantNull %v2float
%21 = OpTypeFunction %v4float
%18 = OpConstantNull %v2float
%19 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%atan2_57fb13 = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_v2float Function %20
%13 = OpExtInst %v2float %15 Atan2 %17 %17
OpStore %res %13
%res = OpVariable %_ptr_Function_v2float Function %18
OpStore %res %15
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %21
%23 = OpLabel
%24 = OpFunctionCall %void %atan2_57fb13
%vertex_main_inner = OpFunction %v4float None %19
%21 = OpLabel
%22 = OpFunctionCall %void %atan2_57fb13
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %9
%26 = OpLabel
%27 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %27
%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
%29 = OpLabel
%30 = OpFunctionCall %void %atan2_57fb13
%28 = OpLabel
%29 = OpFunctionCall %void %atan2_57fb13
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%32 = OpLabel
%33 = OpFunctionCall %void %atan2_57fb13
%31 = OpLabel
%32 = OpFunctionCall %void %atan2_57fb13
OpReturn
OpFunctionEnd

View File

@@ -1,5 +1,5 @@
void atan2_96057c() {
float res = atan2(1.0f, 1.0f);
float res = 0.785398185f;
}
struct tint_symbol {

View File

@@ -1,5 +1,5 @@
void atan2_96057c() {
float res = atan2(1.0f, 1.0f);
float res = 0.785398185f;
}
struct tint_symbol {

View File

@@ -1,7 +1,7 @@
#version 310 es
void atan2_96057c() {
float res = atan(1.0f, 1.0f);
float res = 0.785398185f;
}
vec4 vertex_main() {
@@ -21,7 +21,7 @@ void main() {
precision mediump float;
void atan2_96057c() {
float res = atan(1.0f, 1.0f);
float res = 0.785398185f;
}
void fragment_main() {
@@ -35,7 +35,7 @@ void main() {
#version 310 es
void atan2_96057c() {
float res = atan(1.0f, 1.0f);
float res = 0.785398185f;
}
void compute_main() {

View File

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

View File

@@ -1,10 +1,9 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 31
; Bound: 30
; 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"
@@ -31,35 +30,35 @@
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
%void = OpTypeVoid
%9 = OpTypeFunction %void
%float_1 = OpConstant %float 1
%float_0_785398185 = OpConstant %float 0.785398185
%_ptr_Function_float = OpTypePointer Function %float
%18 = OpTypeFunction %v4float
%16 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%atan2_96057c = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_float Function %8
%13 = OpExtInst %float %14 Atan2 %float_1 %float_1
OpStore %res %13
OpStore %res %float_0_785398185
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %18
%20 = OpLabel
%21 = OpFunctionCall %void %atan2_96057c
%vertex_main_inner = OpFunction %v4float None %16
%18 = OpLabel
%19 = OpFunctionCall %void %atan2_96057c
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %9
%23 = OpLabel
%24 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %24
%21 = OpLabel
%22 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %22
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %9
%26 = OpLabel
%27 = OpFunctionCall %void %atan2_96057c
%25 = OpLabel
%26 = OpFunctionCall %void %atan2_96057c
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%29 = OpLabel
%30 = OpFunctionCall %void %atan2_96057c
%28 = OpLabel
%29 = OpFunctionCall %void %atan2_96057c
OpReturn
OpFunctionEnd

View File

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

View File

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

View File

@@ -1,7 +1,7 @@
#version 310 es
void atan2_a70d0d() {
vec3 res = atan(vec3(1.0f), vec3(1.0f));
vec3 res = vec3(0.785398185f);
}
vec4 vertex_main() {
@@ -21,7 +21,7 @@ void main() {
precision mediump float;
void atan2_a70d0d() {
vec3 res = atan(vec3(1.0f), vec3(1.0f));
vec3 res = vec3(0.785398185f);
}
void fragment_main() {
@@ -35,7 +35,7 @@ void main() {
#version 310 es
void atan2_a70d0d() {
vec3 res = atan(vec3(1.0f), vec3(1.0f));
vec3 res = vec3(0.785398185f);
}
void compute_main() {

View File

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

View File

@@ -1,10 +1,9 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 34
; 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"
@@ -32,37 +31,37 @@
%void = OpTypeVoid
%9 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
%float_1 = OpConstant %float 1
%17 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%float_0_785398185 = OpConstant %float 0.785398185
%15 = OpConstantComposite %v3float %float_0_785398185 %float_0_785398185 %float_0_785398185
%_ptr_Function_v3float = OpTypePointer Function %v3float
%20 = OpConstantNull %v3float
%21 = OpTypeFunction %v4float
%18 = OpConstantNull %v3float
%19 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%atan2_a70d0d = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_v3float Function %20
%13 = OpExtInst %v3float %15 Atan2 %17 %17
OpStore %res %13
%res = OpVariable %_ptr_Function_v3float Function %18
OpStore %res %15
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %21
%23 = OpLabel
%24 = OpFunctionCall %void %atan2_a70d0d
%vertex_main_inner = OpFunction %v4float None %19
%21 = OpLabel
%22 = OpFunctionCall %void %atan2_a70d0d
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %9
%26 = OpLabel
%27 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %27
%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
%29 = OpLabel
%30 = OpFunctionCall %void %atan2_a70d0d
%28 = OpLabel
%29 = OpFunctionCall %void %atan2_a70d0d
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%32 = OpLabel
%33 = OpFunctionCall %void %atan2_a70d0d
%31 = OpLabel
%32 = OpFunctionCall %void %atan2_a70d0d
OpReturn
OpFunctionEnd

View File

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

View File

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

View File

@@ -1,7 +1,7 @@
#version 310 es
void atan2_ae713e() {
vec4 res = atan(vec4(1.0f), vec4(1.0f));
vec4 res = vec4(0.785398185f);
}
vec4 vertex_main() {
@@ -21,7 +21,7 @@ void main() {
precision mediump float;
void atan2_ae713e() {
vec4 res = atan(vec4(1.0f), vec4(1.0f));
vec4 res = vec4(0.785398185f);
}
void fragment_main() {
@@ -35,7 +35,7 @@ void main() {
#version 310 es
void atan2_ae713e() {
vec4 res = atan(vec4(1.0f), vec4(1.0f));
vec4 res = vec4(0.785398185f);
}
void compute_main() {

View File

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

View File

@@ -1,10 +1,9 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 32
; 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"
@@ -31,36 +30,36 @@
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
%void = OpTypeVoid
%9 = OpTypeFunction %void
%float_1 = OpConstant %float 1
%16 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
%float_0_785398185 = OpConstant %float 0.785398185
%14 = OpConstantComposite %v4float %float_0_785398185 %float_0_785398185 %float_0_785398185 %float_0_785398185
%_ptr_Function_v4float = OpTypePointer Function %v4float
%19 = OpTypeFunction %v4float
%17 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%atan2_ae713e = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_v4float Function %5
%13 = OpExtInst %v4float %14 Atan2 %16 %16
OpStore %res %13
OpStore %res %14
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %19
%21 = OpLabel
%22 = OpFunctionCall %void %atan2_ae713e
%vertex_main_inner = OpFunction %v4float None %17
%19 = OpLabel
%20 = OpFunctionCall %void %atan2_ae713e
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %9
%24 = OpLabel
%25 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %25
%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
%27 = OpLabel
%28 = OpFunctionCall %void %atan2_ae713e
%26 = OpLabel
%27 = OpFunctionCall %void %atan2_ae713e
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%30 = OpLabel
%31 = OpFunctionCall %void %atan2_ae713e
%29 = OpLabel
%30 = OpFunctionCall %void %atan2_ae713e
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,43 @@
// 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/src/cmd/gen
// using the template:
// test/tint/builtins/gen/gen.wgsl.tmpl
//
// Do not modify this file directly
////////////////////////////////////////////////////////////////////////////////
// fn atan2(vec<2, fa>, vec<2, fa>) -> vec<2, fa>
fn atan2_c19683() {
var res = atan2(vec2(1), vec2(1));
}
@vertex
fn vertex_main() -> @builtin(position) vec4<f32> {
atan2_c19683();
return vec4<f32>();
}
@fragment
fn fragment_main() {
atan2_c19683();
}
@compute @workgroup_size(1)
fn compute_main() {
atan2_c19683();
}

View File

@@ -0,0 +1,30 @@
void atan2_c19683() {
float2 res = (0.785398185f).xx;
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
atan2_c19683();
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() {
atan2_c19683();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
atan2_c19683();
return;
}

View File

@@ -0,0 +1,30 @@
void atan2_c19683() {
float2 res = (0.785398185f).xx;
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
atan2_c19683();
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() {
atan2_c19683();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
atan2_c19683();
return;
}

View File

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,43 @@
// 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/src/cmd/gen
// using the template:
// test/tint/builtins/gen/gen.wgsl.tmpl
//
// Do not modify this file directly
////////////////////////////////////////////////////////////////////////////////
// fn atan2(vec<4, fa>, vec<4, fa>) -> vec<4, fa>
fn atan2_c4be45() {
var res = atan2(vec4(1), vec4(1));
}
@vertex
fn vertex_main() -> @builtin(position) vec4<f32> {
atan2_c4be45();
return vec4<f32>();
}
@fragment
fn fragment_main() {
atan2_c4be45();
}
@compute @workgroup_size(1)
fn compute_main() {
atan2_c4be45();
}

View File

@@ -0,0 +1,30 @@
void atan2_c4be45() {
float4 res = (0.785398185f).xxxx;
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
atan2_c4be45();
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() {
atan2_c4be45();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
atan2_c4be45();
return;
}

View File

@@ -0,0 +1,30 @@
void atan2_c4be45() {
float4 res = (0.785398185f).xxxx;
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
atan2_c4be45();
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() {
atan2_c4be45();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
atan2_c4be45();
return;
}

View File

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

View File

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

View File

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

View File

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

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/src/cmd/gen
// using the template:
// test/tint/builtins/gen/gen.wgsl.tmpl
//
// Do not modify this file directly
////////////////////////////////////////////////////////////////////////////////
// fn atan2(fa, fa) -> fa
fn atan2_034ace() {
const arg_0 = 1;
const arg_1 = 1;
var res = atan2(arg_0, arg_1);
}
@vertex
fn vertex_main() -> @builtin(position) vec4<f32> {
atan2_034ace();
return vec4<f32>();
}
@fragment
fn fragment_main() {
atan2_034ace();
}
@compute @workgroup_size(1)
fn compute_main() {
atan2_034ace();
}

View File

@@ -0,0 +1,30 @@
void atan2_034ace() {
float res = 0.785398185f;
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
atan2_034ace();
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() {
atan2_034ace();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
atan2_034ace();
return;
}

View File

@@ -0,0 +1,30 @@
void atan2_034ace() {
float res = 0.785398185f;
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
atan2_034ace();
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() {
atan2_034ace();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
atan2_034ace();
return;
}

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,21 @@
fn atan2_034ace() {
const arg_0 = 1;
const arg_1 = 1;
var res = atan2(arg_0, arg_1);
}
@vertex
fn vertex_main() -> @builtin(position) vec4<f32> {
atan2_034ace();
return vec4<f32>();
}
@fragment
fn fragment_main() {
atan2_034ace();
}
@compute @workgroup_size(1)
fn compute_main() {
atan2_034ace();
}

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/src/cmd/gen
// using the template:
// test/tint/builtins/gen/gen.wgsl.tmpl
//
// Do not modify this file directly
////////////////////////////////////////////////////////////////////////////////
// fn atan2(vec<3, fa>, vec<3, fa>) -> vec<3, fa>
fn atan2_3c2865() {
const arg_0 = vec3(1);
const arg_1 = vec3(1);
var res = atan2(arg_0, arg_1);
}
@vertex
fn vertex_main() -> @builtin(position) vec4<f32> {
atan2_3c2865();
return vec4<f32>();
}
@fragment
fn fragment_main() {
atan2_3c2865();
}
@compute @workgroup_size(1)
fn compute_main() {
atan2_3c2865();
}

View File

@@ -0,0 +1,30 @@
void atan2_3c2865() {
float3 res = (0.785398185f).xxx;
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
atan2_3c2865();
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() {
atan2_3c2865();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
atan2_3c2865();
return;
}

View File

@@ -0,0 +1,30 @@
void atan2_3c2865() {
float3 res = (0.785398185f).xxx;
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
atan2_3c2865();
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() {
atan2_3c2865();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
atan2_3c2865();
return;
}

View File

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

View File

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

View File

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

View File

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

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/src/cmd/gen
// using the template:
// test/tint/builtins/gen/gen.wgsl.tmpl
//
// Do not modify this file directly
////////////////////////////////////////////////////////////////////////////////
// fn atan2(vec<2, fa>, vec<2, fa>) -> vec<2, fa>
fn atan2_c19683() {
const arg_0 = vec2(1);
const arg_1 = vec2(1);
var res = atan2(arg_0, arg_1);
}
@vertex
fn vertex_main() -> @builtin(position) vec4<f32> {
atan2_c19683();
return vec4<f32>();
}
@fragment
fn fragment_main() {
atan2_c19683();
}
@compute @workgroup_size(1)
fn compute_main() {
atan2_c19683();
}

View File

@@ -0,0 +1,30 @@
void atan2_c19683() {
float2 res = (0.785398185f).xx;
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
atan2_c19683();
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() {
atan2_c19683();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
atan2_c19683();
return;
}

View File

@@ -0,0 +1,30 @@
void atan2_c19683() {
float2 res = (0.785398185f).xx;
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
atan2_c19683();
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() {
atan2_c19683();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
atan2_c19683();
return;
}

View File

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

View File

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

View File

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

View File

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

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/src/cmd/gen
// using the template:
// test/tint/builtins/gen/gen.wgsl.tmpl
//
// Do not modify this file directly
////////////////////////////////////////////////////////////////////////////////
// fn atan2(vec<4, fa>, vec<4, fa>) -> vec<4, fa>
fn atan2_c4be45() {
const arg_0 = vec4(1);
const arg_1 = vec4(1);
var res = atan2(arg_0, arg_1);
}
@vertex
fn vertex_main() -> @builtin(position) vec4<f32> {
atan2_c4be45();
return vec4<f32>();
}
@fragment
fn fragment_main() {
atan2_c4be45();
}
@compute @workgroup_size(1)
fn compute_main() {
atan2_c4be45();
}

View File

@@ -0,0 +1,30 @@
void atan2_c4be45() {
float4 res = (0.785398185f).xxxx;
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
atan2_c4be45();
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() {
atan2_c4be45();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
atan2_c4be45();
return;
}

View File

@@ -0,0 +1,30 @@
void atan2_c4be45() {
float4 res = (0.785398185f).xxxx;
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
atan2_c4be45();
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() {
atan2_c4be45();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
atan2_c4be45();
return;
}

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,21 @@
fn atan2_c4be45() {
const arg_0 = vec4(1);
const arg_1 = vec4(1);
var res = atan2(arg_0, arg_1);
}
@vertex
fn vertex_main() -> @builtin(position) vec4<f32> {
atan2_c4be45();
return vec4<f32>();
}
@fragment
fn fragment_main() {
atan2_c4be45();
}
@compute @workgroup_size(1)
fn compute_main() {
atan2_c4be45();
}