John Stiles | dac139a | 2021-01-26 11:06:42 -0500 | [diff] [blame] | 1 | OpCapability Shader |
| 2 | %1 = OpExtInstImport "GLSL.std.450" |
| 3 | OpMemoryModel Logical GLSL450 |
John Stiles | 4d6310a | 2021-01-26 19:58:22 -0500 | [diff] [blame] | 4 | OpEntryPoint Fragment %_entrypoint "_entrypoint" %sk_FragColor %sk_Clockwise |
| 5 | OpExecutionMode %_entrypoint OriginUpperLeft |
| 6 | OpName %sk_FragColor "sk_FragColor" |
John Stiles | dac139a | 2021-01-26 11:06:42 -0500 | [diff] [blame] | 7 | OpName %sk_Clockwise "sk_Clockwise" |
John Stiles | acba304 | 2021-01-28 15:11:39 -0500 | [diff] [blame^] | 8 | OpName %_UniformBuffer "_UniformBuffer" |
| 9 | OpMemberName %_UniformBuffer 0 "colorWhite" |
John Stiles | 4d6310a | 2021-01-26 19:58:22 -0500 | [diff] [blame] | 10 | OpName %_entrypoint "_entrypoint" |
John Stiles | dac139a | 2021-01-26 11:06:42 -0500 | [diff] [blame] | 11 | OpName %main "main" |
| 12 | OpName %x "x" |
| 13 | OpName %r "r" |
| 14 | OpName %b "b" |
John Stiles | 4d6310a | 2021-01-26 19:58:22 -0500 | [diff] [blame] | 15 | OpDecorate %sk_FragColor RelaxedPrecision |
| 16 | OpDecorate %sk_FragColor Location 0 |
| 17 | OpDecorate %sk_FragColor Index 0 |
John Stiles | dac139a | 2021-01-26 11:06:42 -0500 | [diff] [blame] | 18 | OpDecorate %sk_Clockwise RelaxedPrecision |
| 19 | OpDecorate %sk_Clockwise BuiltIn FrontFacing |
John Stiles | acba304 | 2021-01-28 15:11:39 -0500 | [diff] [blame^] | 20 | OpMemberDecorate %_UniformBuffer 0 Offset 0 |
| 21 | OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision |
| 22 | OpDecorate %_UniformBuffer Block |
| 23 | OpDecorate %10 Binding 0 |
| 24 | OpDecorate %10 DescriptorSet 0 |
| 25 | OpDecorate %26 RelaxedPrecision |
| 26 | OpDecorate %35 RelaxedPrecision |
| 27 | OpDecorate %39 RelaxedPrecision |
| 28 | OpDecorate %43 RelaxedPrecision |
| 29 | OpDecorate %48 RelaxedPrecision |
| 30 | OpDecorate %49 RelaxedPrecision |
| 31 | OpDecorate %56 RelaxedPrecision |
John Stiles | dac139a | 2021-01-26 11:06:42 -0500 | [diff] [blame] | 32 | OpDecorate %58 RelaxedPrecision |
John Stiles | acba304 | 2021-01-28 15:11:39 -0500 | [diff] [blame^] | 33 | OpDecorate %61 RelaxedPrecision |
| 34 | OpDecorate %68 RelaxedPrecision |
| 35 | OpDecorate %69 RelaxedPrecision |
| 36 | OpDecorate %70 RelaxedPrecision |
John Stiles | 4d6310a | 2021-01-26 19:58:22 -0500 | [diff] [blame] | 37 | %float = OpTypeFloat 32 |
| 38 | %v4float = OpTypeVector %float 4 |
| 39 | %_ptr_Output_v4float = OpTypePointer Output %v4float |
| 40 | %sk_FragColor = OpVariable %_ptr_Output_v4float Output |
John Stiles | dac139a | 2021-01-26 11:06:42 -0500 | [diff] [blame] | 41 | %bool = OpTypeBool |
| 42 | %_ptr_Input_bool = OpTypePointer Input %bool |
| 43 | %sk_Clockwise = OpVariable %_ptr_Input_bool Input |
John Stiles | acba304 | 2021-01-28 15:11:39 -0500 | [diff] [blame^] | 44 | %_UniformBuffer = OpTypeStruct %v4float |
| 45 | %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer |
| 46 | %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform |
John Stiles | 4d6310a | 2021-01-26 19:58:22 -0500 | [diff] [blame] | 47 | %void = OpTypeVoid |
John Stiles | acba304 | 2021-01-28 15:11:39 -0500 | [diff] [blame^] | 48 | %15 = OpTypeFunction %void |
| 49 | %18 = OpTypeFunction %v4float |
John Stiles | dac139a | 2021-01-26 11:06:42 -0500 | [diff] [blame] | 50 | %_ptr_Function_v4float = OpTypePointer Function %v4float |
John Stiles | acba304 | 2021-01-28 15:11:39 -0500 | [diff] [blame^] | 51 | %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float |
| 52 | %int = OpTypeInt 32 1 |
| 53 | %int_0 = OpConstant %int 0 |
John Stiles | dac139a | 2021-01-26 11:06:42 -0500 | [diff] [blame] | 54 | %_ptr_Function_float = OpTypePointer Function %float |
| 55 | %float_n5 = OpConstant %float -5 |
| 56 | %float_5 = OpConstant %float 5 |
John Stiles | dac139a | 2021-01-26 11:06:42 -0500 | [diff] [blame] | 57 | %float_0 = OpConstant %float 0 |
John Stiles | b41d5bb | 2021-01-26 16:28:12 -0500 | [diff] [blame] | 58 | %float_1 = OpConstant %float 1 |
John Stiles | dac139a | 2021-01-26 11:06:42 -0500 | [diff] [blame] | 59 | %int_2 = OpConstant %int 2 |
| 60 | %int_1 = OpConstant %int 1 |
John Stiles | acba304 | 2021-01-28 15:11:39 -0500 | [diff] [blame^] | 61 | %_entrypoint = OpFunction %void None %15 |
| 62 | %16 = OpLabel |
| 63 | %17 = OpFunctionCall %v4float %main |
| 64 | OpStore %sk_FragColor %17 |
John Stiles | 4d6310a | 2021-01-26 19:58:22 -0500 | [diff] [blame] | 65 | OpReturn |
| 66 | OpFunctionEnd |
John Stiles | acba304 | 2021-01-28 15:11:39 -0500 | [diff] [blame^] | 67 | %main = OpFunction %v4float None %18 |
| 68 | %19 = OpLabel |
John Stiles | dac139a | 2021-01-26 11:06:42 -0500 | [diff] [blame] | 69 | %x = OpVariable %_ptr_Function_v4float Function |
| 70 | %r = OpVariable %_ptr_Function_float Function |
| 71 | %b = OpVariable %_ptr_Function_float Function |
John Stiles | acba304 | 2021-01-28 15:11:39 -0500 | [diff] [blame^] | 72 | %22 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 |
| 73 | %26 = OpLoad %v4float %22 |
| 74 | OpStore %x %26 |
John Stiles | dac139a | 2021-01-26 11:06:42 -0500 | [diff] [blame] | 75 | OpStore %r %float_n5 |
John Stiles | acba304 | 2021-01-28 15:11:39 -0500 | [diff] [blame^] | 76 | OpBranch %30 |
| 77 | %30 = OpLabel |
| 78 | OpLoopMerge %34 %33 None |
| 79 | OpBranch %31 |
| 80 | %31 = OpLabel |
| 81 | %35 = OpLoad %float %r |
| 82 | %37 = OpFOrdLessThan %bool %35 %float_5 |
| 83 | OpBranchConditional %37 %32 %34 |
| 84 | %32 = OpLabel |
| 85 | %39 = OpLoad %float %r |
| 86 | %38 = OpExtInst %float %1 FClamp %39 %float_0 %float_1 |
| 87 | %42 = OpAccessChain %_ptr_Function_float %x %int_0 |
| 88 | OpStore %42 %38 |
| 89 | %43 = OpLoad %v4float %x |
| 90 | %44 = OpCompositeExtract %float %43 0 |
| 91 | %45 = OpFOrdEqual %bool %44 %float_0 |
| 92 | OpSelectionMerge %47 None |
| 93 | OpBranchConditional %45 %46 %47 |
| 94 | %46 = OpLabel |
| 95 | OpBranch %34 |
| 96 | %47 = OpLabel |
| 97 | OpBranch %33 |
| 98 | %33 = OpLabel |
| 99 | %48 = OpLoad %float %r |
| 100 | %49 = OpFAdd %float %48 %float_1 |
| 101 | OpStore %r %49 |
| 102 | OpBranch %30 |
| 103 | %34 = OpLabel |
John Stiles | 4d6310a | 2021-01-26 19:58:22 -0500 | [diff] [blame] | 104 | OpStore %b %float_5 |
John Stiles | 4d6310a | 2021-01-26 19:58:22 -0500 | [diff] [blame] | 105 | OpBranch %51 |
| 106 | %51 = OpLabel |
John Stiles | acba304 | 2021-01-28 15:11:39 -0500 | [diff] [blame^] | 107 | OpLoopMerge %55 %54 None |
| 108 | OpBranch %52 |
John Stiles | 4d6310a | 2021-01-26 19:58:22 -0500 | [diff] [blame] | 109 | %52 = OpLabel |
John Stiles | acba304 | 2021-01-28 15:11:39 -0500 | [diff] [blame^] | 110 | %56 = OpLoad %float %b |
| 111 | %57 = OpFOrdGreaterThanEqual %bool %56 %float_0 |
| 112 | OpBranchConditional %57 %53 %55 |
| 113 | %53 = OpLabel |
| 114 | %58 = OpLoad %float %b |
| 115 | %59 = OpAccessChain %_ptr_Function_float %x %int_2 |
| 116 | OpStore %59 %58 |
| 117 | %61 = OpLoad %v4float %x |
| 118 | %62 = OpCompositeExtract %float %61 3 |
| 119 | %63 = OpFOrdEqual %bool %62 %float_1 |
| 120 | OpSelectionMerge %65 None |
| 121 | OpBranchConditional %63 %64 %65 |
| 122 | %64 = OpLabel |
| 123 | OpBranch %54 |
| 124 | %65 = OpLabel |
| 125 | %66 = OpAccessChain %_ptr_Function_float %x %int_1 |
| 126 | OpStore %66 %float_0 |
| 127 | OpBranch %54 |
| 128 | %54 = OpLabel |
| 129 | %68 = OpLoad %float %b |
| 130 | %69 = OpFSub %float %68 %float_1 |
| 131 | OpStore %b %69 |
| 132 | OpBranch %51 |
| 133 | %55 = OpLabel |
| 134 | %70 = OpLoad %v4float %x |
| 135 | OpReturnValue %70 |
John Stiles | dac139a | 2021-01-26 11:06:42 -0500 | [diff] [blame] | 136 | OpFunctionEnd |