tint: const eval of length builtin

Bug: tint:1581
Change-Id: Ie6dc9da6b48c606af03da023c835ec36a99dd362
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110981
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
This commit is contained in:
Antonio Maiorano
2022-11-23 00:00:45 +00:00
committed by Dawn LUCI CQ
parent 89f15fc57e
commit 92d858ac3c
167 changed files with 2726 additions and 488 deletions

View File

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

View File

@@ -1,5 +1,5 @@
void length_056071() {
float res = length((1.0f).xxx);
float res = 0.0f;
}
struct tint_symbol {

View File

@@ -1,5 +1,5 @@
void length_056071() {
float res = length((1.0f).xxx);
float res = 0.0f;
}
struct tint_symbol {

View File

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

View File

@@ -2,7 +2,7 @@
using namespace metal;
void length_056071() {
float res = length(float3(1.0f));
float res = 0.0f;
}
struct tint_symbol {

View File

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

View File

@@ -1,5 +1,5 @@
fn length_056071() {
var res : f32 = length(vec3<f32>(1.0f));
var res : f32 = length(vec3<f32>(0.0f));
}
@vertex

View File

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

View File

@@ -1,5 +1,5 @@
void length_3f0e13() {
float16_t res = length((float16_t(1.0h)).xx);
float16_t res = float16_t(0.0h);
}
struct tint_symbol {

View File

@@ -2,7 +2,7 @@
#extension GL_AMD_gpu_shader_half_float : require
void length_3f0e13() {
float16_t res = length(f16vec2(1.0hf));
float16_t res = 0.0hf;
}
vec4 vertex_main() {
@@ -23,7 +23,7 @@ void main() {
precision mediump float;
void length_3f0e13() {
float16_t res = length(f16vec2(1.0hf));
float16_t res = 0.0hf;
}
void fragment_main() {
@@ -38,7 +38,7 @@ void main() {
#extension GL_AMD_gpu_shader_half_float : require
void length_3f0e13() {
float16_t res = length(f16vec2(1.0hf));
float16_t res = 0.0hf;
}
void compute_main() {

View File

@@ -2,7 +2,7 @@
using namespace metal;
void length_3f0e13() {
half res = length(half2(1.0h));
half res = 0.0h;
}
struct tint_symbol {

View File

@@ -1,14 +1,13 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 36
; Bound: 31
; 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,39 +35,35 @@
%void = OpTypeVoid
%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
%14 = OpConstantNull %half
%_ptr_Function_half = OpTypePointer Function %half
%21 = OpConstantNull %half
%22 = OpTypeFunction %v4float
%17 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%length_3f0e13 = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_half Function %21
%13 = OpExtInst %half %15 Length %18
OpStore %res %13
%res = OpVariable %_ptr_Function_half Function %14
OpStore %res %14
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %22
%24 = OpLabel
%25 = OpFunctionCall %void %length_3f0e13
%vertex_main_inner = OpFunction %v4float None %17
%19 = OpLabel
%20 = OpFunctionCall %void %length_3f0e13
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %9
%27 = OpLabel
%28 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %28
%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
%31 = OpLabel
%32 = OpFunctionCall %void %length_3f0e13
%26 = OpLabel
%27 = OpFunctionCall %void %length_3f0e13
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%34 = OpLabel
%35 = OpFunctionCall %void %length_3f0e13
%29 = OpLabel
%30 = OpFunctionCall %void %length_3f0e13
OpReturn
OpFunctionEnd

View File

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

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 length(vec<3, fa>) -> fa
fn length_555aba() {
var res = length(vec3(0.));
}
@vertex
fn vertex_main() -> @builtin(position) vec4<f32> {
length_555aba();
return vec4<f32>();
}
@fragment
fn fragment_main() {
length_555aba();
}
@compute @workgroup_size(1)
fn compute_main() {
length_555aba();
}

View File

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

View File

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

View File

@@ -0,0 +1,49 @@
#version 310 es
void length_555aba() {
float res = 0.0f;
}
vec4 vertex_main() {
length_555aba();
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 length_555aba() {
float res = 0.0f;
}
void fragment_main() {
length_555aba();
}
void main() {
fragment_main();
return;
}
#version 310 es
void length_555aba() {
float res = 0.0f;
}
void compute_main() {
length_555aba();
}
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 length_555aba() {
float res = 0.0f;
}
struct tint_symbol {
float4 value [[position]];
};
float4 vertex_main_inner() {
length_555aba();
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() {
length_555aba();
return;
}
kernel void compute_main() {
length_555aba();
return;
}

View File

@@ -0,0 +1,63 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 29
; 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 %length_555aba "length_555aba"
OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner"
OpName %vertex_main "vertex_main"
OpName %fragment_main "fragment_main"
OpName %compute_main "compute_main"
OpDecorate %value BuiltIn Position
OpDecorate %vertex_point_size BuiltIn PointSize
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%5 = OpConstantNull %v4float
%value = OpVariable %_ptr_Output_v4float Output %5
%_ptr_Output_float = OpTypePointer Output %float
%8 = OpConstantNull %float
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
%void = OpTypeVoid
%9 = OpTypeFunction %void
%_ptr_Function_float = OpTypePointer Function %float
%15 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%length_555aba = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_float Function %8
OpStore %res %8
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %15
%17 = OpLabel
%18 = OpFunctionCall %void %length_555aba
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %9
%20 = OpLabel
%21 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %21
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %9
%24 = OpLabel
%25 = OpFunctionCall %void %length_555aba
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%27 = OpLabel
%28 = OpFunctionCall %void %length_555aba
OpReturn
OpFunctionEnd

View File

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

View File

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

View File

@@ -1,5 +1,5 @@
void length_5b1a9b() {
float16_t res = length((float16_t(1.0h)).xxxx);
float16_t res = float16_t(0.0h);
}
struct tint_symbol {

View File

@@ -2,7 +2,7 @@
#extension GL_AMD_gpu_shader_half_float : require
void length_5b1a9b() {
float16_t res = length(f16vec4(1.0hf));
float16_t res = 0.0hf;
}
vec4 vertex_main() {
@@ -23,7 +23,7 @@ void main() {
precision mediump float;
void length_5b1a9b() {
float16_t res = length(f16vec4(1.0hf));
float16_t res = 0.0hf;
}
void fragment_main() {
@@ -38,7 +38,7 @@ void main() {
#extension GL_AMD_gpu_shader_half_float : require
void length_5b1a9b() {
float16_t res = length(f16vec4(1.0hf));
float16_t res = 0.0hf;
}
void compute_main() {

View File

@@ -2,7 +2,7 @@
using namespace metal;
void length_5b1a9b() {
half res = length(half4(1.0h));
half res = 0.0h;
}
struct tint_symbol {

View File

@@ -1,14 +1,13 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 36
; Bound: 31
; 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,39 +35,35 @@
%void = OpTypeVoid
%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
%14 = OpConstantNull %half
%_ptr_Function_half = OpTypePointer Function %half
%21 = OpConstantNull %half
%22 = OpTypeFunction %v4float
%17 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%length_5b1a9b = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_half Function %21
%13 = OpExtInst %half %15 Length %18
OpStore %res %13
%res = OpVariable %_ptr_Function_half Function %14
OpStore %res %14
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %22
%24 = OpLabel
%25 = OpFunctionCall %void %length_5b1a9b
%vertex_main_inner = OpFunction %v4float None %17
%19 = OpLabel
%20 = OpFunctionCall %void %length_5b1a9b
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %9
%27 = OpLabel
%28 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %28
%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
%31 = OpLabel
%32 = OpFunctionCall %void %length_5b1a9b
%26 = OpLabel
%27 = OpFunctionCall %void %length_5b1a9b
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%34 = OpLabel
%35 = OpFunctionCall %void %length_5b1a9b
%29 = OpLabel
%30 = OpFunctionCall %void %length_5b1a9b
OpReturn
OpFunctionEnd

View File

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

View File

@@ -23,7 +23,7 @@
// fn length(f32) -> f32
fn length_602a17() {
var res: f32 = length(1.f);
var res: f32 = length(0.f);
}
@vertex

View File

@@ -1,5 +1,5 @@
void length_602a17() {
float res = length(1.0f);
float res = 0.0f;
}
struct tint_symbol {

View File

@@ -1,5 +1,5 @@
void length_602a17() {
float res = length(1.0f);
float res = 0.0f;
}
struct tint_symbol {

View File

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

View File

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

View File

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

View File

@@ -1,5 +1,5 @@
fn length_602a17() {
var res : f32 = length(1.0f);
var res : f32 = length(0.0f);
}
@vertex

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 length(vec<2, fa>) -> fa
fn length_7b4741() {
var res = length(vec2(0.));
}
@vertex
fn vertex_main() -> @builtin(position) vec4<f32> {
length_7b4741();
return vec4<f32>();
}
@fragment
fn fragment_main() {
length_7b4741();
}
@compute @workgroup_size(1)
fn compute_main() {
length_7b4741();
}

View File

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

View File

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

View File

@@ -0,0 +1,49 @@
#version 310 es
void length_7b4741() {
float res = 0.0f;
}
vec4 vertex_main() {
length_7b4741();
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 length_7b4741() {
float res = 0.0f;
}
void fragment_main() {
length_7b4741();
}
void main() {
fragment_main();
return;
}
#version 310 es
void length_7b4741() {
float res = 0.0f;
}
void compute_main() {
length_7b4741();
}
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 length_7b4741() {
float res = 0.0f;
}
struct tint_symbol {
float4 value [[position]];
};
float4 vertex_main_inner() {
length_7b4741();
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() {
length_7b4741();
return;
}
kernel void compute_main() {
length_7b4741();
return;
}

View File

@@ -0,0 +1,63 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 29
; 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 %length_7b4741 "length_7b4741"
OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner"
OpName %vertex_main "vertex_main"
OpName %fragment_main "fragment_main"
OpName %compute_main "compute_main"
OpDecorate %value BuiltIn Position
OpDecorate %vertex_point_size BuiltIn PointSize
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%5 = OpConstantNull %v4float
%value = OpVariable %_ptr_Output_v4float Output %5
%_ptr_Output_float = OpTypePointer Output %float
%8 = OpConstantNull %float
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
%void = OpTypeVoid
%9 = OpTypeFunction %void
%_ptr_Function_float = OpTypePointer Function %float
%15 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%length_7b4741 = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_float Function %8
OpStore %res %8
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %15
%17 = OpLabel
%18 = OpFunctionCall %void %length_7b4741
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %9
%20 = OpLabel
%21 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %21
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %9
%24 = OpLabel
%25 = OpFunctionCall %void %length_7b4741
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%27 = OpLabel
%28 = OpFunctionCall %void %length_7b4741
OpReturn
OpFunctionEnd

View File

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

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 length(fa) -> fa
fn length_936ad5() {
var res = length(0.);
}
@vertex
fn vertex_main() -> @builtin(position) vec4<f32> {
length_936ad5();
return vec4<f32>();
}
@fragment
fn fragment_main() {
length_936ad5();
}
@compute @workgroup_size(1)
fn compute_main() {
length_936ad5();
}

View File

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

View File

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

View File

@@ -0,0 +1,49 @@
#version 310 es
void length_936ad5() {
float res = 0.0f;
}
vec4 vertex_main() {
length_936ad5();
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 length_936ad5() {
float res = 0.0f;
}
void fragment_main() {
length_936ad5();
}
void main() {
fragment_main();
return;
}
#version 310 es
void length_936ad5() {
float res = 0.0f;
}
void compute_main() {
length_936ad5();
}
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 length_936ad5() {
float res = 0.0f;
}
struct tint_symbol {
float4 value [[position]];
};
float4 vertex_main_inner() {
length_936ad5();
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() {
length_936ad5();
return;
}
kernel void compute_main() {
length_936ad5();
return;
}

View File

@@ -0,0 +1,63 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 29
; 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 %length_936ad5 "length_936ad5"
OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner"
OpName %vertex_main "vertex_main"
OpName %fragment_main "fragment_main"
OpName %compute_main "compute_main"
OpDecorate %value BuiltIn Position
OpDecorate %vertex_point_size BuiltIn PointSize
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%5 = OpConstantNull %v4float
%value = OpVariable %_ptr_Output_v4float Output %5
%_ptr_Output_float = OpTypePointer Output %float
%8 = OpConstantNull %float
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
%void = OpTypeVoid
%9 = OpTypeFunction %void
%_ptr_Function_float = OpTypePointer Function %float
%15 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%length_936ad5 = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_float Function %8
OpStore %res %8
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %15
%17 = OpLabel
%18 = OpFunctionCall %void %length_936ad5
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %9
%20 = OpLabel
%21 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %21
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %9
%24 = OpLabel
%25 = OpFunctionCall %void %length_936ad5
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%27 = OpLabel
%28 = OpFunctionCall %void %length_936ad5
OpReturn
OpFunctionEnd

View File

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

View File

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

View File

@@ -1,5 +1,5 @@
void length_afde8b() {
float res = length((1.0f).xx);
float res = 0.0f;
}
struct tint_symbol {

View File

@@ -1,5 +1,5 @@
void length_afde8b() {
float res = length((1.0f).xx);
float res = 0.0f;
}
struct tint_symbol {

View File

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

View File

@@ -2,7 +2,7 @@
using namespace metal;
void length_afde8b() {
float res = length(float2(1.0f));
float res = 0.0f;
}
struct tint_symbol {

View File

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

View File

@@ -1,5 +1,5 @@
fn length_afde8b() {
var res : f32 = length(vec2<f32>(1.0f));
var res : f32 = length(vec2<f32>(0.0f));
}
@vertex

View File

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

View File

@@ -1,5 +1,5 @@
void length_ba16d6() {
float16_t res = length((float16_t(1.0h)).xxx);
float16_t res = float16_t(0.0h);
}
struct tint_symbol {

View File

@@ -2,7 +2,7 @@
#extension GL_AMD_gpu_shader_half_float : require
void length_ba16d6() {
float16_t res = length(f16vec3(1.0hf));
float16_t res = 0.0hf;
}
vec4 vertex_main() {
@@ -23,7 +23,7 @@ void main() {
precision mediump float;
void length_ba16d6() {
float16_t res = length(f16vec3(1.0hf));
float16_t res = 0.0hf;
}
void fragment_main() {
@@ -38,7 +38,7 @@ void main() {
#extension GL_AMD_gpu_shader_half_float : require
void length_ba16d6() {
float16_t res = length(f16vec3(1.0hf));
float16_t res = 0.0hf;
}
void compute_main() {

View File

@@ -2,7 +2,7 @@
using namespace metal;
void length_ba16d6() {
half res = length(half3(1.0h));
half res = 0.0h;
}
struct tint_symbol {

View File

@@ -1,14 +1,13 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 36
; Bound: 31
; 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,39 +35,35 @@
%void = OpTypeVoid
%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
%14 = OpConstantNull %half
%_ptr_Function_half = OpTypePointer Function %half
%21 = OpConstantNull %half
%22 = OpTypeFunction %v4float
%17 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%length_ba16d6 = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_half Function %21
%13 = OpExtInst %half %15 Length %18
OpStore %res %13
%res = OpVariable %_ptr_Function_half Function %14
OpStore %res %14
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %22
%24 = OpLabel
%25 = OpFunctionCall %void %length_ba16d6
%vertex_main_inner = OpFunction %v4float None %17
%19 = OpLabel
%20 = OpFunctionCall %void %length_ba16d6
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %9
%27 = OpLabel
%28 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %28
%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
%31 = OpLabel
%32 = OpFunctionCall %void %length_ba16d6
%26 = OpLabel
%27 = OpFunctionCall %void %length_ba16d6
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%34 = OpLabel
%35 = OpFunctionCall %void %length_ba16d6
%29 = OpLabel
%30 = OpFunctionCall %void %length_ba16d6
OpReturn
OpFunctionEnd

View File

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

View File

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

View File

@@ -1,5 +1,5 @@
void length_becebf() {
float res = length((1.0f).xxxx);
float res = 0.0f;
}
struct tint_symbol {

View File

@@ -1,5 +1,5 @@
void length_becebf() {
float res = length((1.0f).xxxx);
float res = 0.0f;
}
struct tint_symbol {

View File

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

View File

@@ -2,7 +2,7 @@
using namespace metal;
void length_becebf() {
float res = length(float4(1.0f));
float res = 0.0f;
}
struct tint_symbol {

View File

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

View File

@@ -1,5 +1,5 @@
fn length_becebf() {
var res : f32 = length(vec4<f32>(1.0f));
var res : f32 = length(vec4<f32>(0.0f));
}
@vertex

View File

@@ -25,7 +25,7 @@ enable f16;
// fn length(f16) -> f16
fn length_c158da() {
var res: f16 = length(1.h);
var res: f16 = length(0.h);
}
@vertex

View File

@@ -1,5 +1,5 @@
void length_c158da() {
float16_t res = length(float16_t(1.0h));
float16_t res = float16_t(0.0h);
}
struct tint_symbol {

View File

@@ -2,7 +2,7 @@
#extension GL_AMD_gpu_shader_half_float : require
void length_c158da() {
float16_t res = length(1.0hf);
float16_t res = 0.0hf;
}
vec4 vertex_main() {
@@ -23,7 +23,7 @@ void main() {
precision mediump float;
void length_c158da() {
float16_t res = length(1.0hf);
float16_t res = 0.0hf;
}
void fragment_main() {
@@ -38,7 +38,7 @@ void main() {
#extension GL_AMD_gpu_shader_half_float : require
void length_c158da() {
float16_t res = length(1.0hf);
float16_t res = 0.0hf;
}
void compute_main() {

View File

@@ -2,7 +2,7 @@
using namespace metal;
void length_c158da() {
half res = fabs(1.0h);
half res = 0.0h;
}
struct tint_symbol {

View File

@@ -1,14 +1,13 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 34
; Bound: 31
; 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,35 @@
%void = OpTypeVoid
%9 = OpTypeFunction %void
%half = OpTypeFloat 16
%half_0x1p_0 = OpConstant %half 0x1p+0
%14 = OpConstantNull %half
%_ptr_Function_half = OpTypePointer Function %half
%19 = OpConstantNull %half
%20 = OpTypeFunction %v4float
%17 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%length_c158da = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_half Function %19
%13 = OpExtInst %half %15 Length %half_0x1p_0
OpStore %res %13
%res = OpVariable %_ptr_Function_half Function %14
OpStore %res %14
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %20
%22 = OpLabel
%23 = OpFunctionCall %void %length_c158da
%vertex_main_inner = OpFunction %v4float None %17
%19 = OpLabel
%20 = OpFunctionCall %void %length_c158da
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %9
%25 = OpLabel
%26 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %26
%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 %length_c158da
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%29 = OpLabel
%30 = OpFunctionCall %void %length_c158da
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%32 = OpLabel
%33 = OpFunctionCall %void %length_c158da
OpReturn
OpFunctionEnd

View File

@@ -1,7 +1,7 @@
enable f16;
fn length_c158da() {
var res : f16 = length(1.0h);
var res : f16 = length(0.0h);
}
@vertex

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 length(vec<4, fa>) -> fa
fn length_c2c544() {
var res = length(vec4(0.));
}
@vertex
fn vertex_main() -> @builtin(position) vec4<f32> {
length_c2c544();
return vec4<f32>();
}
@fragment
fn fragment_main() {
length_c2c544();
}
@compute @workgroup_size(1)
fn compute_main() {
length_c2c544();
}

View File

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

View File

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

View File

@@ -0,0 +1,49 @@
#version 310 es
void length_c2c544() {
float res = 0.0f;
}
vec4 vertex_main() {
length_c2c544();
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 length_c2c544() {
float res = 0.0f;
}
void fragment_main() {
length_c2c544();
}
void main() {
fragment_main();
return;
}
#version 310 es
void length_c2c544() {
float res = 0.0f;
}
void compute_main() {
length_c2c544();
}
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 length_c2c544() {
float res = 0.0f;
}
struct tint_symbol {
float4 value [[position]];
};
float4 vertex_main_inner() {
length_c2c544();
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() {
length_c2c544();
return;
}
kernel void compute_main() {
length_c2c544();
return;
}

View File

@@ -0,0 +1,63 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 29
; 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 %length_c2c544 "length_c2c544"
OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner"
OpName %vertex_main "vertex_main"
OpName %fragment_main "fragment_main"
OpName %compute_main "compute_main"
OpDecorate %value BuiltIn Position
OpDecorate %vertex_point_size BuiltIn PointSize
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%5 = OpConstantNull %v4float
%value = OpVariable %_ptr_Output_v4float Output %5
%_ptr_Output_float = OpTypePointer Output %float
%8 = OpConstantNull %float
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
%void = OpTypeVoid
%9 = OpTypeFunction %void
%_ptr_Function_float = OpTypePointer Function %float
%15 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%length_c2c544 = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_float Function %8
OpStore %res %8
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %15
%17 = OpLabel
%18 = OpFunctionCall %void %length_c2c544
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %9
%20 = OpLabel
%21 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %21
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %9
%24 = OpLabel
%25 = OpFunctionCall %void %length_c2c544
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%27 = OpLabel
%28 = OpFunctionCall %void %length_c2c544
OpReturn
OpFunctionEnd

View File

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

View File

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

View File

@@ -1,5 +1,5 @@
void length_056071() {
float3 arg_0 = (1.0f).xxx;
float3 arg_0 = (0.0f).xxx;
float res = length(arg_0);
}

View File

@@ -1,5 +1,5 @@
void length_056071() {
float3 arg_0 = (1.0f).xxx;
float3 arg_0 = (0.0f).xxx;
float res = length(arg_0);
}

View File

@@ -1,7 +1,7 @@
#version 310 es
void length_056071() {
vec3 arg_0 = vec3(1.0f);
vec3 arg_0 = vec3(0.0f);
float res = length(arg_0);
}
@@ -22,7 +22,7 @@ void main() {
precision mediump float;
void length_056071() {
vec3 arg_0 = vec3(1.0f);
vec3 arg_0 = vec3(0.0f);
float res = length(arg_0);
}
@@ -37,7 +37,7 @@ void main() {
#version 310 es
void length_056071() {
vec3 arg_0 = vec3(1.0f);
vec3 arg_0 = vec3(0.0f);
float res = length(arg_0);
}

View File

@@ -2,7 +2,7 @@
using namespace metal;
void length_056071() {
float3 arg_0 = float3(1.0f);
float3 arg_0 = float3(0.0f);
float res = length(arg_0);
}

View File

@@ -1,10 +1,10 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 37
; Bound: 36
; Schema: 0
OpCapability Shader
%20 = OpExtInstImport "GLSL.std.450"
%18 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
OpEntryPoint Fragment %fragment_main "fragment_main"
@@ -33,41 +33,40 @@
%void = OpTypeVoid
%9 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
%float_1 = OpConstant %float 1
%15 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%14 = OpConstantNull %v3float
%_ptr_Function_v3float = OpTypePointer Function %v3float
%18 = OpConstantNull %v3float
%_ptr_Function_float = OpTypePointer Function %float
%24 = OpTypeFunction %v4float
%22 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%length_056071 = OpFunction %void None %9
%12 = OpLabel
%arg_0 = OpVariable %_ptr_Function_v3float Function %18
%arg_0 = OpVariable %_ptr_Function_v3float Function %14
%res = OpVariable %_ptr_Function_float Function %8
OpStore %arg_0 %15
%21 = OpLoad %v3float %arg_0
%19 = OpExtInst %float %20 Length %21
OpStore %res %19
OpStore %arg_0 %14
%19 = OpLoad %v3float %arg_0
%17 = OpExtInst %float %18 Length %19
OpStore %res %17
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %24
%26 = OpLabel
%27 = OpFunctionCall %void %length_056071
%vertex_main_inner = OpFunction %v4float None %22
%24 = OpLabel
%25 = OpFunctionCall %void %length_056071
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %9
%29 = OpLabel
%30 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %30
%27 = OpLabel
%28 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %28
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %9
%32 = OpLabel
%33 = OpFunctionCall %void %length_056071
%31 = OpLabel
%32 = OpFunctionCall %void %length_056071
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%35 = OpLabel
%36 = OpFunctionCall %void %length_056071
%34 = OpLabel
%35 = OpFunctionCall %void %length_056071
OpReturn
OpFunctionEnd

View File

@@ -1,5 +1,5 @@
fn length_056071() {
var arg_0 = vec3<f32>(1.0f);
var arg_0 = vec3<f32>(0.0f);
var res : f32 = length(arg_0);
}

View File

@@ -25,7 +25,7 @@ enable f16;
// fn length(vec<2, f16>) -> f16
fn length_3f0e13() {
var arg_0 = vec2<f16>(1.h);
var arg_0 = vec2<f16>(0.h);
var res: f16 = length(arg_0);
}

View File

@@ -1,5 +1,5 @@
void length_3f0e13() {
vector<float16_t, 2> arg_0 = (float16_t(1.0h)).xx;
vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
float16_t res = length(arg_0);
}

View File

@@ -2,7 +2,7 @@
#extension GL_AMD_gpu_shader_half_float : require
void length_3f0e13() {
f16vec2 arg_0 = f16vec2(1.0hf);
f16vec2 arg_0 = f16vec2(0.0hf);
float16_t res = length(arg_0);
}
@@ -24,7 +24,7 @@ void main() {
precision mediump float;
void length_3f0e13() {
f16vec2 arg_0 = f16vec2(1.0hf);
f16vec2 arg_0 = f16vec2(0.0hf);
float16_t res = length(arg_0);
}
@@ -40,7 +40,7 @@ void main() {
#extension GL_AMD_gpu_shader_half_float : require
void length_3f0e13() {
f16vec2 arg_0 = f16vec2(1.0hf);
f16vec2 arg_0 = f16vec2(0.0hf);
float16_t res = length(arg_0);
}

View File

@@ -2,7 +2,7 @@
using namespace metal;
void length_3f0e13() {
half2 arg_0 = half2(1.0h);
half2 arg_0 = half2(0.0h);
half res = length(arg_0);
}

View File

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

View File

@@ -1,7 +1,7 @@
enable f16;
fn length_3f0e13() {
var arg_0 = vec2<f16>(1.0h);
var arg_0 = vec2<f16>(0.0h);
var res : f16 = length(arg_0);
}

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,49 @@
#version 310 es
void length_555aba() {
float res = 0.0f;
}
vec4 vertex_main() {
length_555aba();
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 length_555aba() {
float res = 0.0f;
}
void fragment_main() {
length_555aba();
}
void main() {
fragment_main();
return;
}
#version 310 es
void length_555aba() {
float res = 0.0f;
}
void compute_main() {
length_555aba();
}
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 length_555aba() {
float res = 0.0f;
}
struct tint_symbol {
float4 value [[position]];
};
float4 vertex_main_inner() {
length_555aba();
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() {
length_555aba();
return;
}
kernel void compute_main() {
length_555aba();
return;
}

View File

@@ -0,0 +1,63 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 29
; 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 %length_555aba "length_555aba"
OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner"
OpName %vertex_main "vertex_main"
OpName %fragment_main "fragment_main"
OpName %compute_main "compute_main"
OpDecorate %value BuiltIn Position
OpDecorate %vertex_point_size BuiltIn PointSize
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%5 = OpConstantNull %v4float
%value = OpVariable %_ptr_Output_v4float Output %5
%_ptr_Output_float = OpTypePointer Output %float
%8 = OpConstantNull %float
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
%void = OpTypeVoid
%9 = OpTypeFunction %void
%_ptr_Function_float = OpTypePointer Function %float
%15 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%length_555aba = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_float Function %8
OpStore %res %8
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %15
%17 = OpLabel
%18 = OpFunctionCall %void %length_555aba
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %9
%20 = OpLabel
%21 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %21
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %9
%24 = OpLabel
%25 = OpFunctionCall %void %length_555aba
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%27 = OpLabel
%28 = OpFunctionCall %void %length_555aba
OpReturn
OpFunctionEnd

View File

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

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