mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-17 17:05:31 +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,73 +0,0 @@
|
||||
void set_float4(inout float4 vec, int idx, float val) {
|
||||
vec = (idx.xxxx == int4(0, 1, 2, 3)) ? val.xxxx : vec;
|
||||
}
|
||||
|
||||
cbuffer cbuffer_x_6 : register(b0, space0) {
|
||||
uint4 x_6[1];
|
||||
};
|
||||
static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
|
||||
void main_1() {
|
||||
int k = 0;
|
||||
int GLF_dead0j = 0;
|
||||
int donor_replacementGLF_dead0stack[10] = (int[10])0;
|
||||
int donor_replacementGLF_dead0top = 0;
|
||||
int x_54 = 0;
|
||||
float4 matrix_b = float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
int b = 0;
|
||||
k = 0;
|
||||
{
|
||||
for(; (k < 4); k = (k + 1)) {
|
||||
const float x_62 = asfloat(x_6[0].y);
|
||||
if ((0.0f > x_62)) {
|
||||
GLF_dead0j = 1;
|
||||
while (true) {
|
||||
const int x_13 = donor_replacementGLF_dead0stack[0];
|
||||
if ((1 <= x_13)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (((donor_replacementGLF_dead0top >= 0) & (donor_replacementGLF_dead0top < 9))) {
|
||||
const int x_17 = (donor_replacementGLF_dead0top + 1);
|
||||
donor_replacementGLF_dead0top = x_17;
|
||||
x_54 = x_17;
|
||||
} else {
|
||||
x_54 = 0;
|
||||
}
|
||||
donor_replacementGLF_dead0stack[x_54] = 1;
|
||||
}
|
||||
matrix_b = float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
b = 3;
|
||||
{
|
||||
for(; (b >= 0); b = (b - 1)) {
|
||||
const int x_20 = b;
|
||||
const float x_87 = matrix_b[b];
|
||||
set_float4(matrix_b, x_20, (x_87 - 1.0f));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.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;
|
||||
}
|
||||
@@ -1,94 +0,0 @@
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct buf0 {
|
||||
/* 0x0000 */ float2 injectionSwitch;
|
||||
};
|
||||
struct tint_array_wrapper {
|
||||
int arr[10];
|
||||
};
|
||||
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_6, thread float4* const tint_symbol_3) {
|
||||
int k = 0;
|
||||
int GLF_dead0j = 0;
|
||||
tint_array_wrapper donor_replacementGLF_dead0stack = {};
|
||||
int donor_replacementGLF_dead0top = 0;
|
||||
int x_54 = 0;
|
||||
float4 matrix_b = 0.0f;
|
||||
int b = 0;
|
||||
k = 0;
|
||||
while (true) {
|
||||
int const x_12 = k;
|
||||
if ((x_12 < 4)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
float const x_62 = x_6.injectionSwitch.y;
|
||||
if ((0.0f > x_62)) {
|
||||
GLF_dead0j = 1;
|
||||
while (true) {
|
||||
int const x_13 = donor_replacementGLF_dead0stack.arr[0];
|
||||
if ((1 <= x_13)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
int const x_14 = donor_replacementGLF_dead0top;
|
||||
int const x_15 = donor_replacementGLF_dead0top;
|
||||
if (((x_14 >= 0) & (x_15 < 9))) {
|
||||
int const x_16 = donor_replacementGLF_dead0top;
|
||||
int const x_17 = as_type<int>((as_type<uint>(x_16) + as_type<uint>(1)));
|
||||
donor_replacementGLF_dead0top = x_17;
|
||||
x_54 = x_17;
|
||||
} else {
|
||||
x_54 = 0;
|
||||
}
|
||||
int const x_18 = x_54;
|
||||
donor_replacementGLF_dead0stack.arr[x_18] = 1;
|
||||
}
|
||||
matrix_b = float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
b = 3;
|
||||
while (true) {
|
||||
int const x_19 = b;
|
||||
if ((x_19 >= 0)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
int const x_20 = b;
|
||||
int const x_21 = b;
|
||||
float const x_87 = matrix_b[x_21];
|
||||
matrix_b[x_20] = (x_87 - 1.0f);
|
||||
{
|
||||
int const x_22 = b;
|
||||
b = as_type<int>((as_type<uint>(x_22) - as_type<uint>(1)));
|
||||
}
|
||||
}
|
||||
{
|
||||
int const x_24 = k;
|
||||
k = as_type<int>((as_type<uint>(x_24) + as_type<uint>(1)));
|
||||
}
|
||||
}
|
||||
*(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
|
||||
return;
|
||||
}
|
||||
|
||||
main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
|
||||
main_1(x_6, 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_6 [[buffer(0)]]) {
|
||||
thread float4 tint_symbol_5 = 0.0f;
|
||||
main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
|
||||
tint_symbol_1 wrapper_result = {};
|
||||
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
@@ -1,198 +0,0 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 112
|
||||
; 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 %buf0 "buf0"
|
||||
OpMemberName %buf0 0 "injectionSwitch"
|
||||
OpName %x_6 "x_6"
|
||||
OpName %x_GLF_color "x_GLF_color"
|
||||
OpName %main_1 "main_1"
|
||||
OpName %k "k"
|
||||
OpName %GLF_dead0j "GLF_dead0j"
|
||||
OpName %donor_replacementGLF_dead0stack "donor_replacementGLF_dead0stack"
|
||||
OpName %donor_replacementGLF_dead0top "donor_replacementGLF_dead0top"
|
||||
OpName %x_54 "x_54"
|
||||
OpName %matrix_b "matrix_b"
|
||||
OpName %b "b"
|
||||
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_6 NonWritable
|
||||
OpDecorate %x_6 DescriptorSet 0
|
||||
OpDecorate %x_6 Binding 0
|
||||
OpDecorate %_arr_int_uint_10 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
|
||||
%v2float = OpTypeVector %float 2
|
||||
%buf0 = OpTypeStruct %v2float
|
||||
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
|
||||
%x_6 = OpVariable %_ptr_Uniform_buf0 Uniform
|
||||
%_ptr_Private_v4float = OpTypePointer Private %v4float
|
||||
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %5
|
||||
%void = OpTypeVoid
|
||||
%12 = OpTypeFunction %void
|
||||
%int = OpTypeInt 32 1
|
||||
%_ptr_Function_int = OpTypePointer Function %int
|
||||
%19 = OpConstantNull %int
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_10 = OpConstant %uint 10
|
||||
%_arr_int_uint_10 = OpTypeArray %int %uint_10
|
||||
%_ptr_Function__arr_int_uint_10 = OpTypePointer Function %_arr_int_uint_10
|
||||
%26 = OpConstantNull %_arr_int_uint_10
|
||||
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
||||
%int_0 = OpConstant %int 0
|
||||
%int_4 = OpConstant %int 4
|
||||
%bool = OpTypeBool
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%uint_1 = OpConstant %uint 1
|
||||
%_ptr_Uniform_float = OpTypePointer Uniform %float
|
||||
%float_0 = OpConstant %float 0
|
||||
%int_1 = OpConstant %int 1
|
||||
%int_9 = OpConstant %int 9
|
||||
%77 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
|
||||
%int_3 = OpConstant %int 3
|
||||
%_ptr_Function_float = OpTypePointer Function %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%100 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
|
||||
%main_out = OpTypeStruct %v4float
|
||||
%101 = OpTypeFunction %main_out
|
||||
%main_1 = OpFunction %void None %12
|
||||
%15 = OpLabel
|
||||
%k = OpVariable %_ptr_Function_int Function %19
|
||||
%GLF_dead0j = OpVariable %_ptr_Function_int Function %19
|
||||
%donor_replacementGLF_dead0stack = OpVariable %_ptr_Function__arr_int_uint_10 Function %26
|
||||
%donor_replacementGLF_dead0top = OpVariable %_ptr_Function_int Function %19
|
||||
%x_54 = OpVariable %_ptr_Function_int Function %19
|
||||
%matrix_b = OpVariable %_ptr_Function_v4float Function %5
|
||||
%b = OpVariable %_ptr_Function_int Function %19
|
||||
OpStore %k %int_0
|
||||
OpBranch %33
|
||||
%33 = OpLabel
|
||||
OpLoopMerge %34 %35 None
|
||||
OpBranch %36
|
||||
%36 = OpLabel
|
||||
%37 = OpLoad %int %k
|
||||
%39 = OpSLessThan %bool %37 %int_4
|
||||
OpSelectionMerge %41 None
|
||||
OpBranchConditional %39 %42 %43
|
||||
%42 = OpLabel
|
||||
OpBranch %41
|
||||
%43 = OpLabel
|
||||
OpBranch %34
|
||||
%41 = OpLabel
|
||||
%47 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %uint_1
|
||||
%48 = OpLoad %float %47
|
||||
%50 = OpFOrdGreaterThan %bool %float_0 %48
|
||||
OpSelectionMerge %51 None
|
||||
OpBranchConditional %50 %52 %51
|
||||
%52 = OpLabel
|
||||
OpStore %GLF_dead0j %int_1
|
||||
OpBranch %54
|
||||
%54 = OpLabel
|
||||
OpLoopMerge %55 %56 None
|
||||
OpBranch %57
|
||||
%57 = OpLabel
|
||||
%58 = OpAccessChain %_ptr_Function_int %donor_replacementGLF_dead0stack %int_0
|
||||
%59 = OpLoad %int %58
|
||||
%60 = OpSLessThanEqual %bool %int_1 %59
|
||||
OpSelectionMerge %61 None
|
||||
OpBranchConditional %60 %62 %63
|
||||
%62 = OpLabel
|
||||
OpBranch %61
|
||||
%63 = OpLabel
|
||||
OpBranch %55
|
||||
%61 = OpLabel
|
||||
OpBranch %56
|
||||
%56 = OpLabel
|
||||
OpBranch %54
|
||||
%55 = OpLabel
|
||||
%64 = OpLoad %int %donor_replacementGLF_dead0top
|
||||
%65 = OpLoad %int %donor_replacementGLF_dead0top
|
||||
%66 = OpSGreaterThanEqual %bool %64 %int_0
|
||||
%68 = OpSLessThan %bool %65 %int_9
|
||||
%69 = OpLogicalAnd %bool %66 %68
|
||||
OpSelectionMerge %70 None
|
||||
OpBranchConditional %69 %71 %72
|
||||
%71 = OpLabel
|
||||
%73 = OpLoad %int %donor_replacementGLF_dead0top
|
||||
%74 = OpIAdd %int %73 %int_1
|
||||
OpStore %donor_replacementGLF_dead0top %74
|
||||
OpStore %x_54 %74
|
||||
OpBranch %70
|
||||
%72 = OpLabel
|
||||
OpStore %x_54 %int_0
|
||||
OpBranch %70
|
||||
%70 = OpLabel
|
||||
%75 = OpLoad %int %x_54
|
||||
%76 = OpAccessChain %_ptr_Function_int %donor_replacementGLF_dead0stack %75
|
||||
OpStore %76 %int_1
|
||||
OpBranch %51
|
||||
%51 = OpLabel
|
||||
OpStore %matrix_b %77
|
||||
OpStore %b %int_3
|
||||
OpBranch %79
|
||||
%79 = OpLabel
|
||||
OpLoopMerge %80 %81 None
|
||||
OpBranch %82
|
||||
%82 = OpLabel
|
||||
%83 = OpLoad %int %b
|
||||
%84 = OpSGreaterThanEqual %bool %83 %int_0
|
||||
OpSelectionMerge %85 None
|
||||
OpBranchConditional %84 %86 %87
|
||||
%86 = OpLabel
|
||||
OpBranch %85
|
||||
%87 = OpLabel
|
||||
OpBranch %80
|
||||
%85 = OpLabel
|
||||
%88 = OpLoad %int %b
|
||||
%89 = OpLoad %int %b
|
||||
%91 = OpAccessChain %_ptr_Function_float %matrix_b %89
|
||||
%92 = OpLoad %float %91
|
||||
%93 = OpAccessChain %_ptr_Function_float %matrix_b %88
|
||||
%95 = OpFSub %float %92 %float_1
|
||||
OpStore %93 %95
|
||||
OpBranch %81
|
||||
%81 = OpLabel
|
||||
%96 = OpLoad %int %b
|
||||
%97 = OpISub %int %96 %int_1
|
||||
OpStore %b %97
|
||||
OpBranch %79
|
||||
%80 = OpLabel
|
||||
OpBranch %35
|
||||
%35 = OpLabel
|
||||
%98 = OpLoad %int %k
|
||||
%99 = OpIAdd %int %98 %int_1
|
||||
OpStore %k %99
|
||||
OpBranch %33
|
||||
%34 = OpLabel
|
||||
OpStore %x_GLF_color %100
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%main_inner = OpFunction %main_out None %101
|
||||
%104 = OpLabel
|
||||
%105 = OpFunctionCall %void %main_1
|
||||
%106 = OpLoad %v4float %x_GLF_color
|
||||
%107 = OpCompositeConstruct %main_out %106
|
||||
OpReturnValue %107
|
||||
OpFunctionEnd
|
||||
%main = OpFunction %void None %12
|
||||
%109 = OpLabel
|
||||
%110 = OpFunctionCall %main_out %main_inner
|
||||
%111 = OpCompositeExtract %v4float %110 0
|
||||
OpStore %x_GLF_color_1_1 %111
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -1,85 +0,0 @@
|
||||
[[block]]
|
||||
struct buf0 {
|
||||
injectionSwitch : vec2<f32>;
|
||||
};
|
||||
|
||||
[[group(0), binding(0)]] var<uniform> x_6 : buf0;
|
||||
|
||||
var<private> x_GLF_color : vec4<f32>;
|
||||
|
||||
fn main_1() {
|
||||
var k : i32;
|
||||
var GLF_dead0j : i32;
|
||||
var donor_replacementGLF_dead0stack : array<i32, 10>;
|
||||
var donor_replacementGLF_dead0top : i32;
|
||||
var x_54 : i32;
|
||||
var matrix_b : vec4<f32>;
|
||||
var b : i32;
|
||||
k = 0;
|
||||
loop {
|
||||
let x_12 : i32 = k;
|
||||
if ((x_12 < 4)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
let x_62 : f32 = x_6.injectionSwitch.y;
|
||||
if ((0.0 > x_62)) {
|
||||
GLF_dead0j = 1;
|
||||
loop {
|
||||
let x_13 : i32 = donor_replacementGLF_dead0stack[0];
|
||||
if ((1 <= x_13)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
let x_14 : i32 = donor_replacementGLF_dead0top;
|
||||
let x_15 : i32 = donor_replacementGLF_dead0top;
|
||||
if (((x_14 >= 0) & (x_15 < 9))) {
|
||||
let x_16 : i32 = donor_replacementGLF_dead0top;
|
||||
let x_17 : i32 = (x_16 + 1);
|
||||
donor_replacementGLF_dead0top = x_17;
|
||||
x_54 = x_17;
|
||||
} else {
|
||||
x_54 = 0;
|
||||
}
|
||||
let x_18 : i32 = x_54;
|
||||
donor_replacementGLF_dead0stack[x_18] = 1;
|
||||
}
|
||||
matrix_b = vec4<f32>(0.0, 0.0, 0.0, 0.0);
|
||||
b = 3;
|
||||
loop {
|
||||
let x_19 : i32 = b;
|
||||
if ((x_19 >= 0)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
let x_20 : i32 = b;
|
||||
let x_21 : i32 = b;
|
||||
let x_87 : f32 = matrix_b[x_21];
|
||||
matrix_b[x_20] = (x_87 - 1.0);
|
||||
|
||||
continuing {
|
||||
let x_22 : i32 = b;
|
||||
b = (x_22 - 1);
|
||||
}
|
||||
}
|
||||
|
||||
continuing {
|
||||
let x_24 : i32 = k;
|
||||
k = (x_24 + 1);
|
||||
}
|
||||
}
|
||||
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() -> main_out {
|
||||
main_1();
|
||||
return main_out(x_GLF_color);
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
void set_float4(inout float4 vec, int idx, float val) {
|
||||
vec = (idx.xxxx == int4(0, 1, 2, 3)) ? val.xxxx : vec;
|
||||
}
|
||||
|
||||
cbuffer cbuffer_x_6 : register(b0, space0) {
|
||||
uint4 x_6[1];
|
||||
};
|
||||
static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
|
||||
void main_1() {
|
||||
int k = 0;
|
||||
int GLF_dead0j = 0;
|
||||
int donor_replacementGLF_dead0stack[10] = (int[10])0;
|
||||
int donor_replacementGLF_dead0top = 0;
|
||||
int x_54 = 0;
|
||||
float4 matrix_b = float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
int b = 0;
|
||||
k = 0;
|
||||
{
|
||||
for(; (k < 4); k = (k + 1)) {
|
||||
const float x_62 = asfloat(x_6[0].y);
|
||||
if ((0.0f > x_62)) {
|
||||
GLF_dead0j = 1;
|
||||
while (true) {
|
||||
const int x_13 = donor_replacementGLF_dead0stack[0];
|
||||
if ((1 <= x_13)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
bool tint_tmp = (donor_replacementGLF_dead0top >= 0);
|
||||
if (tint_tmp) {
|
||||
tint_tmp = (donor_replacementGLF_dead0top < 9);
|
||||
}
|
||||
if ((tint_tmp)) {
|
||||
const int x_17 = (donor_replacementGLF_dead0top + 1);
|
||||
donor_replacementGLF_dead0top = x_17;
|
||||
x_54 = x_17;
|
||||
} else {
|
||||
x_54 = 0;
|
||||
}
|
||||
donor_replacementGLF_dead0stack[x_54] = 1;
|
||||
}
|
||||
matrix_b = float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
b = 3;
|
||||
{
|
||||
for(; (b >= 0); b = (b - 1)) {
|
||||
const int x_20 = b;
|
||||
const float x_87 = matrix_b[b];
|
||||
set_float4(matrix_b, x_20, (x_87 - 1.0f));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.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;
|
||||
}
|
||||
@@ -1,94 +0,0 @@
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct buf0 {
|
||||
/* 0x0000 */ float2 injectionSwitch;
|
||||
};
|
||||
struct tint_array_wrapper {
|
||||
int arr[10];
|
||||
};
|
||||
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_6, thread float4* const tint_symbol_3) {
|
||||
int k = 0;
|
||||
int GLF_dead0j = 0;
|
||||
tint_array_wrapper donor_replacementGLF_dead0stack = {};
|
||||
int donor_replacementGLF_dead0top = 0;
|
||||
int x_54 = 0;
|
||||
float4 matrix_b = 0.0f;
|
||||
int b = 0;
|
||||
k = 0;
|
||||
while (true) {
|
||||
int const x_12 = k;
|
||||
if ((x_12 < 4)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
float const x_62 = x_6.injectionSwitch.y;
|
||||
if ((0.0f > x_62)) {
|
||||
GLF_dead0j = 1;
|
||||
while (true) {
|
||||
int const x_13 = donor_replacementGLF_dead0stack.arr[0];
|
||||
if ((1 <= x_13)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
int const x_14 = donor_replacementGLF_dead0top;
|
||||
int const x_15 = donor_replacementGLF_dead0top;
|
||||
if (((x_14 >= 0) && (x_15 < 9))) {
|
||||
int const x_16 = donor_replacementGLF_dead0top;
|
||||
int const x_17 = as_type<int>((as_type<uint>(x_16) + as_type<uint>(1)));
|
||||
donor_replacementGLF_dead0top = x_17;
|
||||
x_54 = x_17;
|
||||
} else {
|
||||
x_54 = 0;
|
||||
}
|
||||
int const x_18 = x_54;
|
||||
donor_replacementGLF_dead0stack.arr[x_18] = 1;
|
||||
}
|
||||
matrix_b = float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
b = 3;
|
||||
while (true) {
|
||||
int const x_19 = b;
|
||||
if ((x_19 >= 0)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
int const x_20 = b;
|
||||
int const x_21 = b;
|
||||
float const x_87 = matrix_b[x_21];
|
||||
matrix_b[x_20] = (x_87 - 1.0f);
|
||||
{
|
||||
int const x_22 = b;
|
||||
b = as_type<int>((as_type<uint>(x_22) - as_type<uint>(1)));
|
||||
}
|
||||
}
|
||||
{
|
||||
int const x_24 = k;
|
||||
k = as_type<int>((as_type<uint>(x_24) + as_type<uint>(1)));
|
||||
}
|
||||
}
|
||||
*(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
|
||||
return;
|
||||
}
|
||||
|
||||
main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
|
||||
main_1(x_6, 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_6 [[buffer(0)]]) {
|
||||
thread float4 tint_symbol_5 = 0.0f;
|
||||
main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
|
||||
tint_symbol_1 wrapper_result = {};
|
||||
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
@@ -1,203 +0,0 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 114
|
||||
; 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 %buf0 "buf0"
|
||||
OpMemberName %buf0 0 "injectionSwitch"
|
||||
OpName %x_6 "x_6"
|
||||
OpName %x_GLF_color "x_GLF_color"
|
||||
OpName %main_1 "main_1"
|
||||
OpName %k "k"
|
||||
OpName %GLF_dead0j "GLF_dead0j"
|
||||
OpName %donor_replacementGLF_dead0stack "donor_replacementGLF_dead0stack"
|
||||
OpName %donor_replacementGLF_dead0top "donor_replacementGLF_dead0top"
|
||||
OpName %x_54 "x_54"
|
||||
OpName %matrix_b "matrix_b"
|
||||
OpName %b "b"
|
||||
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_6 NonWritable
|
||||
OpDecorate %x_6 DescriptorSet 0
|
||||
OpDecorate %x_6 Binding 0
|
||||
OpDecorate %_arr_int_uint_10 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
|
||||
%v2float = OpTypeVector %float 2
|
||||
%buf0 = OpTypeStruct %v2float
|
||||
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
|
||||
%x_6 = OpVariable %_ptr_Uniform_buf0 Uniform
|
||||
%_ptr_Private_v4float = OpTypePointer Private %v4float
|
||||
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %5
|
||||
%void = OpTypeVoid
|
||||
%12 = OpTypeFunction %void
|
||||
%int = OpTypeInt 32 1
|
||||
%_ptr_Function_int = OpTypePointer Function %int
|
||||
%19 = OpConstantNull %int
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_10 = OpConstant %uint 10
|
||||
%_arr_int_uint_10 = OpTypeArray %int %uint_10
|
||||
%_ptr_Function__arr_int_uint_10 = OpTypePointer Function %_arr_int_uint_10
|
||||
%26 = OpConstantNull %_arr_int_uint_10
|
||||
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
||||
%int_0 = OpConstant %int 0
|
||||
%int_4 = OpConstant %int 4
|
||||
%bool = OpTypeBool
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%uint_1 = OpConstant %uint 1
|
||||
%_ptr_Uniform_float = OpTypePointer Uniform %float
|
||||
%float_0 = OpConstant %float 0
|
||||
%int_1 = OpConstant %int 1
|
||||
%int_9 = OpConstant %int 9
|
||||
%79 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
|
||||
%int_3 = OpConstant %int 3
|
||||
%_ptr_Function_float = OpTypePointer Function %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%102 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
|
||||
%main_out = OpTypeStruct %v4float
|
||||
%103 = OpTypeFunction %main_out
|
||||
%main_1 = OpFunction %void None %12
|
||||
%15 = OpLabel
|
||||
%k = OpVariable %_ptr_Function_int Function %19
|
||||
%GLF_dead0j = OpVariable %_ptr_Function_int Function %19
|
||||
%donor_replacementGLF_dead0stack = OpVariable %_ptr_Function__arr_int_uint_10 Function %26
|
||||
%donor_replacementGLF_dead0top = OpVariable %_ptr_Function_int Function %19
|
||||
%x_54 = OpVariable %_ptr_Function_int Function %19
|
||||
%matrix_b = OpVariable %_ptr_Function_v4float Function %5
|
||||
%b = OpVariable %_ptr_Function_int Function %19
|
||||
OpStore %k %int_0
|
||||
OpBranch %33
|
||||
%33 = OpLabel
|
||||
OpLoopMerge %34 %35 None
|
||||
OpBranch %36
|
||||
%36 = OpLabel
|
||||
%37 = OpLoad %int %k
|
||||
%39 = OpSLessThan %bool %37 %int_4
|
||||
OpSelectionMerge %41 None
|
||||
OpBranchConditional %39 %42 %43
|
||||
%42 = OpLabel
|
||||
OpBranch %41
|
||||
%43 = OpLabel
|
||||
OpBranch %34
|
||||
%41 = OpLabel
|
||||
%47 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %uint_1
|
||||
%48 = OpLoad %float %47
|
||||
%50 = OpFOrdGreaterThan %bool %float_0 %48
|
||||
OpSelectionMerge %51 None
|
||||
OpBranchConditional %50 %52 %51
|
||||
%52 = OpLabel
|
||||
OpStore %GLF_dead0j %int_1
|
||||
OpBranch %54
|
||||
%54 = OpLabel
|
||||
OpLoopMerge %55 %56 None
|
||||
OpBranch %57
|
||||
%57 = OpLabel
|
||||
%58 = OpAccessChain %_ptr_Function_int %donor_replacementGLF_dead0stack %int_0
|
||||
%59 = OpLoad %int %58
|
||||
%60 = OpSLessThanEqual %bool %int_1 %59
|
||||
OpSelectionMerge %61 None
|
||||
OpBranchConditional %60 %62 %63
|
||||
%62 = OpLabel
|
||||
OpBranch %61
|
||||
%63 = OpLabel
|
||||
OpBranch %55
|
||||
%61 = OpLabel
|
||||
OpBranch %56
|
||||
%56 = OpLabel
|
||||
OpBranch %54
|
||||
%55 = OpLabel
|
||||
%64 = OpLoad %int %donor_replacementGLF_dead0top
|
||||
%65 = OpLoad %int %donor_replacementGLF_dead0top
|
||||
%66 = OpSGreaterThanEqual %bool %64 %int_0
|
||||
OpSelectionMerge %67 None
|
||||
OpBranchConditional %66 %68 %67
|
||||
%68 = OpLabel
|
||||
%70 = OpSLessThan %bool %65 %int_9
|
||||
OpBranch %67
|
||||
%67 = OpLabel
|
||||
%71 = OpPhi %bool %66 %55 %70 %68
|
||||
OpSelectionMerge %72 None
|
||||
OpBranchConditional %71 %73 %74
|
||||
%73 = OpLabel
|
||||
%75 = OpLoad %int %donor_replacementGLF_dead0top
|
||||
%76 = OpIAdd %int %75 %int_1
|
||||
OpStore %donor_replacementGLF_dead0top %76
|
||||
OpStore %x_54 %76
|
||||
OpBranch %72
|
||||
%74 = OpLabel
|
||||
OpStore %x_54 %int_0
|
||||
OpBranch %72
|
||||
%72 = OpLabel
|
||||
%77 = OpLoad %int %x_54
|
||||
%78 = OpAccessChain %_ptr_Function_int %donor_replacementGLF_dead0stack %77
|
||||
OpStore %78 %int_1
|
||||
OpBranch %51
|
||||
%51 = OpLabel
|
||||
OpStore %matrix_b %79
|
||||
OpStore %b %int_3
|
||||
OpBranch %81
|
||||
%81 = OpLabel
|
||||
OpLoopMerge %82 %83 None
|
||||
OpBranch %84
|
||||
%84 = OpLabel
|
||||
%85 = OpLoad %int %b
|
||||
%86 = OpSGreaterThanEqual %bool %85 %int_0
|
||||
OpSelectionMerge %87 None
|
||||
OpBranchConditional %86 %88 %89
|
||||
%88 = OpLabel
|
||||
OpBranch %87
|
||||
%89 = OpLabel
|
||||
OpBranch %82
|
||||
%87 = OpLabel
|
||||
%90 = OpLoad %int %b
|
||||
%91 = OpLoad %int %b
|
||||
%93 = OpAccessChain %_ptr_Function_float %matrix_b %91
|
||||
%94 = OpLoad %float %93
|
||||
%95 = OpAccessChain %_ptr_Function_float %matrix_b %90
|
||||
%97 = OpFSub %float %94 %float_1
|
||||
OpStore %95 %97
|
||||
OpBranch %83
|
||||
%83 = OpLabel
|
||||
%98 = OpLoad %int %b
|
||||
%99 = OpISub %int %98 %int_1
|
||||
OpStore %b %99
|
||||
OpBranch %81
|
||||
%82 = OpLabel
|
||||
OpBranch %35
|
||||
%35 = OpLabel
|
||||
%100 = OpLoad %int %k
|
||||
%101 = OpIAdd %int %100 %int_1
|
||||
OpStore %k %101
|
||||
OpBranch %33
|
||||
%34 = OpLabel
|
||||
OpStore %x_GLF_color %102
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%main_inner = OpFunction %main_out None %103
|
||||
%106 = OpLabel
|
||||
%107 = OpFunctionCall %void %main_1
|
||||
%108 = OpLoad %v4float %x_GLF_color
|
||||
%109 = OpCompositeConstruct %main_out %108
|
||||
OpReturnValue %109
|
||||
OpFunctionEnd
|
||||
%main = OpFunction %void None %12
|
||||
%111 = OpLabel
|
||||
%112 = OpFunctionCall %main_out %main_inner
|
||||
%113 = OpCompositeExtract %v4float %112 0
|
||||
OpStore %x_GLF_color_1_1 %113
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -1,85 +0,0 @@
|
||||
[[block]]
|
||||
struct buf0 {
|
||||
injectionSwitch : vec2<f32>;
|
||||
};
|
||||
|
||||
[[group(0), binding(0)]] var<uniform> x_6 : buf0;
|
||||
|
||||
var<private> x_GLF_color : vec4<f32>;
|
||||
|
||||
fn main_1() {
|
||||
var k : i32;
|
||||
var GLF_dead0j : i32;
|
||||
var donor_replacementGLF_dead0stack : array<i32, 10>;
|
||||
var donor_replacementGLF_dead0top : i32;
|
||||
var x_54 : i32;
|
||||
var matrix_b : vec4<f32>;
|
||||
var b : i32;
|
||||
k = 0;
|
||||
loop {
|
||||
let x_12 : i32 = k;
|
||||
if ((x_12 < 4)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
let x_62 : f32 = x_6.injectionSwitch.y;
|
||||
if ((0.0 > x_62)) {
|
||||
GLF_dead0j = 1;
|
||||
loop {
|
||||
let x_13 : i32 = donor_replacementGLF_dead0stack[0];
|
||||
if ((1 <= x_13)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
let x_14 : i32 = donor_replacementGLF_dead0top;
|
||||
let x_15 : i32 = donor_replacementGLF_dead0top;
|
||||
if (((x_14 >= 0) && (x_15 < 9))) {
|
||||
let x_16 : i32 = donor_replacementGLF_dead0top;
|
||||
let x_17 : i32 = (x_16 + 1);
|
||||
donor_replacementGLF_dead0top = x_17;
|
||||
x_54 = x_17;
|
||||
} else {
|
||||
x_54 = 0;
|
||||
}
|
||||
let x_18 : i32 = x_54;
|
||||
donor_replacementGLF_dead0stack[x_18] = 1;
|
||||
}
|
||||
matrix_b = vec4<f32>(0.0, 0.0, 0.0, 0.0);
|
||||
b = 3;
|
||||
loop {
|
||||
let x_19 : i32 = b;
|
||||
if ((x_19 >= 0)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
let x_20 : i32 = b;
|
||||
let x_21 : i32 = b;
|
||||
let x_87 : f32 = matrix_b[x_21];
|
||||
matrix_b[x_20] = (x_87 - 1.0);
|
||||
|
||||
continuing {
|
||||
let x_22 : i32 = b;
|
||||
b = (x_22 - 1);
|
||||
}
|
||||
}
|
||||
|
||||
continuing {
|
||||
let x_24 : i32 = k;
|
||||
k = (x_24 + 1);
|
||||
}
|
||||
}
|
||||
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() -> main_out {
|
||||
main_1();
|
||||
return main_out(x_GLF_color);
|
||||
}
|
||||
Reference in New Issue
Block a user