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:
James Price
2021-08-24 22:49:42 +00:00
committed by Tint LUCI CQ
parent 568136dd10
commit 87cce20f67
8526 changed files with 12 additions and 613699 deletions

View File

@@ -1,79 +0,0 @@
void set_float3(inout float3 vec, int idx, float val) {
vec = (idx.xxx == int3(0, 1, 2)) ? val.xxx : vec;
}
static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
void main_1() {
float4x3 m43 = float4x3(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
int ll1 = 0;
int rows = 0;
int ll4 = 0;
int ll2 = 0;
int c = 0;
float4x3 tempm43 = float4x3(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
int ll3 = 0;
int d = 0;
int r = 0;
float sums[9] = (float[9])0;
int idx = 0;
m43 = float4x3(float3(1.0f, 0.0f, 0.0f), float3(0.0f, 1.0f, 0.0f), float3(0.0f, 0.0f, 1.0f), float3(0.0f, 0.0f, 0.0f));
ll1 = 0;
rows = 2;
while (true) {
if (true) {
} else {
break;
}
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
if ((ll1 >= 5)) {
break;
}
ll1 = (ll1 + 1);
ll4 = 10;
ll2 = 0;
c = 0;
{
for(; (c < 1); c = (c + 1)) {
if ((ll2 >= 0)) {
break;
}
ll2 = (ll2 + 1);
tempm43 = m43;
ll3 = 0;
d = 0;
{
for(; (1 < ll4); d = (d + 1)) {
set_float3(tempm43[(((d >= 0) & (d < 4)) ? d : 0)], (((r >= 0) & (r < 3)) ? r : 0), 1.0f);
}
}
const int x_111 = (((idx >= 0) & (idx < 9)) ? idx : 0);
const float x_113 = m43[c].y;
const float x_115 = sums[x_111];
sums[x_111] = (x_115 + x_113);
}
}
idx = (idx + 1);
}
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;
}

View File

@@ -1,111 +0,0 @@
#include <metal_stdlib>
using namespace metal;
struct tint_array_wrapper {
float arr[9];
};
struct main_out {
float4 x_GLF_color_1;
};
struct tint_symbol_1 {
float4 x_GLF_color_1 [[color(0)]];
};
void main_1(thread float4* const tint_symbol_3) {
float4x3 m43 = float4x3(0.0f);
int ll1 = 0;
int rows = 0;
int ll4 = 0;
int ll2 = 0;
int c = 0;
float4x3 tempm43 = float4x3(0.0f);
int ll3 = 0;
int d = 0;
int r = 0;
tint_array_wrapper sums = {};
int idx = 0;
m43 = float4x3(float3(1.0f, 0.0f, 0.0f), float3(0.0f, 1.0f, 0.0f), float3(0.0f, 0.0f, 1.0f), float3(0.0f, 0.0f, 0.0f));
ll1 = 0;
rows = 2;
while (true) {
if (true) {
} else {
break;
}
*(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
int const x_16 = ll1;
if ((x_16 >= 5)) {
break;
}
int const x_17 = ll1;
ll1 = as_type<int>((as_type<uint>(x_17) + as_type<uint>(1)));
ll4 = 10;
ll2 = 0;
c = 0;
while (true) {
int const x_19 = c;
if ((x_19 < 1)) {
} else {
break;
}
int const x_20 = ll2;
if ((x_20 >= 0)) {
break;
}
int const x_21 = ll2;
ll2 = as_type<int>((as_type<uint>(x_21) + as_type<uint>(1)));
float4x3 const x_92 = m43;
tempm43 = x_92;
ll3 = 0;
d = 0;
while (true) {
int const x_23 = ll4;
if ((1 < x_23)) {
} else {
break;
}
int const x_24 = d;
int const x_25 = d;
int const x_26 = d;
int const x_27 = r;
int const x_28 = r;
int const x_29 = r;
tempm43[select(0, x_26, ((x_24 >= 0) & (x_25 < 4)))][select(0, x_29, ((x_27 >= 0) & (x_28 < 3)))] = 1.0f;
{
int const x_30 = d;
d = as_type<int>((as_type<uint>(x_30) + as_type<uint>(1)));
}
}
int const x_32 = idx;
int const x_33 = idx;
int const x_34 = idx;
int const x_111 = select(0, x_34, ((x_32 >= 0) & (x_33 < 9)));
int const x_35 = c;
float const x_113 = m43[x_35].y;
float const x_115 = sums.arr[x_111];
sums.arr[x_111] = (x_115 + x_113);
{
int const x_36 = c;
c = as_type<int>((as_type<uint>(x_36) + as_type<uint>(1)));
}
}
int const x_38 = idx;
idx = as_type<int>((as_type<uint>(x_38) + as_type<uint>(1)));
}
return;
}
main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
main_1(tint_symbol_4);
main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
return tint_symbol_2;
}
fragment tint_symbol_1 tint_symbol() {
thread float4 tint_symbol_5 = 0.0f;
main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
tint_symbol_1 wrapper_result = {};
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
return wrapper_result;
}

View File

@@ -1,227 +0,0 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 140
; Schema: 0
OpCapability Shader
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 %main_1 "main_1"
OpName %m43 "m43"
OpName %ll1 "ll1"
OpName %rows "rows"
OpName %ll4 "ll4"
OpName %ll2 "ll2"
OpName %c "c"
OpName %tempm43 "tempm43"
OpName %ll3 "ll3"
OpName %d "d"
OpName %r "r"
OpName %sums "sums"
OpName %idx "idx"
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_float_uint_9 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
%8 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
%mat4v3float = OpTypeMatrix %v3float 4
%_ptr_Function_mat4v3float = OpTypePointer Function %mat4v3float
%16 = OpConstantNull %mat4v3float
%int = OpTypeInt 32 1
%_ptr_Function_int = OpTypePointer Function %int
%20 = OpConstantNull %int
%uint = OpTypeInt 32 0
%uint_9 = OpConstant %uint 9
%_arr_float_uint_9 = OpTypeArray %float %uint_9
%_ptr_Function__arr_float_uint_9 = OpTypePointer Function %_arr_float_uint_9
%34 = OpConstantNull %_arr_float_uint_9
%float_1 = OpConstant %float 1
%float_0 = OpConstant %float 0
%38 = OpConstantComposite %v3float %float_1 %float_0 %float_0
%39 = OpConstantComposite %v3float %float_0 %float_1 %float_0
%40 = OpConstantComposite %v3float %float_0 %float_0 %float_1
%41 = OpConstantComposite %v3float %float_0 %float_0 %float_0
%42 = OpConstantComposite %mat4v3float %38 %39 %40 %41
%int_0 = OpConstant %int 0
%int_2 = OpConstant %int 2
%bool = OpTypeBool
%true = OpConstantTrue %bool
%54 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%int_5 = OpConstant %int 5
%int_1 = OpConstant %int 1
%int_10 = OpConstant %int 10
%int_4 = OpConstant %int 4
%int_3 = OpConstant %int 3
%_ptr_Function_float = OpTypePointer Function %float
%int_9 = OpConstant %int 9
%uint_1 = OpConstant %uint 1
%main_out = OpTypeStruct %v4float
%129 = OpTypeFunction %main_out
%main_1 = OpFunction %void None %8
%11 = OpLabel
%m43 = OpVariable %_ptr_Function_mat4v3float Function %16
%ll1 = OpVariable %_ptr_Function_int Function %20
%rows = OpVariable %_ptr_Function_int Function %20
%ll4 = OpVariable %_ptr_Function_int Function %20
%ll2 = OpVariable %_ptr_Function_int Function %20
%c = OpVariable %_ptr_Function_int Function %20
%tempm43 = OpVariable %_ptr_Function_mat4v3float Function %16
%ll3 = OpVariable %_ptr_Function_int Function %20
%d = OpVariable %_ptr_Function_int Function %20
%r = OpVariable %_ptr_Function_int Function %20
%sums = OpVariable %_ptr_Function__arr_float_uint_9 Function %34
%idx = OpVariable %_ptr_Function_int Function %20
OpStore %m43 %42
OpStore %ll1 %int_0
OpStore %rows %int_2
OpBranch %45
%45 = OpLabel
OpLoopMerge %46 %47 None
OpBranch %48
%48 = OpLabel
OpSelectionMerge %51 None
OpBranchConditional %true %52 %53
%52 = OpLabel
OpBranch %51
%53 = OpLabel
OpBranch %46
%51 = OpLabel
OpStore %x_GLF_color %54
%55 = OpLoad %int %ll1
%57 = OpSGreaterThanEqual %bool %55 %int_5
OpSelectionMerge %58 None
OpBranchConditional %57 %59 %58
%59 = OpLabel
OpBranch %46
%58 = OpLabel
%60 = OpLoad %int %ll1
%62 = OpIAdd %int %60 %int_1
OpStore %ll1 %62
OpStore %ll4 %int_10
OpStore %ll2 %int_0
OpStore %c %int_0
OpBranch %64
%64 = OpLabel
OpLoopMerge %65 %66 None
OpBranch %67
%67 = OpLabel
%68 = OpLoad %int %c
%69 = OpSLessThan %bool %68 %int_1
OpSelectionMerge %70 None
OpBranchConditional %69 %71 %72
%71 = OpLabel
OpBranch %70
%72 = OpLabel
OpBranch %65
%70 = OpLabel
%73 = OpLoad %int %ll2
%74 = OpSGreaterThanEqual %bool %73 %int_0
OpSelectionMerge %75 None
OpBranchConditional %74 %76 %75
%76 = OpLabel
OpBranch %65
%75 = OpLabel
%77 = OpLoad %int %ll2
%78 = OpIAdd %int %77 %int_1
OpStore %ll2 %78
%79 = OpLoad %mat4v3float %m43
OpStore %tempm43 %79
OpStore %ll3 %int_0
OpStore %d %int_0
OpBranch %80
%80 = OpLabel
OpLoopMerge %81 %82 None
OpBranch %83
%83 = OpLabel
%84 = OpLoad %int %ll4
%85 = OpSLessThan %bool %int_1 %84
OpSelectionMerge %86 None
OpBranchConditional %85 %87 %88
%87 = OpLabel
OpBranch %86
%88 = OpLabel
OpBranch %81
%86 = OpLabel
%89 = OpLoad %int %d
%90 = OpLoad %int %d
%91 = OpLoad %int %d
%92 = OpLoad %int %r
%93 = OpLoad %int %r
%94 = OpLoad %int %r
%96 = OpSGreaterThanEqual %bool %89 %int_0
%98 = OpSLessThan %bool %90 %int_4
%99 = OpLogicalAnd %bool %96 %98
%95 = OpSelect %int %99 %91 %int_0
%101 = OpSGreaterThanEqual %bool %92 %int_0
%103 = OpSLessThan %bool %93 %int_3
%104 = OpLogicalAnd %bool %101 %103
%100 = OpSelect %int %104 %94 %int_0
%106 = OpAccessChain %_ptr_Function_float %tempm43 %95 %100
OpStore %106 %float_1
OpBranch %82
%82 = OpLabel
%107 = OpLoad %int %d
%108 = OpIAdd %int %107 %int_1
OpStore %d %108
OpBranch %80
%81 = OpLabel
%109 = OpLoad %int %idx
%110 = OpLoad %int %idx
%111 = OpLoad %int %idx
%113 = OpSGreaterThanEqual %bool %109 %int_0
%115 = OpSLessThan %bool %110 %int_9
%116 = OpLogicalAnd %bool %113 %115
%112 = OpSelect %int %116 %111 %int_0
%117 = OpLoad %int %c
%119 = OpAccessChain %_ptr_Function_float %m43 %117 %uint_1
%120 = OpLoad %float %119
%121 = OpAccessChain %_ptr_Function_float %sums %112
%122 = OpLoad %float %121
%123 = OpAccessChain %_ptr_Function_float %sums %112
%124 = OpFAdd %float %122 %120
OpStore %123 %124
OpBranch %66
%66 = OpLabel
%125 = OpLoad %int %c
%126 = OpIAdd %int %125 %int_1
OpStore %c %126
OpBranch %64
%65 = OpLabel
%127 = OpLoad %int %idx
%128 = OpIAdd %int %127 %int_1
OpStore %idx %128
OpBranch %47
%47 = OpLabel
OpBranch %45
%46 = OpLabel
OpReturn
OpFunctionEnd
%main_inner = OpFunction %main_out None %129
%132 = OpLabel
%133 = OpFunctionCall %void %main_1
%134 = OpLoad %v4float %x_GLF_color
%135 = OpCompositeConstruct %main_out %134
OpReturnValue %135
OpFunctionEnd
%main = OpFunction %void None %8
%137 = OpLabel
%138 = OpFunctionCall %main_out %main_inner
%139 = OpCompositeExtract %v4float %138 0
OpStore %x_GLF_color_1_1 %139
OpReturn
OpFunctionEnd

View File

@@ -1,98 +0,0 @@
var<private> x_GLF_color : vec4<f32>;
fn main_1() {
var m43 : mat4x3<f32>;
var ll1 : i32;
var rows : i32;
var ll4 : i32;
var ll2 : i32;
var c : i32;
var tempm43 : mat4x3<f32>;
var ll3 : i32;
var d : i32;
var r : i32;
var sums : array<f32, 9>;
var idx : i32;
m43 = mat4x3<f32>(vec3<f32>(1.0, 0.0, 0.0), vec3<f32>(0.0, 1.0, 0.0), vec3<f32>(0.0, 0.0, 1.0), vec3<f32>(0.0, 0.0, 0.0));
ll1 = 0;
rows = 2;
loop {
if (true) {
} else {
break;
}
x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0);
let x_16 : i32 = ll1;
if ((x_16 >= 5)) {
break;
}
let x_17 : i32 = ll1;
ll1 = (x_17 + 1);
ll4 = 10;
ll2 = 0;
c = 0;
loop {
let x_19 : i32 = c;
if ((x_19 < 1)) {
} else {
break;
}
let x_20 : i32 = ll2;
if ((x_20 >= 0)) {
break;
}
let x_21 : i32 = ll2;
ll2 = (x_21 + 1);
let x_92 : mat4x3<f32> = m43;
tempm43 = x_92;
ll3 = 0;
d = 0;
loop {
let x_23 : i32 = ll4;
if ((1 < x_23)) {
} else {
break;
}
let x_24 : i32 = d;
let x_25 : i32 = d;
let x_26 : i32 = d;
let x_27 : i32 = r;
let x_28 : i32 = r;
let x_29 : i32 = r;
tempm43[select(0, x_26, ((x_24 >= 0) & (x_25 < 4)))][select(0, x_29, ((x_27 >= 0) & (x_28 < 3)))] = 1.0;
continuing {
let x_30 : i32 = d;
d = (x_30 + 1);
}
}
let x_32 : i32 = idx;
let x_33 : i32 = idx;
let x_34 : i32 = idx;
let x_111 : i32 = select(0, x_34, ((x_32 >= 0) & (x_33 < 9)));
let x_35 : i32 = c;
let x_113 : f32 = m43[x_35].y;
let x_115 : f32 = sums[x_111];
sums[x_111] = (x_115 + x_113);
continuing {
let x_36 : i32 = c;
c = (x_36 + 1);
}
}
let x_38 : i32 = idx;
idx = (x_38 + 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);
}

View File

@@ -1,91 +0,0 @@
void set_float3(inout float3 vec, int idx, float val) {
vec = (idx.xxx == int3(0, 1, 2)) ? val.xxx : vec;
}
static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
void main_1() {
float4x3 m43 = float4x3(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
int ll1 = 0;
int rows = 0;
int ll4 = 0;
int ll2 = 0;
int c = 0;
float4x3 tempm43 = float4x3(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
int ll3 = 0;
int d = 0;
int r = 0;
float sums[9] = (float[9])0;
int idx = 0;
m43 = float4x3(float3(1.0f, 0.0f, 0.0f), float3(0.0f, 1.0f, 0.0f), float3(0.0f, 0.0f, 1.0f), float3(0.0f, 0.0f, 0.0f));
ll1 = 0;
rows = 2;
while (true) {
if (true) {
} else {
break;
}
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
if ((ll1 >= 5)) {
break;
}
ll1 = (ll1 + 1);
ll4 = 10;
ll2 = 0;
c = 0;
{
for(; (c < 1); c = (c + 1)) {
if ((ll2 >= 0)) {
break;
}
ll2 = (ll2 + 1);
tempm43 = m43;
ll3 = 0;
d = 0;
{
for(; (1 < ll4); d = (d + 1)) {
bool tint_tmp = (d >= 0);
if (tint_tmp) {
tint_tmp = (d < 4);
}
bool tint_tmp_1 = (r >= 0);
if (tint_tmp_1) {
tint_tmp_1 = (r < 3);
}
set_float3(tempm43[((tint_tmp) ? d : 0)], ((tint_tmp_1) ? r : 0), 1.0f);
}
}
bool tint_tmp_2 = (idx >= 0);
if (tint_tmp_2) {
tint_tmp_2 = (idx < 9);
}
const int x_111 = ((tint_tmp_2) ? idx : 0);
const float x_113 = m43[c].y;
const float x_115 = sums[x_111];
sums[x_111] = (x_115 + x_113);
}
}
idx = (idx + 1);
}
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;
}

View File

@@ -1,111 +0,0 @@
#include <metal_stdlib>
using namespace metal;
struct tint_array_wrapper {
float arr[9];
};
struct main_out {
float4 x_GLF_color_1;
};
struct tint_symbol_1 {
float4 x_GLF_color_1 [[color(0)]];
};
void main_1(thread float4* const tint_symbol_3) {
float4x3 m43 = float4x3(0.0f);
int ll1 = 0;
int rows = 0;
int ll4 = 0;
int ll2 = 0;
int c = 0;
float4x3 tempm43 = float4x3(0.0f);
int ll3 = 0;
int d = 0;
int r = 0;
tint_array_wrapper sums = {};
int idx = 0;
m43 = float4x3(float3(1.0f, 0.0f, 0.0f), float3(0.0f, 1.0f, 0.0f), float3(0.0f, 0.0f, 1.0f), float3(0.0f, 0.0f, 0.0f));
ll1 = 0;
rows = 2;
while (true) {
if (true) {
} else {
break;
}
*(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
int const x_16 = ll1;
if ((x_16 >= 5)) {
break;
}
int const x_17 = ll1;
ll1 = as_type<int>((as_type<uint>(x_17) + as_type<uint>(1)));
ll4 = 10;
ll2 = 0;
c = 0;
while (true) {
int const x_19 = c;
if ((x_19 < 1)) {
} else {
break;
}
int const x_20 = ll2;
if ((x_20 >= 0)) {
break;
}
int const x_21 = ll2;
ll2 = as_type<int>((as_type<uint>(x_21) + as_type<uint>(1)));
float4x3 const x_92 = m43;
tempm43 = x_92;
ll3 = 0;
d = 0;
while (true) {
int const x_23 = ll4;
if ((1 < x_23)) {
} else {
break;
}
int const x_24 = d;
int const x_25 = d;
int const x_26 = d;
int const x_27 = r;
int const x_28 = r;
int const x_29 = r;
tempm43[select(0, x_26, ((x_24 >= 0) && (x_25 < 4)))][select(0, x_29, ((x_27 >= 0) && (x_28 < 3)))] = 1.0f;
{
int const x_30 = d;
d = as_type<int>((as_type<uint>(x_30) + as_type<uint>(1)));
}
}
int const x_32 = idx;
int const x_33 = idx;
int const x_34 = idx;
int const x_111 = select(0, x_34, ((x_32 >= 0) && (x_33 < 9)));
int const x_35 = c;
float const x_113 = m43[x_35].y;
float const x_115 = sums.arr[x_111];
sums.arr[x_111] = (x_115 + x_113);
{
int const x_36 = c;
c = as_type<int>((as_type<uint>(x_36) + as_type<uint>(1)));
}
}
int const x_38 = idx;
idx = as_type<int>((as_type<uint>(x_38) + as_type<uint>(1)));
}
return;
}
main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
main_1(tint_symbol_4);
main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
return tint_symbol_2;
}
fragment tint_symbol_1 tint_symbol() {
thread float4 tint_symbol_5 = 0.0f;
main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
tint_symbol_1 wrapper_result = {};
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
return wrapper_result;
}

View File

@@ -1,242 +0,0 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 146
; Schema: 0
OpCapability Shader
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 %main_1 "main_1"
OpName %m43 "m43"
OpName %ll1 "ll1"
OpName %rows "rows"
OpName %ll4 "ll4"
OpName %ll2 "ll2"
OpName %c "c"
OpName %tempm43 "tempm43"
OpName %ll3 "ll3"
OpName %d "d"
OpName %r "r"
OpName %sums "sums"
OpName %idx "idx"
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_float_uint_9 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
%8 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
%mat4v3float = OpTypeMatrix %v3float 4
%_ptr_Function_mat4v3float = OpTypePointer Function %mat4v3float
%16 = OpConstantNull %mat4v3float
%int = OpTypeInt 32 1
%_ptr_Function_int = OpTypePointer Function %int
%20 = OpConstantNull %int
%uint = OpTypeInt 32 0
%uint_9 = OpConstant %uint 9
%_arr_float_uint_9 = OpTypeArray %float %uint_9
%_ptr_Function__arr_float_uint_9 = OpTypePointer Function %_arr_float_uint_9
%34 = OpConstantNull %_arr_float_uint_9
%float_1 = OpConstant %float 1
%float_0 = OpConstant %float 0
%38 = OpConstantComposite %v3float %float_1 %float_0 %float_0
%39 = OpConstantComposite %v3float %float_0 %float_1 %float_0
%40 = OpConstantComposite %v3float %float_0 %float_0 %float_1
%41 = OpConstantComposite %v3float %float_0 %float_0 %float_0
%42 = OpConstantComposite %mat4v3float %38 %39 %40 %41
%int_0 = OpConstant %int 0
%int_2 = OpConstant %int 2
%bool = OpTypeBool
%true = OpConstantTrue %bool
%54 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%int_5 = OpConstant %int 5
%int_1 = OpConstant %int 1
%int_10 = OpConstant %int 10
%int_4 = OpConstant %int 4
%int_3 = OpConstant %int 3
%_ptr_Function_float = OpTypePointer Function %float
%int_9 = OpConstant %int 9
%uint_1 = OpConstant %uint 1
%main_out = OpTypeStruct %v4float
%135 = OpTypeFunction %main_out
%main_1 = OpFunction %void None %8
%11 = OpLabel
%m43 = OpVariable %_ptr_Function_mat4v3float Function %16
%ll1 = OpVariable %_ptr_Function_int Function %20
%rows = OpVariable %_ptr_Function_int Function %20
%ll4 = OpVariable %_ptr_Function_int Function %20
%ll2 = OpVariable %_ptr_Function_int Function %20
%c = OpVariable %_ptr_Function_int Function %20
%tempm43 = OpVariable %_ptr_Function_mat4v3float Function %16
%ll3 = OpVariable %_ptr_Function_int Function %20
%d = OpVariable %_ptr_Function_int Function %20
%r = OpVariable %_ptr_Function_int Function %20
%sums = OpVariable %_ptr_Function__arr_float_uint_9 Function %34
%idx = OpVariable %_ptr_Function_int Function %20
OpStore %m43 %42
OpStore %ll1 %int_0
OpStore %rows %int_2
OpBranch %45
%45 = OpLabel
OpLoopMerge %46 %47 None
OpBranch %48
%48 = OpLabel
OpSelectionMerge %51 None
OpBranchConditional %true %52 %53
%52 = OpLabel
OpBranch %51
%53 = OpLabel
OpBranch %46
%51 = OpLabel
OpStore %x_GLF_color %54
%55 = OpLoad %int %ll1
%57 = OpSGreaterThanEqual %bool %55 %int_5
OpSelectionMerge %58 None
OpBranchConditional %57 %59 %58
%59 = OpLabel
OpBranch %46
%58 = OpLabel
%60 = OpLoad %int %ll1
%62 = OpIAdd %int %60 %int_1
OpStore %ll1 %62
OpStore %ll4 %int_10
OpStore %ll2 %int_0
OpStore %c %int_0
OpBranch %64
%64 = OpLabel
OpLoopMerge %65 %66 None
OpBranch %67
%67 = OpLabel
%68 = OpLoad %int %c
%69 = OpSLessThan %bool %68 %int_1
OpSelectionMerge %70 None
OpBranchConditional %69 %71 %72
%71 = OpLabel
OpBranch %70
%72 = OpLabel
OpBranch %65
%70 = OpLabel
%73 = OpLoad %int %ll2
%74 = OpSGreaterThanEqual %bool %73 %int_0
OpSelectionMerge %75 None
OpBranchConditional %74 %76 %75
%76 = OpLabel
OpBranch %65
%75 = OpLabel
%77 = OpLoad %int %ll2
%78 = OpIAdd %int %77 %int_1
OpStore %ll2 %78
%79 = OpLoad %mat4v3float %m43
OpStore %tempm43 %79
OpStore %ll3 %int_0
OpStore %d %int_0
OpBranch %80
%80 = OpLabel
OpLoopMerge %81 %82 None
OpBranch %83
%83 = OpLabel
%84 = OpLoad %int %ll4
%85 = OpSLessThan %bool %int_1 %84
OpSelectionMerge %86 None
OpBranchConditional %85 %87 %88
%87 = OpLabel
OpBranch %86
%88 = OpLabel
OpBranch %81
%86 = OpLabel
%89 = OpLoad %int %d
%90 = OpLoad %int %d
%91 = OpLoad %int %d
%92 = OpLoad %int %r
%93 = OpLoad %int %r
%94 = OpLoad %int %r
%96 = OpSGreaterThanEqual %bool %89 %int_0
OpSelectionMerge %97 None
OpBranchConditional %96 %98 %97
%98 = OpLabel
%100 = OpSLessThan %bool %90 %int_4
OpBranch %97
%97 = OpLabel
%101 = OpPhi %bool %96 %86 %100 %98
%95 = OpSelect %int %101 %91 %int_0
%103 = OpSGreaterThanEqual %bool %92 %int_0
OpSelectionMerge %104 None
OpBranchConditional %103 %105 %104
%105 = OpLabel
%107 = OpSLessThan %bool %93 %int_3
OpBranch %104
%104 = OpLabel
%108 = OpPhi %bool %103 %97 %107 %105
%102 = OpSelect %int %108 %94 %int_0
%110 = OpAccessChain %_ptr_Function_float %tempm43 %95 %102
OpStore %110 %float_1
OpBranch %82
%82 = OpLabel
%111 = OpLoad %int %d
%112 = OpIAdd %int %111 %int_1
OpStore %d %112
OpBranch %80
%81 = OpLabel
%113 = OpLoad %int %idx
%114 = OpLoad %int %idx
%115 = OpLoad %int %idx
%117 = OpSGreaterThanEqual %bool %113 %int_0
OpSelectionMerge %118 None
OpBranchConditional %117 %119 %118
%119 = OpLabel
%121 = OpSLessThan %bool %114 %int_9
OpBranch %118
%118 = OpLabel
%122 = OpPhi %bool %117 %81 %121 %119
%116 = OpSelect %int %122 %115 %int_0
%123 = OpLoad %int %c
%125 = OpAccessChain %_ptr_Function_float %m43 %123 %uint_1
%126 = OpLoad %float %125
%127 = OpAccessChain %_ptr_Function_float %sums %116
%128 = OpLoad %float %127
%129 = OpAccessChain %_ptr_Function_float %sums %116
%130 = OpFAdd %float %128 %126
OpStore %129 %130
OpBranch %66
%66 = OpLabel
%131 = OpLoad %int %c
%132 = OpIAdd %int %131 %int_1
OpStore %c %132
OpBranch %64
%65 = OpLabel
%133 = OpLoad %int %idx
%134 = OpIAdd %int %133 %int_1
OpStore %idx %134
OpBranch %47
%47 = OpLabel
OpBranch %45
%46 = OpLabel
OpReturn
OpFunctionEnd
%main_inner = OpFunction %main_out None %135
%138 = OpLabel
%139 = OpFunctionCall %void %main_1
%140 = OpLoad %v4float %x_GLF_color
%141 = OpCompositeConstruct %main_out %140
OpReturnValue %141
OpFunctionEnd
%main = OpFunction %void None %8
%143 = OpLabel
%144 = OpFunctionCall %main_out %main_inner
%145 = OpCompositeExtract %v4float %144 0
OpStore %x_GLF_color_1_1 %145
OpReturn
OpFunctionEnd

View File

@@ -1,98 +0,0 @@
var<private> x_GLF_color : vec4<f32>;
fn main_1() {
var m43 : mat4x3<f32>;
var ll1 : i32;
var rows : i32;
var ll4 : i32;
var ll2 : i32;
var c : i32;
var tempm43 : mat4x3<f32>;
var ll3 : i32;
var d : i32;
var r : i32;
var sums : array<f32, 9>;
var idx : i32;
m43 = mat4x3<f32>(vec3<f32>(1.0, 0.0, 0.0), vec3<f32>(0.0, 1.0, 0.0), vec3<f32>(0.0, 0.0, 1.0), vec3<f32>(0.0, 0.0, 0.0));
ll1 = 0;
rows = 2;
loop {
if (true) {
} else {
break;
}
x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0);
let x_16 : i32 = ll1;
if ((x_16 >= 5)) {
break;
}
let x_17 : i32 = ll1;
ll1 = (x_17 + 1);
ll4 = 10;
ll2 = 0;
c = 0;
loop {
let x_19 : i32 = c;
if ((x_19 < 1)) {
} else {
break;
}
let x_20 : i32 = ll2;
if ((x_20 >= 0)) {
break;
}
let x_21 : i32 = ll2;
ll2 = (x_21 + 1);
let x_92 : mat4x3<f32> = m43;
tempm43 = x_92;
ll3 = 0;
d = 0;
loop {
let x_23 : i32 = ll4;
if ((1 < x_23)) {
} else {
break;
}
let x_24 : i32 = d;
let x_25 : i32 = d;
let x_26 : i32 = d;
let x_27 : i32 = r;
let x_28 : i32 = r;
let x_29 : i32 = r;
tempm43[select(0, x_26, ((x_24 >= 0) && (x_25 < 4)))][select(0, x_29, ((x_27 >= 0) && (x_28 < 3)))] = 1.0;
continuing {
let x_30 : i32 = d;
d = (x_30 + 1);
}
}
let x_32 : i32 = idx;
let x_33 : i32 = idx;
let x_34 : i32 = idx;
let x_111 : i32 = select(0, x_34, ((x_32 >= 0) && (x_33 < 9)));
let x_35 : i32 = c;
let x_113 : f32 = m43[x_35].y;
let x_115 : f32 = sums[x_111];
sums[x_111] = (x_115 + x_113);
continuing {
let x_36 : i32 = c;
c = (x_36 + 1);
}
}
let x_38 : i32 = idx;
idx = (x_38 + 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);
}