blob: 4ba5887f8ba60d1e57ab59d498ad7d574088032e [file] [log] [blame]
John Stilesdda1d312020-11-20 16:28:50 -05001OpCapability Shader
2%1 = OpExtInstImport "GLSL.std.450"
3OpMemoryModel Logical GLSL450
4OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
5OpExecutionMode %main OriginUpperLeft
6OpName %sk_FragColor "sk_FragColor"
7OpName %sk_Clockwise "sk_Clockwise"
8OpName %main "main"
John Stiles7a3f5502021-03-08 13:29:15 -05009OpName %x "x"
10OpName %y "y"
11OpName %z "z"
John Stilesdda1d312020-11-20 16:28:50 -050012OpDecorate %sk_FragColor RelaxedPrecision
13OpDecorate %sk_FragColor Location 0
14OpDecorate %sk_FragColor Index 0
John Stilesdda1d312020-11-20 16:28:50 -050015OpDecorate %sk_Clockwise BuiltIn FrontFacing
Ethan Nicholas7f015882021-03-23 14:16:52 -040016OpDecorate %21 RelaxedPrecision
17OpDecorate %23 RelaxedPrecision
18OpDecorate %25 RelaxedPrecision
19OpDecorate %26 RelaxedPrecision
20OpDecorate %28 RelaxedPrecision
John Stiles7a3f5502021-03-08 13:29:15 -050021OpDecorate %29 RelaxedPrecision
John Stilesdda1d312020-11-20 16:28:50 -050022%float = OpTypeFloat 32
23%v4float = OpTypeVector %float 4
24%_ptr_Output_v4float = OpTypePointer Output %v4float
25%sk_FragColor = OpVariable %_ptr_Output_v4float Output
26%bool = OpTypeBool
27%_ptr_Input_bool = OpTypePointer Input %bool
28%sk_Clockwise = OpVariable %_ptr_Input_bool Input
29%void = OpTypeVoid
30%11 = OpTypeFunction %void
John Stiles7a3f5502021-03-08 13:29:15 -050031%int = OpTypeInt 32 1
32%_ptr_Function_int = OpTypePointer Function %int
33%int_0 = OpConstant %int 0
34%int_1 = OpConstant %int 1
John Stilesdda1d312020-11-20 16:28:50 -050035%v3float = OpTypeVector %float 3
John Stilesdda1d312020-11-20 16:28:50 -050036%main = OpFunction %void None %11
37%12 = OpLabel
John Stiles7a3f5502021-03-08 13:29:15 -050038%x = OpVariable %_ptr_Function_int Function
39%y = OpVariable %_ptr_Function_int Function
40%z = OpVariable %_ptr_Function_int Function
41OpStore %x %int_0
42OpStore %y %int_0
43OpStore %z %int_0
44OpStore %x %int_1
John Stiles7a3f5502021-03-08 13:29:15 -050045OpStore %z %int_1
46%20 = OpLoad %int %x
47%21 = OpConvertSToF %float %20
48%22 = OpLoad %int %y
49%23 = OpConvertSToF %float %22
50%24 = OpLoad %int %z
51%25 = OpConvertSToF %float %24
52%26 = OpCompositeConstruct %v3float %21 %23 %25
53%28 = OpLoad %v4float %sk_FragColor
54%29 = OpVectorShuffle %v4float %28 %26 4 5 6 3
55OpStore %sk_FragColor %29
John Stilesdda1d312020-11-20 16:28:50 -050056OpReturn
57OpFunctionEnd