mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-11 14:41:50 +00:00
test: Remove many expected files
For these tests, we only really care that we can successfully consume them and generate valid output for each backend. Having the expected files in the tree generates significant churn for any change to how we generate backend code, which makes it hard to inspect diffs. Change-Id: Ic98c248081144c0fb1791f1303eaf6d459548e3d Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/62720 Reviewed-by: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: James Price <jrprice@google.com>
This commit is contained in:
committed by
Tint LUCI CQ
parent
568136dd10
commit
87cce20f67
@@ -1,81 +0,0 @@
|
||||
static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
|
||||
void func_i1_(inout int x) {
|
||||
int a = 0;
|
||||
int data[9] = (int[9])0;
|
||||
int temp[2] = (int[2])0;
|
||||
int i = 0;
|
||||
bool x_95 = false;
|
||||
bool x_96_phi = false;
|
||||
a = 0;
|
||||
data[0] = 5;
|
||||
while (true) {
|
||||
const int x_56 = a;
|
||||
const int x_57 = x;
|
||||
if ((x_56 <= x_57)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
if ((a <= 10)) {
|
||||
const int x_64 = a;
|
||||
const int x_69 = data[min(a, 0)];
|
||||
temp[min(x_64, 1)] = x_69;
|
||||
a = (a + 1);
|
||||
}
|
||||
}
|
||||
i = 0;
|
||||
{
|
||||
for(; (i < 2); i = (i + 1)) {
|
||||
const int x_80 = i;
|
||||
const int x_82 = temp[0];
|
||||
data[x_80] = (x_82 + i);
|
||||
}
|
||||
}
|
||||
const int x_89 = data[0];
|
||||
const bool x_90 = (x_89 == 5);
|
||||
x_96_phi = x_90;
|
||||
if (x_90) {
|
||||
const int x_94 = data[1];
|
||||
x_95 = (x_94 == 6);
|
||||
x_96_phi = x_95;
|
||||
}
|
||||
if (x_96_phi) {
|
||||
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
|
||||
} else {
|
||||
x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void main_1() {
|
||||
int i_1 = 0;
|
||||
int param = 0;
|
||||
i_1 = 1;
|
||||
{
|
||||
for(; (i_1 < 6); i_1 = (i_1 + 1)) {
|
||||
param = i_1;
|
||||
func_i1_(param);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
struct main_out {
|
||||
float4 x_GLF_color_1;
|
||||
};
|
||||
struct tint_symbol {
|
||||
float4 x_GLF_color_1 : SV_Target0;
|
||||
};
|
||||
|
||||
main_out main_inner() {
|
||||
main_1();
|
||||
const main_out tint_symbol_1 = {x_GLF_color};
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
tint_symbol main() {
|
||||
const main_out inner_result = main_inner();
|
||||
tint_symbol wrapper_result = (tint_symbol)0;
|
||||
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
|
||||
return wrapper_result;
|
||||
}
|
||||
@@ -1,110 +0,0 @@
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct tint_array_wrapper {
|
||||
int arr[9];
|
||||
};
|
||||
struct tint_array_wrapper_1 {
|
||||
int arr[2];
|
||||
};
|
||||
struct main_out {
|
||||
float4 x_GLF_color_1;
|
||||
};
|
||||
struct tint_symbol_1 {
|
||||
float4 x_GLF_color_1 [[color(0)]];
|
||||
};
|
||||
|
||||
void func_i1_(thread int* const x, thread float4* const tint_symbol_3) {
|
||||
int a = 0;
|
||||
tint_array_wrapper data = {};
|
||||
tint_array_wrapper_1 temp = {};
|
||||
int i = 0;
|
||||
bool x_95 = false;
|
||||
bool x_96_phi = false;
|
||||
a = 0;
|
||||
data.arr[0] = 5;
|
||||
while (true) {
|
||||
int const x_56 = a;
|
||||
int const x_57 = *(x);
|
||||
if ((x_56 <= x_57)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
int const x_60 = a;
|
||||
if ((x_60 <= 10)) {
|
||||
int const x_64 = a;
|
||||
int const x_66 = a;
|
||||
int const x_69 = data.arr[min(x_66, 0)];
|
||||
temp.arr[min(x_64, 1)] = x_69;
|
||||
int const x_71 = a;
|
||||
a = as_type<int>((as_type<uint>(x_71) + as_type<uint>(1)));
|
||||
}
|
||||
}
|
||||
i = 0;
|
||||
while (true) {
|
||||
int const x_77 = i;
|
||||
if ((x_77 < 2)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
int const x_80 = i;
|
||||
int const x_82 = temp.arr[0];
|
||||
int const x_83 = i;
|
||||
data.arr[x_80] = as_type<int>((as_type<uint>(x_82) + as_type<uint>(x_83)));
|
||||
{
|
||||
int const x_86 = i;
|
||||
i = as_type<int>((as_type<uint>(x_86) + as_type<uint>(1)));
|
||||
}
|
||||
}
|
||||
int const x_89 = data.arr[0];
|
||||
bool const x_90 = (x_89 == 5);
|
||||
x_96_phi = x_90;
|
||||
if (x_90) {
|
||||
int const x_94 = data.arr[1];
|
||||
x_95 = (x_94 == 6);
|
||||
x_96_phi = x_95;
|
||||
}
|
||||
bool const x_96 = x_96_phi;
|
||||
if (x_96) {
|
||||
*(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
|
||||
} else {
|
||||
*(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void main_1(thread float4* const tint_symbol_4) {
|
||||
int i_1 = 0;
|
||||
int param = 0;
|
||||
i_1 = 1;
|
||||
while (true) {
|
||||
int const x_43 = i_1;
|
||||
if ((x_43 < 6)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
int const x_46 = i_1;
|
||||
param = x_46;
|
||||
func_i1_(&(param), tint_symbol_4);
|
||||
{
|
||||
int const x_48 = i_1;
|
||||
i_1 = as_type<int>((as_type<uint>(x_48) + as_type<uint>(1)));
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
main_out tint_symbol_inner(thread float4* const tint_symbol_5) {
|
||||
main_1(tint_symbol_5);
|
||||
main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_5)};
|
||||
return tint_symbol_2;
|
||||
}
|
||||
|
||||
fragment tint_symbol_1 tint_symbol() {
|
||||
thread float4 tint_symbol_6 = 0.0f;
|
||||
main_out const inner_result = tint_symbol_inner(&(tint_symbol_6));
|
||||
tint_symbol_1 wrapper_result = {};
|
||||
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
@@ -1,218 +0,0 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 130
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%56 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Fragment %main "main" %x_GLF_color_1_1
|
||||
OpExecutionMode %main OriginUpperLeft
|
||||
OpName %x_GLF_color_1_1 "x_GLF_color_1_1"
|
||||
OpName %x_GLF_color "x_GLF_color"
|
||||
OpName %func_i1_ "func_i1_"
|
||||
OpName %x "x"
|
||||
OpName %a "a"
|
||||
OpName %data "data"
|
||||
OpName %temp "temp"
|
||||
OpName %i "i"
|
||||
OpName %x_95 "x_95"
|
||||
OpName %x_96_phi "x_96_phi"
|
||||
OpName %main_1 "main_1"
|
||||
OpName %i_1 "i_1"
|
||||
OpName %param "param"
|
||||
OpName %main_out "main_out"
|
||||
OpMemberName %main_out 0 "x_GLF_color_1"
|
||||
OpName %main_inner "main_inner"
|
||||
OpName %main "main"
|
||||
OpDecorate %x_GLF_color_1_1 Location 0
|
||||
OpDecorate %_arr_int_uint_9 ArrayStride 4
|
||||
OpDecorate %_arr_int_uint_2 ArrayStride 4
|
||||
OpMemberDecorate %main_out 0 Offset 0
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%5 = OpConstantNull %v4float
|
||||
%x_GLF_color_1_1 = OpVariable %_ptr_Output_v4float Output %5
|
||||
%_ptr_Private_v4float = OpTypePointer Private %v4float
|
||||
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %5
|
||||
%void = OpTypeVoid
|
||||
%int = OpTypeInt 32 1
|
||||
%_ptr_Function_int = OpTypePointer Function %int
|
||||
%8 = OpTypeFunction %void %_ptr_Function_int
|
||||
%16 = OpConstantNull %int
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_9 = OpConstant %uint 9
|
||||
%_arr_int_uint_9 = OpTypeArray %int %uint_9
|
||||
%_ptr_Function__arr_int_uint_9 = OpTypePointer Function %_arr_int_uint_9
|
||||
%22 = OpConstantNull %_arr_int_uint_9
|
||||
%uint_2 = OpConstant %uint 2
|
||||
%_arr_int_uint_2 = OpTypeArray %int %uint_2
|
||||
%_ptr_Function__arr_int_uint_2 = OpTypePointer Function %_arr_int_uint_2
|
||||
%27 = OpConstantNull %_arr_int_uint_2
|
||||
%bool = OpTypeBool
|
||||
%_ptr_Function_bool = OpTypePointer Function %bool
|
||||
%32 = OpConstantNull %bool
|
||||
%int_0 = OpConstant %int 0
|
||||
%int_5 = OpConstant %int 5
|
||||
%int_10 = OpConstant %int 10
|
||||
%int_1 = OpConstant %int 1
|
||||
%int_2 = OpConstant %int 2
|
||||
%int_6 = OpConstant %int 6
|
||||
%float_1 = OpConstant %float 1
|
||||
%float_0 = OpConstant %float 0
|
||||
%98 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
|
||||
%99 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
|
||||
%100 = OpTypeFunction %void
|
||||
%main_out = OpTypeStruct %v4float
|
||||
%119 = OpTypeFunction %main_out
|
||||
%func_i1_ = OpFunction %void None %8
|
||||
%x = OpFunctionParameter %_ptr_Function_int
|
||||
%14 = OpLabel
|
||||
%a = OpVariable %_ptr_Function_int Function %16
|
||||
%data = OpVariable %_ptr_Function__arr_int_uint_9 Function %22
|
||||
%temp = OpVariable %_ptr_Function__arr_int_uint_2 Function %27
|
||||
%i = OpVariable %_ptr_Function_int Function %16
|
||||
%x_95 = OpVariable %_ptr_Function_bool Function %32
|
||||
%x_96_phi = OpVariable %_ptr_Function_bool Function %32
|
||||
OpStore %a %int_0
|
||||
%35 = OpAccessChain %_ptr_Function_int %data %int_0
|
||||
OpStore %35 %int_5
|
||||
OpBranch %37
|
||||
%37 = OpLabel
|
||||
OpLoopMerge %38 %39 None
|
||||
OpBranch %40
|
||||
%40 = OpLabel
|
||||
%41 = OpLoad %int %a
|
||||
%43 = OpLoad %int %x
|
||||
%44 = OpSLessThanEqual %bool %41 %43
|
||||
OpSelectionMerge %45 None
|
||||
OpBranchConditional %44 %46 %47
|
||||
%46 = OpLabel
|
||||
OpBranch %45
|
||||
%47 = OpLabel
|
||||
OpBranch %38
|
||||
%45 = OpLabel
|
||||
%48 = OpLoad %int %a
|
||||
%50 = OpSLessThanEqual %bool %48 %int_10
|
||||
OpSelectionMerge %51 None
|
||||
OpBranchConditional %50 %52 %51
|
||||
%52 = OpLabel
|
||||
%53 = OpLoad %int %a
|
||||
%54 = OpLoad %int %a
|
||||
%55 = OpExtInst %int %56 SMin %54 %int_0
|
||||
%57 = OpAccessChain %_ptr_Function_int %data %55
|
||||
%58 = OpLoad %int %57
|
||||
%59 = OpExtInst %int %56 SMin %53 %int_1
|
||||
%61 = OpAccessChain %_ptr_Function_int %temp %59
|
||||
OpStore %61 %58
|
||||
%62 = OpLoad %int %a
|
||||
%63 = OpIAdd %int %62 %int_1
|
||||
OpStore %a %63
|
||||
OpBranch %51
|
||||
%51 = OpLabel
|
||||
OpBranch %39
|
||||
%39 = OpLabel
|
||||
OpBranch %37
|
||||
%38 = OpLabel
|
||||
OpStore %i %int_0
|
||||
OpBranch %64
|
||||
%64 = OpLabel
|
||||
OpLoopMerge %65 %66 None
|
||||
OpBranch %67
|
||||
%67 = OpLabel
|
||||
%68 = OpLoad %int %i
|
||||
%70 = OpSLessThan %bool %68 %int_2
|
||||
OpSelectionMerge %71 None
|
||||
OpBranchConditional %70 %72 %73
|
||||
%72 = OpLabel
|
||||
OpBranch %71
|
||||
%73 = OpLabel
|
||||
OpBranch %65
|
||||
%71 = OpLabel
|
||||
%74 = OpLoad %int %i
|
||||
%75 = OpAccessChain %_ptr_Function_int %temp %int_0
|
||||
%76 = OpLoad %int %75
|
||||
%77 = OpLoad %int %i
|
||||
%78 = OpAccessChain %_ptr_Function_int %data %74
|
||||
%79 = OpIAdd %int %76 %77
|
||||
OpStore %78 %79
|
||||
OpBranch %66
|
||||
%66 = OpLabel
|
||||
%80 = OpLoad %int %i
|
||||
%81 = OpIAdd %int %80 %int_1
|
||||
OpStore %i %81
|
||||
OpBranch %64
|
||||
%65 = OpLabel
|
||||
%82 = OpAccessChain %_ptr_Function_int %data %int_0
|
||||
%83 = OpLoad %int %82
|
||||
%84 = OpIEqual %bool %83 %int_5
|
||||
OpStore %x_96_phi %84
|
||||
OpSelectionMerge %85 None
|
||||
OpBranchConditional %84 %86 %85
|
||||
%86 = OpLabel
|
||||
%87 = OpAccessChain %_ptr_Function_int %data %int_1
|
||||
%88 = OpLoad %int %87
|
||||
%90 = OpIEqual %bool %88 %int_6
|
||||
OpStore %x_95 %90
|
||||
%91 = OpLoad %bool %x_95
|
||||
OpStore %x_96_phi %91
|
||||
OpBranch %85
|
||||
%85 = OpLabel
|
||||
%92 = OpLoad %bool %x_96_phi
|
||||
OpSelectionMerge %93 None
|
||||
OpBranchConditional %92 %94 %95
|
||||
%94 = OpLabel
|
||||
OpStore %x_GLF_color %98
|
||||
OpBranch %93
|
||||
%95 = OpLabel
|
||||
OpStore %x_GLF_color %99
|
||||
OpBranch %93
|
||||
%93 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%main_1 = OpFunction %void None %100
|
||||
%102 = OpLabel
|
||||
%i_1 = OpVariable %_ptr_Function_int Function %16
|
||||
%param = OpVariable %_ptr_Function_int Function %16
|
||||
OpStore %i_1 %int_1
|
||||
OpBranch %105
|
||||
%105 = OpLabel
|
||||
OpLoopMerge %106 %107 None
|
||||
OpBranch %108
|
||||
%108 = OpLabel
|
||||
%109 = OpLoad %int %i_1
|
||||
%110 = OpSLessThan %bool %109 %int_6
|
||||
OpSelectionMerge %111 None
|
||||
OpBranchConditional %110 %112 %113
|
||||
%112 = OpLabel
|
||||
OpBranch %111
|
||||
%113 = OpLabel
|
||||
OpBranch %106
|
||||
%111 = OpLabel
|
||||
%114 = OpLoad %int %i_1
|
||||
OpStore %param %114
|
||||
%115 = OpFunctionCall %void %func_i1_ %param
|
||||
OpBranch %107
|
||||
%107 = OpLabel
|
||||
%117 = OpLoad %int %i_1
|
||||
%118 = OpIAdd %int %117 %int_1
|
||||
OpStore %i_1 %118
|
||||
OpBranch %105
|
||||
%106 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%main_inner = OpFunction %main_out None %119
|
||||
%122 = OpLabel
|
||||
%123 = OpFunctionCall %void %main_1
|
||||
%124 = OpLoad %v4float %x_GLF_color
|
||||
%125 = OpCompositeConstruct %main_out %124
|
||||
OpReturnValue %125
|
||||
OpFunctionEnd
|
||||
%main = OpFunction %void None %100
|
||||
%127 = OpLabel
|
||||
%128 = OpFunctionCall %main_out %main_inner
|
||||
%129 = OpCompositeExtract %v4float %128 0
|
||||
OpStore %x_GLF_color_1_1 %129
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -1,94 +0,0 @@
|
||||
var<private> x_GLF_color : vec4<f32>;
|
||||
|
||||
fn func_i1_(x : ptr<function, i32>) {
|
||||
var a : i32;
|
||||
var data : array<i32, 9>;
|
||||
var temp : array<i32, 2>;
|
||||
var i : i32;
|
||||
var x_95 : bool;
|
||||
var x_96_phi : bool;
|
||||
a = 0;
|
||||
data[0] = 5;
|
||||
loop {
|
||||
let x_56 : i32 = a;
|
||||
let x_57 : i32 = *(x);
|
||||
if ((x_56 <= x_57)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
let x_60 : i32 = a;
|
||||
if ((x_60 <= 10)) {
|
||||
let x_64 : i32 = a;
|
||||
let x_66 : i32 = a;
|
||||
let x_69 : i32 = data[min(x_66, 0)];
|
||||
temp[min(x_64, 1)] = x_69;
|
||||
let x_71 : i32 = a;
|
||||
a = (x_71 + 1);
|
||||
}
|
||||
}
|
||||
i = 0;
|
||||
loop {
|
||||
let x_77 : i32 = i;
|
||||
if ((x_77 < 2)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
let x_80 : i32 = i;
|
||||
let x_82 : i32 = temp[0];
|
||||
let x_83 : i32 = i;
|
||||
data[x_80] = (x_82 + x_83);
|
||||
|
||||
continuing {
|
||||
let x_86 : i32 = i;
|
||||
i = (x_86 + 1);
|
||||
}
|
||||
}
|
||||
let x_89 : i32 = data[0];
|
||||
let x_90 : bool = (x_89 == 5);
|
||||
x_96_phi = x_90;
|
||||
if (x_90) {
|
||||
let x_94 : i32 = data[1];
|
||||
x_95 = (x_94 == 6);
|
||||
x_96_phi = x_95;
|
||||
}
|
||||
let x_96 : bool = x_96_phi;
|
||||
if (x_96) {
|
||||
x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0);
|
||||
} else {
|
||||
x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
fn main_1() {
|
||||
var i_1 : i32;
|
||||
var param : i32;
|
||||
i_1 = 1;
|
||||
loop {
|
||||
let x_43 : i32 = i_1;
|
||||
if ((x_43 < 6)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
let x_46 : i32 = i_1;
|
||||
param = x_46;
|
||||
func_i1_(&(param));
|
||||
|
||||
continuing {
|
||||
let x_48 : i32 = i_1;
|
||||
i_1 = (x_48 + 1);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
struct main_out {
|
||||
[[location(0)]]
|
||||
x_GLF_color_1 : vec4<f32>;
|
||||
};
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn main() -> main_out {
|
||||
main_1();
|
||||
return main_out(x_GLF_color);
|
||||
}
|
||||
@@ -1,81 +0,0 @@
|
||||
static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
|
||||
void func_i1_(inout int x) {
|
||||
int a = 0;
|
||||
int data[9] = (int[9])0;
|
||||
int temp[2] = (int[2])0;
|
||||
int i = 0;
|
||||
bool x_95 = false;
|
||||
bool x_96_phi = false;
|
||||
a = 0;
|
||||
data[0] = 5;
|
||||
while (true) {
|
||||
const int x_56 = a;
|
||||
const int x_57 = x;
|
||||
if ((x_56 <= x_57)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
if ((a <= 10)) {
|
||||
const int x_64 = a;
|
||||
const int x_69 = data[min(a, 0)];
|
||||
temp[min(x_64, 1)] = x_69;
|
||||
a = (a + 1);
|
||||
}
|
||||
}
|
||||
i = 0;
|
||||
{
|
||||
for(; (i < 2); i = (i + 1)) {
|
||||
const int x_80 = i;
|
||||
const int x_82 = temp[0];
|
||||
data[x_80] = (x_82 + i);
|
||||
}
|
||||
}
|
||||
const int x_89 = data[0];
|
||||
const bool x_90 = (x_89 == 5);
|
||||
x_96_phi = x_90;
|
||||
if (x_90) {
|
||||
const int x_94 = data[1];
|
||||
x_95 = (x_94 == 6);
|
||||
x_96_phi = x_95;
|
||||
}
|
||||
if (x_96_phi) {
|
||||
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
|
||||
} else {
|
||||
x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void main_1() {
|
||||
int i_1 = 0;
|
||||
int param = 0;
|
||||
i_1 = 1;
|
||||
{
|
||||
for(; (i_1 < 6); i_1 = (i_1 + 1)) {
|
||||
param = i_1;
|
||||
func_i1_(param);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
struct main_out {
|
||||
float4 x_GLF_color_1;
|
||||
};
|
||||
struct tint_symbol {
|
||||
float4 x_GLF_color_1 : SV_Target0;
|
||||
};
|
||||
|
||||
main_out main_inner() {
|
||||
main_1();
|
||||
const main_out tint_symbol_1 = {x_GLF_color};
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
tint_symbol main() {
|
||||
const main_out inner_result = main_inner();
|
||||
tint_symbol wrapper_result = (tint_symbol)0;
|
||||
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
|
||||
return wrapper_result;
|
||||
}
|
||||
@@ -1,110 +0,0 @@
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct tint_array_wrapper {
|
||||
int arr[9];
|
||||
};
|
||||
struct tint_array_wrapper_1 {
|
||||
int arr[2];
|
||||
};
|
||||
struct main_out {
|
||||
float4 x_GLF_color_1;
|
||||
};
|
||||
struct tint_symbol_1 {
|
||||
float4 x_GLF_color_1 [[color(0)]];
|
||||
};
|
||||
|
||||
void func_i1_(thread int* const x, thread float4* const tint_symbol_3) {
|
||||
int a = 0;
|
||||
tint_array_wrapper data = {};
|
||||
tint_array_wrapper_1 temp = {};
|
||||
int i = 0;
|
||||
bool x_95 = false;
|
||||
bool x_96_phi = false;
|
||||
a = 0;
|
||||
data.arr[0] = 5;
|
||||
while (true) {
|
||||
int const x_56 = a;
|
||||
int const x_57 = *(x);
|
||||
if ((x_56 <= x_57)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
int const x_60 = a;
|
||||
if ((x_60 <= 10)) {
|
||||
int const x_64 = a;
|
||||
int const x_66 = a;
|
||||
int const x_69 = data.arr[min(x_66, 0)];
|
||||
temp.arr[min(x_64, 1)] = x_69;
|
||||
int const x_71 = a;
|
||||
a = as_type<int>((as_type<uint>(x_71) + as_type<uint>(1)));
|
||||
}
|
||||
}
|
||||
i = 0;
|
||||
while (true) {
|
||||
int const x_77 = i;
|
||||
if ((x_77 < 2)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
int const x_80 = i;
|
||||
int const x_82 = temp.arr[0];
|
||||
int const x_83 = i;
|
||||
data.arr[x_80] = as_type<int>((as_type<uint>(x_82) + as_type<uint>(x_83)));
|
||||
{
|
||||
int const x_86 = i;
|
||||
i = as_type<int>((as_type<uint>(x_86) + as_type<uint>(1)));
|
||||
}
|
||||
}
|
||||
int const x_89 = data.arr[0];
|
||||
bool const x_90 = (x_89 == 5);
|
||||
x_96_phi = x_90;
|
||||
if (x_90) {
|
||||
int const x_94 = data.arr[1];
|
||||
x_95 = (x_94 == 6);
|
||||
x_96_phi = x_95;
|
||||
}
|
||||
bool const x_96 = x_96_phi;
|
||||
if (x_96) {
|
||||
*(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
|
||||
} else {
|
||||
*(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void main_1(thread float4* const tint_symbol_4) {
|
||||
int i_1 = 0;
|
||||
int param = 0;
|
||||
i_1 = 1;
|
||||
while (true) {
|
||||
int const x_43 = i_1;
|
||||
if ((x_43 < 6)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
int const x_46 = i_1;
|
||||
param = x_46;
|
||||
func_i1_(&(param), tint_symbol_4);
|
||||
{
|
||||
int const x_48 = i_1;
|
||||
i_1 = as_type<int>((as_type<uint>(x_48) + as_type<uint>(1)));
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
main_out tint_symbol_inner(thread float4* const tint_symbol_5) {
|
||||
main_1(tint_symbol_5);
|
||||
main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_5)};
|
||||
return tint_symbol_2;
|
||||
}
|
||||
|
||||
fragment tint_symbol_1 tint_symbol() {
|
||||
thread float4 tint_symbol_6 = 0.0f;
|
||||
main_out const inner_result = tint_symbol_inner(&(tint_symbol_6));
|
||||
tint_symbol_1 wrapper_result = {};
|
||||
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
@@ -1,218 +0,0 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 130
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%56 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Fragment %main "main" %x_GLF_color_1_1
|
||||
OpExecutionMode %main OriginUpperLeft
|
||||
OpName %x_GLF_color_1_1 "x_GLF_color_1_1"
|
||||
OpName %x_GLF_color "x_GLF_color"
|
||||
OpName %func_i1_ "func_i1_"
|
||||
OpName %x "x"
|
||||
OpName %a "a"
|
||||
OpName %data "data"
|
||||
OpName %temp "temp"
|
||||
OpName %i "i"
|
||||
OpName %x_95 "x_95"
|
||||
OpName %x_96_phi "x_96_phi"
|
||||
OpName %main_1 "main_1"
|
||||
OpName %i_1 "i_1"
|
||||
OpName %param "param"
|
||||
OpName %main_out "main_out"
|
||||
OpMemberName %main_out 0 "x_GLF_color_1"
|
||||
OpName %main_inner "main_inner"
|
||||
OpName %main "main"
|
||||
OpDecorate %x_GLF_color_1_1 Location 0
|
||||
OpDecorate %_arr_int_uint_9 ArrayStride 4
|
||||
OpDecorate %_arr_int_uint_2 ArrayStride 4
|
||||
OpMemberDecorate %main_out 0 Offset 0
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%5 = OpConstantNull %v4float
|
||||
%x_GLF_color_1_1 = OpVariable %_ptr_Output_v4float Output %5
|
||||
%_ptr_Private_v4float = OpTypePointer Private %v4float
|
||||
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %5
|
||||
%void = OpTypeVoid
|
||||
%int = OpTypeInt 32 1
|
||||
%_ptr_Function_int = OpTypePointer Function %int
|
||||
%8 = OpTypeFunction %void %_ptr_Function_int
|
||||
%16 = OpConstantNull %int
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_9 = OpConstant %uint 9
|
||||
%_arr_int_uint_9 = OpTypeArray %int %uint_9
|
||||
%_ptr_Function__arr_int_uint_9 = OpTypePointer Function %_arr_int_uint_9
|
||||
%22 = OpConstantNull %_arr_int_uint_9
|
||||
%uint_2 = OpConstant %uint 2
|
||||
%_arr_int_uint_2 = OpTypeArray %int %uint_2
|
||||
%_ptr_Function__arr_int_uint_2 = OpTypePointer Function %_arr_int_uint_2
|
||||
%27 = OpConstantNull %_arr_int_uint_2
|
||||
%bool = OpTypeBool
|
||||
%_ptr_Function_bool = OpTypePointer Function %bool
|
||||
%32 = OpConstantNull %bool
|
||||
%int_0 = OpConstant %int 0
|
||||
%int_5 = OpConstant %int 5
|
||||
%int_10 = OpConstant %int 10
|
||||
%int_1 = OpConstant %int 1
|
||||
%int_2 = OpConstant %int 2
|
||||
%int_6 = OpConstant %int 6
|
||||
%float_1 = OpConstant %float 1
|
||||
%float_0 = OpConstant %float 0
|
||||
%98 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
|
||||
%99 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
|
||||
%100 = OpTypeFunction %void
|
||||
%main_out = OpTypeStruct %v4float
|
||||
%119 = OpTypeFunction %main_out
|
||||
%func_i1_ = OpFunction %void None %8
|
||||
%x = OpFunctionParameter %_ptr_Function_int
|
||||
%14 = OpLabel
|
||||
%a = OpVariable %_ptr_Function_int Function %16
|
||||
%data = OpVariable %_ptr_Function__arr_int_uint_9 Function %22
|
||||
%temp = OpVariable %_ptr_Function__arr_int_uint_2 Function %27
|
||||
%i = OpVariable %_ptr_Function_int Function %16
|
||||
%x_95 = OpVariable %_ptr_Function_bool Function %32
|
||||
%x_96_phi = OpVariable %_ptr_Function_bool Function %32
|
||||
OpStore %a %int_0
|
||||
%35 = OpAccessChain %_ptr_Function_int %data %int_0
|
||||
OpStore %35 %int_5
|
||||
OpBranch %37
|
||||
%37 = OpLabel
|
||||
OpLoopMerge %38 %39 None
|
||||
OpBranch %40
|
||||
%40 = OpLabel
|
||||
%41 = OpLoad %int %a
|
||||
%43 = OpLoad %int %x
|
||||
%44 = OpSLessThanEqual %bool %41 %43
|
||||
OpSelectionMerge %45 None
|
||||
OpBranchConditional %44 %46 %47
|
||||
%46 = OpLabel
|
||||
OpBranch %45
|
||||
%47 = OpLabel
|
||||
OpBranch %38
|
||||
%45 = OpLabel
|
||||
%48 = OpLoad %int %a
|
||||
%50 = OpSLessThanEqual %bool %48 %int_10
|
||||
OpSelectionMerge %51 None
|
||||
OpBranchConditional %50 %52 %51
|
||||
%52 = OpLabel
|
||||
%53 = OpLoad %int %a
|
||||
%54 = OpLoad %int %a
|
||||
%55 = OpExtInst %int %56 SMin %54 %int_0
|
||||
%57 = OpAccessChain %_ptr_Function_int %data %55
|
||||
%58 = OpLoad %int %57
|
||||
%59 = OpExtInst %int %56 SMin %53 %int_1
|
||||
%61 = OpAccessChain %_ptr_Function_int %temp %59
|
||||
OpStore %61 %58
|
||||
%62 = OpLoad %int %a
|
||||
%63 = OpIAdd %int %62 %int_1
|
||||
OpStore %a %63
|
||||
OpBranch %51
|
||||
%51 = OpLabel
|
||||
OpBranch %39
|
||||
%39 = OpLabel
|
||||
OpBranch %37
|
||||
%38 = OpLabel
|
||||
OpStore %i %int_0
|
||||
OpBranch %64
|
||||
%64 = OpLabel
|
||||
OpLoopMerge %65 %66 None
|
||||
OpBranch %67
|
||||
%67 = OpLabel
|
||||
%68 = OpLoad %int %i
|
||||
%70 = OpSLessThan %bool %68 %int_2
|
||||
OpSelectionMerge %71 None
|
||||
OpBranchConditional %70 %72 %73
|
||||
%72 = OpLabel
|
||||
OpBranch %71
|
||||
%73 = OpLabel
|
||||
OpBranch %65
|
||||
%71 = OpLabel
|
||||
%74 = OpLoad %int %i
|
||||
%75 = OpAccessChain %_ptr_Function_int %temp %int_0
|
||||
%76 = OpLoad %int %75
|
||||
%77 = OpLoad %int %i
|
||||
%78 = OpAccessChain %_ptr_Function_int %data %74
|
||||
%79 = OpIAdd %int %76 %77
|
||||
OpStore %78 %79
|
||||
OpBranch %66
|
||||
%66 = OpLabel
|
||||
%80 = OpLoad %int %i
|
||||
%81 = OpIAdd %int %80 %int_1
|
||||
OpStore %i %81
|
||||
OpBranch %64
|
||||
%65 = OpLabel
|
||||
%82 = OpAccessChain %_ptr_Function_int %data %int_0
|
||||
%83 = OpLoad %int %82
|
||||
%84 = OpIEqual %bool %83 %int_5
|
||||
OpStore %x_96_phi %84
|
||||
OpSelectionMerge %85 None
|
||||
OpBranchConditional %84 %86 %85
|
||||
%86 = OpLabel
|
||||
%87 = OpAccessChain %_ptr_Function_int %data %int_1
|
||||
%88 = OpLoad %int %87
|
||||
%90 = OpIEqual %bool %88 %int_6
|
||||
OpStore %x_95 %90
|
||||
%91 = OpLoad %bool %x_95
|
||||
OpStore %x_96_phi %91
|
||||
OpBranch %85
|
||||
%85 = OpLabel
|
||||
%92 = OpLoad %bool %x_96_phi
|
||||
OpSelectionMerge %93 None
|
||||
OpBranchConditional %92 %94 %95
|
||||
%94 = OpLabel
|
||||
OpStore %x_GLF_color %98
|
||||
OpBranch %93
|
||||
%95 = OpLabel
|
||||
OpStore %x_GLF_color %99
|
||||
OpBranch %93
|
||||
%93 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%main_1 = OpFunction %void None %100
|
||||
%102 = OpLabel
|
||||
%i_1 = OpVariable %_ptr_Function_int Function %16
|
||||
%param = OpVariable %_ptr_Function_int Function %16
|
||||
OpStore %i_1 %int_1
|
||||
OpBranch %105
|
||||
%105 = OpLabel
|
||||
OpLoopMerge %106 %107 None
|
||||
OpBranch %108
|
||||
%108 = OpLabel
|
||||
%109 = OpLoad %int %i_1
|
||||
%110 = OpSLessThan %bool %109 %int_6
|
||||
OpSelectionMerge %111 None
|
||||
OpBranchConditional %110 %112 %113
|
||||
%112 = OpLabel
|
||||
OpBranch %111
|
||||
%113 = OpLabel
|
||||
OpBranch %106
|
||||
%111 = OpLabel
|
||||
%114 = OpLoad %int %i_1
|
||||
OpStore %param %114
|
||||
%115 = OpFunctionCall %void %func_i1_ %param
|
||||
OpBranch %107
|
||||
%107 = OpLabel
|
||||
%117 = OpLoad %int %i_1
|
||||
%118 = OpIAdd %int %117 %int_1
|
||||
OpStore %i_1 %118
|
||||
OpBranch %105
|
||||
%106 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%main_inner = OpFunction %main_out None %119
|
||||
%122 = OpLabel
|
||||
%123 = OpFunctionCall %void %main_1
|
||||
%124 = OpLoad %v4float %x_GLF_color
|
||||
%125 = OpCompositeConstruct %main_out %124
|
||||
OpReturnValue %125
|
||||
OpFunctionEnd
|
||||
%main = OpFunction %void None %100
|
||||
%127 = OpLabel
|
||||
%128 = OpFunctionCall %main_out %main_inner
|
||||
%129 = OpCompositeExtract %v4float %128 0
|
||||
OpStore %x_GLF_color_1_1 %129
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -1,94 +0,0 @@
|
||||
var<private> x_GLF_color : vec4<f32>;
|
||||
|
||||
fn func_i1_(x : ptr<function, i32>) {
|
||||
var a : i32;
|
||||
var data : array<i32, 9>;
|
||||
var temp : array<i32, 2>;
|
||||
var i : i32;
|
||||
var x_95 : bool;
|
||||
var x_96_phi : bool;
|
||||
a = 0;
|
||||
data[0] = 5;
|
||||
loop {
|
||||
let x_56 : i32 = a;
|
||||
let x_57 : i32 = *(x);
|
||||
if ((x_56 <= x_57)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
let x_60 : i32 = a;
|
||||
if ((x_60 <= 10)) {
|
||||
let x_64 : i32 = a;
|
||||
let x_66 : i32 = a;
|
||||
let x_69 : i32 = data[min(x_66, 0)];
|
||||
temp[min(x_64, 1)] = x_69;
|
||||
let x_71 : i32 = a;
|
||||
a = (x_71 + 1);
|
||||
}
|
||||
}
|
||||
i = 0;
|
||||
loop {
|
||||
let x_77 : i32 = i;
|
||||
if ((x_77 < 2)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
let x_80 : i32 = i;
|
||||
let x_82 : i32 = temp[0];
|
||||
let x_83 : i32 = i;
|
||||
data[x_80] = (x_82 + x_83);
|
||||
|
||||
continuing {
|
||||
let x_86 : i32 = i;
|
||||
i = (x_86 + 1);
|
||||
}
|
||||
}
|
||||
let x_89 : i32 = data[0];
|
||||
let x_90 : bool = (x_89 == 5);
|
||||
x_96_phi = x_90;
|
||||
if (x_90) {
|
||||
let x_94 : i32 = data[1];
|
||||
x_95 = (x_94 == 6);
|
||||
x_96_phi = x_95;
|
||||
}
|
||||
let x_96 : bool = x_96_phi;
|
||||
if (x_96) {
|
||||
x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0);
|
||||
} else {
|
||||
x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
fn main_1() {
|
||||
var i_1 : i32;
|
||||
var param : i32;
|
||||
i_1 = 1;
|
||||
loop {
|
||||
let x_43 : i32 = i_1;
|
||||
if ((x_43 < 6)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
let x_46 : i32 = i_1;
|
||||
param = x_46;
|
||||
func_i1_(&(param));
|
||||
|
||||
continuing {
|
||||
let x_48 : i32 = i_1;
|
||||
i_1 = (x_48 + 1);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
struct main_out {
|
||||
[[location(0)]]
|
||||
x_GLF_color_1 : vec4<f32>;
|
||||
};
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn main() -> main_out {
|
||||
main_1();
|
||||
return main_out(x_GLF_color);
|
||||
}
|
||||
Reference in New Issue
Block a user