• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1OpCapability 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 %_UniformBuffer "_UniformBuffer"
9OpMemberName %_UniformBuffer 0 "a"
10OpMemberName %_UniformBuffer 1 "b"
11OpName %main "main"
12OpDecorate %sk_FragColor RelaxedPrecision
13OpDecorate %sk_FragColor Location 0
14OpDecorate %sk_FragColor Index 0
15OpDecorate %sk_Clockwise BuiltIn FrontFacing
16OpMemberDecorate %_UniformBuffer 0 Offset 0
17OpMemberDecorate %_UniformBuffer 1 Offset 4
18OpDecorate %_UniformBuffer Block
19OpDecorate %10 Binding 0
20OpDecorate %10 DescriptorSet 0
21OpDecorate %23 RelaxedPrecision
22OpDecorate %31 RelaxedPrecision
23%float = OpTypeFloat 32
24%v4float = OpTypeVector %float 4
25%_ptr_Output_v4float = OpTypePointer Output %v4float
26%sk_FragColor = OpVariable %_ptr_Output_v4float Output
27%bool = OpTypeBool
28%_ptr_Input_bool = OpTypePointer Input %bool
29%sk_Clockwise = OpVariable %_ptr_Input_bool Input
30%int = OpTypeInt 32 1
31%uint = OpTypeInt 32 0
32%_UniformBuffer = OpTypeStruct %int %uint
33%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
34%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
35%void = OpTypeVoid
36%16 = OpTypeFunction %void
37%_ptr_Uniform_int = OpTypePointer Uniform %int
38%int_0 = OpConstant %int 0
39%_ptr_Output_float = OpTypePointer Output %float
40%_ptr_Uniform_uint = OpTypePointer Uniform %uint
41%int_1 = OpConstant %int 1
42%main = OpFunction %void None %16
43%17 = OpLabel
44%19 = OpAccessChain %_ptr_Uniform_int %10 %int_0
45%22 = OpLoad %int %19
46%18 = OpExtInst %int %1 FindSMsb %22
47%23 = OpConvertSToF %float %18
48%24 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
49OpStore %24 %23
50%27 = OpAccessChain %_ptr_Uniform_uint %10 %int_1
51%30 = OpLoad %uint %27
52%26 = OpExtInst %int %1 FindUMsb %30
53%31 = OpConvertSToF %float %26
54%32 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_1
55OpStore %32 %31
56OpReturn
57OpFunctionEnd
58