Add const-eval for degrees and radians

This CL adds const-eval for `degrees` and `radians`.

Bug: tint:1581
Change-Id: I7f00e2b1e5ab7c8e895680a6b75b9531dac31f5a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110601
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
This commit is contained in:
dan sinclair
2022-11-21 18:00:01 +00:00
committed by Dawn LUCI CQ
parent d114055e4e
commit efe9c49819
198 changed files with 5029 additions and 909 deletions

View File

@@ -1,9 +1,5 @@
float4 tint_degrees(float4 param_0) {
return param_0 * 57.295779513082322865;
}
void degrees_0d170c() {
float4 res = tint_degrees((1.0f).xxxx);
float4 res = (57.295776367f).xxxx;
}
struct tint_symbol {

View File

@@ -1,9 +1,5 @@
float4 tint_degrees(float4 param_0) {
return param_0 * 57.295779513082322865;
}
void degrees_0d170c() {
float4 res = tint_degrees((1.0f).xxxx);
float4 res = (57.295776367f).xxxx;
}
struct tint_symbol {

View File

@@ -1,12 +1,7 @@
#version 310 es
vec4 tint_degrees(vec4 param_0) {
return param_0 * 57.295779513082322865f;
}
void degrees_0d170c() {
vec4 res = tint_degrees(vec4(1.0f));
vec4 res = vec4(57.295776367f);
}
vec4 vertex_main() {
@@ -25,13 +20,8 @@ void main() {
#version 310 es
precision mediump float;
vec4 tint_degrees(vec4 param_0) {
return param_0 * 57.295779513082322865f;
}
void degrees_0d170c() {
vec4 res = tint_degrees(vec4(1.0f));
vec4 res = vec4(57.295776367f);
}
void fragment_main() {
@@ -44,13 +34,8 @@ void main() {
}
#version 310 es
vec4 tint_degrees(vec4 param_0) {
return param_0 * 57.295779513082322865f;
}
void degrees_0d170c() {
vec4 res = tint_degrees(vec4(1.0f));
vec4 res = vec4(57.295776367f);
}
void compute_main() {

View File

@@ -1,13 +1,8 @@
#include <metal_stdlib>
using namespace metal;
float4 tint_degrees(float4 param_0) {
return param_0 * 57.295779513082322865;
}
void degrees_0d170c() {
float4 res = tint_degrees(float4(1.0f));
float4 res = float4(57.295776367f);
}
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_57_2957764 = OpConstant %float 57.2957764
%14 = OpConstantComposite %v4float %float_57_2957764 %float_57_2957764 %float_57_2957764 %float_57_2957764
%_ptr_Function_v4float = OpTypePointer Function %v4float
%19 = OpTypeFunction %v4float
%17 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%degrees_0d170c = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_v4float Function %5
%13 = OpExtInst %v4float %14 Degrees %16
OpStore %res %13
OpStore %res %14
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %19
%21 = OpLabel
%22 = OpFunctionCall %void %degrees_0d170c
%vertex_main_inner = OpFunction %v4float None %17
%19 = OpLabel
%20 = OpFunctionCall %void %degrees_0d170c
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 %degrees_0d170c
%26 = OpLabel
%27 = OpFunctionCall %void %degrees_0d170c
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%30 = OpLabel
%31 = OpFunctionCall %void %degrees_0d170c
%29 = OpLabel
%30 = OpFunctionCall %void %degrees_0d170c
OpReturn
OpFunctionEnd

View File

@@ -1,9 +1,5 @@
float2 tint_degrees(float2 param_0) {
return param_0 * 57.295779513082322865;
}
void degrees_1ad5df() {
float2 res = tint_degrees((1.0f).xx);
float2 res = (57.295776367f).xx;
}
struct tint_symbol {

View File

@@ -1,9 +1,5 @@
float2 tint_degrees(float2 param_0) {
return param_0 * 57.295779513082322865;
}
void degrees_1ad5df() {
float2 res = tint_degrees((1.0f).xx);
float2 res = (57.295776367f).xx;
}
struct tint_symbol {

View File

@@ -1,12 +1,7 @@
#version 310 es
vec2 tint_degrees(vec2 param_0) {
return param_0 * 57.295779513082322865f;
}
void degrees_1ad5df() {
vec2 res = tint_degrees(vec2(1.0f));
vec2 res = vec2(57.295776367f);
}
vec4 vertex_main() {
@@ -25,13 +20,8 @@ void main() {
#version 310 es
precision mediump float;
vec2 tint_degrees(vec2 param_0) {
return param_0 * 57.295779513082322865f;
}
void degrees_1ad5df() {
vec2 res = tint_degrees(vec2(1.0f));
vec2 res = vec2(57.295776367f);
}
void fragment_main() {
@@ -44,13 +34,8 @@ void main() {
}
#version 310 es
vec2 tint_degrees(vec2 param_0) {
return param_0 * 57.295779513082322865f;
}
void degrees_1ad5df() {
vec2 res = tint_degrees(vec2(1.0f));
vec2 res = vec2(57.295776367f);
}
void compute_main() {

View File

@@ -1,13 +1,8 @@
#include <metal_stdlib>
using namespace metal;
float2 tint_degrees(float2 param_0) {
return param_0 * 57.295779513082322865;
}
void degrees_1ad5df() {
float2 res = tint_degrees(float2(1.0f));
float2 res = float2(57.295776367f);
}
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_57_2957764 = OpConstant %float 57.2957764
%15 = OpConstantComposite %v2float %float_57_2957764 %float_57_2957764
%_ptr_Function_v2float = OpTypePointer Function %v2float
%20 = OpConstantNull %v2float
%21 = OpTypeFunction %v4float
%18 = OpConstantNull %v2float
%19 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%degrees_1ad5df = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_v2float Function %20
%13 = OpExtInst %v2float %15 Degrees %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 %degrees_1ad5df
%vertex_main_inner = OpFunction %v4float None %19
%21 = OpLabel
%22 = OpFunctionCall %void %degrees_1ad5df
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 %degrees_1ad5df
%28 = OpLabel
%29 = OpFunctionCall %void %degrees_1ad5df
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%32 = OpLabel
%33 = OpFunctionCall %void %degrees_1ad5df
%31 = OpLabel
%32 = OpFunctionCall %void %degrees_1ad5df
OpReturn
OpFunctionEnd

View File

@@ -1,9 +1,5 @@
float3 tint_degrees(float3 param_0) {
return param_0 * 57.295779513082322865;
}
void degrees_2af623() {
float3 res = tint_degrees((1.0f).xxx);
float3 res = (57.295776367f).xxx;
}
struct tint_symbol {

View File

@@ -1,9 +1,5 @@
float3 tint_degrees(float3 param_0) {
return param_0 * 57.295779513082322865;
}
void degrees_2af623() {
float3 res = tint_degrees((1.0f).xxx);
float3 res = (57.295776367f).xxx;
}
struct tint_symbol {

View File

@@ -1,12 +1,7 @@
#version 310 es
vec3 tint_degrees(vec3 param_0) {
return param_0 * 57.295779513082322865f;
}
void degrees_2af623() {
vec3 res = tint_degrees(vec3(1.0f));
vec3 res = vec3(57.295776367f);
}
vec4 vertex_main() {
@@ -25,13 +20,8 @@ void main() {
#version 310 es
precision mediump float;
vec3 tint_degrees(vec3 param_0) {
return param_0 * 57.295779513082322865f;
}
void degrees_2af623() {
vec3 res = tint_degrees(vec3(1.0f));
vec3 res = vec3(57.295776367f);
}
void fragment_main() {
@@ -44,13 +34,8 @@ void main() {
}
#version 310 es
vec3 tint_degrees(vec3 param_0) {
return param_0 * 57.295779513082322865f;
}
void degrees_2af623() {
vec3 res = tint_degrees(vec3(1.0f));
vec3 res = vec3(57.295776367f);
}
void compute_main() {

View File

@@ -1,13 +1,8 @@
#include <metal_stdlib>
using namespace metal;
float3 tint_degrees(float3 param_0) {
return param_0 * 57.295779513082322865;
}
void degrees_2af623() {
float3 res = tint_degrees(float3(1.0f));
float3 res = float3(57.295776367f);
}
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_57_2957764 = OpConstant %float 57.2957764
%15 = OpConstantComposite %v3float %float_57_2957764 %float_57_2957764 %float_57_2957764
%_ptr_Function_v3float = OpTypePointer Function %v3float
%20 = OpConstantNull %v3float
%21 = OpTypeFunction %v4float
%18 = OpConstantNull %v3float
%19 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%degrees_2af623 = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_v3float Function %20
%13 = OpExtInst %v3float %15 Degrees %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 %degrees_2af623
%vertex_main_inner = OpFunction %v4float None %19
%21 = OpLabel
%22 = OpFunctionCall %void %degrees_2af623
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 %degrees_2af623
%28 = OpLabel
%29 = OpFunctionCall %void %degrees_2af623
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%32 = OpLabel
%33 = OpFunctionCall %void %degrees_2af623
%31 = OpLabel
%32 = OpFunctionCall %void %degrees_2af623
OpReturn
OpFunctionEnd

View File

@@ -1,9 +1,5 @@
vector<float16_t, 4> tint_degrees(vector<float16_t, 4> param_0) {
return param_0 * 57.295779513082322865;
}
void degrees_3055d3() {
vector<float16_t, 4> res = tint_degrees((float16_t(1.0h)).xxxx);
vector<float16_t, 4> res = (float16_t(57.3125h)).xxxx;
}
struct tint_symbol {

View File

@@ -1,13 +1,8 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float : require
f16vec4 tint_degrees(f16vec4 param_0) {
return param_0 * 57.295779513082322865hf;
}
void degrees_3055d3() {
f16vec4 res = tint_degrees(f16vec4(1.0hf));
f16vec4 res = f16vec4(57.3125hf);
}
vec4 vertex_main() {
@@ -27,13 +22,8 @@ void main() {
#extension GL_AMD_gpu_shader_half_float : require
precision mediump float;
f16vec4 tint_degrees(f16vec4 param_0) {
return param_0 * 57.295779513082322865hf;
}
void degrees_3055d3() {
f16vec4 res = tint_degrees(f16vec4(1.0hf));
f16vec4 res = f16vec4(57.3125hf);
}
void fragment_main() {
@@ -47,13 +37,8 @@ void main() {
#version 310 es
#extension GL_AMD_gpu_shader_half_float : require
f16vec4 tint_degrees(f16vec4 param_0) {
return param_0 * 57.295779513082322865hf;
}
void degrees_3055d3() {
f16vec4 res = tint_degrees(f16vec4(1.0hf));
f16vec4 res = f16vec4(57.3125hf);
}
void compute_main() {

View File

@@ -1,13 +1,8 @@
#include <metal_stdlib>
using namespace metal;
half4 tint_degrees(half4 param_0) {
return param_0 * 57.295779513082322865;
}
void degrees_3055d3() {
half4 res = tint_degrees(half4(1.0h));
half4 res = half4(57.3125h);
}
struct tint_symbol {

View File

@@ -1,14 +1,13 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 36
; Bound: 34
; Schema: 0
OpCapability Shader
OpCapability Float16
OpCapability UniformAndStorageBuffer16BitAccess
OpCapability StorageBuffer16BitAccess
OpCapability StorageInputOutput16
%16 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
OpEntryPoint Fragment %fragment_main "fragment_main"
@@ -37,38 +36,37 @@
%9 = OpTypeFunction %void
%half = OpTypeFloat 16
%v4half = OpTypeVector %half 4
%half_0x1p_0 = OpConstant %half 0x1p+0
%18 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0
%half_0x1_ca8p_5 = OpConstant %half 0x1.ca8p+5
%16 = OpConstantComposite %v4half %half_0x1_ca8p_5 %half_0x1_ca8p_5 %half_0x1_ca8p_5 %half_0x1_ca8p_5
%_ptr_Function_v4half = OpTypePointer Function %v4half
%21 = OpConstantNull %v4half
%22 = OpTypeFunction %v4float
%19 = OpConstantNull %v4half
%20 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%degrees_3055d3 = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_v4half Function %21
%13 = OpExtInst %v4half %16 Degrees %18
OpStore %res %13
%res = OpVariable %_ptr_Function_v4half Function %19
OpStore %res %16
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %22
%24 = OpLabel
%25 = OpFunctionCall %void %degrees_3055d3
%vertex_main_inner = OpFunction %v4float None %20
%22 = OpLabel
%23 = OpFunctionCall %void %degrees_3055d3
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %9
%27 = OpLabel
%28 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %28
%25 = OpLabel
%26 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %26
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %9
%31 = OpLabel
%32 = OpFunctionCall %void %degrees_3055d3
%29 = OpLabel
%30 = OpFunctionCall %void %degrees_3055d3
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%34 = OpLabel
%35 = OpFunctionCall %void %degrees_3055d3
%32 = OpLabel
%33 = OpFunctionCall %void %degrees_3055d3
OpReturn
OpFunctionEnd

View File

@@ -1,9 +1,5 @@
float tint_degrees(float param_0) {
return param_0 * 57.295779513082322865;
}
void degrees_51f705() {
float res = tint_degrees(1.0f);
float res = 57.295776367f;
}
struct tint_symbol {

View File

@@ -1,9 +1,5 @@
float tint_degrees(float param_0) {
return param_0 * 57.295779513082322865;
}
void degrees_51f705() {
float res = tint_degrees(1.0f);
float res = 57.295776367f;
}
struct tint_symbol {

View File

@@ -1,12 +1,7 @@
#version 310 es
float tint_degrees(float param_0) {
return param_0 * 57.295779513082322865f;
}
void degrees_51f705() {
float res = tint_degrees(1.0f);
float res = 57.295776367f;
}
vec4 vertex_main() {
@@ -25,13 +20,8 @@ void main() {
#version 310 es
precision mediump float;
float tint_degrees(float param_0) {
return param_0 * 57.295779513082322865f;
}
void degrees_51f705() {
float res = tint_degrees(1.0f);
float res = 57.295776367f;
}
void fragment_main() {
@@ -44,13 +34,8 @@ void main() {
}
#version 310 es
float tint_degrees(float param_0) {
return param_0 * 57.295779513082322865f;
}
void degrees_51f705() {
float res = tint_degrees(1.0f);
float res = 57.295776367f;
}
void compute_main() {

View File

@@ -1,13 +1,8 @@
#include <metal_stdlib>
using namespace metal;
float tint_degrees(float param_0) {
return param_0 * 57.295779513082322865;
}
void degrees_51f705() {
float res = tint_degrees(1.0f);
float res = 57.295776367f;
}
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_57_2957764 = OpConstant %float 57.2957764
%_ptr_Function_float = OpTypePointer Function %float
%18 = OpTypeFunction %v4float
%16 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%degrees_51f705 = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_float Function %8
%13 = OpExtInst %float %14 Degrees %float_1
OpStore %res %13
OpStore %res %float_57_2957764
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %18
%20 = OpLabel
%21 = OpFunctionCall %void %degrees_51f705
%vertex_main_inner = OpFunction %v4float None %16
%18 = OpLabel
%19 = OpFunctionCall %void %degrees_51f705
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 %degrees_51f705
%25 = OpLabel
%26 = OpFunctionCall %void %degrees_51f705
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%29 = OpLabel
%30 = OpFunctionCall %void %degrees_51f705
%28 = OpLabel
%29 = OpFunctionCall %void %degrees_51f705
OpReturn
OpFunctionEnd

View File

@@ -1,9 +1,5 @@
float16_t tint_degrees(float16_t param_0) {
return param_0 * 57.295779513082322865;
}
void degrees_5e9805() {
float16_t res = tint_degrees(float16_t(1.0h));
float16_t res = float16_t(57.3125h);
}
struct tint_symbol {

View File

@@ -1,13 +1,8 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float : require
float16_t tint_degrees(float16_t param_0) {
return param_0 * 57.295779513082322865hf;
}
void degrees_5e9805() {
float16_t res = tint_degrees(1.0hf);
float16_t res = 57.3125hf;
}
vec4 vertex_main() {
@@ -27,13 +22,8 @@ void main() {
#extension GL_AMD_gpu_shader_half_float : require
precision mediump float;
float16_t tint_degrees(float16_t param_0) {
return param_0 * 57.295779513082322865hf;
}
void degrees_5e9805() {
float16_t res = tint_degrees(1.0hf);
float16_t res = 57.3125hf;
}
void fragment_main() {
@@ -47,13 +37,8 @@ void main() {
#version 310 es
#extension GL_AMD_gpu_shader_half_float : require
float16_t tint_degrees(float16_t param_0) {
return param_0 * 57.295779513082322865hf;
}
void degrees_5e9805() {
float16_t res = tint_degrees(1.0hf);
float16_t res = 57.3125hf;
}
void compute_main() {

View File

@@ -1,13 +1,8 @@
#include <metal_stdlib>
using namespace metal;
half tint_degrees(half param_0) {
return param_0 * 57.295779513082322865;
}
void degrees_5e9805() {
half res = tint_degrees(1.0h);
half res = 57.3125h;
}
struct tint_symbol {

View File

@@ -1,14 +1,13 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 34
; Bound: 32
; Schema: 0
OpCapability Shader
OpCapability Float16
OpCapability UniformAndStorageBuffer16BitAccess
OpCapability StorageBuffer16BitAccess
OpCapability StorageInputOutput16
%15 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
OpEntryPoint Fragment %fragment_main "fragment_main"
@@ -36,37 +35,36 @@
%void = OpTypeVoid
%9 = OpTypeFunction %void
%half = OpTypeFloat 16
%half_0x1p_0 = OpConstant %half 0x1p+0
%half_0x1_ca8p_5 = OpConstant %half 0x1.ca8p+5
%_ptr_Function_half = OpTypePointer Function %half
%19 = OpConstantNull %half
%20 = OpTypeFunction %v4float
%17 = OpConstantNull %half
%18 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%degrees_5e9805 = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_half Function %19
%13 = OpExtInst %half %15 Degrees %half_0x1p_0
OpStore %res %13
%res = OpVariable %_ptr_Function_half Function %17
OpStore %res %half_0x1_ca8p_5
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %20
%22 = OpLabel
%23 = OpFunctionCall %void %degrees_5e9805
%vertex_main_inner = OpFunction %v4float None %18
%20 = OpLabel
%21 = OpFunctionCall %void %degrees_5e9805
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %9
%25 = OpLabel
%26 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %26
%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
%29 = OpLabel
%30 = OpFunctionCall %void %degrees_5e9805
%27 = OpLabel
%28 = OpFunctionCall %void %degrees_5e9805
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%32 = OpLabel
%33 = OpFunctionCall %void %degrees_5e9805
%30 = OpLabel
%31 = OpFunctionCall %void %degrees_5e9805
OpReturn
OpFunctionEnd

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,49 @@
#version 310 es
void degrees_810467() {
vec2 res = vec2(57.295780182f);
}
vec4 vertex_main() {
degrees_810467();
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 degrees_810467() {
vec2 res = vec2(57.295780182f);
}
void fragment_main() {
degrees_810467();
}
void main() {
fragment_main();
return;
}
#version 310 es
void degrees_810467() {
vec2 res = vec2(57.295780182f);
}
void compute_main() {
degrees_810467();
}
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 degrees_810467() {
float2 res = float2(57.295780182f);
}
struct tint_symbol {
float4 value [[position]];
};
float4 vertex_main_inner() {
degrees_810467();
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() {
degrees_810467();
return;
}
kernel void compute_main() {
degrees_810467();
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 %degrees_810467 "degrees_810467"
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_57_2957802 = OpConstant %float 57.2957802
%15 = OpConstantComposite %v2float %float_57_2957802 %float_57_2957802
%_ptr_Function_v2float = OpTypePointer Function %v2float
%18 = OpConstantNull %v2float
%19 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%degrees_810467 = 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 %degrees_810467
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 %degrees_810467
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%31 = OpLabel
%32 = OpFunctionCall %void %degrees_810467
OpReturn
OpFunctionEnd

View File

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,49 @@
#version 310 es
void degrees_c0880c() {
vec3 res = vec3(57.295780182f);
}
vec4 vertex_main() {
degrees_c0880c();
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 degrees_c0880c() {
vec3 res = vec3(57.295780182f);
}
void fragment_main() {
degrees_c0880c();
}
void main() {
fragment_main();
return;
}
#version 310 es
void degrees_c0880c() {
vec3 res = vec3(57.295780182f);
}
void compute_main() {
degrees_c0880c();
}
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 degrees_c0880c() {
float3 res = float3(57.295780182f);
}
struct tint_symbol {
float4 value [[position]];
};
float4 vertex_main_inner() {
degrees_c0880c();
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() {
degrees_c0880c();
return;
}
kernel void compute_main() {
degrees_c0880c();
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 %degrees_c0880c "degrees_c0880c"
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_57_2957802 = OpConstant %float 57.2957802
%15 = OpConstantComposite %v3float %float_57_2957802 %float_57_2957802 %float_57_2957802
%_ptr_Function_v3float = OpTypePointer Function %v3float
%18 = OpConstantNull %v3float
%19 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%degrees_c0880c = 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 %degrees_c0880c
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 %degrees_c0880c
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%31 = OpLabel
%32 = OpFunctionCall %void %degrees_c0880c
OpReturn
OpFunctionEnd

View File

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,49 @@
#version 310 es
void degrees_d43a49() {
vec4 res = vec4(57.295780182f);
}
vec4 vertex_main() {
degrees_d43a49();
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 degrees_d43a49() {
vec4 res = vec4(57.295780182f);
}
void fragment_main() {
degrees_d43a49();
}
void main() {
fragment_main();
return;
}
#version 310 es
void degrees_d43a49() {
vec4 res = vec4(57.295780182f);
}
void compute_main() {
degrees_d43a49();
}
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 degrees_d43a49() {
float4 res = float4(57.295780182f);
}
struct tint_symbol {
float4 value [[position]];
};
float4 vertex_main_inner() {
degrees_d43a49();
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() {
degrees_d43a49();
return;
}
kernel void compute_main() {
degrees_d43a49();
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 %degrees_d43a49 "degrees_d43a49"
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_57_2957802 = OpConstant %float 57.2957802
%14 = OpConstantComposite %v4float %float_57_2957802 %float_57_2957802 %float_57_2957802 %float_57_2957802
%_ptr_Function_v4float = OpTypePointer Function %v4float
%17 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%degrees_d43a49 = 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 %degrees_d43a49
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 %degrees_d43a49
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%29 = OpLabel
%30 = OpFunctionCall %void %degrees_d43a49
OpReturn
OpFunctionEnd

View File

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

View File

@@ -1,9 +1,5 @@
vector<float16_t, 3> tint_degrees(vector<float16_t, 3> param_0) {
return param_0 * 57.295779513082322865;
}
void degrees_dfe8f4() {
vector<float16_t, 3> res = tint_degrees((float16_t(1.0h)).xxx);
vector<float16_t, 3> res = (float16_t(57.3125h)).xxx;
}
struct tint_symbol {

View File

@@ -1,13 +1,8 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float : require
f16vec3 tint_degrees(f16vec3 param_0) {
return param_0 * 57.295779513082322865hf;
}
void degrees_dfe8f4() {
f16vec3 res = tint_degrees(f16vec3(1.0hf));
f16vec3 res = f16vec3(57.3125hf);
}
vec4 vertex_main() {
@@ -27,13 +22,8 @@ void main() {
#extension GL_AMD_gpu_shader_half_float : require
precision mediump float;
f16vec3 tint_degrees(f16vec3 param_0) {
return param_0 * 57.295779513082322865hf;
}
void degrees_dfe8f4() {
f16vec3 res = tint_degrees(f16vec3(1.0hf));
f16vec3 res = f16vec3(57.3125hf);
}
void fragment_main() {
@@ -47,13 +37,8 @@ void main() {
#version 310 es
#extension GL_AMD_gpu_shader_half_float : require
f16vec3 tint_degrees(f16vec3 param_0) {
return param_0 * 57.295779513082322865hf;
}
void degrees_dfe8f4() {
f16vec3 res = tint_degrees(f16vec3(1.0hf));
f16vec3 res = f16vec3(57.3125hf);
}
void compute_main() {

View File

@@ -1,13 +1,8 @@
#include <metal_stdlib>
using namespace metal;
half3 tint_degrees(half3 param_0) {
return param_0 * 57.295779513082322865;
}
void degrees_dfe8f4() {
half3 res = tint_degrees(half3(1.0h));
half3 res = half3(57.3125h);
}
struct tint_symbol {

View File

@@ -1,14 +1,13 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 36
; Bound: 34
; Schema: 0
OpCapability Shader
OpCapability Float16
OpCapability UniformAndStorageBuffer16BitAccess
OpCapability StorageBuffer16BitAccess
OpCapability StorageInputOutput16
%16 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
OpEntryPoint Fragment %fragment_main "fragment_main"
@@ -37,38 +36,37 @@
%9 = OpTypeFunction %void
%half = OpTypeFloat 16
%v3half = OpTypeVector %half 3
%half_0x1p_0 = OpConstant %half 0x1p+0
%18 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0
%half_0x1_ca8p_5 = OpConstant %half 0x1.ca8p+5
%16 = OpConstantComposite %v3half %half_0x1_ca8p_5 %half_0x1_ca8p_5 %half_0x1_ca8p_5
%_ptr_Function_v3half = OpTypePointer Function %v3half
%21 = OpConstantNull %v3half
%22 = OpTypeFunction %v4float
%19 = OpConstantNull %v3half
%20 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%degrees_dfe8f4 = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_v3half Function %21
%13 = OpExtInst %v3half %16 Degrees %18
OpStore %res %13
%res = OpVariable %_ptr_Function_v3half Function %19
OpStore %res %16
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %22
%24 = OpLabel
%25 = OpFunctionCall %void %degrees_dfe8f4
%vertex_main_inner = OpFunction %v4float None %20
%22 = OpLabel
%23 = OpFunctionCall %void %degrees_dfe8f4
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %9
%27 = OpLabel
%28 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %28
%25 = OpLabel
%26 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %26
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %9
%31 = OpLabel
%32 = OpFunctionCall %void %degrees_dfe8f4
%29 = OpLabel
%30 = OpFunctionCall %void %degrees_dfe8f4
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%34 = OpLabel
%35 = OpFunctionCall %void %degrees_dfe8f4
%32 = OpLabel
%33 = OpFunctionCall %void %degrees_dfe8f4
OpReturn
OpFunctionEnd

View File

@@ -1,9 +1,5 @@
vector<float16_t, 2> tint_degrees(vector<float16_t, 2> param_0) {
return param_0 * 57.295779513082322865;
}
void degrees_f59715() {
vector<float16_t, 2> res = tint_degrees((float16_t(1.0h)).xx);
vector<float16_t, 2> res = (float16_t(57.3125h)).xx;
}
struct tint_symbol {

View File

@@ -1,13 +1,8 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float : require
f16vec2 tint_degrees(f16vec2 param_0) {
return param_0 * 57.295779513082322865hf;
}
void degrees_f59715() {
f16vec2 res = tint_degrees(f16vec2(1.0hf));
f16vec2 res = f16vec2(57.3125hf);
}
vec4 vertex_main() {
@@ -27,13 +22,8 @@ void main() {
#extension GL_AMD_gpu_shader_half_float : require
precision mediump float;
f16vec2 tint_degrees(f16vec2 param_0) {
return param_0 * 57.295779513082322865hf;
}
void degrees_f59715() {
f16vec2 res = tint_degrees(f16vec2(1.0hf));
f16vec2 res = f16vec2(57.3125hf);
}
void fragment_main() {
@@ -47,13 +37,8 @@ void main() {
#version 310 es
#extension GL_AMD_gpu_shader_half_float : require
f16vec2 tint_degrees(f16vec2 param_0) {
return param_0 * 57.295779513082322865hf;
}
void degrees_f59715() {
f16vec2 res = tint_degrees(f16vec2(1.0hf));
f16vec2 res = f16vec2(57.3125hf);
}
void compute_main() {

View File

@@ -1,13 +1,8 @@
#include <metal_stdlib>
using namespace metal;
half2 tint_degrees(half2 param_0) {
return param_0 * 57.295779513082322865;
}
void degrees_f59715() {
half2 res = tint_degrees(half2(1.0h));
half2 res = half2(57.3125h);
}
struct tint_symbol {

View File

@@ -1,14 +1,13 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 36
; Bound: 34
; Schema: 0
OpCapability Shader
OpCapability Float16
OpCapability UniformAndStorageBuffer16BitAccess
OpCapability StorageBuffer16BitAccess
OpCapability StorageInputOutput16
%16 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
OpEntryPoint Fragment %fragment_main "fragment_main"
@@ -37,38 +36,37 @@
%9 = OpTypeFunction %void
%half = OpTypeFloat 16
%v2half = OpTypeVector %half 2
%half_0x1p_0 = OpConstant %half 0x1p+0
%18 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0
%half_0x1_ca8p_5 = OpConstant %half 0x1.ca8p+5
%16 = OpConstantComposite %v2half %half_0x1_ca8p_5 %half_0x1_ca8p_5
%_ptr_Function_v2half = OpTypePointer Function %v2half
%21 = OpConstantNull %v2half
%22 = OpTypeFunction %v4float
%19 = OpConstantNull %v2half
%20 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%degrees_f59715 = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_v2half Function %21
%13 = OpExtInst %v2half %16 Degrees %18
OpStore %res %13
%res = OpVariable %_ptr_Function_v2half Function %19
OpStore %res %16
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %22
%24 = OpLabel
%25 = OpFunctionCall %void %degrees_f59715
%vertex_main_inner = OpFunction %v4float None %20
%22 = OpLabel
%23 = OpFunctionCall %void %degrees_f59715
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %9
%27 = OpLabel
%28 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %28
%25 = OpLabel
%26 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %26
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %9
%31 = OpLabel
%32 = OpFunctionCall %void %degrees_f59715
%29 = OpLabel
%30 = OpFunctionCall %void %degrees_f59715
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%34 = OpLabel
%35 = OpFunctionCall %void %degrees_f59715
%32 = OpLabel
%33 = OpFunctionCall %void %degrees_f59715
OpReturn
OpFunctionEnd

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,49 @@
#version 310 es
void degrees_fafa7e() {
float res = 57.295780182f;
}
vec4 vertex_main() {
degrees_fafa7e();
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 degrees_fafa7e() {
float res = 57.295780182f;
}
void fragment_main() {
degrees_fafa7e();
}
void main() {
fragment_main();
return;
}
#version 310 es
void degrees_fafa7e() {
float res = 57.295780182f;
}
void compute_main() {
degrees_fafa7e();
}
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 degrees_fafa7e() {
float res = 57.295780182f;
}
struct tint_symbol {
float4 value [[position]];
};
float4 vertex_main_inner() {
degrees_fafa7e();
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() {
degrees_fafa7e();
return;
}
kernel void compute_main() {
degrees_fafa7e();
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 %degrees_fafa7e "degrees_fafa7e"
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_57_2957802 = OpConstant %float 57.2957802
%_ptr_Function_float = OpTypePointer Function %float
%16 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%degrees_fafa7e = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_float Function %8
OpStore %res %float_57_2957802
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %16
%18 = OpLabel
%19 = OpFunctionCall %void %degrees_fafa7e
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 %degrees_fafa7e
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%28 = OpLabel
%29 = OpFunctionCall %void %degrees_fafa7e
OpReturn
OpFunctionEnd

View File

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

View File

@@ -1,9 +1,5 @@
float4 tint_radians(float4 param_0) {
return param_0 * 0.017453292519943295474;
}
void radians_09b7fc() {
float4 res = tint_radians((1.0f).xxxx);
float4 res = (0.017453292f).xxxx;
}
struct tint_symbol {

View File

@@ -1,9 +1,5 @@
float4 tint_radians(float4 param_0) {
return param_0 * 0.017453292519943295474;
}
void radians_09b7fc() {
float4 res = tint_radians((1.0f).xxxx);
float4 res = (0.017453292f).xxxx;
}
struct tint_symbol {

View File

@@ -1,12 +1,7 @@
#version 310 es
vec4 tint_radians(vec4 param_0) {
return param_0 * 0.017453292519943295474f;
}
void radians_09b7fc() {
vec4 res = tint_radians(vec4(1.0f));
vec4 res = vec4(0.017453292f);
}
vec4 vertex_main() {
@@ -25,13 +20,8 @@ void main() {
#version 310 es
precision mediump float;
vec4 tint_radians(vec4 param_0) {
return param_0 * 0.017453292519943295474f;
}
void radians_09b7fc() {
vec4 res = tint_radians(vec4(1.0f));
vec4 res = vec4(0.017453292f);
}
void fragment_main() {
@@ -44,13 +34,8 @@ void main() {
}
#version 310 es
vec4 tint_radians(vec4 param_0) {
return param_0 * 0.017453292519943295474f;
}
void radians_09b7fc() {
vec4 res = tint_radians(vec4(1.0f));
vec4 res = vec4(0.017453292f);
}
void compute_main() {

View File

@@ -1,13 +1,8 @@
#include <metal_stdlib>
using namespace metal;
float4 tint_radians(float4 param_0) {
return param_0 * 0.017453292519943295474;
}
void radians_09b7fc() {
float4 res = tint_radians(float4(1.0f));
float4 res = float4(0.017453292f);
}
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_0174532924 = OpConstant %float 0.0174532924
%14 = OpConstantComposite %v4float %float_0_0174532924 %float_0_0174532924 %float_0_0174532924 %float_0_0174532924
%_ptr_Function_v4float = OpTypePointer Function %v4float
%19 = OpTypeFunction %v4float
%17 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%radians_09b7fc = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_v4float Function %5
%13 = OpExtInst %v4float %14 Radians %16
OpStore %res %13
OpStore %res %14
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %19
%21 = OpLabel
%22 = OpFunctionCall %void %radians_09b7fc
%vertex_main_inner = OpFunction %v4float None %17
%19 = OpLabel
%20 = OpFunctionCall %void %radians_09b7fc
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 %radians_09b7fc
%26 = OpLabel
%27 = OpFunctionCall %void %radians_09b7fc
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%30 = OpLabel
%31 = OpFunctionCall %void %radians_09b7fc
%29 = OpLabel
%30 = OpFunctionCall %void %radians_09b7fc
OpReturn
OpFunctionEnd

View File

@@ -1,9 +1,5 @@
float16_t tint_radians(float16_t param_0) {
return param_0 * 0.017453292519943295474;
}
void radians_208fd9() {
float16_t res = tint_radians(float16_t(1.0h));
float16_t res = float16_t(0.017440796h);
}
struct tint_symbol {

View File

@@ -1,13 +1,8 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float : require
float16_t tint_radians(float16_t param_0) {
return param_0 * 0.017453292519943295474hf;
}
void radians_208fd9() {
float16_t res = tint_radians(1.0hf);
float16_t res = 0.017440796hf;
}
vec4 vertex_main() {
@@ -27,13 +22,8 @@ void main() {
#extension GL_AMD_gpu_shader_half_float : require
precision mediump float;
float16_t tint_radians(float16_t param_0) {
return param_0 * 0.017453292519943295474hf;
}
void radians_208fd9() {
float16_t res = tint_radians(1.0hf);
float16_t res = 0.017440796hf;
}
void fragment_main() {
@@ -47,13 +37,8 @@ void main() {
#version 310 es
#extension GL_AMD_gpu_shader_half_float : require
float16_t tint_radians(float16_t param_0) {
return param_0 * 0.017453292519943295474hf;
}
void radians_208fd9() {
float16_t res = tint_radians(1.0hf);
float16_t res = 0.017440796hf;
}
void compute_main() {

View File

@@ -1,13 +1,8 @@
#include <metal_stdlib>
using namespace metal;
half tint_radians(half param_0) {
return param_0 * 0.017453292519943295474;
}
void radians_208fd9() {
half res = tint_radians(1.0h);
half res = 0.017440796h;
}
struct tint_symbol {

View File

@@ -1,14 +1,13 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 34
; Bound: 32
; Schema: 0
OpCapability Shader
OpCapability Float16
OpCapability UniformAndStorageBuffer16BitAccess
OpCapability StorageBuffer16BitAccess
OpCapability StorageInputOutput16
%15 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
OpEntryPoint Fragment %fragment_main "fragment_main"
@@ -36,37 +35,36 @@
%void = OpTypeVoid
%9 = OpTypeFunction %void
%half = OpTypeFloat 16
%half_0x1p_0 = OpConstant %half 0x1p+0
%half_0x1_1dcpn6 = OpConstant %half 0x1.1dcp-6
%_ptr_Function_half = OpTypePointer Function %half
%19 = OpConstantNull %half
%20 = OpTypeFunction %v4float
%17 = OpConstantNull %half
%18 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%radians_208fd9 = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_half Function %19
%13 = OpExtInst %half %15 Radians %half_0x1p_0
OpStore %res %13
%res = OpVariable %_ptr_Function_half Function %17
OpStore %res %half_0x1_1dcpn6
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %20
%22 = OpLabel
%23 = OpFunctionCall %void %radians_208fd9
%vertex_main_inner = OpFunction %v4float None %18
%20 = OpLabel
%21 = OpFunctionCall %void %radians_208fd9
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %9
%25 = OpLabel
%26 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %26
%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
%29 = OpLabel
%30 = OpFunctionCall %void %radians_208fd9
%27 = OpLabel
%28 = OpFunctionCall %void %radians_208fd9
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%32 = OpLabel
%33 = OpFunctionCall %void %radians_208fd9
%30 = OpLabel
%31 = OpFunctionCall %void %radians_208fd9
OpReturn
OpFunctionEnd

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,49 @@
#version 310 es
void radians_379214() {
vec3 res = vec3(0.017453292f);
}
vec4 vertex_main() {
radians_379214();
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 radians_379214() {
vec3 res = vec3(0.017453292f);
}
void fragment_main() {
radians_379214();
}
void main() {
fragment_main();
return;
}
#version 310 es
void radians_379214() {
vec3 res = vec3(0.017453292f);
}
void compute_main() {
radians_379214();
}
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 radians_379214() {
float3 res = float3(0.017453292f);
}
struct tint_symbol {
float4 value [[position]];
};
float4 vertex_main_inner() {
radians_379214();
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() {
radians_379214();
return;
}
kernel void compute_main() {
radians_379214();
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 %radians_379214 "radians_379214"
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_0174532924 = OpConstant %float 0.0174532924
%15 = OpConstantComposite %v3float %float_0_0174532924 %float_0_0174532924 %float_0_0174532924
%_ptr_Function_v3float = OpTypePointer Function %v3float
%18 = OpConstantNull %v3float
%19 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%radians_379214 = 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 %radians_379214
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 %radians_379214
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%31 = OpLabel
%32 = OpFunctionCall %void %radians_379214
OpReturn
OpFunctionEnd

View File

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,49 @@
#version 310 es
void radians_44a9f8() {
vec2 res = vec2(0.017453292f);
}
vec4 vertex_main() {
radians_44a9f8();
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 radians_44a9f8() {
vec2 res = vec2(0.017453292f);
}
void fragment_main() {
radians_44a9f8();
}
void main() {
fragment_main();
return;
}
#version 310 es
void radians_44a9f8() {
vec2 res = vec2(0.017453292f);
}
void compute_main() {
radians_44a9f8();
}
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 radians_44a9f8() {
float2 res = float2(0.017453292f);
}
struct tint_symbol {
float4 value [[position]];
};
float4 vertex_main_inner() {
radians_44a9f8();
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() {
radians_44a9f8();
return;
}
kernel void compute_main() {
radians_44a9f8();
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 %radians_44a9f8 "radians_44a9f8"
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_0174532924 = OpConstant %float 0.0174532924
%15 = OpConstantComposite %v2float %float_0_0174532924 %float_0_0174532924
%_ptr_Function_v2float = OpTypePointer Function %v2float
%18 = OpConstantNull %v2float
%19 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%radians_44a9f8 = 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 %radians_44a9f8
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 %radians_44a9f8
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%31 = OpLabel
%32 = OpFunctionCall %void %radians_44a9f8
OpReturn
OpFunctionEnd

View File

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

View File

@@ -1,9 +1,5 @@
vector<float16_t, 4> tint_radians(vector<float16_t, 4> param_0) {
return param_0 * 0.017453292519943295474;
}
void radians_44f20b() {
vector<float16_t, 4> res = tint_radians((float16_t(1.0h)).xxxx);
vector<float16_t, 4> res = (float16_t(0.017440796h)).xxxx;
}
struct tint_symbol {

View File

@@ -1,13 +1,8 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float : require
f16vec4 tint_radians(f16vec4 param_0) {
return param_0 * 0.017453292519943295474hf;
}
void radians_44f20b() {
f16vec4 res = tint_radians(f16vec4(1.0hf));
f16vec4 res = f16vec4(0.017440796hf);
}
vec4 vertex_main() {
@@ -27,13 +22,8 @@ void main() {
#extension GL_AMD_gpu_shader_half_float : require
precision mediump float;
f16vec4 tint_radians(f16vec4 param_0) {
return param_0 * 0.017453292519943295474hf;
}
void radians_44f20b() {
f16vec4 res = tint_radians(f16vec4(1.0hf));
f16vec4 res = f16vec4(0.017440796hf);
}
void fragment_main() {
@@ -47,13 +37,8 @@ void main() {
#version 310 es
#extension GL_AMD_gpu_shader_half_float : require
f16vec4 tint_radians(f16vec4 param_0) {
return param_0 * 0.017453292519943295474hf;
}
void radians_44f20b() {
f16vec4 res = tint_radians(f16vec4(1.0hf));
f16vec4 res = f16vec4(0.017440796hf);
}
void compute_main() {

View File

@@ -1,13 +1,8 @@
#include <metal_stdlib>
using namespace metal;
half4 tint_radians(half4 param_0) {
return param_0 * 0.017453292519943295474;
}
void radians_44f20b() {
half4 res = tint_radians(half4(1.0h));
half4 res = half4(0.017440796h);
}
struct tint_symbol {

View File

@@ -1,14 +1,13 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 36
; Bound: 34
; Schema: 0
OpCapability Shader
OpCapability Float16
OpCapability UniformAndStorageBuffer16BitAccess
OpCapability StorageBuffer16BitAccess
OpCapability StorageInputOutput16
%16 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
OpEntryPoint Fragment %fragment_main "fragment_main"
@@ -37,38 +36,37 @@
%9 = OpTypeFunction %void
%half = OpTypeFloat 16
%v4half = OpTypeVector %half 4
%half_0x1p_0 = OpConstant %half 0x1p+0
%18 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0
%half_0x1_1dcpn6 = OpConstant %half 0x1.1dcp-6
%16 = OpConstantComposite %v4half %half_0x1_1dcpn6 %half_0x1_1dcpn6 %half_0x1_1dcpn6 %half_0x1_1dcpn6
%_ptr_Function_v4half = OpTypePointer Function %v4half
%21 = OpConstantNull %v4half
%22 = OpTypeFunction %v4float
%19 = OpConstantNull %v4half
%20 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%radians_44f20b = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_v4half Function %21
%13 = OpExtInst %v4half %16 Radians %18
OpStore %res %13
%res = OpVariable %_ptr_Function_v4half Function %19
OpStore %res %16
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %22
%24 = OpLabel
%25 = OpFunctionCall %void %radians_44f20b
%vertex_main_inner = OpFunction %v4float None %20
%22 = OpLabel
%23 = OpFunctionCall %void %radians_44f20b
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %9
%27 = OpLabel
%28 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %28
%25 = OpLabel
%26 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %26
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %9
%31 = OpLabel
%32 = OpFunctionCall %void %radians_44f20b
%29 = OpLabel
%30 = OpFunctionCall %void %radians_44f20b
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%34 = OpLabel
%35 = OpFunctionCall %void %radians_44f20b
%32 = OpLabel
%33 = OpFunctionCall %void %radians_44f20b
OpReturn
OpFunctionEnd

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,49 @@
#version 310 es
void radians_524a91() {
vec4 res = vec4(0.017453292f);
}
vec4 vertex_main() {
radians_524a91();
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 radians_524a91() {
vec4 res = vec4(0.017453292f);
}
void fragment_main() {
radians_524a91();
}
void main() {
fragment_main();
return;
}
#version 310 es
void radians_524a91() {
vec4 res = vec4(0.017453292f);
}
void compute_main() {
radians_524a91();
}
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 radians_524a91() {
float4 res = float4(0.017453292f);
}
struct tint_symbol {
float4 value [[position]];
};
float4 vertex_main_inner() {
radians_524a91();
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() {
radians_524a91();
return;
}
kernel void compute_main() {
radians_524a91();
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 %radians_524a91 "radians_524a91"
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_0174532924 = OpConstant %float 0.0174532924
%14 = OpConstantComposite %v4float %float_0_0174532924 %float_0_0174532924 %float_0_0174532924 %float_0_0174532924
%_ptr_Function_v4float = OpTypePointer Function %v4float
%17 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%radians_524a91 = 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 %radians_524a91
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 %radians_524a91
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%29 = OpLabel
%30 = OpFunctionCall %void %radians_524a91
OpReturn
OpFunctionEnd

View File

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

View File

@@ -1,9 +1,5 @@
float2 tint_radians(float2 param_0) {
return param_0 * 0.017453292519943295474;
}
void radians_61687a() {
float2 res = tint_radians((1.0f).xx);
float2 res = (0.017453292f).xx;
}
struct tint_symbol {

View File

@@ -1,9 +1,5 @@
float2 tint_radians(float2 param_0) {
return param_0 * 0.017453292519943295474;
}
void radians_61687a() {
float2 res = tint_radians((1.0f).xx);
float2 res = (0.017453292f).xx;
}
struct tint_symbol {

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