blob: 7a89289748bed4efc403f49b8f47483479b241c6 [file] [log] [blame]
John Stilesdac139a2021-01-26 11:06:42 -05001OpCapability Shader
2%1 = OpExtInstImport "GLSL.std.450"
3OpMemoryModel Logical GLSL450
John Stiles4d6310a2021-01-26 19:58:22 -05004OpEntryPoint Fragment %_entrypoint "_entrypoint" %sk_FragColor %sk_Clockwise
5OpExecutionMode %_entrypoint OriginUpperLeft
6OpName %sk_FragColor "sk_FragColor"
John Stilesdac139a2021-01-26 11:06:42 -05007OpName %sk_Clockwise "sk_Clockwise"
John Stilesacba3042021-01-28 15:11:39 -05008OpName %_UniformBuffer "_UniformBuffer"
9OpMemberName %_UniformBuffer 0 "colorWhite"
John Stiles4d6310a2021-01-26 19:58:22 -050010OpName %_entrypoint "_entrypoint"
John Stilesdac139a2021-01-26 11:06:42 -050011OpName %main "main"
12OpName %x "x"
13OpName %r "r"
14OpName %b "b"
John Stiles4d6310a2021-01-26 19:58:22 -050015OpDecorate %sk_FragColor RelaxedPrecision
16OpDecorate %sk_FragColor Location 0
17OpDecorate %sk_FragColor Index 0
John Stilesdac139a2021-01-26 11:06:42 -050018OpDecorate %sk_Clockwise RelaxedPrecision
19OpDecorate %sk_Clockwise BuiltIn FrontFacing
John Stilesacba3042021-01-28 15:11:39 -050020OpMemberDecorate %_UniformBuffer 0 Offset 0
21OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
22OpDecorate %_UniformBuffer Block
23OpDecorate %10 Binding 0
24OpDecorate %10 DescriptorSet 0
25OpDecorate %26 RelaxedPrecision
26OpDecorate %35 RelaxedPrecision
27OpDecorate %39 RelaxedPrecision
28OpDecorate %43 RelaxedPrecision
29OpDecorate %48 RelaxedPrecision
30OpDecorate %49 RelaxedPrecision
31OpDecorate %56 RelaxedPrecision
John Stilesdac139a2021-01-26 11:06:42 -050032OpDecorate %58 RelaxedPrecision
John Stilesacba3042021-01-28 15:11:39 -050033OpDecorate %61 RelaxedPrecision
34OpDecorate %68 RelaxedPrecision
35OpDecorate %69 RelaxedPrecision
36OpDecorate %70 RelaxedPrecision
John Stiles4d6310a2021-01-26 19:58:22 -050037%float = OpTypeFloat 32
38%v4float = OpTypeVector %float 4
39%_ptr_Output_v4float = OpTypePointer Output %v4float
40%sk_FragColor = OpVariable %_ptr_Output_v4float Output
John Stilesdac139a2021-01-26 11:06:42 -050041%bool = OpTypeBool
42%_ptr_Input_bool = OpTypePointer Input %bool
43%sk_Clockwise = OpVariable %_ptr_Input_bool Input
John Stilesacba3042021-01-28 15:11:39 -050044%_UniformBuffer = OpTypeStruct %v4float
45%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
46%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
John Stiles4d6310a2021-01-26 19:58:22 -050047%void = OpTypeVoid
John Stilesacba3042021-01-28 15:11:39 -050048%15 = OpTypeFunction %void
49%18 = OpTypeFunction %v4float
John Stilesdac139a2021-01-26 11:06:42 -050050%_ptr_Function_v4float = OpTypePointer Function %v4float
John Stilesacba3042021-01-28 15:11:39 -050051%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
52%int = OpTypeInt 32 1
53%int_0 = OpConstant %int 0
John Stilesdac139a2021-01-26 11:06:42 -050054%_ptr_Function_float = OpTypePointer Function %float
55%float_n5 = OpConstant %float -5
56%float_5 = OpConstant %float 5
John Stilesdac139a2021-01-26 11:06:42 -050057%float_0 = OpConstant %float 0
John Stilesb41d5bb2021-01-26 16:28:12 -050058%float_1 = OpConstant %float 1
John Stilesdac139a2021-01-26 11:06:42 -050059%int_2 = OpConstant %int 2
60%int_1 = OpConstant %int 1
John Stilesacba3042021-01-28 15:11:39 -050061%_entrypoint = OpFunction %void None %15
62%16 = OpLabel
63%17 = OpFunctionCall %v4float %main
64OpStore %sk_FragColor %17
John Stiles4d6310a2021-01-26 19:58:22 -050065OpReturn
66OpFunctionEnd
John Stilesacba3042021-01-28 15:11:39 -050067%main = OpFunction %v4float None %18
68%19 = OpLabel
John Stilesdac139a2021-01-26 11:06:42 -050069%x = OpVariable %_ptr_Function_v4float Function
70%r = OpVariable %_ptr_Function_float Function
71%b = OpVariable %_ptr_Function_float Function
John Stilesacba3042021-01-28 15:11:39 -050072%22 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
73%26 = OpLoad %v4float %22
74OpStore %x %26
John Stilesdac139a2021-01-26 11:06:42 -050075OpStore %r %float_n5
John Stilesacba3042021-01-28 15:11:39 -050076OpBranch %30
77%30 = OpLabel
78OpLoopMerge %34 %33 None
79OpBranch %31
80%31 = OpLabel
81%35 = OpLoad %float %r
82%37 = OpFOrdLessThan %bool %35 %float_5
83OpBranchConditional %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
88OpStore %42 %38
89%43 = OpLoad %v4float %x
90%44 = OpCompositeExtract %float %43 0
91%45 = OpFOrdEqual %bool %44 %float_0
92OpSelectionMerge %47 None
93OpBranchConditional %45 %46 %47
94%46 = OpLabel
95OpBranch %34
96%47 = OpLabel
97OpBranch %33
98%33 = OpLabel
99%48 = OpLoad %float %r
100%49 = OpFAdd %float %48 %float_1
101OpStore %r %49
102OpBranch %30
103%34 = OpLabel
John Stiles4d6310a2021-01-26 19:58:22 -0500104OpStore %b %float_5
John Stiles4d6310a2021-01-26 19:58:22 -0500105OpBranch %51
106%51 = OpLabel
John Stilesacba3042021-01-28 15:11:39 -0500107OpLoopMerge %55 %54 None
108OpBranch %52
John Stiles4d6310a2021-01-26 19:58:22 -0500109%52 = OpLabel
John Stilesacba3042021-01-28 15:11:39 -0500110%56 = OpLoad %float %b
111%57 = OpFOrdGreaterThanEqual %bool %56 %float_0
112OpBranchConditional %57 %53 %55
113%53 = OpLabel
114%58 = OpLoad %float %b
115%59 = OpAccessChain %_ptr_Function_float %x %int_2
116OpStore %59 %58
117%61 = OpLoad %v4float %x
118%62 = OpCompositeExtract %float %61 3
119%63 = OpFOrdEqual %bool %62 %float_1
120OpSelectionMerge %65 None
121OpBranchConditional %63 %64 %65
122%64 = OpLabel
123OpBranch %54
124%65 = OpLabel
125%66 = OpAccessChain %_ptr_Function_float %x %int_1
126OpStore %66 %float_0
127OpBranch %54
128%54 = OpLabel
129%68 = OpLoad %float %b
130%69 = OpFSub %float %68 %float_1
131OpStore %b %69
132OpBranch %51
133%55 = OpLabel
134%70 = OpLoad %v4float %x
135OpReturnValue %70
John Stilesdac139a2021-01-26 11:06:42 -0500136OpFunctionEnd