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,71 +0,0 @@
cbuffer cbuffer_x_7 : register(b1, space0) {
uint4 x_7[2];
};
cbuffer cbuffer_x_9 : register(b0, space0) {
uint4 x_9[4];
};
static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
void main_1() {
float f = 0.0f;
float arr[10] = (float[10])0;
f = 2.0f;
const uint scalar_offset = ((16u * uint(0))) / 4;
const float x_37 = asfloat(x_7[scalar_offset / 4][scalar_offset % 4]);
const uint scalar_offset_1 = ((16u * uint(0))) / 4;
const float x_39 = asfloat(x_7[scalar_offset_1 / 4][scalar_offset_1 % 4]);
const uint scalar_offset_2 = ((16u * uint(0))) / 4;
const float x_41 = asfloat(x_7[scalar_offset_2 / 4][scalar_offset_2 % 4]);
const uint scalar_offset_3 = ((16u * uint(0))) / 4;
const float x_43 = asfloat(x_7[scalar_offset_3 / 4][scalar_offset_3 % 4]);
const uint scalar_offset_4 = ((16u * uint(0))) / 4;
const float x_45 = asfloat(x_7[scalar_offset_4 / 4][scalar_offset_4 % 4]);
const uint scalar_offset_5 = ((16u * uint(0))) / 4;
const float x_47 = asfloat(x_7[scalar_offset_5 / 4][scalar_offset_5 % 4]);
const uint scalar_offset_6 = ((16u * uint(0))) / 4;
const float x_49 = asfloat(x_7[scalar_offset_6 / 4][scalar_offset_6 % 4]);
const float x_50 = f;
const float x_52 = asfloat(x_7[1].x);
const uint scalar_offset_7 = ((16u * uint(0))) / 4;
const float x_55 = asfloat(x_7[scalar_offset_7 / 4][scalar_offset_7 % 4]);
const uint scalar_offset_8 = ((16u * uint(0))) / 4;
const float x_57 = asfloat(x_7[scalar_offset_8 / 4][scalar_offset_8 % 4]);
const float tint_symbol_3[10] = {x_37, x_39, x_41, x_43, x_45, x_47, x_49, pow(x_50, x_52), x_55, x_57};
arr = tint_symbol_3;
const uint scalar_offset_9 = ((16u * uint(0))) / 4;
const int x_60 = asint(x_9[scalar_offset_9 / 4][scalar_offset_9 % 4]);
const float x_62 = arr[x_60];
const int x_65 = asint(x_9[3].x);
if ((int(x_62) == x_65)) {
const int x_71 = asint(x_9[1].x);
const int x_74 = asint(x_9[2].x);
const int x_77 = asint(x_9[2].x);
const int x_80 = asint(x_9[1].x);
x_GLF_color = float4(float(x_71), float(x_74), float(x_77), float(x_80));
} else {
const int x_84 = asint(x_9[2].x);
const float x_85 = float(x_84);
x_GLF_color = float4(x_85, x_85, x_85, x_85);
}
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_4 = {x_GLF_color};
return tint_symbol_4;
}
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,81 +0,0 @@
#include <metal_stdlib>
using namespace metal;
struct tint_padded_array_element {
/* 0x0000 */ float el;
/* 0x0004 */ int8_t tint_pad[12];
};
struct tint_array_wrapper {
/* 0x0000 */ tint_padded_array_element arr[2];
};
struct buf1 {
/* 0x0000 */ tint_array_wrapper x_GLF_uniform_float_values;
};
struct tint_padded_array_element_1 {
/* 0x0000 */ int el;
/* 0x0004 */ int8_t tint_pad_1[12];
};
struct tint_array_wrapper_1 {
/* 0x0000 */ tint_padded_array_element_1 arr[4];
};
struct buf0 {
/* 0x0000 */ tint_array_wrapper_1 x_GLF_uniform_int_values;
};
struct tint_array_wrapper_2 {
float 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 buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_4) {
float f = 0.0f;
tint_array_wrapper_2 arr = {};
f = 2.0f;
float const x_37 = x_7.x_GLF_uniform_float_values.arr[0].el;
float const x_39 = x_7.x_GLF_uniform_float_values.arr[0].el;
float const x_41 = x_7.x_GLF_uniform_float_values.arr[0].el;
float const x_43 = x_7.x_GLF_uniform_float_values.arr[0].el;
float const x_45 = x_7.x_GLF_uniform_float_values.arr[0].el;
float const x_47 = x_7.x_GLF_uniform_float_values.arr[0].el;
float const x_49 = x_7.x_GLF_uniform_float_values.arr[0].el;
float const x_50 = f;
float const x_52 = x_7.x_GLF_uniform_float_values.arr[1].el;
float const x_55 = x_7.x_GLF_uniform_float_values.arr[0].el;
float const x_57 = x_7.x_GLF_uniform_float_values.arr[0].el;
tint_array_wrapper_2 const tint_symbol_2 = {.arr={x_37, x_39, x_41, x_43, x_45, x_47, x_49, pow(x_50, x_52), x_55, x_57}};
arr = tint_symbol_2;
int const x_60 = x_9.x_GLF_uniform_int_values.arr[0].el;
float const x_62 = arr.arr[x_60];
int const x_65 = x_9.x_GLF_uniform_int_values.arr[3].el;
if ((int(x_62) == x_65)) {
int const x_71 = x_9.x_GLF_uniform_int_values.arr[1].el;
int const x_74 = x_9.x_GLF_uniform_int_values.arr[2].el;
int const x_77 = x_9.x_GLF_uniform_int_values.arr[2].el;
int const x_80 = x_9.x_GLF_uniform_int_values.arr[1].el;
*(tint_symbol_4) = float4(float(x_71), float(x_74), float(x_77), float(x_80));
} else {
int const x_84 = x_9.x_GLF_uniform_int_values.arr[2].el;
float const x_85 = float(x_84);
*(tint_symbol_4) = float4(x_85, x_85, x_85, x_85);
}
return;
}
main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_5) {
main_1(x_7, x_9, tint_symbol_5);
main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)};
return tint_symbol_3;
}
fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(0)]], constant buf0& x_9 [[buffer(1)]]) {
thread float4 tint_symbol_6 = 0.0f;
main_out const inner_result = tint_symbol_inner(x_7, x_9, &(tint_symbol_6));
tint_symbol_1 wrapper_result = {};
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
return wrapper_result;
}

