mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-13 15:16:16 +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,85 +0,0 @@
|
||||
static int x_GLF_global_loop_count = 0;
|
||||
cbuffer cbuffer_x_7 : register(b0, space0) {
|
||||
uint4 x_7[4];
|
||||
};
|
||||
static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
|
||||
void func_() {
|
||||
int x_66_phi = 0;
|
||||
const int x_62 = asint(x_7[1].x);
|
||||
const uint scalar_offset = ((16u * uint(0))) / 4;
|
||||
const int x_64 = asint(x_7[scalar_offset / 4][scalar_offset % 4]);
|
||||
x_66_phi = x_64;
|
||||
while (true) {
|
||||
int x_67 = 0;
|
||||
const int x_66 = x_66_phi;
|
||||
const int x_70 = asint(x_7[3].x);
|
||||
if ((x_66 < x_70)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
{
|
||||
x_GLF_global_loop_count = (x_GLF_global_loop_count + 1);
|
||||
x_67 = (x_66 + 1);
|
||||
x_66_phi = x_67;
|
||||
}
|
||||
}
|
||||
if ((x_62 < x_62)) {
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void main_1() {
|
||||
x_GLF_global_loop_count = 0;
|
||||
while (true) {
|
||||
if ((x_GLF_global_loop_count < 10)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
{
|
||||
x_GLF_global_loop_count = (x_GLF_global_loop_count + 1);
|
||||
func_();
|
||||
}
|
||||
}
|
||||
{
|
||||
for(; (x_GLF_global_loop_count < 10); x_GLF_global_loop_count = (x_GLF_global_loop_count + 1)) {
|
||||
}
|
||||
}
|
||||
const int x_42 = x_GLF_global_loop_count;
|
||||
const int x_44 = asint(x_7[2].x);
|
||||
if ((x_42 == x_44)) {
|
||||
const int x_50 = asint(x_7[1].x);
|
||||
const float x_51 = float(x_50);
|
||||
const uint scalar_offset_1 = ((16u * uint(0))) / 4;
|
||||
const int x_53 = asint(x_7[scalar_offset_1 / 4][scalar_offset_1 % 4]);
|
||||
const float x_54 = float(x_53);
|
||||
x_GLF_color = float4(x_51, x_54, x_54, x_51);
|
||||
} else {
|
||||
const uint scalar_offset_2 = ((16u * uint(0))) / 4;
|
||||
const int x_57 = asint(x_7[scalar_offset_2 / 4][scalar_offset_2 % 4]);
|
||||
const float x_58 = float(x_57);
|
||||
x_GLF_color = float4(x_58, x_58, x_58, x_58);
|
||||
}
|
||||
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,102 +0,0 @@
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct tint_padded_array_element {
|
||||
/* 0x0000 */ int el;
|
||||
/* 0x0004 */ int8_t tint_pad[12];
|
||||
};
|
||||
struct tint_array_wrapper {
|
||||
/* 0x0000 */ tint_padded_array_element arr[4];
|
||||
};
|
||||
struct buf0 {
|
||||
/* 0x0000 */ tint_array_wrapper x_GLF_uniform_int_values;
|
||||
};
|
||||
struct main_out {
|
||||
float4 x_GLF_color_1;
|
||||
};
|
||||
struct tint_symbol_1 {
|
||||
float4 x_GLF_color_1 [[color(0)]];
|
||||
};
|
||||
|
||||
void func_(constant buf0& x_7, thread int* const tint_symbol_3) {
|
||||
int x_66_phi = 0;
|
||||
int const x_62 = x_7.x_GLF_uniform_int_values.arr[1].el;
|
||||
int const x_64 = x_7.x_GLF_uniform_int_values.arr[0].el;
|
||||
x_66_phi = x_64;
|
||||
while (true) {
|
||||
int x_67 = 0;
|
||||
int const x_66 = x_66_phi;
|
||||
int const x_70 = x_7.x_GLF_uniform_int_values.arr[3].el;
|
||||
if ((x_66 < x_70)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
{
|
||||
int const x_73 = *(tint_symbol_3);
|
||||
*(tint_symbol_3) = as_type<int>((as_type<uint>(x_73) + as_type<uint>(1)));
|
||||
x_67 = as_type<int>((as_type<uint>(x_66) + as_type<uint>(1)));
|
||||
x_66_phi = x_67;
|
||||
}
|
||||
}
|
||||
if ((x_62 < x_62)) {
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void main_1(constant buf0& x_7, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) {
|
||||
*(tint_symbol_4) = 0;
|
||||
while (true) {
|
||||
int const x_28 = *(tint_symbol_4);
|
||||
if ((x_28 < 10)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
{
|
||||
int const x_32 = *(tint_symbol_4);
|
||||
*(tint_symbol_4) = as_type<int>((as_type<uint>(x_32) + as_type<uint>(1)));
|
||||
func_(x_7, tint_symbol_4);
|
||||
}
|
||||
}
|
||||
while (true) {
|
||||
int const x_36 = *(tint_symbol_4);
|
||||
if ((x_36 < 10)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
{
|
||||
int const x_40 = *(tint_symbol_4);
|
||||
*(tint_symbol_4) = as_type<int>((as_type<uint>(x_40) + as_type<uint>(1)));
|
||||
}
|
||||
}
|
||||
int const x_42 = *(tint_symbol_4);
|
||||
int const x_44 = x_7.x_GLF_uniform_int_values.arr[2].el;
|
||||
if ((x_42 == x_44)) {
|
||||
int const x_50 = x_7.x_GLF_uniform_int_values.arr[1].el;
|
||||
float const x_51 = float(x_50);
|
||||
int const x_53 = x_7.x_GLF_uniform_int_values.arr[0].el;
|
||||
float const x_54 = float(x_53);
|
||||
*(tint_symbol_5) = float4(x_51, x_54, x_54, x_51);
|
||||
} else {
|
||||
int const x_57 = x_7.x_GLF_uniform_int_values.arr[0].el;
|
||||
float const x_58 = float(x_57);
|
||||
*(tint_symbol_5) = float4(x_58, x_58, x_58, x_58);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
main_out tint_symbol_inner(constant buf0& x_7, thread int* const tint_symbol_6, thread float4* const tint_symbol_7) {
|
||||
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(constant buf0& x_7 [[buffer(0)]]) {
|
||||
thread int tint_symbol_8 = 0;
|
||||
thread float4 tint_symbol_9 = 0.0f;
|
||||
main_out const inner_result = tint_symbol_inner(x_7, &(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,191 +0,0 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 109
|
||||
; 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_global_loop_count "x_GLF_global_loop_count"
|
||||
OpName %buf0 "buf0"
|
||||
OpMemberName %buf0 0 "x_GLF_uniform_int_values"
|
||||
OpName %x_7 "x_7"
|
||||
OpName %x_GLF_color "x_GLF_color"
|
||||
OpName %func_ "func_"
|
||||
OpName %x_66_phi "x_66_phi"
|
||||
OpName %x_67 "x_67"
|
||||
OpName %main_1 "main_1"
|
||||
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 %_arr_int_uint_4 ArrayStride 16
|
||||
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_Output_v4float = OpTypePointer Output %v4float
|
||||
%5 = OpConstantNull %v4float
|
||||
%x_GLF_color_1_1 = OpVariable %_ptr_Output_v4float Output %5
|
||||
%int = OpTypeInt 32 1
|
||||
%_ptr_Private_int = OpTypePointer Private %int
|
||||
%9 = OpConstantNull %int
|
||||
%x_GLF_global_loop_count = OpVariable %_ptr_Private_int Private %9
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_4 = OpConstant %uint 4
|
||||
%_arr_int_uint_4 = OpTypeArray %int %uint_4
|
||||
%buf0 = OpTypeStruct %_arr_int_uint_4
|
||||
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
|
||||
%x_7 = OpVariable %_ptr_Uniform_buf0 Uniform
|
||||
%_ptr_Private_v4float = OpTypePointer Private %v4float
|
||||
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %5
|
||||
%void = OpTypeVoid
|
||||
%18 = OpTypeFunction %void
|
||||
%_ptr_Function_int = OpTypePointer Function %int
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%int_1 = OpConstant %int 1
|
||||
%_ptr_Uniform_int = OpTypePointer Uniform %int
|
||||
%int_0 = OpConstant %int 0
|
||||
%int_3 = OpConstant %int 3
|
||||
%bool = OpTypeBool
|
||||
%int_10 = OpConstant %int 10
|
||||
%int_2 = OpConstant %int 2
|
||||
%main_out = OpTypeStruct %v4float
|
||||
%98 = OpTypeFunction %main_out
|
||||
%func_ = OpFunction %void None %18
|
||||
%21 = OpLabel
|
||||
%x_66_phi = OpVariable %_ptr_Function_int Function %9
|
||||
%x_67 = OpVariable %_ptr_Function_int Function %9
|
||||
%27 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %int_1
|
||||
%28 = OpLoad %int %27
|
||||
%30 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %int_0
|
||||
%31 = OpLoad %int %30
|
||||
OpStore %x_66_phi %31
|
||||
OpBranch %32
|
||||
%32 = OpLabel
|
||||
OpLoopMerge %33 %34 None
|
||||
OpBranch %35
|
||||
%35 = OpLabel
|
||||
%37 = OpLoad %int %x_66_phi
|
||||
%39 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %int_3
|
||||
%40 = OpLoad %int %39
|
||||
%41 = OpSLessThan %bool %37 %40
|
||||
OpSelectionMerge %43 None
|
||||
OpBranchConditional %41 %44 %45
|
||||
%44 = OpLabel
|
||||
OpBranch %43
|
||||
%45 = OpLabel
|
||||
OpBranch %33
|
||||
%43 = OpLabel
|
||||
OpBranch %34
|
||||
%34 = OpLabel
|
||||
%46 = OpLoad %int %x_GLF_global_loop_count
|
||||
%47 = OpIAdd %int %46 %int_1
|
||||
OpStore %x_GLF_global_loop_count %47
|
||||
%48 = OpIAdd %int %37 %int_1
|
||||
OpStore %x_67 %48
|
||||
%49 = OpLoad %int %x_67
|
||||
OpStore %x_66_phi %49
|
||||
OpBranch %32
|
||||
%33 = OpLabel
|
||||
%50 = OpSLessThan %bool %28 %28
|
||||
OpSelectionMerge %51 None
|
||||
OpBranchConditional %50 %52 %51
|
||||
%52 = OpLabel
|
||||
OpReturn
|
||||
%51 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%main_1 = OpFunction %void None %18
|
||||
%54 = OpLabel
|
||||
OpStore %x_GLF_global_loop_count %int_0
|
||||
OpBranch %55
|
||||
%55 = OpLabel
|
||||
OpLoopMerge %56 %57 None
|
||||
OpBranch %58
|
||||
%58 = OpLabel
|
||||
%59 = OpLoad %int %x_GLF_global_loop_count
|
||||
%61 = OpSLessThan %bool %59 %int_10
|
||||
OpSelectionMerge %62 None
|
||||
OpBranchConditional %61 %63 %64
|
||||
%63 = OpLabel
|
||||
OpBranch %62
|
||||
%64 = OpLabel
|
||||
OpBranch %56
|
||||
%62 = OpLabel
|
||||
OpBranch %57
|
||||
%57 = OpLabel
|
||||
%65 = OpLoad %int %x_GLF_global_loop_count
|
||||
%66 = OpIAdd %int %65 %int_1
|
||||
OpStore %x_GLF_global_loop_count %66
|
||||
%67 = OpFunctionCall %void %func_
|
||||
OpBranch %55
|
||||
%56 = OpLabel
|
||||
OpBranch %68
|
||||
%68 = OpLabel
|
||||
OpLoopMerge %69 %70 None
|
||||
OpBranch %71
|
||||
%71 = OpLabel
|
||||
%72 = OpLoad %int %x_GLF_global_loop_count
|
||||
%73 = OpSLessThan %bool %72 %int_10
|
||||
OpSelectionMerge %74 None
|
||||
OpBranchConditional %73 %75 %76
|
||||
%75 = OpLabel
|
||||
OpBranch %74
|
||||
%76 = OpLabel
|
||||
OpBranch %69
|
||||
%74 = OpLabel
|
||||
OpBranch %70
|
||||
%70 = OpLabel
|
||||
%77 = OpLoad %int %x_GLF_global_loop_count
|
||||
%78 = OpIAdd %int %77 %int_1
|
||||
OpStore %x_GLF_global_loop_count %78
|
||||
OpBranch %68
|
||||
%69 = OpLabel
|
||||
%79 = OpLoad %int %x_GLF_global_loop_count
|
||||
%81 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %int_2
|
||||
%82 = OpLoad %int %81
|
||||
%83 = OpIEqual %bool %79 %82
|
||||
OpSelectionMerge %84 None
|
||||
OpBranchConditional %83 %85 %86
|
||||
%85 = OpLabel
|
||||
%87 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %int_1
|
||||
%88 = OpLoad %int %87
|
||||
%89 = OpConvertSToF %float %88
|
||||
%90 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %int_0
|
||||
%91 = OpLoad %int %90
|
||||
%92 = OpConvertSToF %float %91
|
||||
%93 = OpCompositeConstruct %v4float %89 %92 %92 %89
|
||||
OpStore %x_GLF_color %93
|
||||
OpBranch %84
|
||||
%86 = OpLabel
|
||||
%94 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %int_0
|
||||
%95 = OpLoad %int %94
|
||||
%96 = OpConvertSToF %float %95
|
||||
%97 = OpCompositeConstruct %v4float %96 %96 %96 %96
|
||||
OpStore %x_GLF_color %97
|
||||
OpBranch %84
|
||||
%84 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%main_inner = OpFunction %main_out None %98
|
||||
%101 = OpLabel
|
||||
%102 = OpFunctionCall %void %main_1
|
||||
%103 = OpLoad %v4float %x_GLF_color
|
||||
%104 = OpCompositeConstruct %main_out %103
|
||||
OpReturnValue %104
|
||||
OpFunctionEnd
|
||||
%main = OpFunction %void None %18
|
||||
%106 = OpLabel
|
||||
%107 = OpFunctionCall %main_out %main_inner
|
||||
%108 = OpCompositeExtract %v4float %107 0
|
||||
OpStore %x_GLF_color_1_1 %108
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -1,93 +0,0 @@
|
||||
type Arr = [[stride(16)]] array<i32, 4>;
|
||||
|
||||
[[block]]
|
||||
struct buf0 {
|
||||
x_GLF_uniform_int_values : Arr;
|
||||
};
|
||||
|
||||
var<private> x_GLF_global_loop_count : i32;
|
||||
|
||||
[[group(0), binding(0)]] var<uniform> x_7 : buf0;
|
||||
|
||||
var<private> x_GLF_color : vec4<f32>;
|
||||
|
||||
fn func_() {
|
||||
var x_66_phi : i32;
|
||||
let x_62 : i32 = x_7.x_GLF_uniform_int_values[1];
|
||||
let x_64 : i32 = x_7.x_GLF_uniform_int_values[0];
|
||||
x_66_phi = x_64;
|
||||
loop {
|
||||
var x_67 : i32;
|
||||
let x_66 : i32 = x_66_phi;
|
||||
let x_70 : i32 = x_7.x_GLF_uniform_int_values[3];
|
||||
if ((x_66 < x_70)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
||||
continuing {
|
||||
let x_73 : i32 = x_GLF_global_loop_count;
|
||||
x_GLF_global_loop_count = (x_73 + 1);
|
||||
x_67 = (x_66 + 1);
|
||||
x_66_phi = x_67;
|
||||
}
|
||||
}
|
||||
if ((x_62 < x_62)) {
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
fn main_1() {
|
||||
x_GLF_global_loop_count = 0;
|
||||
loop {
|
||||
let x_28 : i32 = x_GLF_global_loop_count;
|
||||
if ((x_28 < 10)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
||||
continuing {
|
||||
let x_32 : i32 = x_GLF_global_loop_count;
|
||||
x_GLF_global_loop_count = (x_32 + 1);
|
||||
func_();
|
||||
}
|
||||
}
|
||||
loop {
|
||||
let x_36 : i32 = x_GLF_global_loop_count;
|
||||
if ((x_36 < 10)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
||||
continuing {
|
||||
let x_40 : i32 = x_GLF_global_loop_count;
|
||||
x_GLF_global_loop_count = (x_40 + 1);
|
||||
}
|
||||
}
|
||||
let x_42 : i32 = x_GLF_global_loop_count;
|
||||
let x_44 : i32 = x_7.x_GLF_uniform_int_values[2];
|
||||
if ((x_42 == x_44)) {
|
||||
let x_50 : i32 = x_7.x_GLF_uniform_int_values[1];
|
||||
let x_51 : f32 = f32(x_50);
|
||||
let x_53 : i32 = x_7.x_GLF_uniform_int_values[0];
|
||||
let x_54 : f32 = f32(x_53);
|
||||
x_GLF_color = vec4<f32>(x_51, x_54, x_54, x_51);
|
||||
} else {
|
||||
let x_57 : i32 = x_7.x_GLF_uniform_int_values[0];
|
||||
let x_58 : f32 = f32(x_57);
|
||||
x_GLF_color = vec4<f32>(x_58, x_58, x_58, x_58);
|
||||
}
|
||||
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,85 +0,0 @@
|
||||
static int x_GLF_global_loop_count = 0;
|
||||
cbuffer cbuffer_x_7 : register(b0, space0) {
|
||||
uint4 x_7[4];
|
||||
};
|
||||
static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
|
||||
void func_() {
|
||||
int x_66_phi = 0;
|
||||
const int x_62 = asint(x_7[1].x);
|
||||
const uint scalar_offset = ((16u * uint(0))) / 4;
|
||||
const int x_64 = asint(x_7[scalar_offset / 4][scalar_offset % 4]);
|
||||
x_66_phi = x_64;
|
||||
while (true) {
|
||||
int x_67 = 0;
|
||||
const int x_66 = x_66_phi;
|
||||
const int x_70 = asint(x_7[3].x);
|
||||
if ((x_66 < x_70)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
{
|
||||
x_GLF_global_loop_count = (x_GLF_global_loop_count + 1);
|
||||
x_67 = (x_66 + 1);
|
||||
x_66_phi = x_67;
|
||||
}
|
||||
}
|
||||
if ((x_62 < x_62)) {
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void main_1() {
|
||||
x_GLF_global_loop_count = 0;
|
||||
while (true) {
|
||||
if ((x_GLF_global_loop_count < 10)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
{
|
||||
x_GLF_global_loop_count = (x_GLF_global_loop_count + 1);
|
||||
func_();
|
||||
}
|
||||
}
|
||||
{
|
||||
for(; (x_GLF_global_loop_count < 10); x_GLF_global_loop_count = (x_GLF_global_loop_count + 1)) {
|
||||
}
|
||||
}
|
||||
const int x_42 = x_GLF_global_loop_count;
|
||||
const int x_44 = asint(x_7[2].x);
|
||||
if ((x_42 == x_44)) {
|
||||
const int x_50 = asint(x_7[1].x);
|
||||
const float x_51 = float(x_50);
|
||||
const uint scalar_offset_1 = ((16u * uint(0))) / 4;
|
||||
const int x_53 = asint(x_7[scalar_offset_1 / 4][scalar_offset_1 % 4]);
|
||||
const float x_54 = float(x_53);
|
||||
x_GLF_color = float4(x_51, x_54, x_54, x_51);
|
||||
} else {
|
||||
const uint scalar_offset_2 = ((16u * uint(0))) / 4;
|
||||
const int x_57 = asint(x_7[scalar_offset_2 / 4][scalar_offset_2 % 4]);
|
||||
const float x_58 = float(x_57);
|
||||
x_GLF_color = float4(x_58, x_58, x_58, x_58);
|
||||
}
|
||||
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,102 +0,0 @@
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct tint_padded_array_element {
|
||||
/* 0x0000 */ int el;
|
||||
/* 0x0004 */ int8_t tint_pad[12];
|
||||
};
|
||||
struct tint_array_wrapper {
|
||||
/* 0x0000 */ tint_padded_array_element arr[4];
|
||||
};
|
||||
struct buf0 {
|
||||
/* 0x0000 */ tint_array_wrapper x_GLF_uniform_int_values;
|
||||
};
|
||||
struct main_out {
|
||||
float4 x_GLF_color_1;
|
||||
};
|
||||
struct tint_symbol_1 {
|
||||
float4 x_GLF_color_1 [[color(0)]];
|
||||
};
|
||||
|
||||
void func_(constant buf0& x_7, thread int* const tint_symbol_3) {
|
||||
int x_66_phi = 0;
|
||||
int const x_62 = x_7.x_GLF_uniform_int_values.arr[1].el;
|
||||
int const x_64 = x_7.x_GLF_uniform_int_values.arr[0].el;
|
||||
x_66_phi = x_64;
|
||||
while (true) {
|
||||
int x_67 = 0;
|
||||
int const x_66 = x_66_phi;
|
||||
int const x_70 = x_7.x_GLF_uniform_int_values.arr[3].el;
|
||||
if ((x_66 < x_70)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
{
|
||||
int const x_73 = *(tint_symbol_3);
|
||||
*(tint_symbol_3) = as_type<int>((as_type<uint>(x_73) + as_type<uint>(1)));
|
||||
x_67 = as_type<int>((as_type<uint>(x_66) + as_type<uint>(1)));
|
||||
x_66_phi = x_67;
|
||||
}
|
||||
}
|
||||
if ((x_62 < x_62)) {
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void main_1(constant buf0& x_7, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) {
|
||||
*(tint_symbol_4) = 0;
|
||||
while (true) {
|
||||
int const x_28 = *(tint_symbol_4);
|
||||
if ((x_28 < 10)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
{
|
||||
int const x_32 = *(tint_symbol_4);
|
||||
*(tint_symbol_4) = as_type<int>((as_type<uint>(x_32) + as_type<uint>(1)));
|
||||
func_(x_7, tint_symbol_4);
|
||||
}
|
||||
}
|
||||
while (true) {
|
||||
int const x_36 = *(tint_symbol_4);
|
||||
if ((x_36 < 10)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
{
|
||||
int const x_40 = *(tint_symbol_4);
|
||||
*(tint_symbol_4) = as_type<int>((as_type<uint>(x_40) + as_type<uint>(1)));
|
||||
}
|
||||
}
|
||||
int const x_42 = *(tint_symbol_4);
|
||||
int const x_44 = x_7.x_GLF_uniform_int_values.arr[2].el;
|
||||
if ((x_42 == x_44)) {
|
||||
int const x_50 = x_7.x_GLF_uniform_int_values.arr[1].el;
|
||||
float const x_51 = float(x_50);
|
||||
int const x_53 = x_7.x_GLF_uniform_int_values.arr[0].el;
|
||||
float const x_54 = float(x_53);
|
||||
*(tint_symbol_5) = float4(x_51, x_54, x_54, x_51);
|
||||
} else {
|
||||
int const x_57 = x_7.x_GLF_uniform_int_values.arr[0].el;
|
||||
float const x_58 = float(x_57);
|
||||
*(tint_symbol_5) = float4(x_58, x_58, x_58, x_58);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
main_out tint_symbol_inner(constant buf0& x_7, thread int* const tint_symbol_6, thread float4* const tint_symbol_7) {
|
||||
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(constant buf0& x_7 [[buffer(0)]]) {
|
||||
thread int tint_symbol_8 = 0;
|
||||
thread float4 tint_symbol_9 = 0.0f;
|
||||
main_out const inner_result = tint_symbol_inner(x_7, &(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,191 +0,0 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 109
|
||||
; 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_global_loop_count "x_GLF_global_loop_count"
|
||||
OpName %buf0 "buf0"
|
||||
OpMemberName %buf0 0 "x_GLF_uniform_int_values"
|
||||
OpName %x_7 "x_7"
|
||||
OpName %x_GLF_color "x_GLF_color"
|
||||
OpName %func_ "func_"
|
||||
OpName %x_66_phi "x_66_phi"
|
||||
OpName %x_67 "x_67"
|
||||
OpName %main_1 "main_1"
|
||||
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 %_arr_int_uint_4 ArrayStride 16
|
||||
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_Output_v4float = OpTypePointer Output %v4float
|
||||
%5 = OpConstantNull %v4float
|
||||
%x_GLF_color_1_1 = OpVariable %_ptr_Output_v4float Output %5
|
||||
%int = OpTypeInt 32 1
|
||||
%_ptr_Private_int = OpTypePointer Private %int
|
||||
%9 = OpConstantNull %int
|
||||
%x_GLF_global_loop_count = OpVariable %_ptr_Private_int Private %9
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_4 = OpConstant %uint 4
|
||||
%_arr_int_uint_4 = OpTypeArray %int %uint_4
|
||||
%buf0 = OpTypeStruct %_arr_int_uint_4
|
||||
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
|
||||
%x_7 = OpVariable %_ptr_Uniform_buf0 Uniform
|
||||
%_ptr_Private_v4float = OpTypePointer Private %v4float
|
||||
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %5
|
||||
%void = OpTypeVoid
|
||||
%18 = OpTypeFunction %void
|
||||
%_ptr_Function_int = OpTypePointer Function %int
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%int_1 = OpConstant %int 1
|
||||
%_ptr_Uniform_int = OpTypePointer Uniform %int
|
||||
%int_0 = OpConstant %int 0
|
||||
%int_3 = OpConstant %int 3
|
||||
%bool = OpTypeBool
|
||||
%int_10 = OpConstant %int 10
|
||||
%int_2 = OpConstant %int 2
|
||||
%main_out = OpTypeStruct %v4float
|
||||
%98 = OpTypeFunction %main_out
|
||||
%func_ = OpFunction %void None %18
|
||||
%21 = OpLabel
|
||||
%x_66_phi = OpVariable %_ptr_Function_int Function %9
|
||||
%x_67 = OpVariable %_ptr_Function_int Function %9
|
||||
%27 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %int_1
|
||||
%28 = OpLoad %int %27
|
||||
%30 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %int_0
|
||||
%31 = OpLoad %int %30
|
||||
OpStore %x_66_phi %31
|
||||
OpBranch %32
|
||||
%32 = OpLabel
|
||||
OpLoopMerge %33 %34 None
|
||||
OpBranch %35
|
||||
%35 = OpLabel
|
||||
%37 = OpLoad %int %x_66_phi
|
||||
%39 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %int_3
|
||||
%40 = OpLoad %int %39
|
||||
%41 = OpSLessThan %bool %37 %40
|
||||
OpSelectionMerge %43 None
|
||||
OpBranchConditional %41 %44 %45
|
||||
%44 = OpLabel
|
||||
OpBranch %43
|
||||
%45 = OpLabel
|
||||
OpBranch %33
|
||||
%43 = OpLabel
|
||||
OpBranch %34
|
||||
%34 = OpLabel
|
||||
%46 = OpLoad %int %x_GLF_global_loop_count
|
||||
%47 = OpIAdd %int %46 %int_1
|
||||
OpStore %x_GLF_global_loop_count %47
|
||||
%48 = OpIAdd %int %37 %int_1
|
||||
OpStore %x_67 %48
|
||||
%49 = OpLoad %int %x_67
|
||||
OpStore %x_66_phi %49
|
||||
OpBranch %32
|
||||
%33 = OpLabel
|
||||
%50 = OpSLessThan %bool %28 %28
|
||||
OpSelectionMerge %51 None
|
||||
OpBranchConditional %50 %52 %51
|
||||
%52 = OpLabel
|
||||
OpReturn
|
||||
%51 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%main_1 = OpFunction %void None %18
|
||||
%54 = OpLabel
|
||||
OpStore %x_GLF_global_loop_count %int_0
|
||||
OpBranch %55
|
||||
%55 = OpLabel
|
||||
OpLoopMerge %56 %57 None
|
||||
OpBranch %58
|
||||
%58 = OpLabel
|
||||
%59 = OpLoad %int %x_GLF_global_loop_count
|
||||
%61 = OpSLessThan %bool %59 %int_10
|
||||
OpSelectionMerge %62 None
|
||||
OpBranchConditional %61 %63 %64
|
||||
%63 = OpLabel
|
||||
OpBranch %62
|
||||
%64 = OpLabel
|
||||
OpBranch %56
|
||||
%62 = OpLabel
|
||||
OpBranch %57
|
||||
%57 = OpLabel
|
||||
%65 = OpLoad %int %x_GLF_global_loop_count
|
||||
%66 = OpIAdd %int %65 %int_1
|
||||
OpStore %x_GLF_global_loop_count %66
|
||||
%67 = OpFunctionCall %void %func_
|
||||
OpBranch %55
|
||||
%56 = OpLabel
|
||||
OpBranch %68
|
||||
%68 = OpLabel
|
||||
OpLoopMerge %69 %70 None
|
||||
OpBranch %71
|
||||
%71 = OpLabel
|
||||
%72 = OpLoad %int %x_GLF_global_loop_count
|
||||
%73 = OpSLessThan %bool %72 %int_10
|
||||
OpSelectionMerge %74 None
|
||||
OpBranchConditional %73 %75 %76
|
||||
%75 = OpLabel
|
||||
OpBranch %74
|
||||
%76 = OpLabel
|
||||
OpBranch %69
|
||||
%74 = OpLabel
|
||||
OpBranch %70
|
||||
%70 = OpLabel
|
||||
%77 = OpLoad %int %x_GLF_global_loop_count
|
||||
%78 = OpIAdd %int %77 %int_1
|
||||
OpStore %x_GLF_global_loop_count %78
|
||||
OpBranch %68
|
||||
%69 = OpLabel
|
||||
%79 = OpLoad %int %x_GLF_global_loop_count
|
||||
%81 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %int_2
|
||||
%82 = OpLoad %int %81
|
||||
%83 = OpIEqual %bool %79 %82
|
||||
OpSelectionMerge %84 None
|
||||
OpBranchConditional %83 %85 %86
|
||||
%85 = OpLabel
|
||||
%87 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %int_1
|
||||
%88 = OpLoad %int %87
|
||||
%89 = OpConvertSToF %float %88
|
||||
%90 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %int_0
|
||||
%91 = OpLoad %int %90
|
||||
%92 = OpConvertSToF %float %91
|
||||
%93 = OpCompositeConstruct %v4float %89 %92 %92 %89
|
||||
OpStore %x_GLF_color %93
|
||||
OpBranch %84
|
||||
%86 = OpLabel
|
||||
%94 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %int_0
|
||||
%95 = OpLoad %int %94
|
||||
%96 = OpConvertSToF %float %95
|
||||
%97 = OpCompositeConstruct %v4float %96 %96 %96 %96
|
||||
OpStore %x_GLF_color %97
|
||||
OpBranch %84
|
||||
%84 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%main_inner = OpFunction %main_out None %98
|
||||
%101 = OpLabel
|
||||
%102 = OpFunctionCall %void %main_1
|
||||
%103 = OpLoad %v4float %x_GLF_color
|
||||
%104 = OpCompositeConstruct %main_out %103
|
||||
OpReturnValue %104
|
||||
OpFunctionEnd
|
||||
%main = OpFunction %void None %18
|
||||
%106 = OpLabel
|
||||
%107 = OpFunctionCall %main_out %main_inner
|
||||
%108 = OpCompositeExtract %v4float %107 0
|
||||
OpStore %x_GLF_color_1_1 %108
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -1,93 +0,0 @@
|
||||
type Arr = [[stride(16)]] array<i32, 4>;
|
||||
|
||||
[[block]]
|
||||
struct buf0 {
|
||||
x_GLF_uniform_int_values : Arr;
|
||||
};
|
||||
|
||||
var<private> x_GLF_global_loop_count : i32;
|
||||
|
||||
[[group(0), binding(0)]] var<uniform> x_7 : buf0;
|
||||
|
||||
var<private> x_GLF_color : vec4<f32>;
|
||||
|
||||
fn func_() {
|
||||
var x_66_phi : i32;
|
||||
let x_62 : i32 = x_7.x_GLF_uniform_int_values[1];
|
||||
let x_64 : i32 = x_7.x_GLF_uniform_int_values[0];
|
||||
x_66_phi = x_64;
|
||||
loop {
|
||||
var x_67 : i32;
|
||||
let x_66 : i32 = x_66_phi;
|
||||
let x_70 : i32 = x_7.x_GLF_uniform_int_values[3];
|
||||
if ((x_66 < x_70)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
||||
continuing {
|
||||
let x_73 : i32 = x_GLF_global_loop_count;
|
||||
x_GLF_global_loop_count = (x_73 + 1);
|
||||
x_67 = (x_66 + 1);
|
||||
x_66_phi = x_67;
|
||||
}
|
||||
}
|
||||
if ((x_62 < x_62)) {
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
fn main_1() {
|
||||
x_GLF_global_loop_count = 0;
|
||||
loop {
|
||||
let x_28 : i32 = x_GLF_global_loop_count;
|
||||
if ((x_28 < 10)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
||||
continuing {
|
||||
let x_32 : i32 = x_GLF_global_loop_count;
|
||||
x_GLF_global_loop_count = (x_32 + 1);
|
||||
func_();
|
||||
}
|
||||
}
|
||||
loop {
|
||||
let x_36 : i32 = x_GLF_global_loop_count;
|
||||
if ((x_36 < 10)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
||||
continuing {
|
||||
let x_40 : i32 = x_GLF_global_loop_count;
|
||||
x_GLF_global_loop_count = (x_40 + 1);
|
||||
}
|
||||
}
|
||||
let x_42 : i32 = x_GLF_global_loop_count;
|
||||
let x_44 : i32 = x_7.x_GLF_uniform_int_values[2];
|
||||
if ((x_42 == x_44)) {
|
||||
let x_50 : i32 = x_7.x_GLF_uniform_int_values[1];
|
||||
let x_51 : f32 = f32(x_50);
|
||||
let x_53 : i32 = x_7.x_GLF_uniform_int_values[0];
|
||||
let x_54 : f32 = f32(x_53);
|
||||
x_GLF_color = vec4<f32>(x_51, x_54, x_54, x_51);
|
||||
} else {
|
||||
let x_57 : i32 = x_7.x_GLF_uniform_int_values[0];
|
||||
let x_58 : f32 = f32(x_57);
|
||||
x_GLF_color = vec4<f32>(x_58, x_58, x_58, x_58);
|
||||
}
|
||||
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