interface_var_sroa_test.cpp 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408
  1. // Copyright (c) 2022 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. #include <iostream>
  15. #include "test/opt/pass_fixture.h"
  16. #include "test/opt/pass_utils.h"
  17. namespace spvtools {
  18. namespace opt {
  19. namespace {
  20. using InterfaceVariableScalarReplacementTest = PassTest<::testing::Test>;
  21. TEST_F(InterfaceVariableScalarReplacementTest,
  22. ReplaceInterfaceVarsWithScalars) {
  23. const std::string spirv = R"(
  24. OpCapability Shader
  25. OpCapability Tessellation
  26. OpMemoryModel Logical GLSL450
  27. OpEntryPoint TessellationControl %func "shader" %x %y %z %w %u %v
  28. ; CHECK: OpName [[x:%\w+]] "x"
  29. ; CHECK-NOT: OpName {{%\w+}} "x"
  30. ; CHECK: OpName [[y:%\w+]] "y"
  31. ; CHECK-NOT: OpName {{%\w+}} "y"
  32. ; CHECK: OpName [[z0:%\w+]] "z"
  33. ; CHECK: OpName [[z1:%\w+]] "z"
  34. ; CHECK: OpName [[w0:%\w+]] "w"
  35. ; CHECK: OpName [[w1:%\w+]] "w"
  36. ; CHECK: OpName [[u0:%\w+]] "u"
  37. ; CHECK: OpName [[u1:%\w+]] "u"
  38. ; CHECK: OpName [[v0:%\w+]] "v"
  39. ; CHECK: OpName [[v1:%\w+]] "v"
  40. ; CHECK: OpName [[v2:%\w+]] "v"
  41. ; CHECK: OpName [[v3:%\w+]] "v"
  42. ; CHECK: OpName [[v4:%\w+]] "v"
  43. ; CHECK: OpName [[v5:%\w+]] "v"
  44. OpName %x "x"
  45. OpName %y "y"
  46. OpName %z "z"
  47. OpName %w "w"
  48. OpName %u "u"
  49. OpName %v "v"
  50. ; CHECK-DAG: OpDecorate [[x]] Location 2
  51. ; CHECK-DAG: OpDecorate [[y]] Location 0
  52. ; CHECK-DAG: OpDecorate [[z0]] Location 0
  53. ; CHECK-DAG: OpDecorate [[z0]] Component 0
  54. ; CHECK-DAG: OpDecorate [[z1]] Location 1
  55. ; CHECK-DAG: OpDecorate [[z1]] Component 0
  56. ; CHECK-DAG: OpDecorate [[z0]] Patch
  57. ; CHECK-DAG: OpDecorate [[z1]] Patch
  58. ; CHECK-DAG: OpDecorate [[w0]] Location 2
  59. ; CHECK-DAG: OpDecorate [[w0]] Component 0
  60. ; CHECK-DAG: OpDecorate [[w1]] Location 3
  61. ; CHECK-DAG: OpDecorate [[w1]] Component 0
  62. ; CHECK-DAG: OpDecorate [[w0]] Patch
  63. ; CHECK-DAG: OpDecorate [[w1]] Patch
  64. ; CHECK-DAG: OpDecorate [[u0]] Location 3
  65. ; CHECK-DAG: OpDecorate [[u0]] Component 2
  66. ; CHECK-DAG: OpDecorate [[u1]] Location 4
  67. ; CHECK-DAG: OpDecorate [[u1]] Component 2
  68. ; CHECK-DAG: OpDecorate [[v0]] Location 3
  69. ; CHECK-DAG: OpDecorate [[v0]] Component 3
  70. ; CHECK-DAG: OpDecorate [[v1]] Location 4
  71. ; CHECK-DAG: OpDecorate [[v1]] Component 3
  72. ; CHECK-DAG: OpDecorate [[v2]] Location 5
  73. ; CHECK-DAG: OpDecorate [[v2]] Component 3
  74. ; CHECK-DAG: OpDecorate [[v3]] Location 6
  75. ; CHECK-DAG: OpDecorate [[v3]] Component 3
  76. ; CHECK-DAG: OpDecorate [[v4]] Location 7
  77. ; CHECK-DAG: OpDecorate [[v4]] Component 3
  78. ; CHECK-DAG: OpDecorate [[v5]] Location 8
  79. ; CHECK-DAG: OpDecorate [[v5]] Component 3
  80. OpDecorate %z Patch
  81. OpDecorate %w Patch
  82. OpDecorate %z Location 0
  83. OpDecorate %x Location 2
  84. OpDecorate %v Location 3
  85. OpDecorate %v Component 3
  86. OpDecorate %y Location 0
  87. OpDecorate %w Location 2
  88. OpDecorate %u Location 3
  89. OpDecorate %u Component 2
  90. %uint = OpTypeInt 32 0
  91. %uint_1 = OpConstant %uint 1
  92. %uint_2 = OpConstant %uint 2
  93. %uint_3 = OpConstant %uint 3
  94. %uint_4 = OpConstant %uint 4
  95. %_arr_uint_uint_2 = OpTypeArray %uint %uint_2
  96. %_ptr_Output__arr_uint_uint_2 = OpTypePointer Output %_arr_uint_uint_2
  97. %_ptr_Input__arr_uint_uint_2 = OpTypePointer Input %_arr_uint_uint_2
  98. %_ptr_Input_uint = OpTypePointer Input %uint
  99. %_ptr_Output_uint = OpTypePointer Output %uint
  100. %_arr_arr_uint_uint_2_3 = OpTypeArray %_arr_uint_uint_2 %uint_3
  101. %_ptr_Input__arr_arr_uint_uint_2_3 = OpTypePointer Input %_arr_arr_uint_uint_2_3
  102. %_arr_arr_arr_uint_uint_2_3_4 = OpTypeArray %_arr_arr_uint_uint_2_3 %uint_4
  103. %_ptr_Output__arr_arr_arr_uint_uint_2_3_4 = OpTypePointer Output %_arr_arr_arr_uint_uint_2_3_4
  104. %_ptr_Output__arr_arr_uint_uint_2_3 = OpTypePointer Output %_arr_arr_uint_uint_2_3
  105. %z = OpVariable %_ptr_Output__arr_uint_uint_2 Output
  106. %x = OpVariable %_ptr_Output__arr_uint_uint_2 Output
  107. %y = OpVariable %_ptr_Input__arr_uint_uint_2 Input
  108. %w = OpVariable %_ptr_Input__arr_uint_uint_2 Input
  109. %u = OpVariable %_ptr_Input__arr_arr_uint_uint_2_3 Input
  110. %v = OpVariable %_ptr_Output__arr_arr_arr_uint_uint_2_3_4 Output
  111. ; CHECK-DAG: [[x]] = OpVariable %_ptr_Output__arr_uint_uint_2 Output
  112. ; CHECK-DAG: [[y]] = OpVariable %_ptr_Input__arr_uint_uint_2 Input
  113. ; CHECK-DAG: [[z0]] = OpVariable %_ptr_Output_uint Output
  114. ; CHECK-DAG: [[z1]] = OpVariable %_ptr_Output_uint Output
  115. ; CHECK-DAG: [[w0]] = OpVariable %_ptr_Input_uint Input
  116. ; CHECK-DAG: [[w1]] = OpVariable %_ptr_Input_uint Input
  117. ; CHECK-DAG: [[u0]] = OpVariable %_ptr_Input__arr_uint_uint_3 Input
  118. ; CHECK-DAG: [[u1]] = OpVariable %_ptr_Input__arr_uint_uint_3 Input
  119. ; CHECK-DAG: [[v0]] = OpVariable %_ptr_Output__arr_uint_uint_4 Output
  120. ; CHECK-DAG: [[v1]] = OpVariable %_ptr_Output__arr_uint_uint_4 Output
  121. ; CHECK-DAG: [[v2]] = OpVariable %_ptr_Output__arr_uint_uint_4 Output
  122. ; CHECK-DAG: [[v3]] = OpVariable %_ptr_Output__arr_uint_uint_4 Output
  123. ; CHECK-DAG: [[v4]] = OpVariable %_ptr_Output__arr_uint_uint_4 Output
  124. ; CHECK-DAG: [[v5]] = OpVariable %_ptr_Output__arr_uint_uint_4 Output
  125. %void = OpTypeVoid
  126. %void_f = OpTypeFunction %void
  127. %func = OpFunction %void None %void_f
  128. %label = OpLabel
  129. ; CHECK: [[w0_value:%\w+]] = OpLoad %uint [[w0]]
  130. ; CHECK: [[w1_value:%\w+]] = OpLoad %uint [[w1]]
  131. ; CHECK: [[w_value:%\w+]] = OpCompositeConstruct %_arr_uint_uint_2 [[w0_value]] [[w1_value]]
  132. ; CHECK: [[w0:%\w+]] = OpCompositeExtract %uint [[w_value]] 0
  133. ; CHECK: OpStore [[z0]] [[w0]]
  134. ; CHECK: [[w1:%\w+]] = OpCompositeExtract %uint [[w_value]] 1
  135. ; CHECK: OpStore [[z1]] [[w1]]
  136. %w_value = OpLoad %_arr_uint_uint_2 %w
  137. OpStore %z %w_value
  138. ; CHECK: [[u00_ptr:%\w+]] = OpAccessChain %_ptr_Input_uint [[u0]] %uint_0
  139. ; CHECK: [[u00:%\w+]] = OpLoad %uint [[u00_ptr]]
  140. ; CHECK: [[u10_ptr:%\w+]] = OpAccessChain %_ptr_Input_uint [[u1]] %uint_0
  141. ; CHECK: [[u10:%\w+]] = OpLoad %uint [[u10_ptr]]
  142. ; CHECK: [[u01_ptr:%\w+]] = OpAccessChain %_ptr_Input_uint [[u0]] %uint_1
  143. ; CHECK: [[u01:%\w+]] = OpLoad %uint [[u01_ptr]]
  144. ; CHECK: [[u11_ptr:%\w+]] = OpAccessChain %_ptr_Input_uint [[u1]] %uint_1
  145. ; CHECK: [[u11:%\w+]] = OpLoad %uint [[u11_ptr]]
  146. ; CHECK: [[u02_ptr:%\w+]] = OpAccessChain %_ptr_Input_uint [[u0]] %uint_2
  147. ; CHECK: [[u02:%\w+]] = OpLoad %uint [[u02_ptr]]
  148. ; CHECK: [[u12_ptr:%\w+]] = OpAccessChain %_ptr_Input_uint [[u1]] %uint_2
  149. ; CHECK: [[u12:%\w+]] = OpLoad %uint [[u12_ptr]]
  150. ; CHECK-DAG: [[u0_val:%\w+]] = OpCompositeConstruct %_arr_uint_uint_2 [[u00]] [[u10]]
  151. ; CHECK-DAG: [[u1_val:%\w+]] = OpCompositeConstruct %_arr_uint_uint_2 [[u01]] [[u11]]
  152. ; CHECK-DAG: [[u2_val:%\w+]] = OpCompositeConstruct %_arr_uint_uint_2 [[u02]] [[u12]]
  153. ; CHECK: [[u_val:%\w+]] = OpCompositeConstruct %_arr__arr_uint_uint_2_uint_3 [[u0_val]] [[u1_val]] [[u2_val]]
  154. ; CHECK: [[ptr:%\w+]] = OpAccessChain %_ptr_Output_uint [[v0]] %uint_1
  155. ; CHECK: [[val:%\w+]] = OpCompositeExtract %uint [[u_val]] 0 0
  156. ; CHECK: OpStore [[ptr]] [[val]]
  157. ; CHECK: [[ptr:%\w+]] = OpAccessChain %_ptr_Output_uint [[v1]] %uint_1
  158. ; CHECK: [[val:%\w+]] = OpCompositeExtract %uint [[u_val]] 0 1
  159. ; CHECK: OpStore [[ptr]] [[val]]
  160. ; CHECK: [[ptr:%\w+]] = OpAccessChain %_ptr_Output_uint [[v2]] %uint_1
  161. ; CHECK: [[val:%\w+]] = OpCompositeExtract %uint [[u_val]] 1 0
  162. ; CHECK: OpStore [[ptr]] [[val]]
  163. ; CHECK: [[ptr:%\w+]] = OpAccessChain %_ptr_Output_uint [[v3]] %uint_1
  164. ; CHECK: [[val:%\w+]] = OpCompositeExtract %uint [[u_val]] 1 1
  165. ; CHECK: OpStore [[ptr]] [[val]]
  166. ; CHECK: [[ptr:%\w+]] = OpAccessChain %_ptr_Output_uint [[v4]] %uint_1
  167. ; CHECK: [[val:%\w+]] = OpCompositeExtract %uint [[u_val]] 2 0
  168. ; CHECK: OpStore [[ptr]] [[val]]
  169. ; CHECK: [[ptr:%\w+]] = OpAccessChain %_ptr_Output_uint [[v5]] %uint_1
  170. ; CHECK: [[val:%\w+]] = OpCompositeExtract %uint [[u_val]] 2 1
  171. ; CHECK: OpStore [[ptr]] [[val]]
  172. %v_ptr = OpAccessChain %_ptr_Output__arr_arr_uint_uint_2_3 %v %uint_1
  173. %u_val = OpLoad %_arr_arr_uint_uint_2_3 %u
  174. OpStore %v_ptr %u_val
  175. OpReturn
  176. OpFunctionEnd
  177. )";
  178. SinglePassRunAndMatch<InterfaceVariableScalarReplacement>(spirv, true);
  179. }
  180. TEST_F(InterfaceVariableScalarReplacementTest,
  181. CheckPatchDecorationPreservation) {
  182. // Make sure scalars for the variables with the extra arrayness have the extra
  183. // arrayness after running the pass while others do not have it.
  184. // Only "y" does not have the extra arrayness in the following SPIR-V.
  185. const std::string spirv = R"(
  186. OpCapability Shader
  187. OpCapability Tessellation
  188. OpMemoryModel Logical GLSL450
  189. OpEntryPoint TessellationEvaluation %func "shader" %x %y %z %w
  190. OpDecorate %z Patch
  191. OpDecorate %w Patch
  192. OpDecorate %z Location 0
  193. OpDecorate %x Location 2
  194. OpDecorate %y Location 0
  195. OpDecorate %w Location 1
  196. OpName %x "x"
  197. OpName %y "y"
  198. OpName %z "z"
  199. OpName %w "w"
  200. ; CHECK: OpName [[y:%\w+]] "y"
  201. ; CHECK-NOT: OpName {{%\w+}} "y"
  202. ; CHECK-DAG: OpName [[z0:%\w+]] "z"
  203. ; CHECK-DAG: OpName [[z1:%\w+]] "z"
  204. ; CHECK-DAG: OpName [[w0:%\w+]] "w"
  205. ; CHECK-DAG: OpName [[w1:%\w+]] "w"
  206. ; CHECK-DAG: OpName [[x0:%\w+]] "x"
  207. ; CHECK-DAG: OpName [[x1:%\w+]] "x"
  208. %uint = OpTypeInt 32 0
  209. %uint_2 = OpConstant %uint 2
  210. %_arr_uint_uint_2 = OpTypeArray %uint %uint_2
  211. %_ptr_Output__arr_uint_uint_2 = OpTypePointer Output %_arr_uint_uint_2
  212. %_ptr_Input__arr_uint_uint_2 = OpTypePointer Input %_arr_uint_uint_2
  213. %z = OpVariable %_ptr_Output__arr_uint_uint_2 Output
  214. %x = OpVariable %_ptr_Output__arr_uint_uint_2 Output
  215. %y = OpVariable %_ptr_Input__arr_uint_uint_2 Input
  216. %w = OpVariable %_ptr_Input__arr_uint_uint_2 Input
  217. ; CHECK-DAG: [[y]] = OpVariable %_ptr_Input__arr_uint_uint_2 Input
  218. ; CHECK-DAG: [[z0]] = OpVariable %_ptr_Output_uint Output
  219. ; CHECK-DAG: [[z1]] = OpVariable %_ptr_Output_uint Output
  220. ; CHECK-DAG: [[w0]] = OpVariable %_ptr_Input_uint Input
  221. ; CHECK-DAG: [[w1]] = OpVariable %_ptr_Input_uint Input
  222. ; CHECK-DAG: [[x0]] = OpVariable %_ptr_Output_uint Output
  223. ; CHECK-DAG: [[x1]] = OpVariable %_ptr_Output_uint Output
  224. %void = OpTypeVoid
  225. %void_f = OpTypeFunction %void
  226. %func = OpFunction %void None %void_f
  227. %label = OpLabel
  228. OpReturn
  229. OpFunctionEnd
  230. )";
  231. SinglePassRunAndMatch<InterfaceVariableScalarReplacement>(spirv, true);
  232. }
  233. TEST_F(InterfaceVariableScalarReplacementTest,
  234. CheckEntryPointInterfaceOperands) {
  235. const std::string spirv = R"(
  236. OpCapability Shader
  237. OpCapability Tessellation
  238. OpMemoryModel Logical GLSL450
  239. OpEntryPoint TessellationEvaluation %tess "tess" %x %y
  240. OpEntryPoint Vertex %vert "vert" %w
  241. OpDecorate %z Location 0
  242. OpDecorate %x Location 2
  243. OpDecorate %y Location 0
  244. OpDecorate %w Location 1
  245. OpName %x "x"
  246. OpName %y "y"
  247. OpName %z "z"
  248. OpName %w "w"
  249. ; CHECK: OpName [[y:%\w+]] "y"
  250. ; CHECK-NOT: OpName {{%\w+}} "y"
  251. ; CHECK-DAG: OpName [[x0:%\w+]] "x"
  252. ; CHECK-DAG: OpName [[x1:%\w+]] "x"
  253. ; CHECK-DAG: OpName [[w0:%\w+]] "w"
  254. ; CHECK-DAG: OpName [[w1:%\w+]] "w"
  255. ; CHECK-DAG: OpName [[z:%\w+]] "z"
  256. ; CHECK-NOT: OpName {{%\w+}} "z"
  257. %uint = OpTypeInt 32 0
  258. %uint_2 = OpConstant %uint 2
  259. %_arr_uint_uint_2 = OpTypeArray %uint %uint_2
  260. %_ptr_Output__arr_uint_uint_2 = OpTypePointer Output %_arr_uint_uint_2
  261. %_ptr_Input__arr_uint_uint_2 = OpTypePointer Input %_arr_uint_uint_2
  262. %z = OpVariable %_ptr_Output__arr_uint_uint_2 Output
  263. %x = OpVariable %_ptr_Output__arr_uint_uint_2 Output
  264. %y = OpVariable %_ptr_Input__arr_uint_uint_2 Input
  265. %w = OpVariable %_ptr_Input__arr_uint_uint_2 Input
  266. ; CHECK-DAG: [[y]] = OpVariable %_ptr_Input__arr_uint_uint_2 Input
  267. ; CHECK-DAG: [[z]] = OpVariable %_ptr_Output__arr_uint_uint_2 Output
  268. ; CHECK-DAG: [[w0]] = OpVariable %_ptr_Input_uint Input
  269. ; CHECK-DAG: [[w1]] = OpVariable %_ptr_Input_uint Input
  270. ; CHECK-DAG: [[x0]] = OpVariable %_ptr_Output_uint Output
  271. ; CHECK-DAG: [[x1]] = OpVariable %_ptr_Output_uint Output
  272. %void = OpTypeVoid
  273. %void_f = OpTypeFunction %void
  274. %tess = OpFunction %void None %void_f
  275. %bb0 = OpLabel
  276. OpReturn
  277. OpFunctionEnd
  278. %vert = OpFunction %void None %void_f
  279. %bb1 = OpLabel
  280. OpReturn
  281. OpFunctionEnd
  282. )";
  283. SinglePassRunAndMatch<InterfaceVariableScalarReplacement>(spirv, true);
  284. }
  285. class InterfaceVarSROAErrorTest : public PassTest<::testing::Test> {
  286. public:
  287. InterfaceVarSROAErrorTest()
  288. : consumer_([this](spv_message_level_t level, const char*,
  289. const spv_position_t& position, const char* message) {
  290. if (!error_message_.empty()) error_message_ += "\n";
  291. switch (level) {
  292. case SPV_MSG_FATAL:
  293. case SPV_MSG_INTERNAL_ERROR:
  294. case SPV_MSG_ERROR:
  295. error_message_ += "ERROR";
  296. break;
  297. case SPV_MSG_WARNING:
  298. error_message_ += "WARNING";
  299. break;
  300. case SPV_MSG_INFO:
  301. error_message_ += "INFO";
  302. break;
  303. case SPV_MSG_DEBUG:
  304. error_message_ += "DEBUG";
  305. break;
  306. }
  307. error_message_ +=
  308. ": " + std::to_string(position.index) + ": " + message;
  309. }) {}
  310. Pass::Status RunPass(const std::string& text) {
  311. std::unique_ptr<IRContext> context_ =
  312. spvtools::BuildModule(SPV_ENV_UNIVERSAL_1_2, consumer_, text);
  313. if (!context_.get()) return Pass::Status::Failure;
  314. PassManager manager;
  315. manager.SetMessageConsumer(consumer_);
  316. manager.AddPass<InterfaceVariableScalarReplacement>();
  317. return manager.Run(context_.get());
  318. }
  319. std::string GetErrorMessage() const { return error_message_; }
  320. void TearDown() override { error_message_.clear(); }
  321. private:
  322. spvtools::MessageConsumer consumer_;
  323. std::string error_message_;
  324. };
  325. TEST_F(InterfaceVarSROAErrorTest, CheckConflictOfExtraArraynessBetweenEntries) {
  326. const std::string spirv = R"(
  327. OpCapability Shader
  328. OpCapability Tessellation
  329. OpMemoryModel Logical GLSL450
  330. OpEntryPoint TessellationControl %tess "tess" %x %y %z
  331. OpEntryPoint Vertex %vert "vert" %z %w
  332. OpDecorate %z Location 0
  333. OpDecorate %x Location 2
  334. OpDecorate %y Location 0
  335. OpDecorate %w Location 1
  336. OpName %x "x"
  337. OpName %y "y"
  338. OpName %z "z"
  339. OpName %w "w"
  340. %uint = OpTypeInt 32 0
  341. %uint_2 = OpConstant %uint 2
  342. %_arr_uint_uint_2 = OpTypeArray %uint %uint_2
  343. %_ptr_Output__arr_uint_uint_2 = OpTypePointer Output %_arr_uint_uint_2
  344. %_ptr_Input__arr_uint_uint_2 = OpTypePointer Input %_arr_uint_uint_2
  345. %z = OpVariable %_ptr_Output__arr_uint_uint_2 Output
  346. %x = OpVariable %_ptr_Output__arr_uint_uint_2 Output
  347. %y = OpVariable %_ptr_Input__arr_uint_uint_2 Input
  348. %w = OpVariable %_ptr_Input__arr_uint_uint_2 Input
  349. %void = OpTypeVoid
  350. %void_f = OpTypeFunction %void
  351. %tess = OpFunction %void None %void_f
  352. %bb0 = OpLabel
  353. OpReturn
  354. OpFunctionEnd
  355. %vert = OpFunction %void None %void_f
  356. %bb1 = OpLabel
  357. OpReturn
  358. OpFunctionEnd
  359. )";
  360. EXPECT_EQ(RunPass(spirv), Pass::Status::Failure);
  361. const char expected_error[] =
  362. "ERROR: 0: A variable is arrayed for an entry point but it is not "
  363. "arrayed for another entry point\n"
  364. " %z = OpVariable %_ptr_Output__arr_uint_uint_2 Output";
  365. EXPECT_STREQ(GetErrorMessage().c_str(), expected_error);
  366. }
  367. } // namespace
  368. } // namespace opt
  369. } // namespace spvtools