View File

@@ -1,157 +0,0 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 104
; Schema: 0
OpCapability Shader
%59 = OpExtInstImport "GLSL.std.450"
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 %buf1 "buf1"
OpMemberName %buf1 0 "x_GLF_uniform_float_values"
OpName %x_7 "x_7"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "x_GLF_uniform_int_values"
OpName %x_9 "x_9"
OpName %x_GLF_color "x_GLF_color"
OpName %main_1 "main_1"
OpName %f "f"
OpName %arr "arr"
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 %buf1 Block
OpMemberDecorate %buf1 0 Offset 0
OpDecorate %_arr_float_uint_2 ArrayStride 16
OpDecorate %x_7 NonWritable
OpDecorate %x_7 DescriptorSet 0
OpDecorate %x_7 Binding 1
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %_arr_int_uint_4 ArrayStride 16
OpDecorate %x_9 NonWritable
OpDecorate %x_9 DescriptorSet 0
OpDecorate %x_9 Binding 0
OpDecorate %_arr_float_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
%uint = OpTypeInt 32 0
%uint_2 = OpConstant %uint 2
%_arr_float_uint_2 = OpTypeArray %float %uint_2
%buf1 = OpTypeStruct %_arr_float_uint_2
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%x_7 = OpVariable %_ptr_Uniform_buf1 Uniform
%int = OpTypeInt 32 1
%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_9 = OpVariable %_ptr_Uniform_buf0 Uniform
%_ptr_Private_v4float = OpTypePointer Private %v4float
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %5
%void = OpTypeVoid
%20 = OpTypeFunction %void
%_ptr_Function_float = OpTypePointer Function %float
%26 = OpConstantNull %float
%uint_10 = OpConstant %uint 10
%_arr_float_uint_10 = OpTypeArray %float %uint_10
%_ptr_Function__arr_float_uint_10 = OpTypePointer Function %_arr_float_uint_10
%31 = OpConstantNull %_arr_float_uint_10
%float_2 = OpConstant %float 2
%uint_0 = OpConstant %uint 0
%int_0 = OpConstant %int 0
%_ptr_Uniform_float = OpTypePointer Uniform %float
%int_1 = OpConstant %int 1
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_3 = OpConstant %int 3
%bool = OpTypeBool
%int_2 = OpConstant %int 2
%main_out = OpTypeStruct %v4float
%93 = OpTypeFunction %main_out
%main_1 = OpFunction %void None %20
%23 = OpLabel
%f = OpVariable %_ptr_Function_float Function %26
%arr = OpVariable %_ptr_Function__arr_float_uint_10 Function %31
OpStore %f %float_2
%36 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_0
%37 = OpLoad %float %36
%38 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_0
%39 = OpLoad %float %38
%40 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_0
%41 = OpLoad %float %40
%42 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_0
%43 = OpLoad %float %42
%44 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_0
%45 = OpLoad %float %44
%46 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_0
%47 = OpLoad %float %46
%48 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_0
%49 = OpLoad %float %48
%50 = OpLoad %float %f
%52 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_1
%53 = OpLoad %float %52
%54 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_0
%55 = OpLoad %float %54
%56 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_0
%57 = OpLoad %float %56
%58 = OpExtInst %float %59 Pow %50 %53
%60 = OpCompositeConstruct %_arr_float_uint_10 %37 %39 %41 %43 %45 %47 %49 %58 %55 %57
OpStore %arr %60
%62 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_0
%63 = OpLoad %int %62
%64 = OpAccessChain %_ptr_Function_float %arr %63
%65 = OpLoad %float %64
%67 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_3
%68 = OpLoad %int %67
%69 = OpConvertFToS %int %65
%70 = OpIEqual %bool %69 %68
OpSelectionMerge %72 None
OpBranchConditional %70 %73 %74
%73 = OpLabel
%75 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_1
%76 = OpLoad %int %75
%78 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_2
%79 = OpLoad %int %78
%80 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_2
%81 = OpLoad %int %80
%82 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_1
%83 = OpLoad %int %82
%84 = OpConvertSToF %float %76
%85 = OpConvertSToF %float %79
%86 = OpConvertSToF %float %81
%87 = OpConvertSToF %float %83
%88 = OpCompositeConstruct %v4float %84 %85 %86 %87
OpStore %x_GLF_color %88
OpBranch %72
%74 = OpLabel
%89 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_2
%90 = OpLoad %int %89
%91 = OpConvertSToF %float %90
%92 = OpCompositeConstruct %v4float %91 %91 %91 %91
OpStore %x_GLF_color %92
OpBranch %72
%72 = OpLabel
OpReturn
OpFunctionEnd
%main_inner = OpFunction %main_out None %93
%96 = OpLabel
%97 = OpFunctionCall %void %main_1
%98 = OpLoad %v4float %x_GLF_color
%99 = OpCompositeConstruct %main_out %98
OpReturnValue %99
OpFunctionEnd
%main = OpFunction %void None %20
%101 = OpLabel
%102 = OpFunctionCall %main_out %main_inner
%103 = OpCompositeExtract %v4float %102 0
OpStore %x_GLF_color_1_1 %103
OpReturn
OpFunctionEnd

