John Stiles | dda1d31 | 2020-11-20 16:28:50 -0500 | [diff] [blame] | 1 | OpCapability Shader |
| 2 | %1 = OpExtInstImport "GLSL.std.450" |
| 3 | OpMemoryModel Logical GLSL450 |
| 4 | OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise |
| 5 | OpExecutionMode %main OriginUpperLeft |
| 6 | OpName %sk_FragColor "sk_FragColor" |
| 7 | OpName %sk_Clockwise "sk_Clockwise" |
| 8 | OpName %main "main" |
John Stiles | 7a3f550 | 2021-03-08 13:29:15 -0500 | [diff] [blame] | 9 | OpName %x "x" |
| 10 | OpName %y "y" |
| 11 | OpName %z "z" |
John Stiles | dda1d31 | 2020-11-20 16:28:50 -0500 | [diff] [blame] | 12 | OpDecorate %sk_FragColor RelaxedPrecision |
| 13 | OpDecorate %sk_FragColor Location 0 |
| 14 | OpDecorate %sk_FragColor Index 0 |
John Stiles | dda1d31 | 2020-11-20 16:28:50 -0500 | [diff] [blame] | 15 | OpDecorate %sk_Clockwise BuiltIn FrontFacing |
Ethan Nicholas | 7f01588 | 2021-03-23 14:16:52 -0400 | [diff] [blame] | 16 | OpDecorate %21 RelaxedPrecision |
| 17 | OpDecorate %23 RelaxedPrecision |
| 18 | OpDecorate %25 RelaxedPrecision |
| 19 | OpDecorate %26 RelaxedPrecision |
| 20 | OpDecorate %28 RelaxedPrecision |
John Stiles | 7a3f550 | 2021-03-08 13:29:15 -0500 | [diff] [blame] | 21 | OpDecorate %29 RelaxedPrecision |
John Stiles | dda1d31 | 2020-11-20 16:28:50 -0500 | [diff] [blame] | 22 | %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 Stiles | 7a3f550 | 2021-03-08 13:29:15 -0500 | [diff] [blame] | 31 | %int = OpTypeInt 32 1 |
| 32 | %_ptr_Function_int = OpTypePointer Function %int |
| 33 | %int_0 = OpConstant %int 0 |
| 34 | %int_1 = OpConstant %int 1 |
John Stiles | dda1d31 | 2020-11-20 16:28:50 -0500 | [diff] [blame] | 35 | %v3float = OpTypeVector %float 3 |
John Stiles | dda1d31 | 2020-11-20 16:28:50 -0500 | [diff] [blame] | 36 | %main = OpFunction %void None %11 |
| 37 | %12 = OpLabel |
John Stiles | 7a3f550 | 2021-03-08 13:29:15 -0500 | [diff] [blame] | 38 | %x = OpVariable %_ptr_Function_int Function |
| 39 | %y = OpVariable %_ptr_Function_int Function |
| 40 | %z = OpVariable %_ptr_Function_int Function |
| 41 | OpStore %x %int_0 |
| 42 | OpStore %y %int_0 |
| 43 | OpStore %z %int_0 |
| 44 | OpStore %x %int_1 |
John Stiles | 7a3f550 | 2021-03-08 13:29:15 -0500 | [diff] [blame] | 45 | OpStore %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 |
| 55 | OpStore %sk_FragColor %29 |
John Stiles | dda1d31 | 2020-11-20 16:28:50 -0500 | [diff] [blame] | 56 | OpReturn |
| 57 | OpFunctionEnd |