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,76 +0,0 @@
cbuffer cbuffer_x_7 : register(b0, space0) {
uint4 x_7[1];
};
static float4 gl_FragCoord = float4(0.0f, 0.0f, 0.0f, 0.0f);
static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
void f_() {
while (true) {
const float x_35 = asfloat(x_7[0].y);
if ((1.0f > x_35)) {
const float x_40 = gl_FragCoord.y;
if ((x_40 < 0.0f)) {
{
if (false) {
} else {
break;
}
}
continue;
} else {
{
if (false) {
} else {
break;
}
}
continue;
}
{
if (false) {
} else {
break;
}
}
continue;
}
discard;
{
if (false) {
} else {
break;
}
}
}
return;
}
void main_1() {
f_();
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
return;
}
struct main_out {
float4 x_GLF_color_1;
};
struct tint_symbol_1 {
float4 gl_FragCoord_param : SV_Position;
};
struct tint_symbol_2 {
float4 x_GLF_color_1 : SV_Target0;
};
main_out main_inner(float4 gl_FragCoord_param) {
gl_FragCoord = gl_FragCoord_param;
main_1();
const main_out tint_symbol_4 = {x_GLF_color};
return tint_symbol_4;
}
tint_symbol_2 main(tint_symbol_1 tint_symbol) {
const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
tint_symbol_2 wrapper_result = (tint_symbol_2)0;
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
return wrapper_result;
}

View File

@@ -1,76 +0,0 @@
#include <metal_stdlib>
using namespace metal;
struct buf0 {
/* 0x0000 */ float2 injectionSwitch;
};
struct main_out {
float4 x_GLF_color_1;
};
struct tint_symbol_1 {
float4 x_GLF_color_1 [[color(0)]];
};
void f_(constant buf0& x_7, thread float4* const tint_symbol_3) {
while (true) {
float const x_35 = x_7.injectionSwitch.y;
if ((1.0f > x_35)) {
float const x_40 = (*(tint_symbol_3)).y;
if ((x_40 < 0.0f)) {
{
if (false) {
} else {
break;
}
}
continue;
} else {
{
if (false) {
} else {
break;
}
}
continue;
}
{
if (false) {
} else {
break;
}
}
continue;
}
discard_fragment();
{
if (false) {
} else {
break;
}
}
}
return;
}
void main_1(constant buf0& x_7, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
f_(x_7, tint_symbol_4);
*(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
return;
}
main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
*(tint_symbol_6) = gl_FragCoord_param;
main_1(x_7, tint_symbol_6, tint_symbol_7);
main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)};
return tint_symbol_2;
}
fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
thread float4 tint_symbol_8 = 0.0f;
thread float4 tint_symbol_9 = 0.0f;
main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
tint_symbol_1 wrapper_result = {};
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
return wrapper_result;
}

View File