View File

@@ -1,63 +0,0 @@
type Arr = [[stride(16)]] array<f32, 2>;
[[block]]
struct buf1 {
x_GLF_uniform_float_values : Arr;
};
type Arr_1 = [[stride(16)]] array<i32, 4>;
[[block]]
struct buf0 {
x_GLF_uniform_int_values : Arr_1;
};
[[group(0), binding(1)]] var<uniform> x_7 : buf1;
[[group(0), binding(0)]] var<uniform> x_9 : buf0;
var<private> x_GLF_color : vec4<f32>;
fn main_1() {
var f : f32;
var arr : array<f32, 10>;
f = 2.0;
let x_37 : f32 = x_7.x_GLF_uniform_float_values[0];
let x_39 : f32 = x_7.x_GLF_uniform_float_values[0];
let x_41 : f32 = x_7.x_GLF_uniform_float_values[0];
let x_43 : f32 = x_7.x_GLF_uniform_float_values[0];
let x_45 : f32 = x_7.x_GLF_uniform_float_values[0];
let x_47 : f32 = x_7.x_GLF_uniform_float_values[0];
let x_49 : f32 = x_7.x_GLF_uniform_float_values[0];
let x_50 : f32 = f;
let x_52 : f32 = x_7.x_GLF_uniform_float_values[1];
let x_55 : f32 = x_7.x_GLF_uniform_float_values[0];
let x_57 : f32 = x_7.x_GLF_uniform_float_values[0];
arr = array<f32, 10>(x_37, x_39, x_41, x_43, x_45, x_47, x_49, pow(x_50, x_52), x_55, x_57);
let x_60 : i32 = x_9.x_GLF_uniform_int_values[0];
let x_62 : f32 = arr[x_60];
let x_65 : i32 = x_9.x_GLF_uniform_int_values[3];
if ((i32(x_62) == x_65)) {
let x_71 : i32 = x_9.x_GLF_uniform_int_values[1];
let x_74 : i32 = x_9.x_GLF_uniform_int_values[2];
let x_77 : i32 = x_9.x_GLF_uniform_int_values[2];
let x_80 : i32 = x_9.x_GLF_uniform_int_values[1];
x_GLF_color = vec4<f32>(f32(x_71), f32(x_74), f32(x_77), f32(x_80));
} else {
let x_84 : i32 = x_9.x_GLF_uniform_int_values[2];
let x_85 : f32 = f32(x_84);
x_GLF_color = vec4<f32>(x_85, x_85, x_85, x_85);
}
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,71 +0,0 @@
cbuffer cbuffer_x_7 : register(b1, space0) {
uint4 x_7[2];
};
cbuffer cbuffer_x_9 : register(b0, space0) {
uint4 x_9[4];
};
static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
void main_1() {
float f = 0.0f;
float arr[10] = (float[10])0;
f = 2.0f;
const uint scalar_offset = ((16u * uint(0))) / 4;
const float x_37 = asfloat(x_7[scalar_offset / 4][scalar_offset % 4]);
const uint scalar_offset_1 = ((16u * uint(0))) / 4;
const float x_39 = asfloat(x_7[scalar_offset_1 / 4][scalar_offset_1 % 4]);
const uint scalar_offset_2 = ((16u * uint(0))) / 4;
const float x_41 = asfloat(x_7[scalar_offset_2 / 4][scalar_offset_2 % 4]);
const uint scalar_offset_3 = ((16u * uint(0))) / 4;
const float x_43 = asfloat(x_7[scalar_offset_3 / 4][scalar_offset_3 % 4]);
const uint scalar_offset_4 = ((16u * uint(0))) / 4;
const float x_45 = asfloat(x_7[scalar_offset_4 / 4][scalar_offset_4 % 4]);
const uint scalar_offset_5 = ((16u * uint(0))) / 4;
const float x_47 = asfloat(x_7[scalar_offset_5 / 4][scalar_offset_5 % 4]);
const uint scalar_offset_6 = ((16u * uint(0))) / 4;
const float x_49 = asfloat(x_7[scalar_offset_6 / 4][scalar_offset_6 % 4]);
const float x_50 = f;
const float x_52 = asfloat(x_7[1].x);
const uint scalar_offset_7 = ((16u * uint(0))) / 4;
const float x_55 = asfloat(x_7[scalar_offset_7 / 4][scalar_offset_7 % 4]);
const uint scalar_offset_8 = ((16u * uint(0))) / 4;
const float x_57 = asfloat(x_7[scalar_offset_8 / 4][scalar_offset_8 % 4]);
const float tint_symbol_3[10] = {x_37, x_39, x_41, x_43, x_45, x_47, x_49, pow(x_50, x_52), x_55, x_57};
arr = tint_symbol_3;
const uint scalar_offset_9 = ((16u * uint(0))) / 4;
const int x_60 = asint(x_9[scalar_offset_9 / 4][scalar_offset_9 % 4]);
const float x_62 = arr[x_60];
const int x_65 = asint(x_9[3].x);
if ((int(x_62) == x_65)) {
const int x_71 = asint(x_9[1].x);
const int x_74 = asint(x_9[2].x);
const int x_77 = asint(x_9[2].x);
const int x_80 = asint(x_9[1].x);
x_GLF_color = float4(float(x_71), float(x_74), float(x_77), float(x_80));
} else {
const int x_84 = asint(x_9[2].x);
const float x_85 = float(x_84);
x_GLF_color = float4(x_85, x_85, x_85, x_85);
}
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_4 = {x_GLF_color};
return tint_symbol_4;
}
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,81 +0,0 @@
#include <metal_stdlib>
using namespace metal;
struct tint_padded_array_element {
/* 0x0000 */ float el;
/* 0x0004 */ int8_t tint_pad[12];
};
struct tint_array_wrapper {
/* 0x0000 */ tint_padded_array_element arr[2];
};
struct buf1 {
/* 0x0000 */ tint_array_wrapper x_GLF_uniform_float_values;
};
struct tint_padded_array_element_1 {
/* 0x0000 */ int el;
/* 0x0004 */ int8_t tint_pad_1[12];
};
struct tint_array_wrapper_1 {
/* 0x0000 */ tint_padded_array_element_1 arr[4];
};
struct buf0 {
/* 0x0000 */ tint_array_wrapper_1 x_GLF_uniform_int_values;
};
struct tint_array_wrapper_2 {
float 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 buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_4) {
float f = 0.0f;
tint_array_wrapper_2 arr = {};
f = 2.0f;
float const x_37 = x_7.x_GLF_uniform_float_values.arr[0].el;
float const x_39 = x_7.x_GLF_uniform_float_values.arr[0].el;
float const x_41 = x_7.x_GLF_uniform_float_values.arr[0].el;
float const x_43 = x_7.x_GLF_uniform_float_values.arr[0].el;
float const x_45 = x_7.x_GLF_uniform_float_values.arr[0].el;
float const x_47 = x_7.x_GLF_uniform_float_values.arr[0].el;
float const x_49 = x_7.x_GLF_uniform_float_values.arr[0].el;
float const x_50 = f;
float const x_52 = x_7.x_GLF_uniform_float_values.arr[1].el;
float const x_55 = x_7.x_GLF_uniform_float_values.arr[0].el;
float const x_57 = x_7.x_GLF_uniform_float_values.arr[0].el;
tint_array_wrapper_2 const tint_symbol_2 = {.arr={x_37, x_39, x_41, x_43, x_45, x_47, x_49, pow(x_50, x_52), x_55, x_57}};
arr = tint_symbol_2;
int const x_60 = x_9.x_GLF_uniform_int_values.arr[0].el;
float const x_62 = arr.arr[x_60];
int const x_65 = x_9.x_GLF_uniform_int_values.arr[3].el;
if ((int(x_62) == x_65)) {
int const x_71 = x_9.x_GLF_uniform_int_values.arr[1].el;
int const x_74 = x_9.x_GLF_uniform_int_values.arr[2].el;
int const x_77 = x_9.x_GLF_uniform_int_values.arr[2].el;
int const x_80 = x_9.x_GLF_uniform_int_values.arr[1].el;
*(tint_symbol_4) = float4(float(x_71), float(x_74), float(x_77), float(x_80));
} else {
int const x_84 = x_9.x_GLF_uniform_int_values.arr[2].el;
float const x_85 = float(x_84);
*(tint_symbol_4) = float4(x_85, x_85, x_85, x_85);
}
return;
}
main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_5) {
main_1(x_7, x_9, tint_symbol_5);
main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)};
return tint_symbol_3;
}
fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(0)]], constant buf0& x_9 [[buffer(1)]]) {
thread float4 tint_symbol_6 = 0.0f;
main_out const inner_result = tint_symbol_inner(x_7, x_9, &(tint_symbol_6));
tint_symbol_1 wrapper_result = {};
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
return wrapper_result;
}

