mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-15 08:06:19 +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 @@
|
||||
cbuffer cbuffer_x_5 : register(b0, space0) {
|
||||
uint4 x_5[4];
|
||||
};
|
||||
static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
|
||||
void main_1() {
|
||||
int x_28 = 0;
|
||||
int x_29 = 0;
|
||||
int x_28_phi = 0;
|
||||
int x_31_phi = 0;
|
||||
int x_42_phi = 0;
|
||||
const int x_24 = min(1, reversebits(1));
|
||||
const int x_26 = asint(x_5[3].x);
|
||||
x_28_phi = x_26;
|
||||
x_31_phi = 1;
|
||||
while (true) {
|
||||
int x_32 = 0;
|
||||
x_28 = x_28_phi;
|
||||
const int x_31 = x_31_phi;
|
||||
x_42_phi = x_28;
|
||||
if ((x_31 <= (x_24 - 1))) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
x_29 = asint((x_28 + asint(x_31)));
|
||||
const uint scalar_offset = ((16u * uint(0))) / 4;
|
||||
const int x_38 = asint(x_5[scalar_offset / 4][scalar_offset % 4]);
|
||||
if ((x_38 == 1)) {
|
||||
x_42_phi = x_29;
|
||||
break;
|
||||
}
|
||||
{
|
||||
x_32 = (x_31 + 1);
|
||||
x_28_phi = x_29;
|
||||
x_31_phi = x_32;
|
||||
}
|
||||
}
|
||||
const int x_42 = x_42_phi;
|
||||
const int x_44 = asint(x_5[2].x);
|
||||
if ((x_42 == x_44)) {
|
||||
const uint scalar_offset_1 = ((16u * uint(0))) / 4;
|
||||
const int x_50 = asint(x_5[scalar_offset_1 / 4][scalar_offset_1 % 4]);
|
||||
const float x_51 = float(x_50);
|
||||
const int x_53 = asint(x_5[1].x);
|
||||
const float x_54 = float(x_53);
|
||||
x_GLF_color = float4(x_51, x_54, x_54, x_51);
|
||||
} else {
|
||||
const int x_57 = asint(x_5[1].x);
|
||||
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,81 +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 main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
|
||||
int x_28 = 0;
|
||||
int x_29 = 0;
|
||||
int x_28_phi = 0;
|
||||
int x_31_phi = 0;
|
||||
int x_42_phi = 0;
|
||||
int const x_24 = min(1, reverse_bits(1));
|
||||
int const x_26 = x_5.x_GLF_uniform_int_values.arr[3].el;
|
||||
x_28_phi = x_26;
|
||||
x_31_phi = 1;
|
||||
while (true) {
|
||||
int x_32 = 0;
|
||||
x_28 = x_28_phi;
|
||||
int const x_31 = x_31_phi;
|
||||
x_42_phi = x_28;
|
||||
if ((x_31 <= as_type<int>((as_type<uint>(x_24) - as_type<uint>(1))))) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
x_29 = as_type<int>(as_type<int>((as_type<uint>(x_28) + as_type<uint>(as_type<int>(x_31)))));
|
||||
int const x_38 = x_5.x_GLF_uniform_int_values.arr[0].el;
|
||||
if ((x_38 == 1)) {
|
||||
x_42_phi = x_29;
|
||||
break;
|
||||
}
|
||||
{
|
||||
x_32 = as_type<int>((as_type<uint>(x_31) + as_type<uint>(1)));
|
||||
x_28_phi = x_29;
|
||||
x_31_phi = x_32;
|
||||
}
|
||||
}
|
||||
int const x_42 = x_42_phi;
|
||||
int const x_44 = x_5.x_GLF_uniform_int_values.arr[2].el;
|
||||
if ((x_42 == x_44)) {
|
||||
int const x_50 = x_5.x_GLF_uniform_int_values.arr[0].el;
|
||||
float const x_51 = float(x_50);
|
||||
int const x_53 = x_5.x_GLF_uniform_int_values.arr[1].el;
|
||||
float const x_54 = float(x_53);
|
||||
*(tint_symbol_3) = float4(x_51, x_54, x_54, x_51);
|
||||
} else {
|
||||
int const x_57 = x_5.x_GLF_uniform_int_values.arr[1].el;
|
||||
float const x_58 = float(x_57);
|
||||
*(tint_symbol_3) = float4(x_58, x_58, x_58, x_58);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
|
||||
main_1(x_5, 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_5 [[buffer(0)]]) {
|
||||
thread float4 tint_symbol_5 = 0.0f;
|
||||
main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
|
||||
tint_symbol_1 wrapper_result = {};
|
||||
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
@@ -1,159 +0,0 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 93
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%27 = 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 %buf0 "buf0"
|
||||
OpMemberName %buf0 0 "x_GLF_uniform_int_values"
|
||||
OpName %x_5 "x_5"
|
||||
OpName %x_GLF_color "x_GLF_color"
|
||||
OpName %main_1 "main_1"
|
||||
OpName %x_28 "x_28"
|
||||
OpName %x_29 "x_29"
|
||||
OpName %x_28_phi "x_28_phi"
|
||||
OpName %x_31_phi "x_31_phi"
|
||||
OpName %x_42_phi "x_42_phi"
|
||||
OpName %x_32 "x_32"
|
||||
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_5 NonWritable
|
||||
OpDecorate %x_5 DescriptorSet 0
|
||||
OpDecorate %x_5 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
|
||||
%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_5 = OpVariable %_ptr_Uniform_buf0 Uniform
|
||||
%_ptr_Private_v4float = OpTypePointer Private %v4float
|
||||
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %5
|
||||
%void = OpTypeVoid
|
||||
%15 = OpTypeFunction %void
|
||||
%_ptr_Function_int = OpTypePointer Function %int
|
||||
%21 = OpConstantNull %int
|
||||
%int_1 = OpConstant %int 1
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%int_3 = OpConstant %int 3
|
||||
%_ptr_Uniform_int = OpTypePointer Uniform %int
|
||||
%bool = OpTypeBool
|
||||
%int_0 = OpConstant %int 0
|
||||
%int_2 = OpConstant %int 2
|
||||
%main_out = OpTypeStruct %v4float
|
||||
%82 = OpTypeFunction %main_out
|
||||
%main_1 = OpFunction %void None %15
|
||||
%18 = OpLabel
|
||||
%x_28 = OpVariable %_ptr_Function_int Function %21
|
||||
%x_29 = OpVariable %_ptr_Function_int Function %21
|
||||
%x_28_phi = OpVariable %_ptr_Function_int Function %21
|
||||
%x_31_phi = OpVariable %_ptr_Function_int Function %21
|
||||
%x_42_phi = OpVariable %_ptr_Function_int Function %21
|
||||
%x_32 = OpVariable %_ptr_Function_int Function %21
|
||||
%29 = OpBitReverse %int %int_1
|
||||
%26 = OpExtInst %int %27 SMin %int_1 %29
|
||||
%33 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_3
|
||||
%34 = OpLoad %int %33
|
||||
OpStore %x_28_phi %34
|
||||
OpStore %x_31_phi %int_1
|
||||
OpBranch %35
|
||||
%35 = OpLabel
|
||||
OpLoopMerge %36 %37 None
|
||||
OpBranch %38
|
||||
%38 = OpLabel
|
||||
%40 = OpLoad %int %x_28_phi
|
||||
OpStore %x_28 %40
|
||||
%41 = OpLoad %int %x_31_phi
|
||||
%42 = OpLoad %int %x_28
|
||||
OpStore %x_42_phi %42
|
||||
%43 = OpISub %int %26 %int_1
|
||||
%44 = OpSLessThanEqual %bool %41 %43
|
||||
OpSelectionMerge %46 None
|
||||
OpBranchConditional %44 %47 %48
|
||||
%47 = OpLabel
|
||||
OpBranch %46
|
||||
%48 = OpLabel
|
||||
OpBranch %36
|
||||
%46 = OpLabel
|
||||
%50 = OpLoad %int %x_28
|
||||
%51 = OpCopyObject %int %41
|
||||
%52 = OpIAdd %int %50 %51
|
||||
%49 = OpCopyObject %int %52
|
||||
OpStore %x_29 %49
|
||||
%54 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_0
|
||||
%55 = OpLoad %int %54
|
||||
%56 = OpIEqual %bool %55 %int_1
|
||||
OpSelectionMerge %57 None
|
||||
OpBranchConditional %56 %58 %57
|
||||
%58 = OpLabel
|
||||
%59 = OpLoad %int %x_29
|
||||
OpStore %x_42_phi %59
|
||||
OpBranch %36
|
||||
%57 = OpLabel
|
||||
OpBranch %37
|
||||
%37 = OpLabel
|
||||
%60 = OpIAdd %int %41 %int_1
|
||||
OpStore %x_32 %60
|
||||
%61 = OpLoad %int %x_29
|
||||
OpStore %x_28_phi %61
|
||||
%62 = OpLoad %int %x_32
|
||||
OpStore %x_31_phi %62
|
||||
OpBranch %35
|
||||
%36 = OpLabel
|
||||
%63 = OpLoad %int %x_42_phi
|
||||
%65 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_2
|
||||
%66 = OpLoad %int %65
|
||||
%67 = OpIEqual %bool %63 %66
|
||||
OpSelectionMerge %68 None
|
||||
OpBranchConditional %67 %69 %70
|
||||
%69 = OpLabel
|
||||
%71 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_0
|
||||
%72 = OpLoad %int %71
|
||||
%73 = OpConvertSToF %float %72
|
||||
%74 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_1
|
||||
%75 = OpLoad %int %74
|
||||
%76 = OpConvertSToF %float %75
|
||||
%77 = OpCompositeConstruct %v4float %73 %76 %76 %73
|
||||
OpStore %x_GLF_color %77
|
||||
OpBranch %68
|
||||
%70 = OpLabel
|
||||
%78 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_1
|
||||
%79 = OpLoad %int %78
|
||||
%80 = OpConvertSToF %float %79
|
||||
%81 = OpCompositeConstruct %v4float %80 %80 %80 %80
|
||||
OpStore %x_GLF_color %81
|
||||
OpBranch %68
|
||||
%68 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%main_inner = OpFunction %main_out None %82
|
||||
%85 = OpLabel
|
||||
%86 = OpFunctionCall %void %main_1
|
||||
%87 = OpLoad %v4float %x_GLF_color
|
||||
%88 = OpCompositeConstruct %main_out %87
|
||||
OpReturnValue %88
|
||||
OpFunctionEnd
|
||||
%main = OpFunction %void None %15
|
||||
%90 = OpLabel
|
||||
%91 = OpFunctionCall %main_out %main_inner
|
||||
%92 = OpCompositeExtract %v4float %91 0
|
||||
OpStore %x_GLF_color_1_1 %92
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -1,69 +0,0 @@
|
||||
type Arr = [[stride(16)]] array<i32, 4>;
|
||||
|
||||
[[block]]
|
||||
struct buf0 {
|
||||
x_GLF_uniform_int_values : Arr;
|
||||
};
|
||||
|
||||
[[group(0), binding(0)]] var<uniform> x_5 : buf0;
|
||||
|
||||
var<private> x_GLF_color : vec4<f32>;
|
||||
|
||||
fn main_1() {
|
||||
var x_28 : i32;
|
||||
var x_29 : i32;
|
||||
var x_28_phi : i32;
|
||||
var x_31_phi : i32;
|
||||
var x_42_phi : i32;
|
||||
let x_24 : i32 = min(1, reverseBits(1));
|
||||
let x_26 : i32 = x_5.x_GLF_uniform_int_values[3];
|
||||
x_28_phi = x_26;
|
||||
x_31_phi = 1;
|
||||
loop {
|
||||
var x_32 : i32;
|
||||
x_28 = x_28_phi;
|
||||
let x_31 : i32 = x_31_phi;
|
||||
x_42_phi = x_28;
|
||||
if ((x_31 <= (x_24 - 1))) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
x_29 = bitcast<i32>((x_28 + bitcast<i32>(x_31)));
|
||||
let x_38 : i32 = x_5.x_GLF_uniform_int_values[0];
|
||||
if ((x_38 == 1)) {
|
||||
x_42_phi = x_29;
|
||||
break;
|
||||
}
|
||||
|
||||
continuing {
|
||||
x_32 = (x_31 + 1);
|
||||
x_28_phi = x_29;
|
||||
x_31_phi = x_32;
|
||||
}
|
||||
}
|
||||
let x_42 : i32 = x_42_phi;
|
||||
let x_44 : i32 = x_5.x_GLF_uniform_int_values[2];
|
||||
if ((x_42 == x_44)) {
|
||||
let x_50 : i32 = x_5.x_GLF_uniform_int_values[0];
|
||||
let x_51 : f32 = f32(x_50);
|
||||
let x_53 : i32 = x_5.x_GLF_uniform_int_values[1];
|
||||
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_5.x_GLF_uniform_int_values[1];
|
||||
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,73 +0,0 @@
|
||||
cbuffer cbuffer_x_5 : register(b0, space0) {
|
||||
uint4 x_5[4];
|
||||
};
|
||||
static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
|
||||
void main_1() {
|
||||
int x_28 = 0;
|
||||
int x_29 = 0;
|
||||
int x_28_phi = 0;
|
||||
int x_31_phi = 0;
|
||||
int x_42_phi = 0;
|
||||
const int x_24 = min(1, reversebits(1));
|
||||
const int x_26 = asint(x_5[3].x);
|
||||
x_28_phi = x_26;
|
||||
x_31_phi = 1;
|
||||
while (true) {
|
||||
int x_32 = 0;
|
||||
x_28 = x_28_phi;
|
||||
const int x_31 = x_31_phi;
|
||||
x_42_phi = x_28;
|
||||
if ((x_31 <= (x_24 - 1))) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
x_29 = asint((x_28 + asint(x_31)));
|
||||
const uint scalar_offset = ((16u * uint(0))) / 4;
|
||||
const int x_38 = asint(x_5[scalar_offset / 4][scalar_offset % 4]);
|
||||
if ((x_38 == 1)) {
|
||||
x_42_phi = x_29;
|
||||
break;
|
||||
}
|
||||
{
|
||||
x_32 = (x_31 + 1);
|
||||
x_28_phi = x_29;
|
||||
x_31_phi = x_32;
|
||||
}
|
||||
}
|
||||
const int x_42 = x_42_phi;
|
||||
const int x_44 = asint(x_5[2].x);
|
||||
if ((x_42 == x_44)) {
|
||||
const uint scalar_offset_1 = ((16u * uint(0))) / 4;
|
||||
const int x_50 = asint(x_5[scalar_offset_1 / 4][scalar_offset_1 % 4]);
|
||||
const float x_51 = float(x_50);
|
||||
const int x_53 = asint(x_5[1].x);
|
||||
const float x_54 = float(x_53);
|
||||
x_GLF_color = float4(x_51, x_54, x_54, x_51);
|
||||
} else {
|
||||
const int x_57 = asint(x_5[1].x);
|
||||
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,81 +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 main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
|
||||
int x_28 = 0;
|
||||
int x_29 = 0;
|
||||
int x_28_phi = 0;
|
||||
int x_31_phi = 0;
|
||||
int x_42_phi = 0;
|
||||
int const x_24 = min(1, reverse_bits(1));
|
||||
int const x_26 = x_5.x_GLF_uniform_int_values.arr[3].el;
|
||||
x_28_phi = x_26;
|
||||
x_31_phi = 1;
|
||||
while (true) {
|
||||
int x_32 = 0;
|
||||
x_28 = x_28_phi;
|
||||
int const x_31 = x_31_phi;
|
||||
x_42_phi = x_28;
|
||||
if ((x_31 <= as_type<int>((as_type<uint>(x_24) - as_type<uint>(1))))) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
x_29 = as_type<int>(as_type<int>((as_type<uint>(x_28) + as_type<uint>(as_type<int>(x_31)))));
|
||||
int const x_38 = x_5.x_GLF_uniform_int_values.arr[0].el;
|
||||
if ((x_38 == 1)) {
|
||||
x_42_phi = x_29;
|
||||
break;
|
||||
}
|
||||
{
|
||||
x_32 = as_type<int>((as_type<uint>(x_31) + as_type<uint>(1)));
|
||||
x_28_phi = x_29;
|
||||
x_31_phi = x_32;
|
||||
}
|
||||
}
|
||||
int const x_42 = x_42_phi;
|
||||
int const x_44 = x_5.x_GLF_uniform_int_values.arr[2].el;
|
||||
if ((x_42 == x_44)) {
|
||||
int const x_50 = x_5.x_GLF_uniform_int_values.arr[0].el;
|
||||
float const x_51 = float(x_50);
|
||||
int const x_53 = x_5.x_GLF_uniform_int_values.arr[1].el;
|
||||
float const x_54 = float(x_53);
|
||||
*(tint_symbol_3) = float4(x_51, x_54, x_54, x_51);
|
||||
} else {
|
||||
int const x_57 = x_5.x_GLF_uniform_int_values.arr[1].el;
|
||||
float const x_58 = float(x_57);
|
||||
*(tint_symbol_3) = float4(x_58, x_58, x_58, x_58);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
|
||||
main_1(x_5, 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_5 [[buffer(0)]]) {
|
||||
thread float4 tint_symbol_5 = 0.0f;
|
||||
main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
|
||||
tint_symbol_1 wrapper_result = {};
|
||||
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
@@ -1,159 +0,0 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 93
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%27 = 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 %buf0 "buf0"
|
||||
OpMemberName %buf0 0 "x_GLF_uniform_int_values"
|
||||
OpName %x_5 "x_5"
|
||||
OpName %x_GLF_color "x_GLF_color"
|
||||
OpName %main_1 "main_1"
|
||||
OpName %x_28 "x_28"
|
||||
OpName %x_29 "x_29"
|
||||
OpName %x_28_phi "x_28_phi"
|
||||
OpName %x_31_phi "x_31_phi"
|
||||
OpName %x_42_phi "x_42_phi"
|
||||
OpName %x_32 "x_32"
|
||||
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_5 NonWritable
|
||||
OpDecorate %x_5 DescriptorSet 0
|
||||
OpDecorate %x_5 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
|
||||
%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_5 = OpVariable %_ptr_Uniform_buf0 Uniform
|
||||
%_ptr_Private_v4float = OpTypePointer Private %v4float
|
||||
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %5
|
||||
%void = OpTypeVoid
|
||||
%15 = OpTypeFunction %void
|
||||
%_ptr_Function_int = OpTypePointer Function %int
|
||||
%21 = OpConstantNull %int
|
||||
%int_1 = OpConstant %int 1
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%int_3 = OpConstant %int 3
|
||||
%_ptr_Uniform_int = OpTypePointer Uniform %int
|
||||
%bool = OpTypeBool
|
||||
%int_0 = OpConstant %int 0
|
||||
%int_2 = OpConstant %int 2
|
||||
%main_out = OpTypeStruct %v4float
|
||||
%82 = OpTypeFunction %main_out
|
||||
%main_1 = OpFunction %void None %15
|
||||
%18 = OpLabel
|
||||
%x_28 = OpVariable %_ptr_Function_int Function %21
|
||||
%x_29 = OpVariable %_ptr_Function_int Function %21
|
||||
%x_28_phi = OpVariable %_ptr_Function_int Function %21
|
||||
%x_31_phi = OpVariable %_ptr_Function_int Function %21
|
||||
%x_42_phi = OpVariable %_ptr_Function_int Function %21
|
||||
%x_32 = OpVariable %_ptr_Function_int Function %21
|
||||
%29 = OpBitReverse %int %int_1
|
||||
%26 = OpExtInst %int %27 SMin %int_1 %29
|
||||
%33 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_3
|
||||
%34 = OpLoad %int %33
|
||||
OpStore %x_28_phi %34
|
||||
OpStore %x_31_phi %int_1
|
||||
OpBranch %35
|
||||
%35 = OpLabel
|
||||
OpLoopMerge %36 %37 None
|
||||
OpBranch %38
|
||||
%38 = OpLabel
|
||||
%40 = OpLoad %int %x_28_phi
|
||||
OpStore %x_28 %40
|
||||
%41 = OpLoad %int %x_31_phi
|
||||
%42 = OpLoad %int %x_28
|
||||
OpStore %x_42_phi %42
|
||||
%43 = OpISub %int %26 %int_1
|
||||
%44 = OpSLessThanEqual %bool %41 %43
|
||||
OpSelectionMerge %46 None
|
||||
OpBranchConditional %44 %47 %48
|
||||
%47 = OpLabel
|
||||
OpBranch %46
|
||||
%48 = OpLabel
|
||||
OpBranch %36
|
||||
%46 = OpLabel
|
||||
%50 = OpLoad %int %x_28
|
||||
%51 = OpCopyObject %int %41
|
||||
%52 = OpIAdd %int %50 %51
|
||||
%49 = OpCopyObject %int %52
|
||||
OpStore %x_29 %49
|
||||
%54 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_0
|
||||
%55 = OpLoad %int %54
|
||||
%56 = OpIEqual %bool %55 %int_1
|
||||
OpSelectionMerge %57 None
|
||||
OpBranchConditional %56 %58 %57
|
||||
%58 = OpLabel
|
||||
%59 = OpLoad %int %x_29
|
||||
OpStore %x_42_phi %59
|
||||
OpBranch %36
|
||||
%57 = OpLabel
|
||||
OpBranch %37
|
||||
%37 = OpLabel
|
||||
%60 = OpIAdd %int %41 %int_1
|
||||
OpStore %x_32 %60
|
||||
%61 = OpLoad %int %x_29
|
||||
OpStore %x_28_phi %61
|
||||
%62 = OpLoad %int %x_32
|
||||
OpStore %x_31_phi %62
|
||||
OpBranch %35
|
||||
%36 = OpLabel
|
||||
%63 = OpLoad %int %x_42_phi
|
||||
%65 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_2
|
||||
%66 = OpLoad %int %65
|
||||
%67 = OpIEqual %bool %63 %66
|
||||
OpSelectionMerge %68 None
|
||||
OpBranchConditional %67 %69 %70
|
||||
%69 = OpLabel
|
||||
%71 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_0
|
||||
%72 = OpLoad %int %71
|
||||
%73 = OpConvertSToF %float %72
|
||||
%74 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_1
|
||||
%75 = OpLoad %int %74
|
||||
%76 = OpConvertSToF %float %75
|
||||
%77 = OpCompositeConstruct %v4float %73 %76 %76 %73
|
||||
OpStore %x_GLF_color %77
|
||||
OpBranch %68
|
||||
%70 = OpLabel
|
||||
%78 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_1
|
||||
%79 = OpLoad %int %78
|
||||
%80 = OpConvertSToF %float %79
|
||||
%81 = OpCompositeConstruct %v4float %80 %80 %80 %80
|
||||
OpStore %x_GLF_color %81
|
||||
OpBranch %68
|
||||
%68 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%main_inner = OpFunction %main_out None %82
|
||||
%85 = OpLabel
|
||||
%86 = OpFunctionCall %void %main_1
|
||||
%87 = OpLoad %v4float %x_GLF_color
|
||||
%88 = OpCompositeConstruct %main_out %87
|
||||
OpReturnValue %88
|
||||
OpFunctionEnd
|
||||
%main = OpFunction %void None %15
|
||||
%90 = OpLabel
|
||||
%91 = OpFunctionCall %main_out %main_inner
|
||||
%92 = OpCompositeExtract %v4float %91 0
|
||||
OpStore %x_GLF_color_1_1 %92
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -1,69 +0,0 @@
|
||||
type Arr = [[stride(16)]] array<i32, 4>;
|
||||
|
||||
[[block]]
|
||||
struct buf0 {
|
||||
x_GLF_uniform_int_values : Arr;
|
||||
};
|
||||
|
||||
[[group(0), binding(0)]] var<uniform> x_5 : buf0;
|
||||
|
||||
var<private> x_GLF_color : vec4<f32>;
|
||||
|
||||
fn main_1() {
|
||||
var x_28 : i32;
|
||||
var x_29 : i32;
|
||||
var x_28_phi : i32;
|
||||
var x_31_phi : i32;
|
||||
var x_42_phi : i32;
|
||||
let x_24 : i32 = min(1, reverseBits(1));
|
||||
let x_26 : i32 = x_5.x_GLF_uniform_int_values[3];
|
||||
x_28_phi = x_26;
|
||||
x_31_phi = 1;
|
||||
loop {
|
||||
var x_32 : i32;
|
||||
x_28 = x_28_phi;
|
||||
let x_31 : i32 = x_31_phi;
|
||||
x_42_phi = x_28;
|
||||
if ((x_31 <= (x_24 - 1))) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
x_29 = bitcast<i32>((x_28 + bitcast<i32>(x_31)));
|
||||
let x_38 : i32 = x_5.x_GLF_uniform_int_values[0];
|
||||
if ((x_38 == 1)) {
|
||||
x_42_phi = x_29;
|
||||
break;
|
||||
}
|
||||
|
||||
continuing {
|
||||
x_32 = (x_31 + 1);
|
||||
x_28_phi = x_29;
|
||||
x_31_phi = x_32;
|
||||
}
|
||||
}
|
||||
let x_42 : i32 = x_42_phi;
|
||||
let x_44 : i32 = x_5.x_GLF_uniform_int_values[2];
|
||||
if ((x_42 == x_44)) {
|
||||
let x_50 : i32 = x_5.x_GLF_uniform_int_values[0];
|
||||
let x_51 : f32 = f32(x_50);
|
||||
let x_53 : i32 = x_5.x_GLF_uniform_int_values[1];
|
||||
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_5.x_GLF_uniform_int_values[1];
|
||||
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