mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-16 08:27:05 +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,49 +0,0 @@
|
||||
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);
|
||||
|
||||
float4 func_() {
|
||||
float x = 0.0f;
|
||||
x = 1.0f;
|
||||
const float x_30 = gl_FragCoord.x;
|
||||
if ((x_30 < 0.0f)) {
|
||||
x = 0.5f;
|
||||
}
|
||||
return float4(x, 0.0f, 0.0f, 1.0f);
|
||||
}
|
||||
|
||||
void main_1() {
|
||||
x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
while (true) {
|
||||
const float4 x_26 = func_();
|
||||
x_GLF_color = x_26;
|
||||
if (false) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
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_3 = {x_GLF_color};
|
||||
return tint_symbol_3;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct main_out {
|
||||
float4 x_GLF_color_1;
|
||||
};
|
||||
struct tint_symbol_1 {
|
||||
float4 x_GLF_color_1 [[color(0)]];
|
||||
};
|
||||
|
||||
float4 func_(thread float4* const tint_symbol_3) {
|
||||
float x = 0.0f;
|
||||
x = 1.0f;
|
||||
float const x_30 = (*(tint_symbol_3)).x;
|
||||
if ((x_30 < 0.0f)) {
|
||||
x = 0.5f;
|
||||
}
|
||||
float const x_34 = x;
|
||||
return float4(x_34, 0.0f, 0.0f, 1.0f);
|
||||
}
|
||||
|
||||
void main_1(thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
|
||||
*(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
while (true) {
|
||||
float4 const x_26 = func_(tint_symbol_5);
|
||||
*(tint_symbol_4) = x_26;
|
||||
if (false) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
|
||||
*(tint_symbol_6) = gl_FragCoord_param;
|
||||
main_1(tint_symbol_7, tint_symbol_6);
|
||||
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]]) {
|
||||
thread float4 tint_symbol_8 = 0.0f;
|
||||
thread float4 tint_symbol_9 = 0.0f;
|
||||
main_out const inner_result = tint_symbol_inner(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;
|
||||
}
|
||||
|
||||
@@ -1,107 +0,0 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 58
|
||||
; 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 %gl_FragCoord "gl_FragCoord"
|
||||
OpName %x_GLF_color "x_GLF_color"
|
||||
OpName %func_ "func_"
|
||||
OpName %x "x"
|
||||
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
|
||||
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
|
||||
%_ptr_Private_v4float = OpTypePointer Private %v4float
|
||||
%gl_FragCoord = OpVariable %_ptr_Private_v4float Private %7
|
||||
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %7
|
||||
%11 = OpTypeFunction %v4float
|
||||
%_ptr_Function_float = OpTypePointer Function %float
|
||||
%16 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%_ptr_Private_float = OpTypePointer Private %float
|
||||
%float_0 = OpConstant %float 0
|
||||
%bool = OpTypeBool
|
||||
%float_0_5 = OpConstant %float 0.5
|
||||
%void = OpTypeVoid
|
||||
%31 = OpTypeFunction %void
|
||||
%35 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
|
||||
%false = OpConstantFalse %bool
|
||||
%main_out = OpTypeStruct %v4float
|
||||
%45 = OpTypeFunction %main_out %v4float
|
||||
%func_ = OpFunction %v4float None %11
|
||||
%13 = OpLabel
|
||||
%x = OpVariable %_ptr_Function_float Function %16
|
||||
OpStore %x %float_1
|
||||
%21 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_0
|
||||
%22 = OpLoad %float %21
|
||||
%24 = OpFOrdLessThan %bool %22 %float_0
|
||||
OpSelectionMerge %26 None
|
||||
OpBranchConditional %24 %27 %26
|
||||
%27 = OpLabel
|
||||
OpStore %x %float_0_5
|
||||
OpBranch %26
|
||||
%26 = OpLabel
|
||||
%29 = OpLoad %float %x
|
||||
%30 = OpCompositeConstruct %v4float %29 %float_0 %float_0 %float_1
|
||||
OpReturnValue %30
|
||||
OpFunctionEnd
|
||||
%main_1 = OpFunction %void None %31
|
||||
%34 = OpLabel
|
||||
OpStore %x_GLF_color %35
|
||||
OpBranch %36
|
||||
%36 = OpLabel
|
||||
OpLoopMerge %37 %38 None
|
||||
OpBranch %39
|
||||
%39 = OpLabel
|
||||
%40 = OpFunctionCall %v4float %func_
|
||||
OpStore %x_GLF_color %40
|
||||
OpSelectionMerge %42 None
|
||||
OpBranchConditional %false %43 %44
|
||||
%43 = OpLabel
|
||||
OpBranch %42
|
||||
%44 = OpLabel
|
||||
OpBranch %37
|
||||
%42 = OpLabel
|
||||
OpBranch %38
|
||||
%38 = OpLabel
|
||||
OpBranch %36
|
||||
%37 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%main_inner = OpFunction %main_out None %45
|
||||
%gl_FragCoord_param = OpFunctionParameter %v4float
|
||||
%49 = OpLabel
|
||||
OpStore %gl_FragCoord %gl_FragCoord_param
|
||||
%50 = OpFunctionCall %void %main_1
|
||||
%51 = OpLoad %v4float %x_GLF_color
|
||||
%52 = OpCompositeConstruct %main_out %51
|
||||
OpReturnValue %52
|
||||
OpFunctionEnd
|
||||
%main = OpFunction %void None %31
|
||||
%54 = OpLabel
|
||||
%56 = OpLoad %v4float %gl_FragCoord_param_1
|
||||
%55 = OpFunctionCall %main_out %main_inner %56
|
||||
%57 = OpCompositeExtract %v4float %55 0
|
||||
OpStore %x_GLF_color_1_1 %57
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -1,39 +0,0 @@
|
||||
var<private> gl_FragCoord : vec4<f32>;
|
||||
|
||||
var<private> x_GLF_color : vec4<f32>;
|
||||
|
||||
fn func_() -> vec4<f32> {
|
||||
var x : f32;
|
||||
x = 1.0;
|
||||
let x_30 : f32 = gl_FragCoord.x;
|
||||
if ((x_30 < 0.0)) {
|
||||
x = 0.5;
|
||||
}
|
||||
let x_34 : f32 = x;
|
||||
return vec4<f32>(x_34, 0.0, 0.0, 1.0);
|
||||
}
|
||||
|
||||
fn main_1() {
|
||||
x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0);
|
||||
loop {
|
||||
let x_26 : vec4<f32> = func_();
|
||||
x_GLF_color = x_26;
|
||||
if (false) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
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);
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
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);
|
||||
|
||||
float4 func_() {
|
||||
float x = 0.0f;
|
||||
x = 1.0f;
|
||||
const float x_30 = gl_FragCoord.x;
|
||||
if ((x_30 < 0.0f)) {
|
||||
x = 0.5f;
|
||||
}
|
||||
return float4(x, 0.0f, 0.0f, 1.0f);
|
||||
}
|
||||
|
||||
void main_1() {
|
||||
x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
while (true) {
|
||||
const float4 x_26 = func_();
|
||||
x_GLF_color = x_26;
|
||||
if (false) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
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_3 = {x_GLF_color};
|
||||
return tint_symbol_3;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct main_out {
|
||||
float4 x_GLF_color_1;
|
||||
};
|
||||
struct tint_symbol_1 {
|
||||
float4 x_GLF_color_1 [[color(0)]];
|
||||
};
|
||||
|
||||
float4 func_(thread float4* const tint_symbol_3) {
|
||||
float x = 0.0f;
|
||||
x = 1.0f;
|
||||
float const x_30 = (*(tint_symbol_3)).x;
|
||||
if ((x_30 < 0.0f)) {
|
||||
x = 0.5f;
|
||||
}
|
||||
float const x_34 = x;
|
||||
return float4(x_34, 0.0f, 0.0f, 1.0f);
|
||||
}
|
||||
|
||||
void main_1(thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
|
||||
*(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
while (true) {
|
||||
float4 const x_26 = func_(tint_symbol_5);
|
||||
*(tint_symbol_4) = x_26;
|
||||
if (false) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
|
||||
*(tint_symbol_6) = gl_FragCoord_param;
|
||||
main_1(tint_symbol_7, tint_symbol_6);
|
||||
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]]) {
|
||||
thread float4 tint_symbol_8 = 0.0f;
|
||||
thread float4 tint_symbol_9 = 0.0f;
|
||||
main_out const inner_result = tint_symbol_inner(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;
|
||||
}
|
||||
|
||||
@@ -1,107 +0,0 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 58
|
||||
; 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 %gl_FragCoord "gl_FragCoord"
|
||||
OpName %x_GLF_color "x_GLF_color"
|
||||
OpName %func_ "func_"
|
||||
OpName %x "x"
|
||||
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
|
||||
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
|
||||
%_ptr_Private_v4float = OpTypePointer Private %v4float
|
||||
%gl_FragCoord = OpVariable %_ptr_Private_v4float Private %7
|
||||
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %7
|
||||
%11 = OpTypeFunction %v4float
|
||||
%_ptr_Function_float = OpTypePointer Function %float
|
||||
%16 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%_ptr_Private_float = OpTypePointer Private %float
|
||||
%float_0 = OpConstant %float 0
|
||||
%bool = OpTypeBool
|
||||
%float_0_5 = OpConstant %float 0.5
|
||||
%void = OpTypeVoid
|
||||
%31 = OpTypeFunction %void
|
||||
%35 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
|
||||
%false = OpConstantFalse %bool
|
||||
%main_out = OpTypeStruct %v4float
|
||||
%45 = OpTypeFunction %main_out %v4float
|
||||
%func_ = OpFunction %v4float None %11
|
||||
%13 = OpLabel
|
||||
%x = OpVariable %_ptr_Function_float Function %16
|
||||
OpStore %x %float_1
|
||||
%21 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_0
|
||||
%22 = OpLoad %float %21
|
||||
%24 = OpFOrdLessThan %bool %22 %float_0
|
||||
OpSelectionMerge %26 None
|
||||
OpBranchConditional %24 %27 %26
|
||||
%27 = OpLabel
|
||||
OpStore %x %float_0_5
|
||||
OpBranch %26
|
||||
%26 = OpLabel
|
||||
%29 = OpLoad %float %x
|
||||
%30 = OpCompositeConstruct %v4float %29 %float_0 %float_0 %float_1
|
||||
OpReturnValue %30
|
||||
OpFunctionEnd
|
||||
%main_1 = OpFunction %void None %31
|
||||
%34 = OpLabel
|
||||
OpStore %x_GLF_color %35
|
||||
OpBranch %36
|
||||
%36 = OpLabel
|
||||
OpLoopMerge %37 %38 None
|
||||
OpBranch %39
|
||||
%39 = OpLabel
|
||||
%40 = OpFunctionCall %v4float %func_
|
||||
OpStore %x_GLF_color %40
|
||||
OpSelectionMerge %42 None
|
||||
OpBranchConditional %false %43 %44
|
||||
%43 = OpLabel
|
||||
OpBranch %42
|
||||
%44 = OpLabel
|
||||
OpBranch %37
|
||||
%42 = OpLabel
|
||||
OpBranch %38
|
||||
%38 = OpLabel
|
||||
OpBranch %36
|
||||
%37 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%main_inner = OpFunction %main_out None %45
|
||||
%gl_FragCoord_param = OpFunctionParameter %v4float
|
||||
%49 = OpLabel
|
||||
OpStore %gl_FragCoord %gl_FragCoord_param
|
||||
%50 = OpFunctionCall %void %main_1
|
||||
%51 = OpLoad %v4float %x_GLF_color
|
||||
%52 = OpCompositeConstruct %main_out %51
|
||||
OpReturnValue %52
|
||||
OpFunctionEnd
|
||||
%main = OpFunction %void None %31
|
||||
%54 = OpLabel
|
||||
%56 = OpLoad %v4float %gl_FragCoord_param_1
|
||||
%55 = OpFunctionCall %main_out %main_inner %56
|
||||
%57 = OpCompositeExtract %v4float %55 0
|
||||
OpStore %x_GLF_color_1_1 %57
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -1,39 +0,0 @@
|
||||
var<private> gl_FragCoord : vec4<f32>;
|
||||
|
||||
var<private> x_GLF_color : vec4<f32>;
|
||||
|
||||
fn func_() -> vec4<f32> {
|
||||
var x : f32;
|
||||
x = 1.0;
|
||||
let x_30 : f32 = gl_FragCoord.x;
|
||||
if ((x_30 < 0.0)) {
|
||||
x = 0.5;
|
||||
}
|
||||
let x_34 : f32 = x;
|
||||
return vec4<f32>(x_34, 0.0, 0.0, 1.0);
|
||||
}
|
||||
|
||||
fn main_1() {
|
||||
x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0);
|
||||
loop {
|
||||
let x_26 : vec4<f32> = func_();
|
||||
x_GLF_color = x_26;
|
||||
if (false) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
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);
|
||||
}
|
||||
Reference in New Issue
Block a user