@@ -1,113 +0,0 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 60
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %gl_FragCoord_param_1 %x_GLF_color_1_1
OpExecutionMode %main OriginUpperLeft
OpName %gl_FragCoord_param_1 "gl_FragCoord_param_1"
OpName %x_GLF_color_1_1 "x_GLF_color_1_1"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "injectionSwitch"
OpName %x_7 "x_7"
OpName %gl_FragCoord "gl_FragCoord"
OpName %x_GLF_color "x_GLF_color"
OpName %f_ "f_"
OpName %main_1 "main_1"
OpName %main_out "main_out"
OpMemberName %main_out 0 "x_GLF_color_1"
OpName %main_inner "main_inner"
OpName %gl_FragCoord_param "gl_FragCoord_param"
OpName %main "main"
OpDecorate %gl_FragCoord_param_1 BuiltIn FragCoord
OpDecorate %x_GLF_color_1_1 Location 0
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %x_7 NonWritable
OpDecorate %x_7 DescriptorSet 0
OpDecorate %x_7 Binding 0
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Input_v4float = OpTypePointer Input %v4float
%gl_FragCoord_param_1 = OpVariable %_ptr_Input_v4float Input
%_ptr_Output_v4float = OpTypePointer Output %v4float
%7 = OpConstantNull %v4float
%x_GLF_color_1_1 = OpVariable %_ptr_Output_v4float Output %7
%v2float = OpTypeVector %float 2
%buf0 = OpTypeStruct %v2float
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_7 = OpVariable %_ptr_Uniform_buf0 Uniform
%_ptr_Private_v4float = OpTypePointer Private %v4float
%gl_FragCoord = OpVariable %_ptr_Private_v4float Private %7
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %7
%void = OpTypeVoid
%15 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%uint_1 = OpConstant %uint 1
%_ptr_Uniform_float = OpTypePointer Uniform %float
%float_1 = OpConstant %float 1
%bool = OpTypeBool
%_ptr_Private_float = OpTypePointer Private %float
%float_0 = OpConstant %float 0
%false = OpConstantFalse %bool
%46 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%main_out = OpTypeStruct %v4float
%47 = OpTypeFunction %main_out %v4float
%f_ = OpFunction %void None %15
%18 = OpLabel
OpBranch %19
%19 = OpLabel
OpLoopMerge %20 %21 None
OpBranch %22
%22 = OpLabel
%27 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %uint_1
%28 = OpLoad %float %27
%30 = OpFOrdGreaterThan %bool %float_1 %28
OpSelectionMerge %32 None
OpBranchConditional %30 %33 %32
%33 = OpLabel
%35 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%36 = OpLoad %float %35
%38 = OpFOrdLessThan %bool %36 %float_0
OpSelectionMerge %39 None
OpBranchConditional %38 %40 %41
%40 = OpLabel
OpBranch %21
%41 = OpLabel
OpBranch %21
%39 = OpLabel
OpBranch %21
%32 = OpLabel
OpKill
%21 = OpLabel
OpBranchConditional %false %19 %20
%20 = OpLabel
OpReturn
OpFunctionEnd
%main_1 = OpFunction %void None %15
%44 = OpLabel
%45 = OpFunctionCall %void %f_
OpStore %x_GLF_color %46
OpReturn
OpFunctionEnd
%main_inner = OpFunction %main_out None %47
%gl_FragCoord_param = OpFunctionParameter %v4float
%51 = OpLabel
OpStore %gl_FragCoord %gl_FragCoord_param
%52 = OpFunctionCall %void %main_1
%53 = OpLoad %v4float %x_GLF_color
%54 = OpCompositeConstruct %main_out %53
OpReturnValue %54
OpFunctionEnd
%main = OpFunction %void None %15
%56 = OpLabel
%58 = OpLoad %v4float %gl_FragCoord_param_1
%57 = OpFunctionCall %main_out %main_inner %58
%59 = OpCompositeExtract %v4float %57 0
OpStore %x_GLF_color_1_1 %59
OpReturn
OpFunctionEnd

View File

@@ -1,52 +0,0 @@
[[block]]
struct buf0 {
injectionSwitch : vec2<f32>;
};
[[group(0), binding(0)]] var<uniform> x_7 : buf0;
var<private> gl_FragCoord : vec4<f32>;
var<private> x_GLF_color : vec4<f32>;
fn f_() {
loop {
let x_35 : f32 = x_7.injectionSwitch.y;
if ((1.0 > x_35)) {
let x_40 : f32 = gl_FragCoord.y;
if ((x_40 < 0.0)) {
continue;
} else {
continue;
}
continue;
}
discard;
continuing {
if (false) {
} else {
break;
}
}
}
return;
}
fn main_1() {
f_();
x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0);
return;
}
struct main_out {
[[location(0)]]
x_GLF_color_1 : vec4<f32>;
};
[[stage(fragment)]]
fn main([[builtin(position)]] gl_FragCoord_param : vec4<f32>) -> main_out {
gl_FragCoord = gl_FragCoord_param;
main_1();
return main_out(x_GLF_color);
}

View File

