README_zh.md
1# Vulkan测试套件说明
2
3- [介绍](#section_Vulkan_001)
4- [使用说明](#section_Vulkan_002)
5
6## 介绍<a name="section_Vulkan_001"></a>
7
8Vulkan测试套件使用VK-GL-CTS三方库内原有的vulkancts,通过acts测试套件框架在运行时调用运行,具体目录结构如下:
9
10```bash
11.
12├── BUILD.gn
13├── comm.gni
14├── cpVulkan.sh
15├── genlocal.py
16├── README_zh.md
17├── src
18│ ├── ActsVulkanTest.cpp
19│ ├── ActsVulkanTest.h
20│ ├── apitest
21│ │ ├── ActsVulkanApiTest.cpp
22│ │ ├── ActsVulkanApiTest.h
23│ │ ├── BUILD.gn
24│ │ └── Test.json
25│ ├── bindingmodeltest
26│ │ ├── ActsVulkanBinding_modelTest.cpp
27│ │ ├── ActsVulkanBinding_modelTest.h
28│ │ ├── BUILD.gn
29│ │ └── Test.json
30│ ├── clippingtest
31│ │ ├── ActsVulkanClippingTest.cpp
32│ │ ├── ActsVulkanClippingTest.h
33│ │ ├── BUILD.gn
34│ │ └── Test.json
35│ ├── computetest
36│ │ ├── ActsVulkanComputeTest.cpp
37│ │ ├── ActsVulkanComputeTest.h
38│ │ ├── BUILD.gn
39│ │ └── Test.json
40│ ├── conditionalrenderingtest
41│ │ ├── ActsVulkanConditional_renderingTest.cpp
42│ │ ├── ActsVulkanConditional_renderingTest.h
43│ │ ├── BUILD.gn
44│ │ └── Test.json
45│ ├── descriptorindexingtest
46│ │ ├── ActsVulkanDescriptor_indexingTest.cpp
47│ │ ├── ActsVulkanDescriptor_indexingTest.h
48│ │ ├── BUILD.gn
49│ │ └── Test.json
50│ ├── devicegrouptest
51│ │ ├── ActsVulkanDevice_groupTest.cpp
52│ │ ├── ActsVulkanDevice_groupTest.h
53│ │ ├── BUILD.gn
54│ │ └── Test.json
55│ ├── drawtest
56│ │ ├── ActsVulkanDrawTest.cpp
57│ │ ├── ActsVulkanDrawTest.h
58│ │ ├── BUILD.gn
59│ │ └── Test.json
60│ ├── drmformatmodifierstest
61│ │ ├── ActsVulkanDrm_format_modifiersTest.cpp
62│ │ ├── ActsVulkanDrm_format_modifiersTest.h
63│ │ ├── BUILD.gn
64│ │ └── Test.json
65│ ├── dynamicrenderingtest
66│ │ ├── ActsVulkanDynamic_renderingTest.cpp
67│ │ ├── ActsVulkanDynamic_renderingTest.h
68│ │ ├── BUILD.gn
69│ │ └── Test.json
70│ ├── dynamicstatetest
71│ │ ├── ActsVulkanDynamic_stateTest.cpp
72│ │ ├── ActsVulkanDynamic_stateTest.h
73│ │ ├── BUILD.gn
74│ │ └── Test.json
75│ ├── fastlinkedlibrary
76│ │ ├── ActsVulkanFastlinkedLibraryTest.cpp
77│ │ ├── ActsVulkanFastlinkedLibraryTest.h
78│ │ ├── BUILD.gn
79│ │ └── Test.json
80│ ├── fractionmandatorytests
81│ │ ├── ActsVulkanFraction_mandatory_testsTest.cpp
82│ │ ├── ActsVulkanFraction_mandatory_testsTest.h
83│ │ ├── BUILD.gn
84│ │ └── Test.json
85│ ├── fragmentoperationstest
86│ │ ├── ActsVulkanFragment_operationsTest.cpp
87│ │ ├── ActsVulkanFragment_operationsTest.h
88│ │ ├── BUILD.gn
89│ │ └── Test.json
90│ ├── fragmentshaderinterlocktest
91│ │ ├── ActsVulkanFragment_shader_interlockTest.cpp
92│ │ ├── ActsVulkanFragment_shader_interlockTest.h
93│ │ ├── BUILD.gn
94│ │ └── Test.json
95│ ├── fragmentshadingratetest
96│ │ ├── ActsVulkanFragment_shading_rateTest.cpp
97│ │ ├── ActsVulkanFragment_shading_rateTest.h
98│ │ ├── BUILD.gn
99│ │ └── Test.json
100│ ├── geometrytest
101│ │ ├── ActsVulkanGeometryTest.cpp
102│ │ ├── ActsVulkanGeometryTest.h
103│ │ ├── BUILD.gn
104│ │ └── Test.json
105│ ├── glsltest
106│ │ ├── ActsVulkanGlslTest.cpp
107│ │ ├── ActsVulkanGlslTest.h
108│ │ ├── BUILD.gn
109│ │ └── Test.json
110│ ├── graphicsfuzztest
111│ │ ├── ActsVulkanGraphicsfuzzTest.cpp
112│ │ ├── ActsVulkanGraphicsfuzzTest.h
113│ │ ├── BUILD.gn
114│ │ └── Test.json
115│ ├── imagelessframebuffertest
116│ │ ├── ActsVulkanImageless_framebufferTest.cpp
117│ │ ├── ActsVulkanImageless_framebufferTest.h
118│ │ ├── BUILD.gn
119│ │ └── Test.json
120│ ├── imagetest
121│ │ ├── ActsVulkanImageTest.cpp
122│ │ ├── ActsVulkanImageTest.h
123│ │ ├── BUILD.gn
124│ │ └── Test.json
125│ ├── infotest
126│ │ ├── ActsVulkanInfoTest.cpp
127│ │ ├── ActsVulkanInfoTest.h
128│ │ ├── BUILD.gn
129│ │ └── Test.json
130│ ├── mastertest
131│ │ ├── ActsVulkanMasterTest.cpp
132│ │ ├── ActsVulkanMasterTest.h
133│ │ ├── BUILD.gn
134│ │ └── Test.json
135│ ├── memorymodeltest
136│ │ ├── ActsVulkanMemory_modelTest.cpp
137│ │ ├── ActsVulkanMemory_modelTest.h
138│ │ ├── BUILD.gn
139│ │ └── Test.json
140│ ├── memorytest
141│ │ ├── ActsVulkanMemoryTest.cpp
142│ │ ├── ActsVulkanMemoryTest.h
143│ │ ├── BUILD.gn
144│ │ └── Test.json
145│ ├── meshshadertest
146│ │ ├── ActsVulkanMesh_shaderTest.cpp
147│ │ ├── ActsVulkanMesh_shaderTest.h
148│ │ ├── BUILD.gn
149│ │ └── Test.json
150│ ├── monolithic
151│ │ ├── ActsVulkanMonolithicTest.cpp
152│ │ ├── ActsVulkanMonolithicTest.h
153│ │ ├── BUILD.gn
154│ │ └── Test.json
155│ ├── multiviewtest
156│ │ ├── ActsVulkanMultiviewTest.cpp
157│ │ ├── ActsVulkanMultiviewTest.h
158│ │ ├── BUILD.gn
159│ │ └── Test.json
160│ ├── pipelinelibrary
161│ │ ├── ActsVulkanPipelineLibraryTest.cpp
162│ │ ├── ActsVulkanPipelineLibraryTest.h
163│ │ ├── BUILD.gn
164│ │ └── Test.json
165│ ├── protectedmemorytest
166│ │ ├── ActsVulkanProtected_memoryTest.cpp
167│ │ ├── ActsVulkanProtected_memoryTest.h
168│ │ ├── BUILD.gn
169│ │ └── Test.json
170│ ├── querypooltest
171│ │ ├── ActsVulkanQuery_poolTest.cpp
172│ │ ├── ActsVulkanQuery_poolTest.h
173│ │ ├── BUILD.gn
174│ │ └── Test.json
175│ ├── rasterizationtest
176│ │ ├── ActsVulkanRasterizationTest.cpp
177│ │ ├── ActsVulkanRasterizationTest.h
178│ │ ├── BUILD.gn
179│ │ └── Test.json
180│ ├── rayquerytest
181│ │ ├── ActsVulkanRay_queryTest.cpp
182│ │ ├── ActsVulkanRay_queryTest.h
183│ │ ├── BUILD.gn
184│ │ └── Test.json
185│ ├── raytracingpipelinetest
186│ │ ├── ActsVulkanRay_tracing_pipelineTest.cpp
187│ │ ├── ActsVulkanRay_tracing_pipelineTest.h
188│ │ ├── BUILD.gn
189│ │ └── Test.json
190│ ├── reconvergencetest
191│ │ ├── ActsVulkanReconvergenceTest.cpp
192│ │ ├── ActsVulkanReconvergenceTest.h
193│ │ ├── BUILD.gn
194│ │ └── Test.json
195│ ├── renderpass2test
196│ │ ├── ActsVulkanRenderpass2Test.cpp
197│ │ ├── ActsVulkanRenderpass2Test.h
198│ │ ├── BUILD.gn
199│ │ └── Test.json
200│ ├── renderpasstest
201│ │ ├── ActsVulkanRenderpassTest.cpp
202│ │ ├── ActsVulkanRenderpassTest.h
203│ │ ├── BUILD.gn
204│ │ └── Test.json
205│ ├── robustnesstest
206│ │ ├── ActsVulkanRobustnessTest.cpp
207│ │ ├── ActsVulkanRobustnessTest.h
208│ │ ├── BUILD.gn
209│ │ └── Test.json
210│ ├── sparseresourcestest
211│ │ ├── ActsVulkanSparse_resourcesTest.cpp
212│ │ ├── ActsVulkanSparse_resourcesTest.h
213│ │ ├── BUILD.gn
214│ │ └── Test.json
215│ ├── spirvassemblytest
216│ │ ├── ActsVulkanSpirv_assemblyTest.cpp
217│ │ ├── ActsVulkanSpirv_assemblyTest.h
218│ │ ├── BUILD.gn
219│ │ └── Test.json
220│ ├── ssbotest
221│ │ ├── ActsVulkanSsboTest.cpp
222│ │ ├── ActsVulkanSsboTest.h
223│ │ ├── BUILD.gn
224│ │ └── Test.json
225│ ├── subgroupstest
226│ │ ├── ActsVulkanSubgroupsTest.cpp
227│ │ ├── ActsVulkanSubgroupsTest.h
228│ │ ├── BUILD.gn
229│ │ └── Test.json
230│ ├── synchronization2test
231│ │ ├── ActsVulkanSynchronization2Test.cpp
232│ │ ├── ActsVulkanSynchronization2Test.h
233│ │ ├── BUILD.gn
234│ │ └── Test.json
235│ ├── synchronizationtest
236│ │ ├── ActsVulkanSynchronizationTest.cpp
237│ │ ├── ActsVulkanSynchronizationTest.h
238│ │ ├── BUILD.gn
239│ │ └── Test.json
240│ ├── tessellationtest
241│ │ ├── ActsVulkanTessellationTest.cpp
242│ │ ├── ActsVulkanTessellationTest.h
243│ │ ├── BUILD.gn
244│ │ └── Test.json
245│ ├── testissuestest
246│ │ ├── ActsVulkanTest_issuesTest.cpp
247│ │ ├── ActsVulkanTest_issuesTest.h
248│ │ ├── BUILD.gn
249│ │ └── Test.json
250│ ├── texturetest
251│ │ ├── ActsVulkanTextureTest.cpp
252│ │ ├── ActsVulkanTextureTest.h
253│ │ ├── BUILD.gn
254│ │ └── Test.json
255│ ├── transformfeedbacktest
256│ │ ├── ActsVulkanTransform_feedbackTest.cpp
257│ │ ├── ActsVulkanTransform_feedbackTest.h
258│ │ ├── BUILD.gn
259│ │ └── Test.json
260│ ├── ubotest
261│ │ ├── ActsVulkanUboTest.cpp
262│ │ ├── ActsVulkanUboTest.h
263│ │ ├── BUILD.gn
264│ │ └── Test.json
265│ ├── wsitest
266│ │ ├── ActsVulkanWsiTest.cpp
267│ │ ├── ActsVulkanWsiTest.h
268│ │ ├── BUILD.gn
269│ │ └── Test.json
270│ └── ycbcrtest
271│ ├── ActsVulkanYcbcrTest.cpp
272│ ├── ActsVulkanYcbcrTest.h
273│ ├── BUILD.gn
274│ └── Test.json
275└── Test.json
276```
277
278* BUILD.gn:编译脚本,编译acts测试套件,编译Vulkan三方库测试代码,执行actions事件在acts测试套件对应的testcases目录下建立Vulkandata目录,然后将运行测试需要的Vulkan测试进程,解析运行日志所需的Python脚本拷贝到Vulkandata目录。
279* comm.gni:通用编译配置。
280* cpVulkan.sh:编译后actions事件执行的脚本。
281* genlocal.py:Vulkan的test程序运行后结果会保存在task_log.log文件内,分析运行日志后会存储结果在summary_report.xml文件内,然后根据xdevice流程生成summary_report。
282* src:测试套件的实现,内部直接调用Vulkan的unittest进程。
283* Test.json:运行测试需要json脚本,包括拷贝内容到开发板。
284
285
286## 使用说明<a name="section_Vulkan_002"></a>
287
288* 编译运行
289
290 ```bash
291 ./build.sh --product-name rk3568 --gn-args build_xts=true --build-target "acts" --gn-args is_standard_system=true
292 ```
293
294* 测试运行:进入suites/acts目录,执行python -m xdevice,然后在命令框里输入一下命令
295
296 ```bash
297 run -l ActsVulkanApiTest,
298 run -l ActsVulkanBindingmodelTest,
299 run -l ActsVulkanClippingTest,
300 run -l ActsVulkanComputeTest,
301 run -l ActsVulkanConditionalrenderingTest,
302 run -l ActsVulkanDescriptorindexingTest,
303 run -l ActsVulkanDevicegroupTest,
304 run -l ActsVulkanDrawTest,
305 run -l ActsVulkanDrmformatmodifiersTest,
306 run -l ActsVulkanDynamicrenderingTest,
307 run -l ActsVulkanDynamicstateTest,
308 run -l ActsVulkanFastlinkedLibraryTest,
309 run -l ActsVulkanFractionmandatorytestsTest,
310 run -l ActsVulkanFragmentoperationsTest,
311 run -l ActsVulkanFragmentshaderinterlockTest,
312 run -l ActsVulkanFragmentshadingrateTest,
313 run -l ActsVulkanGeometryTest,
314 run -l ActsVulkanGlslTest,
315 run -l ActsVulkanGraphicsfuzzTest,
316 run -l ActsVulkanImagelessframebufferTest,
317 run -l ActsVulkanImageTest,
318 run -l ActsVulkanInfoTest,
319 run -l ActsVulkanMasterTest,
320 run -l ActsVulkanMemorymodelTest,
321 run -l ActsVulkanMemoryTest,
322 run -l ActsVulkanMeshshaderTest,
323 run -l ActsVulkanMonolithicTest,
324 run -l ActsVulkanMultiviewTest,
325 run -l ActsVulkanPipelineLibraryTest,
326 run -l ActsVulkanProtectedmemoryTest,
327 run -l ActsVulkanQuerypoolTest,
328 run -l ActsVulkanRasterizationTest,
329 run -l ActsVulkanRayqueryTest,
330 run -l ActsVulkanRaytracingpipelineTest,
331 run -l ActsVulkanReconvergenceTest,
332 run -l ActsVulkanRenderpass2Test,
333 run -l ActsVulkanRenderpassTest,
334 run -l ActsVulkanRobustnessTest,
335 run -l ActsVulkanSparseresourcesTest,
336 run -l ActsVulkanSpirvassemblyTest,
337 run -l ActsVulkanSsboTest,
338 run -l ActsVulkanSubgroupsTest,
339 run -l ActsVulkanSynchronization2Test,
340 run -l ActsVulkanSynchronizationTest,
341 run -l ActsVulkanTessellationTest,
342 run -l ActsVulkanTestissuesTest,
343 run -l ActsVulkanTextureTest,
344 run -l ActsVulkanTransformfeedbackTest,
345 run -l ActsVulkanUboTest,
346 run -l ActsVulkanWsiTest,
347 run -l ActsVulkanYcbcrTest
348 ```
349
350* vkgl测试套件运行结束会生成qpa文件方便开发人员调试,qpa文件可以通过vk-gl-cts/scripts/log内的脚本进行解析,具体命令如下:
351
352 ```bash
353 python2 log_to_xml.py TestResults.qpa TestResults.xml
354 ```
355