View File

@@ -1,157 +0,0 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 104
; Schema: 0
OpCapability Shader
%59 = OpExtInstImport "GLSL.std.450"
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 %buf1 "buf1"
OpMemberName %buf1 0 "x_GLF_uniform_float_values"
OpName %x_7 "x_7"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "x_GLF_uniform_int_values"
OpName %x_9 "x_9"
OpName %x_GLF_color "x_GLF_color"
OpName %main_1 "main_1"
OpName %f "f"
OpName %arr "arr"
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 %buf1 Block
OpMemberDecorate %buf1 0 Offset 0
OpDecorate %_arr_float_uint_2 ArrayStride 16
OpDecorate %x_7 NonWritable
OpDecorate %x_7 DescriptorSet 0
OpDecorate %x_7 Binding 1
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %_arr_int_uint_4 ArrayStride 16
OpDecorate %x_9 NonWritable
OpDecorate %x_9 DescriptorSet 0
OpDecorate %x_9 Binding 0
OpDecorate %_arr_float_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
%uint = OpTypeInt 32 0
%uint_2 = OpConstant %uint 2
%_arr_float_uint_2 = OpTypeArray %float %uint_2
%buf1 = OpTypeStruct %_arr_float_uint_2
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%x_7 = OpVariable %_ptr_Uniform_buf1 Uniform
%int = OpTypeInt 32 1
%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_9 = OpVariable %_ptr_Uniform_buf0 Uniform
%_ptr_Private_v4float = OpTypePointer Private %v4float
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %5
%void = OpTypeVoid
%20 = OpTypeFunction %void
%_ptr_Function_float = OpTypePointer Function %float
%26 = OpConstantNull %float
%uint_10 = OpConstant %uint 10
%_arr_float_uint_10 = OpTypeArray %float %uint_10
%_ptr_Function__arr_float_uint_10 = OpTypePointer Function %_arr_float_uint_10
%31 = OpConstantNull %_arr_float_uint_10
%float_2 = OpConstant %float 2
%uint_0 = OpConstant %uint 0
%int_0 = OpConstant %int 0
%_ptr_Uniform_float = OpTypePointer Uniform %float
%int_1 = OpConstant %int 1
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_3 = OpConstant %int 3
%bool = OpTypeBool
%int_2 = OpConstant %int 2
%main_out = OpTypeStruct %v4float
%93 = OpTypeFunction %main_out
%main_1 = OpFunction %void None %20
%23 = OpLabel
%f = OpVariable %_ptr_Function_float Function %26
%arr = OpVariable %_ptr_Function__arr_float_uint_10 Function %31
OpStore %f %float_2
%36 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_0
%37 = OpLoad %float %36
%38 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_0
%39 = OpLoad %float %38
%40 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_0
%41 = OpLoad %float %40
%42 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_0
%43 = OpLoad %float %42
%44 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_0
%45 = OpLoad %float %44
%46 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_0
%47 = OpLoad %float %46
%48 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_0
%49 = OpLoad %float %48
%50 = OpLoad %float %f
%52 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_1
%53 = OpLoad %float %52
%54 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_0
%55 = OpLoad %float %54
%56 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_0
%57 = OpLoad %float %56
%58 = OpExtInst %float %59 Pow %50 %53
%60 = OpCompositeConstruct %_arr_float_uint_10 %37 %39 %41 %43 %45 %47 %49 %58 %55 %57
OpStore %arr %60
%62 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_0
%63 = OpLoad %int %62
%64 = OpAccessChain %_ptr_Function_float %arr %63
%65 = OpLoad %float %64
%67 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_3
%68 = OpLoad %int %67
%69 = OpConvertFToS %int %65
%70 = OpIEqual %bool %69 %68
OpSelectionMerge %72 None
OpBranchConditional %70 %73 %74
%73 = OpLabel
%75 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_1
%76 = OpLoad %int %75
%78 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_2
%79 = OpLoad %int %78
%80 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_2
%81 = OpLoad %int %80
%82 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_1
%83 = OpLoad %int %82
%84 = OpConvertSToF %float %76
%85 = OpConvertSToF %float %79
%86 = OpConvertSToF %float %81
%87 = OpConvertSToF %float %83
%88 = OpCompositeConstruct %v4float %84 %85 %86 %87
OpStore %x_GLF_color %88
OpBranch %72
%74 = OpLabel
%89 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_2
%90 = OpLoad %int %89
%91 = OpConvertSToF %float %90
%92 = OpCompositeConstruct %v4float %91 %91 %91 %91
OpStore %x_GLF_color %92
OpBranch %72
%72 = OpLabel
OpReturn
OpFunctionEnd
%main_inner = OpFunction %main_out None %93
%96 = OpLabel
%97 = OpFunctionCall %void %main_1
%98 = OpLoad %v4float %x_GLF_color
%99 = OpCompositeConstruct %main_out %98
OpReturnValue %99
OpFunctionEnd
%main = OpFunction %void None %20
%101 = OpLabel
%102 = OpFunctionCall %main_out %main_inner
%103 = OpCompositeExtract %v4float %102 0
OpStore %x_GLF_color_1_1 %103
OpReturn
OpFunctionEnd

