blob: 7ea2f77a271fbe844b0424760470999093b54126 [file] [log] [blame]
Alastair Donaldsonf7e73d42021-07-23 13:10:12 +00001 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 %a "a"
9 OpName %b "b"
10 OpName %buf2 "buf2"
11 OpMemberName %buf2 0 "_GLF_uniform_int_values"
12 OpName %_ ""
13 OpName %gl_FragCoord "gl_FragCoord"
14 OpName %buf0 "buf0"
15 OpMemberName %buf0 0 "_GLF_uniform_float_values"
16 OpName %__0 ""
17 OpName %buf1 "buf1"
18 OpMemberName %buf1 0 "_GLF_uniform_uint_values"
19 OpName %__1 ""
20 OpName %_GLF_color "_GLF_color"
21 OpDecorate %_arr_int_uint_2 ArrayStride 16
22 OpMemberDecorate %buf2 0 Offset 0
23 OpDecorate %buf2 Block
24 OpDecorate %_ DescriptorSet 0
25 OpDecorate %_ Binding 2
26 OpDecorate %gl_FragCoord BuiltIn FragCoord
27 OpDecorate %_arr_float_uint_1 ArrayStride 16
28 OpMemberDecorate %buf0 0 Offset 0
29 OpDecorate %buf0 Block
30 OpDecorate %__0 DescriptorSet 0
31 OpDecorate %__0 Binding 0
32 OpDecorate %_arr_uint_uint_1 ArrayStride 16
33 OpMemberDecorate %buf1 0 Offset 0
34 OpDecorate %buf1 Block
35 OpDecorate %__1 DescriptorSet 0
36 OpDecorate %__1 Binding 1
37 OpDecorate %_GLF_color Location 0
38 %void = OpTypeVoid
39 %17 = OpTypeFunction %void
40 %uint = OpTypeInt 32 0
41%_ptr_Function_uint = OpTypePointer Function %uint
42 %uint_0 = OpConstant %uint 0
43 %int = OpTypeInt 32 1
44%_ptr_Function_int = OpTypePointer Function %int
45 %uint_2 = OpConstant %uint 2
46%_arr_int_uint_2 = OpTypeArray %int %uint_2
47 %buf2 = OpTypeStruct %_arr_int_uint_2
48%_ptr_Uniform_buf2 = OpTypePointer Uniform %buf2
49 %_ = OpVariable %_ptr_Uniform_buf2 Uniform
50 %int_0 = OpConstant %int 0
51 %int_1 = OpConstant %int 1
52%_ptr_Uniform_int = OpTypePointer Uniform %int
53 %float = OpTypeFloat 32
54 %v4float = OpTypeVector %float 4
55%_ptr_Input_v4float = OpTypePointer Input %v4float
56%gl_FragCoord = OpVariable %_ptr_Input_v4float Input
57%_ptr_Input_float = OpTypePointer Input %float
58 %uint_1 = OpConstant %uint 1
59%_arr_float_uint_1 = OpTypeArray %float %uint_1
60 %buf0 = OpTypeStruct %_arr_float_uint_1
61%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
62 %__0 = OpVariable %_ptr_Uniform_buf0 Uniform
63%_ptr_Uniform_float = OpTypePointer Uniform %float
64 %bool = OpTypeBool
65%_arr_uint_uint_1 = OpTypeArray %uint %uint_1
66 %buf1 = OpTypeStruct %_arr_uint_uint_1
67%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
68 %__1 = OpVariable %_ptr_Uniform_buf1 Uniform
69%_ptr_Uniform_uint = OpTypePointer Uniform %uint
70%_ptr_Output_v4float = OpTypePointer Output %v4float
71 %_GLF_color = OpVariable %_ptr_Output_v4float Output
72 %main = OpFunction %void None %17
73 %39 = OpLabel
74 %a = OpVariable %_ptr_Function_uint Function
75 %b = OpVariable %_ptr_Function_int Function
76 OpStore %a %uint_0
77 %40 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_1
78 %41 = OpLoad %int %40
79 OpStore %b %41
80 %42 = OpAccessChain %_ptr_Input_float %gl_FragCoord %uint_0
81 %43 = OpLoad %float %42
82 %44 = OpAccessChain %_ptr_Uniform_float %__0 %int_0 %int_0
83 %45 = OpLoad %float %44
84 %46 = OpFOrdLessThan %bool %43 %45
85 OpSelectionMerge %47 None
86 OpBranchConditional %46 %48 %47
87 %48 = OpLabel
88 %49 = OpAccessChain %_ptr_Uniform_uint %__1 %int_0 %int_0
89 %50 = OpLoad %uint %49
90 %51 = OpLoad %uint %a
91 %52 = OpUMod %uint %50 %51
92 %53 = OpBitcast %int %52
93 OpStore %b %53
94 OpBranch %47
95 %47 = OpLabel
96 %54 = OpLoad %int %b
97 %55 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_1
98 %56 = OpLoad %int %55
99 %57 = OpIEqual %bool %54 %56
100 OpSelectionMerge %58 None
101 OpBranchConditional %57 %59 %60
102 %59 = OpLabel
103 %61 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_1
104 %62 = OpLoad %int %61
105 %63 = OpConvertSToF %float %62
106 %64 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_0
107 %65 = OpLoad %int %64
108 %66 = OpConvertSToF %float %65
109 %67 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_0
110 %68 = OpLoad %int %67
111 %69 = OpConvertSToF %float %68
112 %70 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_1
113 %71 = OpLoad %int %70
114 %72 = OpConvertSToF %float %71
115 %73 = OpCompositeConstruct %v4float %63 %66 %69 %72
116 OpStore %_GLF_color %73
117 OpBranch %58
118 %60 = OpLabel
119 %74 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_0
120 %75 = OpLoad %int %74
121 %76 = OpConvertSToF %float %75
122 %77 = OpCompositeConstruct %v4float %76 %76 %76 %76
123 OpStore %_GLF_color %77
124 OpBranch %58
125 %58 = OpLabel
126 OpReturn
127 OpFunctionEnd