blob: fd1b0b69f17bf23078c94110d80f0760d6c4e2cb [file] [log] [blame]
John Stilesdda1d312020-11-20 16:28:50 -05001OpCapability Shader
2%1 = OpExtInstImport "GLSL.std.450"
3OpMemoryModel Logical GLSL450
John Stilesf9e85512021-03-22 12:05:31 -04004OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_FragColor %sk_Clockwise
5OpExecutionMode %_entrypoint_v OriginUpperLeft
John Stilesdda1d312020-11-20 16:28:50 -05006OpName %sk_FragColor "sk_FragColor"
7OpName %sk_Clockwise "sk_Clockwise"
John Stilesf9e85512021-03-22 12:05:31 -04008OpName %_entrypoint_v "_entrypoint_v"
John Stilesb42b9262021-09-18 12:41:06 -04009OpName %increment_vfff "increment_vfff"
John Stilesdda1d312020-11-20 16:28:50 -050010OpName %main "main"
John Stilesb42b9262021-09-18 12:41:06 -040011OpName %a "a"
John Stilesdda1d312020-11-20 16:28:50 -050012OpName %b "b"
John Stiles7a3f5502021-03-08 13:29:15 -050013OpName %c "c"
John Stilesb42b9262021-09-18 12:41:06 -040014OpName %x "x"
John Stilesdda1d312020-11-20 16:28:50 -050015OpName %d "d"
16OpDecorate %sk_FragColor RelaxedPrecision
17OpDecorate %sk_FragColor Location 0
18OpDecorate %sk_FragColor Index 0
John Stilesdda1d312020-11-20 16:28:50 -050019OpDecorate %sk_Clockwise BuiltIn FrontFacing
John Stilesb42b9262021-09-18 12:41:06 -040020OpDecorate %64 RelaxedPrecision
21OpDecorate %67 RelaxedPrecision
22OpDecorate %71 RelaxedPrecision
23OpDecorate %75 RelaxedPrecision
24OpDecorate %76 RelaxedPrecision
John Stilesdda1d312020-11-20 16:28:50 -050025%float = OpTypeFloat 32
26%v4float = OpTypeVector %float 4
27%_ptr_Output_v4float = OpTypePointer Output %v4float
28%sk_FragColor = OpVariable %_ptr_Output_v4float Output
29%bool = OpTypeBool
30%_ptr_Input_bool = OpTypePointer Input %bool
31%sk_Clockwise = OpVariable %_ptr_Input_bool Input
32%void = OpTypeVoid
John Stilesb42b9262021-09-18 12:41:06 -040033%13 = OpTypeFunction %void
Brian Osman169c8902021-04-21 14:27:08 -040034%v2float = OpTypeVector %float 2
35%float_0 = OpConstant %float 0
John Stilesb42b9262021-09-18 12:41:06 -040036%17 = OpConstantComposite %v2float %float_0 %float_0
Brian Osman169c8902021-04-21 14:27:08 -040037%_ptr_Function_v2float = OpTypePointer Function %v2float
John Stilesdda1d312020-11-20 16:28:50 -050038%_ptr_Function_float = OpTypePointer Function %float
John Stilesb42b9262021-09-18 12:41:06 -040039%21 = OpTypeFunction %void %_ptr_Function_float %_ptr_Function_float %_ptr_Function_float
40%float_1 = OpConstant %float 1
41%34 = OpTypeFunction %v4float %_ptr_Function_v2float
John Stilesdda1d312020-11-20 16:28:50 -050042%float_2 = OpConstant %float 2
43%float_3 = OpConstant %float 3
John Stilesb42b9262021-09-18 12:41:06 -040044%int = OpTypeInt 32 1
45%_ptr_Function_int = OpTypePointer Function %int
46%int_0 = OpConstant %int 0
47%int_1 = OpConstant %int 1
John Stilesecd7c222021-02-08 14:20:28 -050048%float_5 = OpConstant %float 5
49%float_4 = OpConstant %float 4
John Stilesb42b9262021-09-18 12:41:06 -040050%_entrypoint_v = OpFunction %void None %13
51%14 = OpLabel
52%18 = OpVariable %_ptr_Function_v2float Function
53OpStore %18 %17
54%20 = OpFunctionCall %v4float %main %18
55OpStore %sk_FragColor %20
John Stilesecd7c222021-02-08 14:20:28 -050056OpReturn
57OpFunctionEnd
John Stilesb42b9262021-09-18 12:41:06 -040058%increment_vfff = OpFunction %void None %21
59%23 = OpFunctionParameter %_ptr_Function_float
60%24 = OpFunctionParameter %_ptr_Function_float
61%25 = OpFunctionParameter %_ptr_Function_float
62%26 = OpLabel
63%27 = OpLoad %float %23
64%29 = OpFAdd %float %27 %float_1
65OpStore %23 %29
66%30 = OpLoad %float %24
67%31 = OpFAdd %float %30 %float_1
68OpStore %24 %31
69%32 = OpLoad %float %25
70%33 = OpFAdd %float %32 %float_1
71OpStore %25 %33
72OpReturn
73OpFunctionEnd
74%main = OpFunction %v4float None %34
75%35 = OpFunctionParameter %_ptr_Function_v2float
76%36 = OpLabel
77%a = OpVariable %_ptr_Function_float Function
John Stilesdda1d312020-11-20 16:28:50 -050078%b = OpVariable %_ptr_Function_float Function
John Stiles7a3f5502021-03-08 13:29:15 -050079%c = OpVariable %_ptr_Function_float Function
John Stilesb42b9262021-09-18 12:41:06 -040080%x = OpVariable %_ptr_Function_int Function
John Stilesdda1d312020-11-20 16:28:50 -050081%d = OpVariable %_ptr_Function_float Function
John Stilesb42b9262021-09-18 12:41:06 -040082OpStore %a %float_1
John Stilesdda1d312020-11-20 16:28:50 -050083OpStore %b %float_2
John Stiles7a3f5502021-03-08 13:29:15 -050084OpStore %c %float_3
John Stilesb42b9262021-09-18 12:41:06 -040085OpStore %x %int_0
86OpBranch %46
87%46 = OpLabel
88OpLoopMerge %50 %49 None
89OpBranch %47
90%47 = OpLabel
91%51 = OpLoad %int %x
92%53 = OpSLessThan %bool %51 %int_1
93OpBranchConditional %53 %48 %50
94%48 = OpLabel
95OpBranch %50
96%49 = OpLabel
97%54 = OpLoad %int %x
98%55 = OpIAdd %int %54 %int_1
99OpStore %x %55
100OpBranch %46
101%50 = OpLabel
102%57 = OpLoad %float %c
103OpStore %d %57
104%58 = OpLoad %float %b
105%59 = OpFAdd %float %58 %float_1
106OpStore %b %59
107%60 = OpLoad %float %d
108%61 = OpFAdd %float %60 %float_1
109OpStore %d %61
110%62 = OpLoad %float %b
111%63 = OpFOrdEqual %bool %62 %float_2
112%64 = OpSelect %float %63 %float_1 %float_0
113%65 = OpLoad %float %b
114%66 = OpFOrdEqual %bool %65 %float_3
115%67 = OpSelect %float %66 %float_1 %float_0
116%68 = OpLoad %float %d
117%70 = OpFOrdEqual %bool %68 %float_5
118%71 = OpSelect %float %70 %float_1 %float_0
119%72 = OpLoad %float %d
120%74 = OpFOrdEqual %bool %72 %float_4
121%75 = OpSelect %float %74 %float_1 %float_0
122%76 = OpCompositeConstruct %v4float %64 %67 %71 %75
123OpReturnValue %76
John Stilesdda1d312020-11-20 16:28:50 -0500124OpFunctionEnd