blob: e70b19a89ddda5bb488b223e8eef26d1bcc30748 [file] [log] [blame]
Ben Clayton97668c82021-07-27 08:17:29 +00001; SPIR-V
2; Version: 1.3
3; Generator: Google Tint Compiler; 0
James Price87537962022-12-06 18:32:19 +00004; Bound: 86
Ben Clayton97668c82021-07-27 08:17:29 +00005; Schema: 0
6 OpCapability Shader
7 OpMemoryModel Logical GLSL450
8 OpEntryPoint GLCompute %f "f"
9 OpExecutionMode %f LocalSize 1 1 1
Zhaoming Jiang6ab5d3c2022-11-02 02:25:38 +000010 OpName %ssbo_block "ssbo_block"
11 OpMemberName %ssbo_block 0 "inner"
Ben Clayton97668c82021-07-27 08:17:29 +000012 OpName %SSBO "SSBO"
13 OpMemberName %SSBO 0 "m"
Ben Clayton009d1292022-02-04 15:39:34 +000014 OpName %strided_arr "strided_arr"
15 OpMemberName %strided_arr 0 "el"
Ben Clayton97668c82021-07-27 08:17:29 +000016 OpName %ssbo "ssbo"
17 OpName %arr_to_mat2x2_stride_16 "arr_to_mat2x2_stride_16"
18 OpName %arr "arr"
19 OpName %mat2x2_stride_16_to_arr "mat2x2_stride_16_to_arr"
James Price7161ae52022-02-17 20:43:19 +000020 OpName %m "m"
James Price87537962022-12-06 18:32:19 +000021 OpName %assign_and_preserve_padding_1_ssbo_m_X "assign_and_preserve_padding_1_ssbo_m_X"
22 OpName %dest "dest"
23 OpName %value "value"
24 OpName %assign_and_preserve_padding_ssbo_m "assign_and_preserve_padding_ssbo_m"
25 OpName %value_0 "value"
26 OpName %i "i"
27 OpName %var_for_index "var_for_index"
Ben Clayton97668c82021-07-27 08:17:29 +000028 OpName %f_1 "f_1"
29 OpName %f "f"
Zhaoming Jiang6ab5d3c2022-11-02 02:25:38 +000030 OpDecorate %ssbo_block Block
31 OpMemberDecorate %ssbo_block 0 Offset 0
Ben Clayton97668c82021-07-27 08:17:29 +000032 OpMemberDecorate %SSBO 0 Offset 0
Ben Clayton009d1292022-02-04 15:39:34 +000033 OpMemberDecorate %strided_arr 0 Offset 0
34 OpDecorate %_arr_strided_arr_uint_2 ArrayStride 16
Ben Clayton97668c82021-07-27 08:17:29 +000035 OpDecorate %ssbo DescriptorSet 0
36 OpDecorate %ssbo Binding 0
James Price87537962022-12-06 18:32:19 +000037 OpDecorate %_arr_uint_uint_1 ArrayStride 4
Ben Clayton97668c82021-07-27 08:17:29 +000038 %float = OpTypeFloat 32
39 %v2float = OpTypeVector %float 2
Ben Clayton009d1292022-02-04 15:39:34 +000040%strided_arr = OpTypeStruct %v2float
Ben Clayton97668c82021-07-27 08:17:29 +000041 %uint = OpTypeInt 32 0
42 %uint_2 = OpConstant %uint 2
Ben Clayton009d1292022-02-04 15:39:34 +000043%_arr_strided_arr_uint_2 = OpTypeArray %strided_arr %uint_2
44 %SSBO = OpTypeStruct %_arr_strided_arr_uint_2
Zhaoming Jiang6ab5d3c2022-11-02 02:25:38 +000045 %ssbo_block = OpTypeStruct %SSBO
46%_ptr_StorageBuffer_ssbo_block = OpTypePointer StorageBuffer %ssbo_block
47 %ssbo = OpVariable %_ptr_StorageBuffer_ssbo_block StorageBuffer
Ben Clayton97668c82021-07-27 08:17:29 +000048%mat2v2float = OpTypeMatrix %v2float 2
Zhaoming Jiang6ab5d3c2022-11-02 02:25:38 +000049 %11 = OpTypeFunction %mat2v2float %_arr_strided_arr_uint_2
50 %16 = OpConstantNull %uint
Ben Clayton97668c82021-07-27 08:17:29 +000051 %uint_1 = OpConstant %uint 1
Zhaoming Jiang6ab5d3c2022-11-02 02:25:38 +000052 %23 = OpTypeFunction %_arr_strided_arr_uint_2 %mat2v2float
Ben Clayton97668c82021-07-27 08:17:29 +000053 %void = OpTypeVoid
James Price87537962022-12-06 18:32:19 +000054%_arr_uint_uint_1 = OpTypeArray %uint %uint_1
55 %32 = OpTypeFunction %void %_arr_uint_uint_1 %strided_arr
Ben Clayton8e348522022-06-01 15:57:22 +000056 %uint_0 = OpConstant %uint 0
James Price87537962022-12-06 18:32:19 +000057 %int = OpTypeInt 32 1
58 %41 = OpConstantNull %int
59%_ptr_StorageBuffer_v2float = OpTypePointer StorageBuffer %v2float
60 %46 = OpTypeFunction %void %_arr_strided_arr_uint_2
61%_ptr_Function_uint = OpTypePointer Function %uint
62 %bool = OpTypeBool
63%_ptr_Function__arr_strided_arr_uint_2 = OpTypePointer Function %_arr_strided_arr_uint_2
64 %64 = OpConstantNull %_arr_strided_arr_uint_2
65%_ptr_Function_strided_arr = OpTypePointer Function %strided_arr
66 %74 = OpTypeFunction %void
Ben Clayton009d1292022-02-04 15:39:34 +000067%_ptr_StorageBuffer__arr_strided_arr_uint_2 = OpTypePointer StorageBuffer %_arr_strided_arr_uint_2
Zhaoming Jiang6ab5d3c2022-11-02 02:25:38 +000068%arr_to_mat2x2_stride_16 = OpFunction %mat2v2float None %11
Ben Clayton009d1292022-02-04 15:39:34 +000069 %arr = OpFunctionParameter %_arr_strided_arr_uint_2
Zhaoming Jiang6ab5d3c2022-11-02 02:25:38 +000070 %15 = OpLabel
71 %17 = OpCompositeExtract %strided_arr %arr 0
72 %18 = OpCompositeExtract %v2float %17 0
73 %20 = OpCompositeExtract %strided_arr %arr 1
74 %21 = OpCompositeExtract %v2float %20 0
75 %22 = OpCompositeConstruct %mat2v2float %18 %21
76 OpReturnValue %22
Ben Clayton97668c82021-07-27 08:17:29 +000077 OpFunctionEnd
Zhaoming Jiang6ab5d3c2022-11-02 02:25:38 +000078%mat2x2_stride_16_to_arr = OpFunction %_arr_strided_arr_uint_2 None %23
James Price7161ae52022-02-17 20:43:19 +000079 %m = OpFunctionParameter %mat2v2float
Zhaoming Jiang6ab5d3c2022-11-02 02:25:38 +000080 %26 = OpLabel
81 %27 = OpCompositeExtract %v2float %m 0
82 %28 = OpCompositeConstruct %strided_arr %27
83 %29 = OpCompositeExtract %v2float %m 1
84 %30 = OpCompositeConstruct %strided_arr %29
85 %31 = OpCompositeConstruct %_arr_strided_arr_uint_2 %28 %30
86 OpReturnValue %31
Ben Clayton97668c82021-07-27 08:17:29 +000087 OpFunctionEnd
James Price87537962022-12-06 18:32:19 +000088%assign_and_preserve_padding_1_ssbo_m_X = OpFunction %void None %32
89 %dest = OpFunctionParameter %_arr_uint_uint_1
90 %value = OpFunctionParameter %strided_arr
91 %38 = OpLabel
92 %42 = OpCompositeExtract %uint %dest 0
93 %44 = OpAccessChain %_ptr_StorageBuffer_v2float %ssbo %uint_0 %uint_0 %42 %uint_0
94 %45 = OpCompositeExtract %v2float %value 0
95 OpStore %44 %45
Ben Clayton97668c82021-07-27 08:17:29 +000096 OpReturn
97 OpFunctionEnd
James Price87537962022-12-06 18:32:19 +000098%assign_and_preserve_padding_ssbo_m = OpFunction %void None %46
99 %value_0 = OpFunctionParameter %_arr_strided_arr_uint_2
100 %49 = OpLabel
101 %i = OpVariable %_ptr_Function_uint Function %16
102%var_for_index = OpVariable %_ptr_Function__arr_strided_arr_uint_2 Function %64
103 OpStore %i %16
104 OpBranch %52
105 %52 = OpLabel
106 OpLoopMerge %53 %54 None
107 OpBranch %55
108 %55 = OpLabel
109 %57 = OpLoad %uint %i
110 %58 = OpULessThan %bool %57 %uint_2
111 %56 = OpLogicalNot %bool %58
112 OpSelectionMerge %60 None
113 OpBranchConditional %56 %61 %60
114 %61 = OpLabel
115 OpBranch %53
116 %60 = OpLabel
117 OpStore %var_for_index %value_0
118 %66 = OpLoad %uint %i
119 %67 = OpCompositeConstruct %_arr_uint_uint_1 %66
120 %68 = OpLoad %uint %i
121 %70 = OpAccessChain %_ptr_Function_strided_arr %var_for_index %68
122 %71 = OpLoad %strided_arr %70
123 %65 = OpFunctionCall %void %assign_and_preserve_padding_1_ssbo_m_X %67 %71
124 OpBranch %54
125 %54 = OpLabel
126 %72 = OpLoad %uint %i
127 %73 = OpIAdd %uint %72 %uint_1
128 OpStore %i %73
129 OpBranch %52
130 %53 = OpLabel
131 OpReturn
132 OpFunctionEnd
133 %f_1 = OpFunction %void None %74
134 %76 = OpLabel
135 %79 = OpAccessChain %_ptr_StorageBuffer__arr_strided_arr_uint_2 %ssbo %uint_0 %uint_0
136 %80 = OpLoad %_arr_strided_arr_uint_2 %79
137 %77 = OpFunctionCall %mat2v2float %arr_to_mat2x2_stride_16 %80
138 %81 = OpFunctionCall %_arr_strided_arr_uint_2 %mat2x2_stride_16_to_arr %77
139 %82 = OpFunctionCall %void %assign_and_preserve_padding_ssbo_m %81
140 OpReturn
141 OpFunctionEnd
142 %f = OpFunction %void None %74
143 %84 = OpLabel
144 %85 = OpFunctionCall %void %f_1
Ben Clayton97668c82021-07-27 08:17:29 +0000145 OpReturn
146 OpFunctionEnd