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,48 +0,0 @@
static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
cbuffer cbuffer_x_5 : register(b0, space0) {
uint4 x_5[1];
};
void main_1() {
int x_9[1] = (int[1])0;
int x_10_phi = 0;
const int x_6 = x_9[0u];
while (true) {
x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
const int x_7 = asint(x_5[0].x);
const int x_8 = x_9[x_7];
if ((x_8 == x_6)) {
x_10_phi = 1;
break;
}
x_10_phi = 2;
break;
}
const int x_10 = x_10_phi;
if (((x_10 == 1) | (x_10 == 2))) {
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;
}
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_2 = {x_GLF_color};
return tint_symbol_2;
}
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,55 +0,0 @@
#include <metal_stdlib>
using namespace metal;
struct buf0 {
/* 0x0000 */ int zero;
};
struct tint_array_wrapper {
int arr[1];
};
struct main_out {
float4 x_GLF_color_1;
};
struct tint_symbol_1 {
float4 x_GLF_color_1 [[color(0)]];
};
void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
tint_array_wrapper x_9 = {};
int x_10_phi = 0;
tint_array_wrapper const x_33 = x_9;
int const x_6 = x_33.arr[0u];
while (true) {
*(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
int const x_7 = x_5.zero;
int const x_8 = x_9.arr[x_7];
if ((x_8 == x_6)) {
x_10_phi = 1;
break;
}
x_10_phi = 2;
break;
}
int const x_10 = x_10_phi;
if (((x_10 == 1) | (x_10 == 2))) {
*(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;
}
main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
main_1(x_5, 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(constant buf0& x_5 [[buffer(0)]]) {
thread float4 tint_symbol_5 = 0.0f;
main_out const inner_result = tint_symbol_inner(x_5, &(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,117 +0,0 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 65
; 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 %buf0 "buf0"
OpMemberName %buf0 0 "zero"
OpName %x_5 "x_5"
OpName %main_1 "main_1"
OpName %x_9 "x_9"
OpName %x_10_phi "x_10_phi"
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 %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %x_5 NonWritable
OpDecorate %x_5 DescriptorSet 0
OpDecorate %x_5 Binding 0
OpDecorate %_arr_int_uint_1 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
%int = OpTypeInt 32 1
%buf0 = OpTypeStruct %int
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_5 = OpVariable %_ptr_Uniform_buf0 Uniform
%void = OpTypeVoid
%12 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_arr_int_uint_1 = OpTypeArray %int %uint_1
%_ptr_Function__arr_int_uint_1 = OpTypePointer Function %_arr_int_uint_1
%21 = OpConstantNull %_arr_int_uint_1
%_ptr_Function_int = OpTypePointer Function %int
%24 = OpConstantNull %int
%uint_0 = OpConstant %uint 0
%float_0 = OpConstant %float 0
%33 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%_ptr_Uniform_int = OpTypePointer Uniform %int
%bool = OpTypeBool
%int_1 = OpConstant %int 1
%int_2 = OpConstant %int 2
%float_1 = OpConstant %float 1
%53 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%main_out = OpTypeStruct %v4float
%54 = OpTypeFunction %main_out
%main_1 = OpFunction %void None %12
%15 = OpLabel
%x_9 = OpVariable %_ptr_Function__arr_int_uint_1 Function %21
%x_10_phi = OpVariable %_ptr_Function_int Function %24
%25 = OpLoad %_arr_int_uint_1 %x_9
%27 = OpCompositeExtract %int %25 0
OpBranch %28
%28 = OpLabel
OpLoopMerge %29 %30 None
OpBranch %31
%31 = OpLabel
OpStore %x_GLF_color %33
%35 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0
%36 = OpLoad %int %35
%37 = OpAccessChain %_ptr_Function_int %x_9 %36
%38 = OpLoad %int %37
%39 = OpIEqual %bool %38 %27
OpSelectionMerge %41 None
OpBranchConditional %39 %42 %41
%42 = OpLabel
OpStore %x_10_phi %int_1
OpBranch %29
%41 = OpLabel
OpStore %x_10_phi %int_2
OpBranch %29
%30 = OpLabel
OpBranch %28
%29 = OpLabel
%45 = OpLoad %int %x_10_phi
%46 = OpIEqual %bool %45 %int_1
%47 = OpIEqual %bool %45 %int_2
%48 = OpLogicalOr %bool %46 %47
OpSelectionMerge %49 None
OpBranchConditional %48 %50 %51
%50 = OpLabel
OpStore %x_GLF_color %53
OpBranch %49
%51 = OpLabel
OpStore %x_GLF_color %33
OpBranch %49
%49 = OpLabel
OpReturn
OpFunctionEnd
%main_inner = OpFunction %main_out None %54
%57 = OpLabel
%58 = OpFunctionCall %void %main_1
%59 = OpLoad %v4float %x_GLF_color
%60 = OpCompositeConstruct %main_out %59
OpReturnValue %60
OpFunctionEnd
%main = OpFunction %void None %12
%62 = OpLabel
%63 = OpFunctionCall %main_out %main_inner
%64 = OpCompositeExtract %v4float %63 0
OpStore %x_GLF_color_1_1 %64
OpReturn
OpFunctionEnd

View File

@@ -1,44 +0,0 @@
[[block]]
struct buf0 {
zero : i32;
};
var<private> x_GLF_color : vec4<f32>;
[[group(0), binding(0)]] var<uniform> x_5 : buf0;
fn main_1() {
var x_9 : array<i32, 1>;
var x_10_phi : i32;
let x_33 : array<i32, 1> = x_9;
let x_6 : i32 = x_33[0u];
loop {
x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0);
let x_7 : i32 = x_5.zero;
let x_8 : i32 = x_9[x_7];
if ((x_8 == x_6)) {
x_10_phi = 1;
break;
}
x_10_phi = 2;
break;
}
let x_10 : i32 = x_10_phi;
if (((x_10 == 1) | (x_10 == 2))) {
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;
}
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,52 +0,0 @@
static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
cbuffer cbuffer_x_5 : register(b0, space0) {
uint4 x_5[1];
};
void main_1() {
int x_9[1] = (int[1])0;
int x_10_phi = 0;
const int x_6 = x_9[0u];
while (true) {
x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
const int x_7 = asint(x_5[0].x);
const int x_8 = x_9[x_7];
if ((x_8 == x_6)) {
x_10_phi = 1;
break;
}
x_10_phi = 2;
break;
}
const int x_10 = x_10_phi;
bool tint_tmp = (x_10 == 1);
if (!tint_tmp) {
tint_tmp = (x_10 == 2);
}
if ((tint_tmp)) {
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;
}
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_2 = {x_GLF_color};
return tint_symbol_2;
}
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,55 +0,0 @@
#include <metal_stdlib>
using namespace metal;
struct buf0 {
/* 0x0000 */ int zero;
};
struct tint_array_wrapper {
int arr[1];
};
struct main_out {
float4 x_GLF_color_1;
};
struct tint_symbol_1 {
float4 x_GLF_color_1 [[color(0)]];
};
void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
tint_array_wrapper x_9 = {};
int x_10_phi = 0;
tint_array_wrapper const x_33 = x_9;
int const x_6 = x_33.arr[0u];
while (true) {
*(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
int const x_7 = x_5.zero;
int const x_8 = x_9.arr[x_7];
if ((x_8 == x_6)) {
x_10_phi = 1;
break;
}
x_10_phi = 2;
break;
}
int const x_10 = x_10_phi;
if (((x_10 == 1) || (x_10 == 2))) {
*(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;
}
main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
main_1(x_5, 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(constant buf0& x_5 [[buffer(0)]]) {
thread float4 tint_symbol_5 = 0.0f;
main_out const inner_result = tint_symbol_inner(x_5, &(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,122 +0,0 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 67
; 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 %buf0 "buf0"
OpMemberName %buf0 0 "zero"
OpName %x_5 "x_5"
OpName %main_1 "main_1"
OpName %x_9 "x_9"
OpName %x_10_phi "x_10_phi"
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 %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %x_5 NonWritable
OpDecorate %x_5 DescriptorSet 0
OpDecorate %x_5 Binding 0
OpDecorate %_arr_int_uint_1 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
%int = OpTypeInt 32 1
%buf0 = OpTypeStruct %int
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_5 = OpVariable %_ptr_Uniform_buf0 Uniform
%void = OpTypeVoid
%12 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_arr_int_uint_1 = OpTypeArray %int %uint_1
%_ptr_Function__arr_int_uint_1 = OpTypePointer Function %_arr_int_uint_1
%21 = OpConstantNull %_arr_int_uint_1
%_ptr_Function_int = OpTypePointer Function %int
%24 = OpConstantNull %int
%uint_0 = OpConstant %uint 0
%float_0 = OpConstant %float 0
%33 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%_ptr_Uniform_int = OpTypePointer Uniform %int
%bool = OpTypeBool
%int_1 = OpConstant %int 1
%int_2 = OpConstant %int 2
%float_1 = OpConstant %float 1
%55 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%main_out = OpTypeStruct %v4float
%56 = OpTypeFunction %main_out
%main_1 = OpFunction %void None %12
%15 = OpLabel
%x_9 = OpVariable %_ptr_Function__arr_int_uint_1 Function %21
%x_10_phi = OpVariable %_ptr_Function_int Function %24
%25 = OpLoad %_arr_int_uint_1 %x_9
%27 = OpCompositeExtract %int %25 0
OpBranch %28
%28 = OpLabel
OpLoopMerge %29 %30 None
OpBranch %31
%31 = OpLabel
OpStore %x_GLF_color %33
%35 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0
%36 = OpLoad %int %35
%37 = OpAccessChain %_ptr_Function_int %x_9 %36
%38 = OpLoad %int %37
%39 = OpIEqual %bool %38 %27
OpSelectionMerge %41 None
OpBranchConditional %39 %42 %41
%42 = OpLabel
OpStore %x_10_phi %int_1
OpBranch %29
%41 = OpLabel
OpStore %x_10_phi %int_2
OpBranch %29
%30 = OpLabel
OpBranch %28
%29 = OpLabel
%45 = OpLoad %int %x_10_phi
%46 = OpIEqual %bool %45 %int_1
OpSelectionMerge %47 None
OpBranchConditional %46 %47 %48
%48 = OpLabel
%49 = OpIEqual %bool %45 %int_2
OpBranch %47
%47 = OpLabel
%50 = OpPhi %bool %46 %29 %49 %48
OpSelectionMerge %51 None
OpBranchConditional %50 %52 %53
%52 = OpLabel
OpStore %x_GLF_color %55
OpBranch %51
%53 = OpLabel
OpStore %x_GLF_color %33
OpBranch %51
%51 = OpLabel
OpReturn
OpFunctionEnd
%main_inner = OpFunction %main_out None %56
%59 = OpLabel
%60 = OpFunctionCall %void %main_1
%61 = OpLoad %v4float %x_GLF_color
%62 = OpCompositeConstruct %main_out %61
OpReturnValue %62
OpFunctionEnd
%main = OpFunction %void None %12
%64 = OpLabel
%65 = OpFunctionCall %main_out %main_inner
%66 = OpCompositeExtract %v4float %65 0
OpStore %x_GLF_color_1_1 %66
OpReturn
OpFunctionEnd

View File

@@ -1,44 +0,0 @@
[[block]]
struct buf0 {
zero : i32;
};
var<private> x_GLF_color : vec4<f32>;
[[group(0), binding(0)]] var<uniform> x_5 : buf0;
fn main_1() {
var x_9 : array<i32, 1>;
var x_10_phi : i32;
let x_33 : array<i32, 1> = x_9;
let x_6 : i32 = x_33[0u];
loop {
x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0);
let x_7 : i32 = x_5.zero;
let x_8 : i32 = x_9[x_7];
if ((x_8 == x_6)) {
x_10_phi = 1;
break;
}
x_10_phi = 2;
break;
}
let x_10 : i32 = x_10_phi;
if (((x_10 == 1) || (x_10 == 2))) {
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;
}
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);
}