@@ -1,76 +0,0 @@
cbuffer cbuffer_x_7 : register(b0, space0) {
uint4 x_7[1];
};
static float4 gl_FragCoord = float4(0.0f, 0.0f, 0.0f, 0.0f);
static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
void f_() {
while (true) {
const float x_35 = asfloat(x_7[0].y);
if ((1.0f > x_35)) {
const float x_40 = gl_FragCoord.y;
if ((x_40 < 0.0f)) {
{
if (false) {
} else {
break;
}
}
continue;
} else {
{
if (false) {
} else {
break;
}
}
continue;
}
{
if (false) {
} else {
break;
}
}
continue;
}
discard;
{
if (false) {
} else {
break;
}
}
}
return;
}
void main_1() {
f_();
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
return;
}
struct main_out {
float4 x_GLF_color_1;
};
struct tint_symbol_1 {
float4 gl_FragCoord_param : SV_Position;
};
struct tint_symbol_2 {
float4 x_GLF_color_1 : SV_Target0;
};
main_out main_inner(float4 gl_FragCoord_param) {
gl_FragCoord = gl_FragCoord_param;
main_1();
const main_out tint_symbol_4 = {x_GLF_color};
return tint_symbol_4;
}
tint_symbol_2 main(tint_symbol_1 tint_symbol) {
const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
tint_symbol_2 wrapper_result = (tint_symbol_2)0;
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
return wrapper_result;
}

View File

@@ -1,76 +0,0 @@
#include <metal_stdlib>
using namespace metal;
struct buf0 {
/* 0x0000 */ float2 injectionSwitch;
};
struct main_out {
float4 x_GLF_color_1;
};
struct tint_symbol_1 {
float4 x_GLF_color_1 [[color(0)]];
};
void f_(constant buf0& x_7, thread float4* const tint_symbol_3) {
while (true) {
float const x_35 = x_7.injectionSwitch.y;
if ((1.0f > x_35)) {
float const x_40 = (*(tint_symbol_3)).y;
if ((x_40 < 0.0f)) {
{
if (false) {
} else {
break;
}
}
continue;
} else {
{
if (false) {
} else {
break;
}
}
continue;
}
{
if (false) {
} else {
break;
}
}
continue;
}
discard_fragment();
{
if (false) {
} else {
break;
}
}
}
return;
}
void main_1(constant buf0& x_7, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
f_(x_7, tint_symbol_4);
*(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
return;
}
main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
*(tint_symbol_6) = gl_FragCoord_param;
main_1(x_7, tint_symbol_6, tint_symbol_7);
main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)};
return tint_symbol_2;
}
fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
thread float4 tint_symbol_8 = 0.0f;
thread float4 tint_symbol_9 = 0.0f;
main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
tint_symbol_1 wrapper_result = {};
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
return wrapper_result;
}

View File

