John Stiles | 5f675be | 2020-12-09 16:19:37 -0500 | [diff] [blame] | 1 | OpCapability Shader |
| 2 | %1 = OpExtInstImport "GLSL.std.450" |
| 3 | OpMemoryModel Logical GLSL450 |
Brian Osman | 8c595fe | 2021-03-15 14:58:57 -0400 | [diff] [blame] | 4 | OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise |
John Stiles | 5f675be | 2020-12-09 16:19:37 -0500 | [diff] [blame] | 5 | OpExecutionMode %main OriginUpperLeft |
| 6 | OpName %sk_FragColor "sk_FragColor" |
| 7 | OpName %sk_Clockwise "sk_Clockwise" |
Brian Osman | 8c595fe | 2021-03-15 14:58:57 -0400 | [diff] [blame] | 8 | OpName %_UniformBuffer "_UniformBuffer" |
| 9 | OpMemberName %_UniformBuffer 0 "a" |
John Stiles | 5f675be | 2020-12-09 16:19:37 -0500 | [diff] [blame] | 10 | OpName %main "main" |
| 11 | OpDecorate %sk_FragColor RelaxedPrecision |
| 12 | OpDecorate %sk_FragColor Location 0 |
| 13 | OpDecorate %sk_FragColor Index 0 |
Ethan Nicholas | a9c187e | 2021-03-15 21:24:32 +0000 | [diff] [blame] | 14 | OpDecorate %sk_Clockwise RelaxedPrecision |
John Stiles | 5f675be | 2020-12-09 16:19:37 -0500 | [diff] [blame] | 15 | OpDecorate %sk_Clockwise BuiltIn FrontFacing |
Brian Osman | 8c595fe | 2021-03-15 14:58:57 -0400 | [diff] [blame] | 16 | OpMemberDecorate %_UniformBuffer 0 Offset 0 |
| 17 | OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision |
| 18 | OpDecorate %_UniformBuffer Block |
| 19 | OpDecorate %10 Binding 0 |
| 20 | OpDecorate %10 DescriptorSet 0 |
| 21 | OpDecorate %21 RelaxedPrecision |
John Stiles | 5f675be | 2020-12-09 16:19:37 -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 |
Brian Osman | 8c595fe | 2021-03-15 14:58:57 -0400 | [diff] [blame] | 29 | %_UniformBuffer = OpTypeStruct %float |
| 30 | %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer |
| 31 | %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform |
John Stiles | 5f675be | 2020-12-09 16:19:37 -0500 | [diff] [blame] | 32 | %void = OpTypeVoid |
Brian Osman | 8c595fe | 2021-03-15 14:58:57 -0400 | [diff] [blame] | 33 | %14 = OpTypeFunction %void |
| 34 | %_ptr_Uniform_float = OpTypePointer Uniform %float |
John Stiles | 5f675be | 2020-12-09 16:19:37 -0500 | [diff] [blame] | 35 | %int = OpTypeInt 32 1 |
| 36 | %int_0 = OpConstant %int 0 |
Brian Osman | 8c595fe | 2021-03-15 14:58:57 -0400 | [diff] [blame] | 37 | %_ptr_Output_float = OpTypePointer Output %float |
| 38 | %main = OpFunction %void None %14 |
| 39 | %15 = OpLabel |
| 40 | %17 = OpAccessChain %_ptr_Uniform_float %10 %int_0 |
| 41 | %21 = OpLoad %float %17 |
| 42 | %16 = OpExtInst %float %1 Round %21 |
| 43 | %22 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0 |
| 44 | OpStore %22 %16 |
John Stiles | 5f675be | 2020-12-09 16:19:37 -0500 | [diff] [blame] | 45 | OpReturn |
| 46 | OpFunctionEnd |