Alastair Donaldson | f7e73d4 | 2021-07-23 13:10:12 +0000 | [diff] [blame] | 1 | ; SPIR-V |
| 2 | ; Version: 1.3 |
| 3 | ; Generator: Google Tint Compiler; 0 |
David Neto | dffa60c | 2021-07-27 15:12:27 +0000 | [diff] [blame] | 4 | ; Bound: 90 |
Alastair Donaldson | f7e73d4 | 2021-07-23 13:10:12 +0000 | [diff] [blame] | 5 | ; Schema: 0 |
| 6 | OpCapability Shader |
| 7 | OpMemoryModel Logical GLSL450 |
| 8 | OpEntryPoint Fragment %main "main" %tint_symbol_1 |
| 9 | OpExecutionMode %main OriginUpperLeft |
| 10 | OpName %buf0 "buf0" |
| 11 | OpMemberName %buf0 0 "one" |
| 12 | OpName %x_10 "x_10" |
| 13 | OpName %x_GLF_color "x_GLF_color" |
| 14 | OpName %tint_symbol_1 "tint_symbol_1" |
| 15 | OpName %S "S" |
| 16 | OpMemberName %S 0 "x" |
| 17 | OpMemberName %S 1 "y" |
| 18 | OpName %func_struct_S_i1_i11_ "func_struct_S_i1_i11_" |
| 19 | OpName %arg "arg" |
| 20 | OpName %main_1 "main_1" |
| 21 | OpName %a "a" |
| 22 | OpName %b "b" |
| 23 | OpName %param "param" |
| 24 | OpName %main_out "main_out" |
| 25 | OpMemberName %main_out 0 "x_GLF_color_1" |
| 26 | OpName %tint_symbol_2 "tint_symbol_2" |
| 27 | OpName %tint_symbol "tint_symbol" |
| 28 | OpName %main "main" |
| 29 | OpDecorate %buf0 Block |
| 30 | OpMemberDecorate %buf0 0 Offset 0 |
| 31 | OpDecorate %x_10 NonWritable |
| 32 | OpDecorate %x_10 DescriptorSet 0 |
| 33 | OpDecorate %x_10 Binding 0 |
| 34 | OpDecorate %tint_symbol_1 Location 0 |
| 35 | OpMemberDecorate %S 0 Offset 0 |
| 36 | OpMemberDecorate %S 1 Offset 4 |
| 37 | OpDecorate %_arr_S_uint_2 ArrayStride 8 |
| 38 | OpMemberDecorate %main_out 0 Offset 0 |
| 39 | %int = OpTypeInt 32 1 |
| 40 | %buf0 = OpTypeStruct %int |
| 41 | %_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0 |
| 42 | %x_10 = OpVariable %_ptr_Uniform_buf0 Uniform |
| 43 | %float = OpTypeFloat 32 |
| 44 | %v4float = OpTypeVector %float 4 |
| 45 | %_ptr_Private_v4float = OpTypePointer Private %v4float |
| 46 | %9 = OpConstantNull %v4float |
| 47 | %x_GLF_color = OpVariable %_ptr_Private_v4float Private %9 |
| 48 | %_ptr_Output_v4float = OpTypePointer Output %v4float |
| 49 | %tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %9 |
| 50 | %void = OpTypeVoid |
| 51 | %S = OpTypeStruct %int %int |
| 52 | %_ptr_Function_S = OpTypePointer Function %S |
| 53 | %12 = OpTypeFunction %void %_ptr_Function_S |
| 54 | %uint = OpTypeInt 32 0 |
| 55 | %uint_1 = OpConstant %uint 1 |
| 56 | %_ptr_Function_int = OpTypePointer Function %int |
| 57 | %int_1 = OpConstant %int 1 |
| 58 | %25 = OpTypeFunction %void |
| 59 | %_ptr_Function_float = OpTypePointer Function %float |
| 60 | %30 = OpConstantNull %float |
| 61 | %uint_2 = OpConstant %uint 2 |
| 62 | %_arr_S_uint_2 = OpTypeArray %S %uint_2 |
| 63 | %_ptr_Function__arr_S_uint_2 = OpTypePointer Function %_arr_S_uint_2 |
| 64 | %35 = OpConstantNull %_arr_S_uint_2 |
| 65 | %37 = OpConstantNull %S |
| 66 | %float_5 = OpConstant %float 5 |
| 67 | %uint_0 = OpConstant %uint 0 |
| 68 | %_ptr_Uniform_int = OpTypePointer Uniform %int |
| 69 | %bool = OpTypeBool |
| 70 | %float_0 = OpConstant %float 0 |
| 71 | %false = OpConstantFalse %bool |
| 72 | %float_1 = OpConstant %float 1 |
David Neto | dffa60c | 2021-07-27 15:12:27 +0000 | [diff] [blame] | 73 | %76 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1 |
| 74 | %77 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 |
Alastair Donaldson | f7e73d4 | 2021-07-23 13:10:12 +0000 | [diff] [blame] | 75 | %main_out = OpTypeStruct %v4float |
David Neto | dffa60c | 2021-07-27 15:12:27 +0000 | [diff] [blame] | 76 | %78 = OpTypeFunction %void %main_out |
Alastair Donaldson | f7e73d4 | 2021-07-23 13:10:12 +0000 | [diff] [blame] | 77 | %func_struct_S_i1_i11_ = OpFunction %void None %12 |
| 78 | %arg = OpFunctionParameter %_ptr_Function_S |
| 79 | %18 = OpLabel |
| 80 | %23 = OpAccessChain %_ptr_Function_int %arg %uint_1 |
| 81 | OpStore %23 %int_1 |
| 82 | OpReturn |
| 83 | OpFunctionEnd |
| 84 | %main_1 = OpFunction %void None %25 |
| 85 | %27 = OpLabel |
| 86 | %a = OpVariable %_ptr_Function_float Function %30 |
| 87 | %b = OpVariable %_ptr_Function__arr_S_uint_2 Function %35 |
| 88 | %param = OpVariable %_ptr_Function_S Function %37 |
| 89 | OpStore %a %float_5 |
| 90 | OpBranch %39 |
| 91 | %39 = OpLabel |
| 92 | OpLoopMerge %40 %41 None |
| 93 | OpBranch %42 |
| 94 | %42 = OpLabel |
| 95 | %45 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 |
| 96 | %46 = OpLoad %int %45 |
| 97 | %47 = OpAccessChain %_ptr_Function_int %b %46 %uint_0 |
| 98 | OpStore %47 %int_1 |
| 99 | %48 = OpAccessChain %_ptr_Function_int %b %int_1 %uint_0 |
| 100 | %49 = OpLoad %int %48 |
| 101 | %50 = OpIEqual %bool %49 %int_1 |
| 102 | OpSelectionMerge %52 None |
| 103 | OpBranchConditional %50 %53 %52 |
| 104 | %53 = OpLabel |
| 105 | %54 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 |
| 106 | %55 = OpLoad %int %54 |
| 107 | %56 = OpIEqual %bool %55 %int_1 |
| 108 | OpSelectionMerge %57 None |
| 109 | OpBranchConditional %56 %58 %57 |
| 110 | %58 = OpLabel |
| 111 | OpBranch %40 |
| 112 | %57 = OpLabel |
| 113 | %59 = OpAccessChain %_ptr_Function_S %b %int_1 |
| 114 | %60 = OpLoad %S %59 |
| 115 | OpStore %param %60 |
| 116 | %61 = OpFunctionCall %void %func_struct_S_i1_i11_ %param |
| 117 | %63 = OpLoad %S %param |
| 118 | %64 = OpAccessChain %_ptr_Function_S %b %int_1 |
| 119 | OpStore %64 %63 |
| 120 | %65 = OpAccessChain %_ptr_Function_int %b %int_1 %uint_1 |
| 121 | %66 = OpLoad %int %65 |
| 122 | %67 = OpConvertSToF %float %66 |
| 123 | OpStore %a %67 |
| 124 | OpBranch %52 |
| 125 | %52 = OpLabel |
| 126 | OpStore %a %float_0 |
| 127 | OpBranch %41 |
| 128 | %41 = OpLabel |
David Neto | dffa60c | 2021-07-27 15:12:27 +0000 | [diff] [blame] | 129 | OpBranchConditional %false %39 %40 |
Alastair Donaldson | f7e73d4 | 2021-07-23 13:10:12 +0000 | [diff] [blame] | 130 | %40 = OpLabel |
David Neto | dffa60c | 2021-07-27 15:12:27 +0000 | [diff] [blame] | 131 | %70 = OpLoad %float %a |
| 132 | %71 = OpFOrdEqual %bool %70 %float_5 |
| 133 | OpSelectionMerge %72 None |
| 134 | OpBranchConditional %71 %73 %74 |
| 135 | %73 = OpLabel |
| 136 | OpStore %x_GLF_color %76 |
| 137 | OpBranch %72 |
| 138 | %74 = OpLabel |
| 139 | OpStore %x_GLF_color %77 |
| 140 | OpBranch %72 |
| 141 | %72 = OpLabel |
Alastair Donaldson | f7e73d4 | 2021-07-23 13:10:12 +0000 | [diff] [blame] | 142 | OpReturn |
| 143 | OpFunctionEnd |
David Neto | dffa60c | 2021-07-27 15:12:27 +0000 | [diff] [blame] | 144 | %tint_symbol_2 = OpFunction %void None %78 |
Alastair Donaldson | f7e73d4 | 2021-07-23 13:10:12 +0000 | [diff] [blame] | 145 | %tint_symbol = OpFunctionParameter %main_out |
David Neto | dffa60c | 2021-07-27 15:12:27 +0000 | [diff] [blame] | 146 | %82 = OpLabel |
| 147 | %83 = OpCompositeExtract %v4float %tint_symbol 0 |
| 148 | OpStore %tint_symbol_1 %83 |
Alastair Donaldson | f7e73d4 | 2021-07-23 13:10:12 +0000 | [diff] [blame] | 149 | OpReturn |
| 150 | OpFunctionEnd |
| 151 | %main = OpFunction %void None %25 |
David Neto | dffa60c | 2021-07-27 15:12:27 +0000 | [diff] [blame] | 152 | %85 = OpLabel |
| 153 | %86 = OpFunctionCall %void %main_1 |
| 154 | %88 = OpLoad %v4float %x_GLF_color |
| 155 | %89 = OpCompositeConstruct %main_out %88 |
| 156 | %87 = OpFunctionCall %void %tint_symbol_2 %89 |
Alastair Donaldson | f7e73d4 | 2021-07-23 13:10:12 +0000 | [diff] [blame] | 157 | OpReturn |
| 158 | OpFunctionEnd |