Alastair Donaldson | f7e73d4 | 2021-07-23 13:10:12 +0000 | [diff] [blame] | 1 | OpCapability Shader |
| 2 | %1 = OpExtInstImport "GLSL.std.450" |
| 3 | OpMemoryModel Logical GLSL450 |
| 4 | OpEntryPoint Fragment %main "main" %_GLF_color |
| 5 | OpExecutionMode %main OriginUpperLeft |
| 6 | OpSource ESSL 320 |
| 7 | OpName %main "main" |
| 8 | OpName %v0 "v0" |
| 9 | OpName %buf0 "buf0" |
| 10 | OpMemberName %buf0 0 "_GLF_uniform_float_values" |
| 11 | OpName %_ "" |
| 12 | OpName %v1 "v1" |
| 13 | OpName %a "a" |
| 14 | OpName %buf1 "buf1" |
| 15 | OpMemberName %buf1 0 "_GLF_uniform_int_values" |
| 16 | OpName %__0 "" |
| 17 | OpName %c "c" |
| 18 | OpName %_GLF_color "_GLF_color" |
| 19 | OpDecorate %_arr_float_uint_2 ArrayStride 16 |
| 20 | OpMemberDecorate %buf0 0 Offset 0 |
| 21 | OpDecorate %buf0 Block |
| 22 | OpDecorate %_ DescriptorSet 0 |
| 23 | OpDecorate %_ Binding 0 |
| 24 | OpDecorate %_arr_int_uint_4 ArrayStride 16 |
| 25 | OpMemberDecorate %buf1 0 Offset 0 |
| 26 | OpDecorate %buf1 Block |
| 27 | OpDecorate %__0 DescriptorSet 0 |
| 28 | OpDecorate %__0 Binding 1 |
| 29 | OpDecorate %_GLF_color Location 0 |
| 30 | %void = OpTypeVoid |
| 31 | %15 = OpTypeFunction %void |
| 32 | %float = OpTypeFloat 32 |
| 33 | %v4float = OpTypeVector %float 4 |
| 34 | %_ptr_Function_v4float = OpTypePointer Function %v4float |
| 35 | %uint = OpTypeInt 32 0 |
| 36 | %uint_2 = OpConstant %uint 2 |
| 37 | %_arr_float_uint_2 = OpTypeArray %float %uint_2 |
| 38 | %buf0 = OpTypeStruct %_arr_float_uint_2 |
| 39 | %_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0 |
| 40 | %_ = OpVariable %_ptr_Uniform_buf0 Uniform |
| 41 | %int = OpTypeInt 32 1 |
| 42 | %int_0 = OpConstant %int 0 |
| 43 | %int_1 = OpConstant %int 1 |
| 44 | %_ptr_Uniform_float = OpTypePointer Uniform %float |
| 45 | %_ptr_Function_int = OpTypePointer Function %int |
| 46 | %uint_4 = OpConstant %uint 4 |
| 47 | %_arr_int_uint_4 = OpTypeArray %int %uint_4 |
| 48 | %buf1 = OpTypeStruct %_arr_int_uint_4 |
| 49 | %_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1 |
| 50 | %__0 = OpVariable %_ptr_Uniform_buf1 Uniform |
| 51 | %_ptr_Uniform_int = OpTypePointer Uniform %int |
| 52 | %bool = OpTypeBool |
| 53 | %int_3 = OpConstant %int 3 |
| 54 | %int_2 = OpConstant %int 2 |
| 55 | %_ptr_Function_float = OpTypePointer Function %float |
| 56 | %float_3 = OpConstant %float 3 |
| 57 | %float_1 = OpConstant %float 1 |
| 58 | %36 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 |
| 59 | %uint_0 = OpConstant %uint 0 |
| 60 | %_ptr_Output_v4float = OpTypePointer Output %v4float |
| 61 | %_GLF_color = OpVariable %_ptr_Output_v4float Output |
| 62 | %main = OpFunction %void None %15 |
| 63 | %39 = OpLabel |
| 64 | %v0 = OpVariable %_ptr_Function_v4float Function |
| 65 | %v1 = OpVariable %_ptr_Function_v4float Function |
| 66 | %a = OpVariable %_ptr_Function_int Function |
| 67 | %c = OpVariable %_ptr_Function_int Function |
| 68 | %40 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_1 |
| 69 | %41 = OpLoad %float %40 |
| 70 | %42 = OpCompositeConstruct %v4float %41 %41 %41 %41 |
| 71 | OpStore %v0 %42 |
| 72 | %43 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_0 |
| 73 | %44 = OpLoad %float %43 |
| 74 | %45 = OpCompositeConstruct %v4float %44 %44 %44 %44 |
| 75 | OpStore %v1 %45 |
| 76 | %46 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_1 |
| 77 | %47 = OpLoad %int %46 |
| 78 | OpStore %a %47 |
| 79 | OpBranch %48 |
| 80 | %48 = OpLabel |
| 81 | OpLoopMerge %49 %50 None |
| 82 | OpBranch %51 |
| 83 | %51 = OpLabel |
| 84 | %52 = OpLoad %int %a |
| 85 | %53 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_0 |
| 86 | %54 = OpLoad %int %53 |
| 87 | %55 = OpSLessThan %bool %52 %54 |
| 88 | OpBranchConditional %55 %56 %49 |
| 89 | %56 = OpLabel |
| 90 | %57 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_3 |
| 91 | %58 = OpLoad %int %57 |
| 92 | OpStore %c %58 |
| 93 | OpBranch %59 |
| 94 | %59 = OpLabel |
| 95 | OpLoopMerge %60 %61 None |
| 96 | OpBranch %62 |
| 97 | %62 = OpLabel |
| 98 | %63 = OpLoad %int %c |
| 99 | %64 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_2 |
| 100 | %65 = OpLoad %int %64 |
| 101 | %66 = OpSLessThan %bool %63 %65 |
| 102 | OpBranchConditional %66 %67 %60 |
| 103 | %67 = OpLabel |
| 104 | %68 = OpLoad %int %c |
| 105 | %69 = OpExtInst %int %1 SClamp %68 %int_0 %int_3 |
| 106 | %70 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_1 |
| 107 | %71 = OpLoad %float %70 |
| 108 | %72 = OpAccessChain %_ptr_Function_float %v0 %69 |
| 109 | %73 = OpLoad %float %72 |
| 110 | %74 = OpFSub %float %73 %71 |
| 111 | %75 = OpAccessChain %_ptr_Function_float %v0 %69 |
| 112 | OpStore %75 %74 |
| 113 | %76 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_1 |
| 114 | %77 = OpLoad %int %76 |
| 115 | %78 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_3 |
| 116 | %79 = OpLoad %int %78 |
| 117 | %80 = OpIEqual %bool %77 %79 |
| 118 | OpSelectionMerge %81 None |
| 119 | OpBranchConditional %80 %82 %81 |
| 120 | %82 = OpLabel |
| 121 | %83 = OpLoad %int %a |
| 122 | %84 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_1 |
| 123 | %85 = OpLoad %float %84 |
| 124 | %86 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_1 |
| 125 | %87 = OpLoad %float %86 |
| 126 | %88 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_1 |
| 127 | %89 = OpLoad %float %88 |
| 128 | %90 = OpCompositeConstruct %v4float %85 %87 %89 %float_3 |
| 129 | %91 = OpLoad %v4float %v0 |
| 130 | %92 = OpExtInst %v4float %1 SmoothStep %90 %36 %91 |
| 131 | %93 = OpLoad %int %a |
| 132 | %94 = OpVectorExtractDynamic %float %92 %93 |
| 133 | %95 = OpAccessChain %_ptr_Function_float %v1 %83 |
| 134 | OpStore %95 %94 |
| 135 | OpBranch %81 |
| 136 | %81 = OpLabel |
| 137 | OpBranch %61 |
| 138 | %61 = OpLabel |
| 139 | %96 = OpLoad %int %c |
| 140 | %97 = OpIAdd %int %96 %int_1 |
| 141 | OpStore %c %97 |
| 142 | OpBranch %59 |
| 143 | %60 = OpLabel |
| 144 | OpBranch %50 |
| 145 | %50 = OpLabel |
| 146 | %98 = OpLoad %int %a |
| 147 | %99 = OpIAdd %int %98 %int_1 |
| 148 | OpStore %a %99 |
| 149 | OpBranch %48 |
| 150 | %49 = OpLabel |
| 151 | %100 = OpAccessChain %_ptr_Function_float %v1 %uint_0 |
| 152 | %101 = OpLoad %float %100 |
| 153 | %102 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_0 |
| 154 | %103 = OpLoad %float %102 |
| 155 | %104 = OpFOrdEqual %bool %101 %103 |
| 156 | OpSelectionMerge %105 None |
| 157 | OpBranchConditional %104 %106 %107 |
| 158 | %106 = OpLabel |
| 159 | %108 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_1 |
| 160 | %109 = OpLoad %int %108 |
| 161 | %110 = OpConvertSToF %float %109 |
| 162 | %111 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_3 |
| 163 | %112 = OpLoad %int %111 |
| 164 | %113 = OpConvertSToF %float %112 |
| 165 | %114 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_3 |
| 166 | %115 = OpLoad %int %114 |
| 167 | %116 = OpConvertSToF %float %115 |
| 168 | %117 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_1 |
| 169 | %118 = OpLoad %int %117 |
| 170 | %119 = OpConvertSToF %float %118 |
| 171 | %120 = OpCompositeConstruct %v4float %110 %113 %116 %119 |
| 172 | OpStore %_GLF_color %120 |
| 173 | OpBranch %105 |
| 174 | %107 = OpLabel |
| 175 | %121 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_3 |
| 176 | %122 = OpLoad %int %121 |
| 177 | %123 = OpConvertSToF %float %122 |
| 178 | %124 = OpCompositeConstruct %v4float %123 %123 %123 %123 |
| 179 | OpStore %_GLF_color %124 |
| 180 | OpBranch %105 |
| 181 | %105 = OpLabel |
| 182 | OpReturn |
| 183 | OpFunctionEnd |