@@ -1,113 +0,0 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 60
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %gl_FragCoord_param_1 %x_GLF_color_1_1
OpExecutionMode %main OriginUpperLeft
OpName %gl_FragCoord_param_1 "gl_FragCoord_param_1"
OpName %x_GLF_color_1_1 "x_GLF_color_1_1"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "injectionSwitch"
OpName %x_7 "x_7"
OpName %gl_FragCoord "gl_FragCoord"
OpName %x_GLF_color "x_GLF_color"
OpName %f_ "f_"
OpName %main_1 "main_1"
OpName %main_out "main_out"
OpMemberName %main_out 0 "x_GLF_color_1"
OpName %main_inner "main_inner"
OpName %gl_FragCoord_param "gl_FragCoord_param"
OpName %main "main"
OpDecorate %gl_FragCoord_param_1 BuiltIn FragCoord
OpDecorate %x_GLF_color_1_1 Location 0
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %x_7 NonWritable
OpDecorate %x_7 DescriptorSet 0
OpDecorate %x_7 Binding 0
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Input_v4float = OpTypePointer Input %v4float
%gl_FragCoord_param_1 = OpVariable %_ptr_Input_v4float Input
%_ptr_Output_v4float = OpTypePointer Output %v4float
%7 = OpConstantNull %v4float
%x_GLF_color_1_1 = OpVariable %_ptr_Output_v4float Output %7
%v2float = OpTypeVector %float 2
%buf0 = OpTypeStruct %v2float
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_7 = OpVariable %_ptr_Uniform_buf0 Uniform
%_ptr_Private_v4float = OpTypePointer Private %v4float
%gl_FragCoord = OpVariable %_ptr_Private_v4float Private %7
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %7
%void = OpTypeVoid
%15 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%uint_1 = OpConstant %uint 1
%_ptr_Uniform_float = OpTypePointer Uniform %float
%float_1 = OpConstant %float 1
%bool = OpTypeBool
%_ptr_Private_float = OpTypePointer Private %float
%float_0 = OpConstant %float 0
%false = OpConstantFalse %bool
%46 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%main_out = OpTypeStruct %v4float
%47 = OpTypeFunction %main_out %v4float
%f_ = OpFunction %void None %15
%18 = OpLabel
OpBranch %19
%19 = OpLabel
OpLoopMerge %20 %21 None
OpBranch %22
%22 = OpLabel
%27 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %uint_1
%28 = OpLoad %float %27
%30 = OpFOrdGreaterThan %bool %float_1 %28
OpSelectionMerge %32 None
OpBranchConditional %30 %33 %32
%33 = OpLabel
%35 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%36 = OpLoad %float %35
%38 = OpFOrdLessThan %bool %36 %float_0
OpSelectionMerge %39 None
OpBranchConditional %38 %40 %41
%40 = OpLabel
OpBranch %21
%41 = OpLabel
OpBranch %21
%39 = OpLabel
OpBranch %21
%32 = OpLabel
OpKill
%21 = OpLabel
OpBranchConditional %false %19 %20
%20 = OpLabel
OpReturn
OpFunctionEnd
%main_1 = OpFunction %void None %15
%44 = OpLabel
%45 = OpFunctionCall %void %f_
OpStore %x_GLF_color %46
OpReturn
OpFunctionEnd
%main_inner = OpFunction %main_out None %47
%gl_FragCoord_param = OpFunctionParameter %v4float
%51 = OpLabel
OpStore %gl_FragCoord %gl_FragCoord_param
%52 = OpFunctionCall %void %main_1
%53 = OpLoad %v4float %x_GLF_color
%54 = OpCompositeConstruct %main_out %53
OpReturnValue %54
OpFunctionEnd
%main = OpFunction %void None %15
%56 = OpLabel
%58 = OpLoad %v4float %gl_FragCoord_param_1
%57 = OpFunctionCall %main_out %main_inner %58
%59 = OpCompositeExtract %v4float %57 0
OpStore %x_GLF_color_1_1 %59
OpReturn
OpFunctionEnd

View File

@@ -1,52 +0,0 @@
[[block]]
struct buf0 {
injectionSwitch : vec2<f32>;
};
[[group(0), binding(0)]] var<uniform> x_7 : buf0;
var<private> gl_FragCoord : vec4<f32>;
var<private> x_GLF_color : vec4<f32>;
fn f_() {
loop {
let x_35 : f32 = x_7.injectionSwitch.y;
if ((1.0 > x_35)) {
let x_40 : f32 = gl_FragCoord.y;
if ((x_40 < 0.0)) {
continue;
} else {
continue;
}
continue;
}
discard;
continuing {
if (false) {
} else {
break;
}
}
}
return;
}
fn main_1() {
f_();
x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0);
return;
}
struct main_out {
[[location(0)]]
x_GLF_color_1 : vec4<f32>;
};
[[stage(fragment)]]
fn main([[builtin(position)]] gl_FragCoord_param : vec4<f32>) -> main_out {
gl_FragCoord = gl_FragCoord_param;
main_1();
return main_out(x_GLF_color);
}