• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1               OpCapability Shader
2          %1 = OpExtInstImport "GLSL.std.450"
3               OpMemoryModel Logical GLSL450
4               OpEntryPoint Fragment %main "main" %gl_FragCoord %_GLF_color
5               OpExecutionMode %main OriginUpperLeft
6               OpSource ESSL 320
7               OpName %main "main"
8               OpName %gl_FragCoord "gl_FragCoord"
9               OpName %buf0 "buf0"
10               OpMemberName %buf0 0 "resolution"
11               OpName %_ ""
12               OpName %_GLF_color "_GLF_color"
13               OpName %indexable "indexable"
14               OpDecorate %gl_FragCoord BuiltIn FragCoord
15               OpMemberDecorate %buf0 0 Offset 0
16               OpDecorate %buf0 Block
17               OpDecorate %_ DescriptorSet 0
18               OpDecorate %_ Binding 0
19               OpDecorate %_GLF_color Location 0
20       %void = OpTypeVoid
21          %9 = OpTypeFunction %void
22        %int = OpTypeInt 32 1
23      %int_0 = OpConstant %int 0
24      %int_1 = OpConstant %int 1
25       %bool = OpTypeBool
26      %int_3 = OpConstant %int 3
27      %int_2 = OpConstant %int 2
28      %float = OpTypeFloat 32
29    %v2float = OpTypeVector %float 2
30    %v4float = OpTypeVector %float 4
31%_ptr_Input_v4float = OpTypePointer Input %v4float
32%gl_FragCoord = OpVariable %_ptr_Input_v4float Input
33       %buf0 = OpTypeStruct %v2float
34%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
35          %_ = OpVariable %_ptr_Uniform_buf0 Uniform
36%_ptr_Uniform_v2float = OpTypePointer Uniform %v2float
37    %float_8 = OpConstant %float 8
38       %uint = OpTypeInt 32 0
39      %int_8 = OpConstant %int 8
40%_ptr_Output_v4float = OpTypePointer Output %v4float
41 %_GLF_color = OpVariable %_ptr_Output_v4float Output
42    %uint_16 = OpConstant %uint 16
43%_arr_v4float_uint_16 = OpTypeArray %v4float %uint_16
44    %float_0 = OpConstant %float 0
45    %float_1 = OpConstant %float 1
46         %30 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_1
47  %float_0_5 = OpConstant %float 0.5
48         %32 = OpConstantComposite %v4float %float_0_5 %float_0 %float_0 %float_1
49         %33 = OpConstantComposite %v4float %float_0 %float_0_5 %float_0 %float_1
50         %34 = OpConstantComposite %v4float %float_0_5 %float_0_5 %float_0 %float_1
51         %35 = OpConstantComposite %v4float %float_0 %float_0 %float_0_5 %float_1
52         %36 = OpConstantComposite %v4float %float_0_5 %float_0 %float_0_5 %float_1
53         %37 = OpConstantComposite %v4float %float_0 %float_0_5 %float_0_5 %float_1
54         %38 = OpConstantComposite %v4float %float_0_5 %float_0_5 %float_0_5 %float_1
55         %39 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
56         %40 = OpConstantComposite %v4float %float_0 %float_1 %float_0 %float_1
57         %41 = OpConstantComposite %v4float %float_1 %float_1 %float_0 %float_1
58         %42 = OpConstantComposite %v4float %float_0 %float_0 %float_1 %float_1
59         %43 = OpConstantComposite %v4float %float_1 %float_0 %float_1 %float_1
60         %44 = OpConstantComposite %v4float %float_0 %float_1 %float_1 %float_1
61         %45 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
62         %46 = OpConstantComposite %_arr_v4float_uint_16 %30 %32 %33 %34 %35 %36 %37 %38 %30 %39 %40 %41 %42 %43 %44 %45
63     %int_16 = OpConstant %int 16
64%_ptr_Function__arr_v4float_uint_16 = OpTypePointer Function %_arr_v4float_uint_16
65%_ptr_Function_v4float = OpTypePointer Function %v4float
66  %float_0_0 = OpConstant %float 0
67         %51 = OpConstantComposite %v4float %float_0_0 %float_0_0 %float_0_0 %float_0_0
68         %52 = OpConstantComposite %_arr_v4float_uint_16 %51 %51 %51 %51 %51 %51 %51 %51 %51 %51 %51 %51 %51 %51 %51 %51
69       %main = OpFunction %void None %9
70         %53 = OpLabel
71  %indexable = OpVariable %_ptr_Function__arr_v4float_uint_16 Function
72         %54 = OpLoad %v4float %gl_FragCoord
73         %55 = OpVectorShuffle %v2float %54 %54 0 1
74         %56 = OpCompositeConstruct %v4float %float_0 %float_8 %55
75         %57 = OpAccessChain %_ptr_Uniform_v2float %_ %int_0
76         %58 = OpLoad %v2float %57
77         %59 = OpCompositeConstruct %_arr_v4float_uint_16 %35 %43 %37 %44 %45 %37 %37 %36 %41 %54 %35 %34 %33 %32 %40 %39
78         %60 = OpFDiv %v2float %55 %58
79         %61 = OpVectorTimesScalar %v2float %60 %float_8
80         %62 = OpExtInst %v2float %1 Floor %61
81         %63 = OpCompositeConstruct %v4float %61 %float_0_5 %float_1
82         %64 = OpCompositeExtract %float %62 0
83         %65 = OpConvertFToS %int %64
84         %66 = OpIMul %int %65 %int_8
85         %67 = OpCompositeExtract %float %62 1
86         %68 = OpConvertFToS %int %67
87         %69 = OpIAdd %int %66 %68
88               OpBranch %70
89         %70 = OpLabel
90         %71 = OpPhi %int %int_0 %53 %72 %73
91         %74 = OpPhi %int %69 %53 %75 %73
92         %76 = OpSGreaterThan %bool %74 %int_1
93               OpLoopMerge %77 %73 None
94               OpBranchConditional %76 %78 %77
95         %78 = OpLabel
96         %79 = OpBitwiseAnd %int %74 %int_1
97         %80 = OpIEqual %bool %79 %int_1
98               OpSelectionMerge %81 None
99               OpBranchConditional %80 %82 %83
100         %82 = OpLabel
101         %84 = OpIMul %int %int_3 %74
102         %85 = OpIAdd %int %84 %int_1
103               OpBranch %81
104         %83 = OpLabel
105         %86 = OpSDiv %int %74 %int_2
106               OpBranch %81
107         %81 = OpLabel
108         %75 = OpPhi %int %85 %82 %86 %83
109         %72 = OpIAdd %int %71 %int_1
110               OpBranch %73
111         %73 = OpLabel
112               OpBranch %70
113         %77 = OpLabel
114         %87 = OpSMod %int %71 %int_16
115               OpStore %indexable %46
116         %88 = OpLoad %_arr_v4float_uint_16 %indexable
117               OpStore %indexable %52
118               OpStore %indexable %88
119         %89 = OpCompositeExtract %v4float %59 1
120         %90 = OpCompositeConstruct %_arr_v4float_uint_16 %36 %36 %40 %30 %36 %38 %43 %30 %40 %56 %35 %37 %36 %41 %43 %63
121         %91 = OpAccessChain %_ptr_Function_v4float %indexable %87
122         %92 = OpLoad %v4float %91
123               OpStore %_GLF_color %92
124               OpReturn
125               OpFunctionEnd
126