View File

@@ -1,63 +0,0 @@
type Arr = [[stride(16)]] array<f32, 2>;
[[block]]
struct buf1 {
x_GLF_uniform_float_values : Arr;
};
type Arr_1 = [[stride(16)]] array<i32, 4>;
[[block]]
struct buf0 {
x_GLF_uniform_int_values : Arr_1;
};
[[group(0), binding(1)]] var<uniform> x_7 : buf1;
[[group(0), binding(0)]] var<uniform> x_9 : buf0;
var<private> x_GLF_color : vec4<f32>;
fn main_1() {
var f : f32;
var arr : array<f32, 10>;
f = 2.0;
let x_37 : f32 = x_7.x_GLF_uniform_float_values[0];
let x_39 : f32 = x_7.x_GLF_uniform_float_values[0];
let x_41 : f32 = x_7.x_GLF_uniform_float_values[0];
let x_43 : f32 = x_7.x_GLF_uniform_float_values[0];
let x_45 : f32 = x_7.x_GLF_uniform_float_values[0];
let x_47 : f32 = x_7.x_GLF_uniform_float_values[0];
let x_49 : f32 = x_7.x_GLF_uniform_float_values[0];
let x_50 : f32 = f;
let x_52 : f32 = x_7.x_GLF_uniform_float_values[1];
let x_55 : f32 = x_7.x_GLF_uniform_float_values[0];
let x_57 : f32 = x_7.x_GLF_uniform_float_values[0];
arr = array<f32, 10>(x_37, x_39, x_41, x_43, x_45, x_47, x_49, pow(x_50, x_52), x_55, x_57);
let x_60 : i32 = x_9.x_GLF_uniform_int_values[0];
let x_62 : f32 = arr[x_60];
let x_65 : i32 = x_9.x_GLF_uniform_int_values[3];
if ((i32(x_62) == x_65)) {
let x_71 : i32 = x_9.x_GLF_uniform_int_values[1];
let x_74 : i32 = x_9.x_GLF_uniform_int_values[2];
let x_77 : i32 = x_9.x_GLF_uniform_int_values[2];
let x_80 : i32 = x_9.x_GLF_uniform_int_values[1];
x_GLF_color = vec4<f32>(f32(x_71), f32(x_74), f32(x_77), f32(x_80));
} else {
let x_84 : i32 = x_9.x_GLF_uniform_int_values[2];
let x_85 : f32 = f32(x_84);
x_GLF_color = vec4<f32>(x_85, x_85, x_85, x_85);
}
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);
}