1e5c31af7Sopenharmony_ciVulkan CTS README
2e5c31af7Sopenharmony_ci=================
3e5c31af7Sopenharmony_ci
4e5c31af7Sopenharmony_ciThis document describes how to build and run Vulkan Conformance Test suite.
5e5c31af7Sopenharmony_ci
6e5c31af7Sopenharmony_ciVulkan CTS is built on the dEQP framework.
7e5c31af7Sopenharmony_ciUp-to-date documentation for dEQP is available at:
8e5c31af7Sopenharmony_ci
9e5c31af7Sopenharmony_ci* [The VK-GL-CTS wiki for Khronos members](https://gitlab.khronos.org/Tracker/vk-gl-cts/wikis/home)
10e5c31af7Sopenharmony_ci* [The VK-GL-CTS wiki for non-Khronos members](https://github.com/KhronosGroup/VK-GL-CTS/wiki)
11e5c31af7Sopenharmony_ci
12e5c31af7Sopenharmony_ci
13e5c31af7Sopenharmony_ciRequirements
14e5c31af7Sopenharmony_ci------------
15e5c31af7Sopenharmony_ci
16e5c31af7Sopenharmony_ci### Common
17e5c31af7Sopenharmony_ci
18e5c31af7Sopenharmony_ciThe following tools must be installed and present in the PATH variable:
19e5c31af7Sopenharmony_ci
20e5c31af7Sopenharmony_ci * Git (for checking out sources)
21e5c31af7Sopenharmony_ci * Python 3.x (for the build related scripts, some other scripts still use Python 2.7.x)
22e5c31af7Sopenharmony_ci * CMake 3.20.0 or newer
23e5c31af7Sopenharmony_ci
24e5c31af7Sopenharmony_ci### Win32
25e5c31af7Sopenharmony_ci
26e5c31af7Sopenharmony_ci * Visual Studio 2015 or newer (glslang uses several C++11 features)
27e5c31af7Sopenharmony_ci
28e5c31af7Sopenharmony_ci### Linux
29e5c31af7Sopenharmony_ci
30e5c31af7Sopenharmony_ci * Standard toolchain (make, gcc/clang)
31e5c31af7Sopenharmony_ci * If you have X11 installed, then the build assumes you also have the `GL/glx.h` header
32e5c31af7Sopenharmony_ci   file.
33e5c31af7Sopenharmony_ci    * You can get this from the `mesa-common-dev` Ubuntu package.
34e5c31af7Sopenharmony_ci
35e5c31af7Sopenharmony_ci### MacOS
36e5c31af7Sopenharmony_ci
37e5c31af7Sopenharmony_ci * Xcode
38e5c31af7Sopenharmony_ci
39e5c31af7Sopenharmony_ciVulkan SDK for macOS includes a MoltenVK runtime library which is recommended method for
40e5c31af7Sopenharmony_cideveloping a Vulkan application.
41e5c31af7Sopenharmony_ci
42e5c31af7Sopenharmony_ci### Android
43e5c31af7Sopenharmony_ci
44e5c31af7Sopenharmony_ci * Android NDK r17c or later.
45e5c31af7Sopenharmony_ci * Android SDK with: SDK Tools, SDK Platform-tools, SDK Build-tools, and API 28
46e5c31af7Sopenharmony_ci * Java Development Kit (JDK)
47e5c31af7Sopenharmony_ci * Windows: either NMake or Ninja in PATH
48e5c31af7Sopenharmony_ci
49e5c31af7Sopenharmony_ciIf you have downloaded the Android SDK command line tools package (25.2.3 or higher) then
50e5c31af7Sopenharmony_ciyou can install the necessary components by running:
51e5c31af7Sopenharmony_ci
52e5c31af7Sopenharmony_ci	tools/bin/sdkmanager tools platform-tools 'build-tools;25.0.2' 'platforms;android-28'
53e5c31af7Sopenharmony_ci
54e5c31af7Sopenharmony_ci
55e5c31af7Sopenharmony_ciBuilding CTS
56e5c31af7Sopenharmony_ci------------
57e5c31af7Sopenharmony_ci
58e5c31af7Sopenharmony_ciTo build dEQP, you need first to download sources for zlib, libpng, jsoncpp, glslang,
59e5c31af7Sopenharmony_civulkan-docs, spirv-headers, and spirv-tools.
60e5c31af7Sopenharmony_ci
61e5c31af7Sopenharmony_ciTo download sources, run:
62e5c31af7Sopenharmony_ci
63e5c31af7Sopenharmony_ci	python3 external/fetch_sources.py
64e5c31af7Sopenharmony_ci
65e5c31af7Sopenharmony_ciYou may need to re-run `fetch_sources.py` to update to the latest glslang,
66e5c31af7Sopenharmony_civulkan-docs and spirv-tools revisions occasionally.
67e5c31af7Sopenharmony_ci
68e5c31af7Sopenharmony_ciYou also need to install lxml python module by running:
69e5c31af7Sopenharmony_ci
70e5c31af7Sopenharmony_ci	python3 -m pip install lxml
71e5c31af7Sopenharmony_ci
72e5c31af7Sopenharmony_ciWith CMake out-of-source builds are always recommended. Create a build directory
73e5c31af7Sopenharmony_ciof your choosing, and in that directory generate Makefiles or IDE project
74e5c31af7Sopenharmony_ciusing cmake.
75e5c31af7Sopenharmony_ci
76e5c31af7Sopenharmony_ci
77e5c31af7Sopenharmony_ci### Windows x86-32
78e5c31af7Sopenharmony_ci
79e5c31af7Sopenharmony_ci	cmake <path to vulkancts> -G"Visual Studio 14"
80e5c31af7Sopenharmony_ci	start dEQP-Core-default.sln
81e5c31af7Sopenharmony_ci
82e5c31af7Sopenharmony_ci### Windows x86-64
83e5c31af7Sopenharmony_ci
84e5c31af7Sopenharmony_ci	cmake <path to vulkancts> -G"Visual Studio 14 Win64"
85e5c31af7Sopenharmony_ci	start dEQP-Core-default.sln
86e5c31af7Sopenharmony_ci
87e5c31af7Sopenharmony_ci### Linux 32-bit Debug
88e5c31af7Sopenharmony_ci
89e5c31af7Sopenharmony_ci	cmake <path to vulkancts> -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS=-m32 -DCMAKE_CXX_FLAGS=-m32
90e5c31af7Sopenharmony_ci	make -j
91e5c31af7Sopenharmony_ci
92e5c31af7Sopenharmony_ciRelease build can be done by using -DCMAKE_BUILD_TYPE=Release
93e5c31af7Sopenharmony_ci
94e5c31af7Sopenharmony_ciIf building for 32-bit x86 with GCC, you probably also want to add `-msse2
95e5c31af7Sopenharmony_ci-mfpmath=sse` to ensure that you get correct IEEE floating-point behavior.
96e5c31af7Sopenharmony_ci
97e5c31af7Sopenharmony_ci### Linux 64-bit Debug
98e5c31af7Sopenharmony_ci
99e5c31af7Sopenharmony_ci	cmake <path to vulkancts> -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS=-m64 -DCMAKE_CXX_FLAGS=-m64
100e5c31af7Sopenharmony_ci	make -j
101e5c31af7Sopenharmony_ci
102e5c31af7Sopenharmony_ci
103e5c31af7Sopenharmony_ci### MacOS 64-bit Debug
104e5c31af7Sopenharmony_ci
105e5c31af7Sopenharmony_ci	cmake <path to vulkancts> -DCMAKE_BUILD_TYPE=Debug -DDEQP_TARGET=osx -DCMAKE_C_FLAGS=-m64 -DCMAKE_CXX_FLAGS=-m64
106e5c31af7Sopenharmony_ci	make -j
107e5c31af7Sopenharmony_ci
108e5c31af7Sopenharmony_ci### Android
109e5c31af7Sopenharmony_ci
110e5c31af7Sopenharmony_ciFollowing command will build dEQP.apk:
111e5c31af7Sopenharmony_ci
112e5c31af7Sopenharmony_ci	python3 scripts/android/build_apk.py --sdk <path to Android SDK> --ndk <path to Android NDK>
113e5c31af7Sopenharmony_ci
114e5c31af7Sopenharmony_ciBy default the CTS package will be built for the Android API level 28.
115e5c31af7Sopenharmony_ciAnother API level may be supplied using --native-api command line option.
116e5c31af7Sopenharmony_ci
117e5c31af7Sopenharmony_ciThe package can be installed by either running:
118e5c31af7Sopenharmony_ci
119e5c31af7Sopenharmony_ci	python3 scripts/android/install_apk.py
120e5c31af7Sopenharmony_ci
121e5c31af7Sopenharmony_ciBy default the CTS package will contain libdeqp.so built for armeabi-v7a, arm64-v8a,
122e5c31af7Sopenharmony_cix86, and x86_64 ABIs, but that can be changed at build time by passing the --abis command line
123e5c31af7Sopenharmony_cioption to `scripts/android/build_apk.py`.
124e5c31af7Sopenharmony_ci
125e5c31af7Sopenharmony_ciTo pick which ABI to use at _install time_, use the following command instead:
126e5c31af7Sopenharmony_ci
127e5c31af7Sopenharmony_ci	adb install -g --abi <ABI name> <build-root>/package/dEQP.apk
128e5c31af7Sopenharmony_ci
129e5c31af7Sopenharmony_ci
130e5c31af7Sopenharmony_ciBuilding Mustpass
131e5c31af7Sopenharmony_ci-----------------
132e5c31af7Sopenharmony_ci
133e5c31af7Sopenharmony_ciCurrent Vulkan mustpass is checked into repository and can be found at:
134e5c31af7Sopenharmony_ci
135e5c31af7Sopenharmony_ci	external/vulkancts/mustpass/main/vk-default.txt
136e5c31af7Sopenharmony_ci
137e5c31af7Sopenharmony_ciCurrent Vulkan SC mustpass can be found at:
138e5c31af7Sopenharmony_ci
139e5c31af7Sopenharmony_ci	external/vulkancts/mustpass/master/vksc-default.txt
140e5c31af7Sopenharmony_ci
141e5c31af7Sopenharmony_ciThis file contains list of files located in vk-default or vksc-default subdirectory. Those files contain
142e5c31af7Sopenharmony_citests from bigest test groups and together they contain all test cases that should pass.
143e5c31af7Sopenharmony_ci
144e5c31af7Sopenharmony_ciVulkan CTS mustpass can be re-generated by running:
145e5c31af7Sopenharmony_ci
146e5c31af7Sopenharmony_ci	python3 <vulkancts>/external/vulkancts/scripts/build_mustpass.py
147e5c31af7Sopenharmony_ci
148e5c31af7Sopenharmony_ci
149e5c31af7Sopenharmony_ciRunning CTS
150e5c31af7Sopenharmony_ci-----------
151e5c31af7Sopenharmony_ci
152e5c31af7Sopenharmony_ciFollowing command line options MUST be used when running CTS:
153e5c31af7Sopenharmony_ci
154e5c31af7Sopenharmony_ci	--deqp-caselist-file=<vulkancts>/external/vulkancts/mustpass/main/vk-default.txt (or vksc-default.txt for Vulkan SC implementations)
155e5c31af7Sopenharmony_ci	--deqp-log-images=disable
156e5c31af7Sopenharmony_ci	--deqp-log-shader-sources=disable
157e5c31af7Sopenharmony_ci
158e5c31af7Sopenharmony_ciIf an implementation ships with [implicit layers](https://github.com/KhronosGroup/Vulkan-Loader/blob/master/loader/LoaderAndLayerInterface.md#implicit-vs-explicit-layers) enabled, then such layers must be enabled
159e5c31af7Sopenharmony_ciwhen running CTS.
160e5c31af7Sopenharmony_ci
161e5c31af7Sopenharmony_ciIn addition, on multi-device systems the device for which conformance is claimed
162e5c31af7Sopenharmony_cican be selected with:
163e5c31af7Sopenharmony_ci
164e5c31af7Sopenharmony_ci	--deqp-vk-device-id=<value>
165e5c31af7Sopenharmony_ci
166e5c31af7Sopenharmony_ciTo speed up the conformance run on some platforms the following command line
167e5c31af7Sopenharmony_cioption may be used to disable frequent fflush() calls to the output logs:
168e5c31af7Sopenharmony_ci
169e5c31af7Sopenharmony_ci	--deqp-log-flush=disable
170e5c31af7Sopenharmony_ci
171e5c31af7Sopenharmony_ciBy default, the test log will be written into the path "TestResults.qpa". If the
172e5c31af7Sopenharmony_ciplatform requires a different path, it can be specified with:
173e5c31af7Sopenharmony_ci
174e5c31af7Sopenharmony_ci	--deqp-log-filename=<path>
175e5c31af7Sopenharmony_ci
176e5c31af7Sopenharmony_ciBy default, the CTS will expect to find its test resource files in the current
177e5c31af7Sopenharmony_ciworking directory. This can be overridden with:
178e5c31af7Sopenharmony_ci
179e5c31af7Sopenharmony_ci	--deqp-archive-dir=<path>
180e5c31af7Sopenharmony_ci
181e5c31af7Sopenharmony_ciBy default, the shader cache will be written into the path "shadercache.bin". If the
182e5c31af7Sopenharmony_ciplatform requires a different path, it can be specified with:
183e5c31af7Sopenharmony_ci
184e5c31af7Sopenharmony_ci	--deqp-shadercache-filename=<path>
185e5c31af7Sopenharmony_ci
186e5c31af7Sopenharmony_ciIf the shader cache is not desired, it can be disabled with:
187e5c31af7Sopenharmony_ci
188e5c31af7Sopenharmony_ci	--deqp-shadercache=disable
189e5c31af7Sopenharmony_ci
190e5c31af7Sopenharmony_ciCTS execution may be split into N fractions ( for the purpose of running it in parallel ) using
191e5c31af7Sopenharmony_ci
192e5c31af7Sopenharmony_ci	--deqp-fraction=I,N
193e5c31af7Sopenharmony_ci
194e5c31af7Sopenharmony_ciwhere I denotes index of current CTS execution ( I=[0..N-1], N=[1..16] )
195e5c31af7Sopenharmony_ci
196e5c31af7Sopenharmony_ciWhen collecting results for a Conformance Submission Package the number of fractions must not exceed 16,
197e5c31af7Sopenharmony_ciand a list of mandatory information tests for each fraction must be supplied:
198e5c31af7Sopenharmony_ci
199e5c31af7Sopenharmony_ci	--deqp-fraction-mandatory-caselist-file=<vulkancts>external/vulkancts/mustpass/main/vk-fraction-mandatory-tests.txt
200e5c31af7Sopenharmony_ci
201e5c31af7Sopenharmony_ciTo specify file containing waived tests that are omitted only by specified vendor and renderer/device
202e5c31af7Sopenharmony_cithe following command line option may be used:
203e5c31af7Sopenharmony_ci
204e5c31af7Sopenharmony_ci	--deqp-waiver-file=<path>
205e5c31af7Sopenharmony_ci
206e5c31af7Sopenharmony_ciTo make log more clear for high level shader source analysis
207e5c31af7Sopenharmony_cioutput of decompiled SPIR-V shader sources can be disabled:
208e5c31af7Sopenharmony_ci
209e5c31af7Sopenharmony_ci	--deqp-log-decompiled-spirv=disable
210e5c31af7Sopenharmony_ci
211e5c31af7Sopenharmony_ciAlso non-informative empty LogInfo sections can be removed
212e5c31af7Sopenharmony_cifrom output into log by specifying:
213e5c31af7Sopenharmony_ci
214e5c31af7Sopenharmony_ci	--deqp-log-empty-loginfo=disable
215e5c31af7Sopenharmony_ci
216e5c31af7Sopenharmony_ciThere are several additional options used only in conjunction with Vulkan SC tests
217e5c31af7Sopenharmony_ci( for Vulkan SC CTS tests deqp-vksc application should be used ).
218e5c31af7Sopenharmony_ci
219e5c31af7Sopenharmony_ciTo define minimum size of the command pool use parameter:
220e5c31af7Sopenharmony_ci
221e5c31af7Sopenharmony_ci	--deqp-command-pool-min-size=<value>
222e5c31af7Sopenharmony_ci
223e5c31af7Sopenharmony_ciTo define minimum size of a single command buffer use parameter:
224e5c31af7Sopenharmony_ci
225e5c31af7Sopenharmony_ci	--deqp-command-buffer-min-size=<value>
226e5c31af7Sopenharmony_ci
227e5c31af7Sopenharmony_ciIf minimum size will not be defined, then the size of single command buffer will be estimated
228e5c31af7Sopenharmony_cifrom number of commands multiplied by value of parameter deqp-command-default-size.
229e5c31af7Sopenharmony_ciDefault size of a single command may be defined using:
230e5c31af7Sopenharmony_ci
231e5c31af7Sopenharmony_ci	--deqp-command-default-size=<value>
232e5c31af7Sopenharmony_ci
233e5c31af7Sopenharmony_ciAnother group of Vulkan SC options enable use of offline pipeline compiler:
234e5c31af7Sopenharmony_ci
235e5c31af7Sopenharmony_ci	--deqp-pipeline-compiler=<value>
236e5c31af7Sopenharmony_ci	--deqp-pipeline-dir=<value>
237e5c31af7Sopenharmony_ci	--deqp-pipeline-args=<value>
238e5c31af7Sopenharmony_ci	--deqp-pipeline-file=<value>
239e5c31af7Sopenharmony_ci	--deqp-pipeline-logfile=<value>
240e5c31af7Sopenharmony_ci	--deqp-pipeline-prefix=<value>
241e5c31af7Sopenharmony_ci
242e5c31af7Sopenharmony_ciIn case of offline pipeline compilers the size of the pipeline will be returned by
243e5c31af7Sopenharmony_cipipeline compiler. If we use internal pipeline compilation then pipeline size will be
244e5c31af7Sopenharmony_ciequal to default size. This size may be modified using:
245e5c31af7Sopenharmony_ci
246e5c31af7Sopenharmony_ci	--deqp-pipeline-default-size=<value>
247e5c31af7Sopenharmony_ci
248e5c31af7Sopenharmony_ciVulkan SC may be implemented on embedded platform that is not able to
249e5c31af7Sopenharmony_ciread from/write to files, write logs, etc. In this case you may use
250e5c31af7Sopenharmony_ciexternal server that will perform these tasks on another machine:
251e5c31af7Sopenharmony_ci
252e5c31af7Sopenharmony_ci	--deqp-server-address=<value>
253e5c31af7Sopenharmony_ci
254e5c31af7Sopenharmony_ciIn Vulkan SC CTS tests are performed twice. You may define how many tests
255e5c31af7Sopenharmony_ciare performed on separate process in a single batch:
256e5c31af7Sopenharmony_ci
257e5c31af7Sopenharmony_ci	--deqp-subprocess-test-count=<value>
258e5c31af7Sopenharmony_ci
259e5c31af7Sopenharmony_ciAbove mentioned parameter works as default value for all tests.
260e5c31af7Sopenharmony_ciYou may also define how many tests are performed on a separate process
261e5c31af7Sopenharmony_cifor specific test tree branch using parameter:
262e5c31af7Sopenharmony_ci
263e5c31af7Sopenharmony_ci	--deqp-subprocess-cfg-file=<path>
264e5c31af7Sopenharmony_ci
265e5c31af7Sopenharmony_ciFile should contain test pattern followed by numeric value, for example:
266e5c31af7Sopenharmony_cidEQP-VKSC.api.copy_and_blit.core.image_to_image.dimensions.src32768x4_dst32768x4.*, 5
267e5c31af7Sopenharmony_cidEQP-VKSC.texture.explicit_lod.2d.sizes.*, 20
268e5c31af7Sopenharmony_cidEQP-VKSC.texture.explicit_lod.2d.sizes.128x128_*, 4
269e5c31af7Sopenharmony_ci
270e5c31af7Sopenharmony_ciThere is also one option used by CTS internally and should not be used manually.
271e5c31af7Sopenharmony_ciIt informs deqp-vksc application that it works as subprocess:
272e5c31af7Sopenharmony_ci
273e5c31af7Sopenharmony_ci	--deqp-subprocess=[enable|disable]
274e5c31af7Sopenharmony_ci
275e5c31af7Sopenharmony_ciNo other command line options are allowed.
276e5c31af7Sopenharmony_ci
277e5c31af7Sopenharmony_ci### Win32
278e5c31af7Sopenharmony_ci
279e5c31af7Sopenharmony_ci	Vulkan:
280e5c31af7Sopenharmony_ci
281e5c31af7Sopenharmony_ci	cd <builddir>/external/vulkancts/modules/vulkan
282e5c31af7Sopenharmony_ci	Debug\deqp-vk.exe --deqp-caselist-file=...
283e5c31af7Sopenharmony_ci
284e5c31af7Sopenharmony_ci	Vulkan SC:
285e5c31af7Sopenharmony_ci
286e5c31af7Sopenharmony_ci	cd <builddir>/external/vulkancts/modules/vulkan
287e5c31af7Sopenharmony_ci	Debug\deqp-vksc.exe --deqp-caselist-file=...
288e5c31af7Sopenharmony_ci
289e5c31af7Sopenharmony_ciTest log will be written into TestResults.qpa
290e5c31af7Sopenharmony_ci
291e5c31af7Sopenharmony_ci### Linux
292e5c31af7Sopenharmony_ci
293e5c31af7Sopenharmony_ci	Vulkan:
294e5c31af7Sopenharmony_ci
295e5c31af7Sopenharmony_ci	cd <builddir>/external/vulkancts/modules/vulkan
296e5c31af7Sopenharmony_ci	./deqp-vk --deqp-caselist-file=...
297e5c31af7Sopenharmony_ci
298e5c31af7Sopenharmony_ci	Vulkan SC:
299e5c31af7Sopenharmony_ci
300e5c31af7Sopenharmony_ci	cd <builddir>/external/vulkancts/modules/vulkan
301e5c31af7Sopenharmony_ci	./deqp-vksc --deqp-caselist-file=...
302e5c31af7Sopenharmony_ci
303e5c31af7Sopenharmony_ci### MacOS
304e5c31af7Sopenharmony_ci
305e5c31af7Sopenharmony_ci	cd <builddir>/external/vulkancts/modules/vulkan
306e5c31af7Sopenharmony_ci	./deqp-vk --deqp-caselist-file=...
307e5c31af7Sopenharmony_ci
308e5c31af7Sopenharmony_ci### Android
309e5c31af7Sopenharmony_ci
310e5c31af7Sopenharmony_ciFor Android build using SDK 29 or greater, it is recommended to use `/sdcard/Documents/` instead of `/sdcard/` due to scoped storage.
311e5c31af7Sopenharmony_ci
312e5c31af7Sopenharmony_ci	adb push <vulkancts>/external/vulkancts/mustpass/main/vk-default.txt /sdcard/vk-default.txt
313e5c31af7Sopenharmony_ci	adb shell
314e5c31af7Sopenharmony_ci
315e5c31af7Sopenharmony_ciIn device shell:
316e5c31af7Sopenharmony_ci
317e5c31af7Sopenharmony_ci	am start -n com.drawelements.deqp/android.app.NativeActivity -e cmdLine "deqp --deqp-caselist-file=/sdcard/vk-default.txt --deqp-log-images=disable --deqp-log-shader-sources=disable --deqp-log-filename=/sdcard/TestResults.qpa"
318e5c31af7Sopenharmony_ci
319e5c31af7Sopenharmony_ciTest progress will be written to device log and can be displayed with:
320e5c31af7Sopenharmony_ci
321e5c31af7Sopenharmony_ci	adb logcat -s dEQP
322e5c31af7Sopenharmony_ci
323e5c31af7Sopenharmony_ciTest log will be written into `/sdcard/TestResults.qpa`.
324e5c31af7Sopenharmony_ci
325e5c31af7Sopenharmony_ci
326e5c31af7Sopenharmony_ciConformance Submission Package Requirements
327e5c31af7Sopenharmony_ci-------------------------------------------
328e5c31af7Sopenharmony_ci
329e5c31af7Sopenharmony_ciThe conformance submission package must contain the following:
330e5c31af7Sopenharmony_ci
331e5c31af7Sopenharmony_ci1. Full test logs (`TestResults.qpa`) from CTS runs against all driver builds and all fractions
332e5c31af7Sopenharmony_ci2. Result of `git status` and `git log` from CTS source directory
333e5c31af7Sopenharmony_ci3. Any patches used on top of release tag
334e5c31af7Sopenharmony_ci4. Conformance statement
335e5c31af7Sopenharmony_ci
336e5c31af7Sopenharmony_ciTest logs (1) should be named `<submission pkg dir>/TestResults-<driver build type>-<fraction id>-of-<total fractions>.qpa`,
337e5c31af7Sopenharmony_cifor example `TestResults-armeabi-v7a-1-of-8.qpa`. On platforms where multiple different driver
338e5c31af7Sopenharmony_cibuilds (for example 64-bit and 32-bit) are present, CTS logs must be provided
339e5c31af7Sopenharmony_cifor each driver build as part of the submission package. If CTS run was split into multiple
340e5c31af7Sopenharmony_cifractions then result files for all fractions must be provided, each file must
341e5c31af7Sopenharmony_cicontain results of the mandatory information tests.
342e5c31af7Sopenharmony_ci
343e5c31af7Sopenharmony_ciFractions may be run on different physical devices but each device must represent
344e5c31af7Sopenharmony_cithe same Conformant Product.
345e5c31af7Sopenharmony_ci
346e5c31af7Sopenharmony_ciTest logs generated on a system which exposes more than one physical device
347e5c31af7Sopenharmony_ciin a device group can be used for products that expose one or more physical
348e5c31af7Sopenharmony_cidevices in their device group.
349e5c31af7Sopenharmony_ci
350e5c31af7Sopenharmony_ciThe CTS build must always be done from clean git repository that doesn't have any
351e5c31af7Sopenharmony_ciuncommitted changes. Thus it is necessary to run and capture output of `git
352e5c31af7Sopenharmony_cistatus` and `git log` (2) in the source directory:
353e5c31af7Sopenharmony_ci
354e5c31af7Sopenharmony_ci	git status > <submission pkg dir>/git-status.txt
355e5c31af7Sopenharmony_ci	git log --first-parent <release tag>^..HEAD > <submission pkg dir>/git-log.txt
356e5c31af7Sopenharmony_ci
357e5c31af7Sopenharmony_ciAny changes made to CTS must be committed to the local repository, and provided
358e5c31af7Sopenharmony_cias part of the submission package (3). This can be done by running:
359e5c31af7Sopenharmony_ci
360e5c31af7Sopenharmony_ci	git format-patch -o <submission pkg dir> <release tag>..HEAD
361e5c31af7Sopenharmony_ci
362e5c31af7Sopenharmony_ciChanges to platform-specific code (mostly under `framework/platform`)
363e5c31af7Sopenharmony_ciare allowed. The commit message for each change must include a clear
364e5c31af7Sopenharmony_cidescription of the change and why it is necessary.
365e5c31af7Sopenharmony_ciFor Vulkan SC, changes are also permitted to the following:
366e5c31af7Sopenharmony_ci- vksc-pipeline-compiler (under `vkscpc/`)
367e5c31af7Sopenharmony_ci- vksc-server (under `vkscserver/`)
368e5c31af7Sopenharmony_ci- modules/vulkan/sc/vktApplicationParametersTests.cpp (to provide vendor-specific test data)
369e5c31af7Sopenharmony_ci
370e5c31af7Sopenharmony_ciBugfixes to the tests are allowed. Before being used for a submission,
371e5c31af7Sopenharmony_cibugfixes must be accepted and merged into the CTS repository.
372e5c31af7Sopenharmony_ci`git cherry-pick` is strongly recommended as a method of applying bug fixes.
373e5c31af7Sopenharmony_ci
374e5c31af7Sopenharmony_ciIf command line parameter --deqp-subprocess-cfg-file was used then the file
375e5c31af7Sopenharmony_cipointed by this parameter must also be added to submission package.
376e5c31af7Sopenharmony_ci
377e5c31af7Sopenharmony_ciOther changes must be accompanied by a waiver (see below).
378e5c31af7Sopenharmony_ci
379e5c31af7Sopenharmony_ciNOTE: When cherry-picking patches on top of release tag, please use `git cherry-pick -x`
380e5c31af7Sopenharmony_cito include original commit hash in the commit message.
381e5c31af7Sopenharmony_ci
382e5c31af7Sopenharmony_ciConformance statement (4) must be included in a file called `STATEMENT-<adopter>`
383e5c31af7Sopenharmony_ciand must contain following:
384e5c31af7Sopenharmony_ci
385e5c31af7Sopenharmony_ci	CONFORM_VERSION:         <git tag of CTS release>
386e5c31af7Sopenharmony_ci	PRODUCT:                 <string-value>
387e5c31af7Sopenharmony_ci	CPU:                     <string-value>
388e5c31af7Sopenharmony_ci	OS:                      <string-value>
389e5c31af7Sopenharmony_ci
390e5c31af7Sopenharmony_ciNote that product/cpu/os information is also captured in `dEQP-VK.info.*` tests
391e5c31af7Sopenharmony_ciif `vk::Platform::describePlatform()` is implemented.
392e5c31af7Sopenharmony_ci
393e5c31af7Sopenharmony_ciIf the submission package covers multiple products, you can list them by appending
394e5c31af7Sopenharmony_ciadditional `PRODUCT:` lines to the conformance statement. For example:
395e5c31af7Sopenharmony_ci
396e5c31af7Sopenharmony_ci	CONFORM_VERSION:         vulkan-cts-1.2.6.0
397e5c31af7Sopenharmony_ci	PRODUCT:                 Product A
398e5c31af7Sopenharmony_ci	PRODUCT:                 Product B
399e5c31af7Sopenharmony_ci	...
400e5c31af7Sopenharmony_ci
401e5c31af7Sopenharmony_ciThe actual submission package consists of the above set of files which must
402e5c31af7Sopenharmony_cibe bundled into a gzipped tar file.
403e5c31af7Sopenharmony_ci
404e5c31af7Sopenharmony_ciFor Vulkan this must be named `VK<API major><API minor>_<adopter><_info>.tgz`.
405e5c31af7Sopenharmony_ci
406e5c31af7Sopenharmony_ciFor Vulkan SC this must be named `VKSC<API major><API minor>_<adopter><_info>.tgz`.
407e5c31af7Sopenharmony_ci
408e5c31af7Sopenharmony_ci`<API major>` is the major version of the Vulkan {SC} API specification.
409e5c31af7Sopenharmony_ci`<API minor>`is the minor version of the Vulkan {SC} API specification.
410e5c31af7Sopenharmony_ci
411e5c31af7Sopenharmony_ci`<adopter>` is the name of the Adopting member company, or some recognizable abbreviation.
412e5c31af7Sopenharmony_ciThe `<_info>` field is optional. It may be used to uniquely identify a submission
413e5c31af7Sopenharmony_ciby OS, platform, date, or other criteria when making multiple submissions.
414e5c31af7Sopenharmony_ciFor example, a company XYZ may make a submission for a Vulkan 1.1 implementation named
415e5c31af7Sopenharmony_ci`VK11_XYZ_PRODUCTA_Windows10.tgz`
416e5c31af7Sopenharmony_ci
417e5c31af7Sopenharmony_ciOne way to create a suiteable gzipped tar file is to execute the command:
418e5c31af7Sopenharmony_ci
419e5c31af7Sopenharmony_ci	tar -cvzf <filename.tgz> -C <submission pkg dir> .
420e5c31af7Sopenharmony_ci
421e5c31af7Sopenharmony_ciwhere `<submission pkg dir>` is the directory containing the files from (1)-(4)
422e5c31af7Sopenharmony_cifrom above. A submission package must contain all of the files listed above,
423e5c31af7Sopenharmony_ciand only those files.
424e5c31af7Sopenharmony_ci
425e5c31af7Sopenharmony_ciAs an example submission package could contain:
426e5c31af7Sopenharmony_ci
427e5c31af7Sopenharmony_ci	STATEMENT-Khronos
428e5c31af7Sopenharmony_ci	git-log.txt
429e5c31af7Sopenharmony_ci	git-status.txt
430e5c31af7Sopenharmony_ci	0001-Remove-Waived-Filtering-Tests.patch
431e5c31af7Sopenharmony_ci	0002-Fix-Pipeline-Parameters.patch
432e5c31af7Sopenharmony_ci	TestResults-armeabi-v7a.qpa
433e5c31af7Sopenharmony_ci	TestResults-arm64-v8a.qpa
434e5c31af7Sopenharmony_ci
435e5c31af7Sopenharmony_ci
436e5c31af7Sopenharmony_ciWaivers
437e5c31af7Sopenharmony_ci-------
438e5c31af7Sopenharmony_ci
439e5c31af7Sopenharmony_ciThe process for requesting a waiver is to report the issue by filing a bug
440e5c31af7Sopenharmony_cireport in the Gitlab VulkanCTS project (TODO Github?). When creating the
441e5c31af7Sopenharmony_cisubmission package, include references to the waiver in the commit message of
442e5c31af7Sopenharmony_cithe relevant change. Including as much information as possible in your bug
443e5c31af7Sopenharmony_cireport (including a unified diff or a merge request of suggested file changes)
444e5c31af7Sopenharmony_ciwill ensure the issue can be progressed as rapidly as possible. Issues must
445e5c31af7Sopenharmony_cibe labeled "Waiver" (TODO!) and identify the version of the CTS and affected
446e5c31af7Sopenharmony_citests.
447e5c31af7Sopenharmony_ci
448e5c31af7Sopenharmony_ciConformance Criteria
449e5c31af7Sopenharmony_ci--------------------
450e5c31af7Sopenharmony_ci
451e5c31af7Sopenharmony_ciConformance run is considered passing if all tests finish with allowed result
452e5c31af7Sopenharmony_cicodes. Test results are contained in the TestResults.qpa log. Each
453e5c31af7Sopenharmony_citest case section contains XML tag Result, for example:
454e5c31af7Sopenharmony_ci
455e5c31af7Sopenharmony_ci	<Result StatusCode="Pass">Not validated</Result>
456e5c31af7Sopenharmony_ci
457e5c31af7Sopenharmony_ciThe result code is the value of the StatusCode attribute. Following status
458e5c31af7Sopenharmony_cicodes are allowed:
459e5c31af7Sopenharmony_ci
460e5c31af7Sopenharmony_ci	Pass
461e5c31af7Sopenharmony_ci	NotSupported
462e5c31af7Sopenharmony_ci	QualityWarning
463e5c31af7Sopenharmony_ci	CompatibilityWarning
464e5c31af7Sopenharmony_ci	Waiver
465e5c31af7Sopenharmony_ci
466e5c31af7Sopenharmony_ciSubmission package can be verified using `verify_submission.py`
467e5c31af7Sopenharmony_ciscript located in [VK-GL-CTS-Tools](https://github.com/KhronosGroup/VK-GL-CTS-Tools).
468e5c31af7Sopenharmony_ci
469e5c31af7Sopenharmony_ciVulkan platform port
470e5c31af7Sopenharmony_ci--------------------
471e5c31af7Sopenharmony_ci
472e5c31af7Sopenharmony_ciVulkan support from Platform implementation requires providing
473e5c31af7Sopenharmony_ci`getVulkanPlatform()` method in `tcu::Platform` class implementation.
474e5c31af7Sopenharmony_ci
475e5c31af7Sopenharmony_ciSee `framework/common/tcuPlatform.hpp` and examples in
476e5c31af7Sopenharmony_ci`framework/platform/win32/tcuWin32Platform.cpp` and
477e5c31af7Sopenharmony_ci`framework/platform/android/tcuAndroidPlatform.cpp`.
478e5c31af7Sopenharmony_ci
479e5c31af7Sopenharmony_ciIf any WSI extensions are supported, platform port must also implement
480e5c31af7Sopenharmony_cimethods for creating native display (`vk::Platform::createWsiDisplay`)
481e5c31af7Sopenharmony_ciand window handles (`vk::wsi::Display::createWindow`). Otherwise tests
482e5c31af7Sopenharmony_ciunder `dEQP-VK.wsi` will fail.
483e5c31af7Sopenharmony_ci
484e5c31af7Sopenharmony_ci
485e5c31af7Sopenharmony_ciNull (dummy) driver
486e5c31af7Sopenharmony_ci-------------------
487e5c31af7Sopenharmony_ci
488e5c31af7Sopenharmony_ciFor testing and development purposes it might be useful to be able to run
489e5c31af7Sopenharmony_citests on dummy Vulkan implementation. One such implementation is provided in
490e5c31af7Sopenharmony_civkNullDriver.cpp. To use that, implement `vk::Platform::createLibrary()` with
491e5c31af7Sopenharmony_ci`vk::createNullDriver()`.
492e5c31af7Sopenharmony_ci
493e5c31af7Sopenharmony_ci
494e5c31af7Sopenharmony_ciValidation Layers
495e5c31af7Sopenharmony_ci-----------------
496e5c31af7Sopenharmony_ci
497e5c31af7Sopenharmony_ciVulkan CTS framework includes first-party support for validation layers, that
498e5c31af7Sopenharmony_cican be turned on with `--deqp-validation=enable` command line option.
499e5c31af7Sopenharmony_ci
500e5c31af7Sopenharmony_ciWhen validation is turned on, default instance and device will be created with
501e5c31af7Sopenharmony_civalidation layers enabled and debug callback is registered to record any
502e5c31af7Sopenharmony_cimessages. Debug messages collected during test execution will be included at
503e5c31af7Sopenharmony_cithe end of the test case log.
504e5c31af7Sopenharmony_ci
505e5c31af7Sopenharmony_ciIn addition, when the `--deqp-print-validation-errors` command line option is
506e5c31af7Sopenharmony_ciused, validation errors are additionally printed to standard error in the
507e5c31af7Sopenharmony_cimoment they are generated.
508e5c31af7Sopenharmony_ci
509e5c31af7Sopenharmony_ciIf any validation errors are found, test result will be set to `InternalError`.
510e5c31af7Sopenharmony_ci
511e5c31af7Sopenharmony_ciBy default `VK_DEBUG_REPORT_INFORMATION_BIT_EXT` and `_DEBUG_BIT_EXT` messages
512e5c31af7Sopenharmony_ciare excluded from the log, but that can be customized by modifying
513e5c31af7Sopenharmony_ci`vk::DebugReportMessage::shouldBeLogged()` in `vkDebugReportUtil.hpp`.
514e5c31af7Sopenharmony_ci
515e5c31af7Sopenharmony_ciOn the Android target, layers can be added to the APK during the build process
516e5c31af7Sopenharmony_ciby setting the `--layers-path` command line option to point to the downloaded
517e5c31af7Sopenharmony_ciValidation Layers binaries or a locally-built layers tree. The layers are
518e5c31af7Sopenharmony_ciexpected to be found under $abi/ under the layers path.
519e5c31af7Sopenharmony_ciThe Validation Layers releases including prebuilt binaries are available at
520e5c31af7Sopenharmony_cihttps://github.com/KhronosGroup/Vulkan-ValidationLayers/releases.
521e5c31af7Sopenharmony_ci
522e5c31af7Sopenharmony_ci
523e5c31af7Sopenharmony_ciCherry GUI
524e5c31af7Sopenharmony_ci----------
525e5c31af7Sopenharmony_ci
526e5c31af7Sopenharmony_ciVulkan test module can be used with Cherry (GUI for test execution and
527e5c31af7Sopenharmony_cianalysis). Cherry is available at
528e5c31af7Sopenharmony_cihttps://android.googlesource.com/platform/external/cherry. Please follow
529e5c31af7Sopenharmony_ciinstructions in README to get started.
530e5c31af7Sopenharmony_ci
531e5c31af7Sopenharmony_ciBefore first launch, and every time test hierarchy has been modified, test
532e5c31af7Sopenharmony_cicase list must be refreshed by running:
533e5c31af7Sopenharmony_ci
534e5c31af7Sopenharmony_ci	python scripts/build_caselists.py path/to/cherry/data
535e5c31af7Sopenharmony_ci
536e5c31af7Sopenharmony_ciCherry must be restarted for the case list update to take effect.
537e5c31af7Sopenharmony_ci
538e5c31af7Sopenharmony_ci
539e5c31af7Sopenharmony_ciShader Optimizer
540e5c31af7Sopenharmony_ci----------------
541e5c31af7Sopenharmony_ci
542e5c31af7Sopenharmony_ciVulkan CTS can be optionally run with the shader optimizer enabled. This
543e5c31af7Sopenharmony_ciis an experimental feature which can be used to further stress both the
544e5c31af7Sopenharmony_cidrivers as well as the optimizer itself. The shader optimizer is disabled
545e5c31af7Sopenharmony_ciby default.
546e5c31af7Sopenharmony_ci
547e5c31af7Sopenharmony_ciThe following command line options can be used to configure the shader
548e5c31af7Sopenharmony_cioptimizer:
549e5c31af7Sopenharmony_ci
550e5c31af7Sopenharmony_ci	--deqp-optimization-recipe=<number>
551e5c31af7Sopenharmony_ci
552e5c31af7Sopenharmony_ciThe list of the optimization recipes can be found and customized in the
553e5c31af7Sopenharmony_ci`optimizeCompiledBinary()` function in `vkPrograms.cpp`.
554e5c31af7Sopenharmony_ci
555e5c31af7Sopenharmony_ciAs of this writing, there are 2 recipes to choose from:
556e5c31af7Sopenharmony_ci
557e5c31af7Sopenharmony_ci	0. Disabled (default)
558e5c31af7Sopenharmony_ci	1. Optimize for performance
559e5c31af7Sopenharmony_ci	2. Optimize for size
560e5c31af7Sopenharmony_ci
561e5c31af7Sopenharmony_ciThe performance and size optimization recipes are defined by the spir-v
562e5c31af7Sopenharmony_cioptimizer, and will change from time to time as the optimizer matures.
563e5c31af7Sopenharmony_ci
564e5c31af7Sopenharmony_ci	--deqp-optimize-spirv=enable
565e5c31af7Sopenharmony_ci
566e5c31af7Sopenharmony_ciThis option is not required to run the optimizer. By default, the shader
567e5c31af7Sopenharmony_cioptimizer only optimizes shaders generated from GLSL or HLSL, and leaves
568e5c31af7Sopenharmony_cihand-written SPIR-V shaders alone.
569e5c31af7Sopenharmony_ci
570e5c31af7Sopenharmony_ciMany of the hand-written SPIR-V tests stress specific features of the
571e5c31af7Sopenharmony_ciSPIR-V which might get optimized out. Using this option will enable the
572e5c31af7Sopenharmony_cioptimizer on the hand-written SPIR-V as well, which may be useful in
573e5c31af7Sopenharmony_cifinding new bugs in drivers or the optimizer itself, but will likely
574e5c31af7Sopenharmony_ciinvalidate the tests themselves.
575e5c31af7Sopenharmony_ci
576e5c31af7Sopenharmony_ci
577e5c31af7Sopenharmony_ciShader Cache
578e5c31af7Sopenharmony_ci------------
579e5c31af7Sopenharmony_ci
580e5c31af7Sopenharmony_ciThe Vulkan CTS framework contains a shader cache for speeding up the running
581e5c31af7Sopenharmony_ciof the CTS. Skipping shader compilation can significantly reduce runtime,
582e5c31af7Sopenharmony_ciespecially for repeated runs.
583e5c31af7Sopenharmony_ci
584e5c31af7Sopenharmony_ciDefault behavior is to have the shader cache enabled, but truncated at the
585e5c31af7Sopenharmony_cistart of the CTS run. This still gives the benefit of skipping shader
586e5c31af7Sopenharmony_cicompilation for identical shaders in different tests (which there are many),
587e5c31af7Sopenharmony_ciwhile making sure that the shader cache file does not grow indefinitely.
588e5c31af7Sopenharmony_ci
589e5c31af7Sopenharmony_ciThe shader cache identifies the shaders by hashing the shader source code
590e5c31af7Sopenharmony_cialong with various bits of information that may affect the shader compilation
591e5c31af7Sopenharmony_ci(such as shader stage, CTS version, possible compilation flags, etc). If a
592e5c31af7Sopenharmony_cicached shader with matching hash is found, a byte-by-byte comparison of the
593e5c31af7Sopenharmony_cishader sources is made to make sure that the correct shader is being
594e5c31af7Sopenharmony_ciretrieved from the cache.
595e5c31af7Sopenharmony_ci
596e5c31af7Sopenharmony_ciThe behavior of the shader cache can be modified with the following command
597e5c31af7Sopenharmony_ciline options:
598e5c31af7Sopenharmony_ci
599e5c31af7Sopenharmony_ci	--deqp-shadercache=disable
600e5c31af7Sopenharmony_ci
601e5c31af7Sopenharmony_ciDisable the shader cache. All shaders will be compiled every time.
602e5c31af7Sopenharmony_ci
603e5c31af7Sopenharmony_ci	--deqp-shadercache-filename=<filename>
604e5c31af7Sopenharmony_ci
605e5c31af7Sopenharmony_ciSet the name of the file where the cached shaders will be stored. This
606e5c31af7Sopenharmony_cioption may be required for the shader cache to work at all on Android
607e5c31af7Sopenharmony_citargets.
608e5c31af7Sopenharmony_ci
609e5c31af7Sopenharmony_ci	--deqp-shadercache-truncate=disable
610e5c31af7Sopenharmony_ci
611e5c31af7Sopenharmony_ciDo not truncate the shader cache file at startup. No shader compilation will
612e5c31af7Sopenharmony_cioccur on repeated runs of the CTS.
613e5c31af7Sopenharmony_ci
614e5c31af7Sopenharmony_ci	--deqp-shadercache-ipc=enable
615e5c31af7Sopenharmony_ci
616e5c31af7Sopenharmony_ciEnables the use of inter-process communication primitives to allow several
617e5c31af7Sopenharmony_ciinstances of CTS to share a single cache file. All of the instances must
618e5c31af7Sopenharmony_ciuse the same shader cache filename.
619e5c31af7Sopenharmony_ci
620e5c31af7Sopenharmony_ciNote that if one instance should crash while holding the cache file lock,
621e5c31af7Sopenharmony_cithe other instances will hang. The lock is only held while reading or
622e5c31af7Sopenharmony_ciwriting to the cache, so crashes are unlikely.
623e5c31af7Sopenharmony_ci
624e5c31af7Sopenharmony_ciIn case of a crash outside the cache file lock, the named shared memory
625e5c31af7Sopenharmony_ciand shared semaphore may be left behind. These will be re-used by CTS on
626e5c31af7Sopenharmony_cisubsequent runs, so additional memory leak will not occur. Shader cache
627e5c31af7Sopenharmony_citruncate may not work in this case. On Windows, when all instances of
628e5c31af7Sopenharmony_ciCTS have terminated the shared resources get automatically cleaned up.
629e5c31af7Sopenharmony_ci
630e5c31af7Sopenharmony_ciRenderDoc
631e5c31af7Sopenharmony_ci---------
632e5c31af7Sopenharmony_ciThe RenderDoc (https://renderdoc.org/) graphics debugger may be used to debug
633e5c31af7Sopenharmony_ciVulkan tests.
634e5c31af7Sopenharmony_ci
635e5c31af7Sopenharmony_ciFollowing command line option should be used when launching tests from
636e5c31af7Sopenharmony_ciRenderDoc UI:
637e5c31af7Sopenharmony_ci
638e5c31af7Sopenharmony_ci	--deqp-renderdoc=enable
639e5c31af7Sopenharmony_ci
640e5c31af7Sopenharmony_ciThis causes the framework to interface with the debugger and mark each dEQP
641e5c31af7Sopenharmony_citest case as a separate 'frame', just for the purpose of capturing. The frames
642e5c31af7Sopenharmony_ciare added using RenderDoc 'In-Application API', instead of swapchain operations.
643e5c31af7Sopenharmony_ci
644e5c31af7Sopenharmony_ciThird Party Runners
645e5c31af7Sopenharmony_ci-------------------
646e5c31af7Sopenharmony_ci
647e5c31af7Sopenharmony_ciSome CTS tests use third-party runners. By default all tests are executed
648e5c31af7Sopenharmony_ciregardless of runner type (`any`). To exclude all tests using any of the
649e5c31af7Sopenharmony_ciexternal runners (`none`) or to only include tests using a certain runner:
650e5c31af7Sopenharmony_ci
651e5c31af7Sopenharmony_ci	--deqp-runner-type=(any|none|amber)
652e5c31af7Sopenharmony_ci
653e5c31af7Sopenharmony_ciVulkan SC Conformance Test suite
654e5c31af7Sopenharmony_ci--------------------------------
655e5c31af7Sopenharmony_ci
656e5c31af7Sopenharmony_ciThis project is also able to perform conformance tests for Vulkan SC
657e5c31af7Sopenharmony_ciimplementations. For this purpose Vulkan CTS framework has been adapted
658e5c31af7Sopenharmony_cito Vulkan SC requirements:
659e5c31af7Sopenharmony_ci
660e5c31af7Sopenharmony_ci- Vulkan SC CTS contains its own mustpass list
661e5c31af7Sopenharmony_ci
662e5c31af7Sopenharmony_ci  external/vulkancts/mustpass/master/vksc-default.txt
663e5c31af7Sopenharmony_ci
664e5c31af7Sopenharmony_ci- Vulkan SC CTS uses its own executable module to perform tests: deqp-vksc
665e5c31af7Sopenharmony_ci
666e5c31af7Sopenharmony_ci- Each test in deqp-vksc is performed twice.
667e5c31af7Sopenharmony_ci  First test run is performed in main process and its purpose is to collect
668e5c31af7Sopenharmony_ci  information about used pipelines, number of created Vulkan objects etc.
669e5c31af7Sopenharmony_ci  Second test run is done in separate process ( subprocess ) and it performs
670e5c31af7Sopenharmony_ci  the real tests.
671e5c31af7Sopenharmony_ci
672e5c31af7Sopenharmony_ci- Vulkan SC pipelines may be compiled using offline pipeline compiler
673e5c31af7Sopenharmony_ci  delivered by implementation vendor. You can use command line parameters
674e5c31af7Sopenharmony_ci  to achieve this ( see parameters: --deqp-pipeline-compiler, --deqp-pipeline-dir,
675e5c31af7Sopenharmony_ci  --deqp-pipeline-args, --deqp-pipeline-file, --deqp-pipeline-logfile,
676e5c31af7Sopenharmony_ci  --deqp-pipeline-prefix )
677e5c31af7Sopenharmony_ci
678e5c31af7Sopenharmony_ci  Reference offline pipeline compiler was created to showcase how input and output
679e5c31af7Sopenharmony_ci  should look like for such application. It uses Vulkan API to create pipeline cache.
680e5c31af7Sopenharmony_ci  The name of the executable is vksc-pipeline-compiler.
681e5c31af7Sopenharmony_ci
682e5c31af7Sopenharmony_ci- Some of the future Vulkan SC implementations may not have a possibility to use
683e5c31af7Sopenharmony_ci  filesystem, create pipeline caches or log results to file. For these implementations
684e5c31af7Sopenharmony_ci  Vulkan SC CTS contains server application that may handle such requests on external
685e5c31af7Sopenharmony_ci  host machine. Define parameter --deqp-server-address in deqp-vksc application
686e5c31af7Sopenharmony_ci  to use external server.
687e5c31af7Sopenharmony_ci  Server application's name is vksc-server and its parameters are listed below,
688e5c31af7Sopenharmony_ci  in Command Line section.
689e5c31af7Sopenharmony_ci
690e5c31af7Sopenharmony_ciCommand Line
691e5c31af7Sopenharmony_ci------------
692e5c31af7Sopenharmony_ciFull list of parameters for the `deqp-vk` and `deqp-vksc` modules:
693e5c31af7Sopenharmony_ci
694e5c31af7Sopenharmony_ciOpenGL and OpenCL parameters not affecting Vulkan API were suppressed.
695e5c31af7Sopenharmony_ci
696e5c31af7Sopenharmony_ci  -h, --help
697e5c31af7Sopenharmony_ci    Show this help
698e5c31af7Sopenharmony_ci
699e5c31af7Sopenharmony_ci  -n, --deqp-case=<value>
700e5c31af7Sopenharmony_ci    Test case(s) to run, supports wildcards (e.g. dEQP-GLES2.info.*)
701e5c31af7Sopenharmony_ci
702e5c31af7Sopenharmony_ci  --deqp-caselist=<value>
703e5c31af7Sopenharmony_ci    Case list to run in trie format (e.g. {dEQP-GLES2{info{version,renderer}}})
704e5c31af7Sopenharmony_ci
705e5c31af7Sopenharmony_ci  --deqp-caselist-file=<value>
706e5c31af7Sopenharmony_ci    Read case list (in trie format) from given file
707e5c31af7Sopenharmony_ci
708e5c31af7Sopenharmony_ci  --deqp-caselist-resource=<value>
709e5c31af7Sopenharmony_ci    Read case list (in trie format) from given file located application's assets
710e5c31af7Sopenharmony_ci
711e5c31af7Sopenharmony_ci  --deqp-stdin-caselist
712e5c31af7Sopenharmony_ci    Read case list (in trie format) from stdin
713e5c31af7Sopenharmony_ci
714e5c31af7Sopenharmony_ci  --deqp-log-filename=<value>
715e5c31af7Sopenharmony_ci    Write test results to given file
716e5c31af7Sopenharmony_ci    default: 'TestResults.qpa'
717e5c31af7Sopenharmony_ci
718e5c31af7Sopenharmony_ci  --deqp-runmode=[execute|xml-caselist|txt-caselist|stdout-caselist]
719e5c31af7Sopenharmony_ci    Execute tests, or write list of test cases into a file
720e5c31af7Sopenharmony_ci    default: 'execute'
721e5c31af7Sopenharmony_ci
722e5c31af7Sopenharmony_ci  --deqp-caselist-export-file=<value>
723e5c31af7Sopenharmony_ci    Set the target file name pattern for caselist export
724e5c31af7Sopenharmony_ci    default: '${packageName}-cases.${typeExtension}'
725e5c31af7Sopenharmony_ci
726e5c31af7Sopenharmony_ci  --deqp-watchdog=[enable|disable]
727e5c31af7Sopenharmony_ci    Enable test watchdog
728e5c31af7Sopenharmony_ci    default: 'disable'
729e5c31af7Sopenharmony_ci
730e5c31af7Sopenharmony_ci  --deqp-crashhandler=[enable|disable]
731e5c31af7Sopenharmony_ci    Enable crash handling
732e5c31af7Sopenharmony_ci    default: 'disable'
733e5c31af7Sopenharmony_ci
734e5c31af7Sopenharmony_ci  --deqp-base-seed=<value>
735e5c31af7Sopenharmony_ci    Base seed for test cases that use randomization
736e5c31af7Sopenharmony_ci    default: '0'
737e5c31af7Sopenharmony_ci
738e5c31af7Sopenharmony_ci  --deqp-test-iteration-count=<value>
739e5c31af7Sopenharmony_ci    Iteration count for cases that support variable number of iterations
740e5c31af7Sopenharmony_ci    default: '0'
741e5c31af7Sopenharmony_ci
742e5c31af7Sopenharmony_ci  --deqp-visibility=[windowed|fullscreen|hidden]
743e5c31af7Sopenharmony_ci    Default test window visibility
744e5c31af7Sopenharmony_ci    default: 'windowed'
745e5c31af7Sopenharmony_ci
746e5c31af7Sopenharmony_ci  --deqp-surface-width=<value>
747e5c31af7Sopenharmony_ci    Use given surface width if possible
748e5c31af7Sopenharmony_ci    default: '-1'
749e5c31af7Sopenharmony_ci
750e5c31af7Sopenharmony_ci  --deqp-surface-height=<value>
751e5c31af7Sopenharmony_ci    Use given surface height if possible
752e5c31af7Sopenharmony_ci    default: '-1'
753e5c31af7Sopenharmony_ci
754e5c31af7Sopenharmony_ci  --deqp-surface-type=[window|pixmap|pbuffer|fbo]
755e5c31af7Sopenharmony_ci    Use given surface type
756e5c31af7Sopenharmony_ci    default: 'window'
757e5c31af7Sopenharmony_ci
758e5c31af7Sopenharmony_ci  --deqp-screen-rotation=[unspecified|0|90|180|270]
759e5c31af7Sopenharmony_ci    Screen rotation for platforms that support it
760e5c31af7Sopenharmony_ci    default: '0'
761e5c31af7Sopenharmony_ci
762e5c31af7Sopenharmony_ci  --deqp-vk-device-id=<value>
763e5c31af7Sopenharmony_ci    Vulkan device ID (IDs start from 1)
764e5c31af7Sopenharmony_ci    default: '1'
765e5c31af7Sopenharmony_ci
766e5c31af7Sopenharmony_ci  --deqp-vk-device-group-id=<value>
767e5c31af7Sopenharmony_ci    Vulkan device Group ID (IDs start from 1)
768e5c31af7Sopenharmony_ci    default: '1'
769e5c31af7Sopenharmony_ci
770e5c31af7Sopenharmony_ci  --deqp-log-images=[enable|disable]
771e5c31af7Sopenharmony_ci    Enable or disable logging of result images
772e5c31af7Sopenharmony_ci    default: 'enable'
773e5c31af7Sopenharmony_ci
774e5c31af7Sopenharmony_ci  --deqp-log-shader-sources=[enable|disable]
775e5c31af7Sopenharmony_ci    Enable or disable logging of shader sources
776e5c31af7Sopenharmony_ci    default: 'enable'
777e5c31af7Sopenharmony_ci
778e5c31af7Sopenharmony_ci  --deqp-test-oom=[enable|disable]
779e5c31af7Sopenharmony_ci    Run tests that exhaust memory on purpose
780e5c31af7Sopenharmony_ci    default: 'enable'
781e5c31af7Sopenharmony_ci
782e5c31af7Sopenharmony_ci  --deqp-archive-dir=<value>
783e5c31af7Sopenharmony_ci    Path to test resource files
784e5c31af7Sopenharmony_ci    default: '.'
785e5c31af7Sopenharmony_ci
786e5c31af7Sopenharmony_ci  --deqp-log-flush=[enable|disable]
787e5c31af7Sopenharmony_ci    Enable or disable log file fflush
788e5c31af7Sopenharmony_ci    default: 'enable'
789e5c31af7Sopenharmony_ci
790e5c31af7Sopenharmony_ci  --deqp-log-compact=[enable|disable]
791e5c31af7Sopenharmony_ci    Enable or disable the compact version of the log
792e5c31af7Sopenharmony_ci    default: 'disable'
793e5c31af7Sopenharmony_ci
794e5c31af7Sopenharmony_ci  --deqp-validation=[enable|disable]
795e5c31af7Sopenharmony_ci    Enable or disable test case validation
796e5c31af7Sopenharmony_ci    default: 'disable'
797e5c31af7Sopenharmony_ci
798e5c31af7Sopenharmony_ci  --deqp-print-validation-errors
799e5c31af7Sopenharmony_ci    Print validation errors to standard error
800e5c31af7Sopenharmony_ci
801e5c31af7Sopenharmony_ci  --deqp-optimization-recipe=<value>
802e5c31af7Sopenharmony_ci    Shader optimization recipe (0=disabled, 1=performance, 2=size)
803e5c31af7Sopenharmony_ci    default: '0'
804e5c31af7Sopenharmony_ci
805e5c31af7Sopenharmony_ci  --deqp-optimize-spirv=[enable|disable]
806e5c31af7Sopenharmony_ci    Apply optimization to spir-v shaders as well
807e5c31af7Sopenharmony_ci    default: 'disable'
808e5c31af7Sopenharmony_ci
809e5c31af7Sopenharmony_ci  --deqp-shadercache=[enable|disable]
810e5c31af7Sopenharmony_ci    Enable or disable shader cache
811e5c31af7Sopenharmony_ci    default: 'enable'
812e5c31af7Sopenharmony_ci
813e5c31af7Sopenharmony_ci  --deqp-shadercache-filename=<value>
814e5c31af7Sopenharmony_ci    Write shader cache to given file
815e5c31af7Sopenharmony_ci    default: 'shadercache.bin'
816e5c31af7Sopenharmony_ci
817e5c31af7Sopenharmony_ci  --deqp-shadercache-truncate=[enable|disable]
818e5c31af7Sopenharmony_ci    Truncate shader cache before running tests
819e5c31af7Sopenharmony_ci    default: 'enable'
820e5c31af7Sopenharmony_ci
821e5c31af7Sopenharmony_ci  --deqp-renderdoc=[enable|disable]
822e5c31af7Sopenharmony_ci    Enable RenderDoc frame markers
823e5c31af7Sopenharmony_ci    default: 'disable'
824e5c31af7Sopenharmony_ci
825e5c31af7Sopenharmony_ci  --deqp-fraction=<value>
826e5c31af7Sopenharmony_ci    Run a fraction of the test cases (e.g. N,M means run group%M==N)
827e5c31af7Sopenharmony_ci    default: ''
828e5c31af7Sopenharmony_ci
829e5c31af7Sopenharmony_ci  --deqp-fraction-mandatory-caselist-file=<value>
830e5c31af7Sopenharmony_ci    Case list file that must be run for each fraction
831e5c31af7Sopenharmony_ci    default: ''
832e5c31af7Sopenharmony_ci
833e5c31af7Sopenharmony_ci  --deqp-waiver-file=<value>
834e5c31af7Sopenharmony_ci    Read waived tests from given file
835e5c31af7Sopenharmony_ci    default: ''
836e5c31af7Sopenharmony_ci
837e5c31af7Sopenharmony_ci  --deqp-runner-type=[any|none|amber]
838e5c31af7Sopenharmony_ci    Filter test cases based on runner
839e5c31af7Sopenharmony_ci    default: 'any'
840e5c31af7Sopenharmony_ci
841e5c31af7Sopenharmony_ci  --deqp-terminate-on-fail=[enable|disable]
842e5c31af7Sopenharmony_ci    Terminate the run on first failure
843e5c31af7Sopenharmony_ci    default: 'disable'
844e5c31af7Sopenharmony_ci
845e5c31af7Sopenharmony_ci  --deqp-subprocess=[enable|disable]
846e5c31af7Sopenharmony_ci    Inform app that it works as subprocess (Vulkan SC only, do not use manually)
847e5c31af7Sopenharmony_ci    default: 'disable'
848e5c31af7Sopenharmony_ci
849e5c31af7Sopenharmony_ci  --deqp-subprocess-test-count=<value>
850e5c31af7Sopenharmony_ci    Define default number of tests performed in subprocess (Vulkan SC only)
851e5c31af7Sopenharmony_ci    default: '65536'
852e5c31af7Sopenharmony_ci
853e5c31af7Sopenharmony_ci  --deqp-subprocess-cfg-file=<path>
854e5c31af7Sopenharmony_ci	Config file defining number of tests performed in subprocess for specific test branches (Vulkan SC only)
855e5c31af7Sopenharmony_ci    default: ''
856e5c31af7Sopenharmony_ci
857e5c31af7Sopenharmony_ci  --deqp-server-address=<value>
858e5c31af7Sopenharmony_ci    Server address (host:port) responsible for shader compilation (Vulkan SC only)
859e5c31af7Sopenharmony_ci    default: ''
860e5c31af7Sopenharmony_ci
861e5c31af7Sopenharmony_ci  --deqp-command-pool-min-size=<value>
862e5c31af7Sopenharmony_ci    Define minimum size of the command pool (in bytes) to use (Vulkan SC only)
863e5c31af7Sopenharmony_ci	default: '0'
864e5c31af7Sopenharmony_ci
865e5c31af7Sopenharmony_ci  --deqp-command-buffer-min-size=<value>
866e5c31af7Sopenharmony_ci    Define minimum size of the command buffer (in bytes) to use (Vulkan SC only)
867e5c31af7Sopenharmony_ci	default: '0'
868e5c31af7Sopenharmony_ci
869e5c31af7Sopenharmony_ci  --deqp-app-params-input-file=<path>
870e5c31af7Sopenharmony_ci    File providing default application parameters (Vulkan SC only)
871e5c31af7Sopenharmony_ci    default: ''
872e5c31af7Sopenharmony_ci
873e5c31af7Sopenharmony_ci    The file should contain lines of input in the following format:
874e5c31af7Sopenharmony_ci    type ("instance" or "device"), 32-bit vendorID, 32-bit deviceID, 32-bit parameterKey, 64-bit parameterValue
875e5c31af7Sopenharmony_ci
876e5c31af7Sopenharmony_ci    `type` specifies whether the values will be used for instance or device creation.
877e5c31af7Sopenharmony_ci    All the other values should be encoded in hex. For example:
878e5c31af7Sopenharmony_ci    instance, 0x01234567, 0x76543210, 0x01234567, 0x0000000076543210
879e5c31af7Sopenharmony_ci
880e5c31af7Sopenharmony_ci  --deqp-command-default-size=<value>
881e5c31af7Sopenharmony_ci    Define default single command size (in bytes) to use (Vulkan SC only)
882e5c31af7Sopenharmony_ci	default: '256'
883e5c31af7Sopenharmony_ci
884e5c31af7Sopenharmony_ci  --deqp-pipeline-default-size=<value>
885e5c31af7Sopenharmony_ci    Define default pipeline size (in bytes) to use (Vulkan SC only)
886e5c31af7Sopenharmony_ci	default: '16384'
887e5c31af7Sopenharmony_ci
888e5c31af7Sopenharmony_ci  --deqp-pipeline-compiler=<value>
889e5c31af7Sopenharmony_ci    Path to offline pipeline compiler (Vulkan SC only)
890e5c31af7Sopenharmony_ci    default: ''
891e5c31af7Sopenharmony_ci
892e5c31af7Sopenharmony_ci  --deqp-pipeline-dir=<value>
893e5c31af7Sopenharmony_ci    Offline pipeline data directory (Vulkan SC only)
894e5c31af7Sopenharmony_ci    default: ''
895e5c31af7Sopenharmony_ci
896e5c31af7Sopenharmony_ci  --deqp-pipeline-args=<value>
897e5c31af7Sopenharmony_ci    Additional compiler parameters (Vulkan SC only)
898e5c31af7Sopenharmony_ci    default: ''
899e5c31af7Sopenharmony_ci
900e5c31af7Sopenharmony_ci  --deqp-pipeline-file=<value>
901e5c31af7Sopenharmony_ci    Output file with pipeline cache (Vulkan SC only, do not use manually)
902e5c31af7Sopenharmony_ci    default: ''
903e5c31af7Sopenharmony_ci
904e5c31af7Sopenharmony_ci  --deqp-pipeline-logfile=<value>
905e5c31af7Sopenharmony_ci    Log file for pipeline compiler (Vulkan SC only, do not use manually)
906e5c31af7Sopenharmony_ci    default: ''
907e5c31af7Sopenharmony_ci
908e5c31af7Sopenharmony_ci  --deqp-pipeline-prefix=<value>
909e5c31af7Sopenharmony_ci    Prefix for input pipeline compiler files (Vulkan SC only, do not use manually)
910e5c31af7Sopenharmony_ci    default: ''
911e5c31af7Sopenharmony_ci
912e5c31af7Sopenharmony_ciFull list of parameters for the `vksc-server` application:
913e5c31af7Sopenharmony_ci
914e5c31af7Sopenharmony_ci  --port
915e5c31af7Sopenharmony_ci    Port
916e5c31af7Sopenharmony_ci    default: '59333'
917e5c31af7Sopenharmony_ci
918e5c31af7Sopenharmony_ci  --log
919e5c31af7Sopenharmony_ci    Log filename
920e5c31af7Sopenharmony_ci    default: 'dummy.log'
921e5c31af7Sopenharmony_ci
922e5c31af7Sopenharmony_ci  --pipeline-compiler
923e5c31af7Sopenharmony_ci    Path to offline pipeline compiler
924e5c31af7Sopenharmony_ci    default: ''
925e5c31af7Sopenharmony_ci
926e5c31af7Sopenharmony_ci  --pipeline-dir
927e5c31af7Sopenharmony_ci    Offline pipeline data directory
928e5c31af7Sopenharmony_ci    default: ''
929e5c31af7Sopenharmony_ci
930e5c31af7Sopenharmony_ci  --pipeline-file
931e5c31af7Sopenharmony_ci    Output file with pipeline cache
932e5c31af7Sopenharmony_ci    default: ''
933e5c31af7Sopenharmony_ci
934e5c31af7Sopenharmony_ci  --pipeline-log
935e5c31af7Sopenharmony_ci    Compiler log file
936e5c31af7Sopenharmony_ci    default: 'compiler.log'
937e5c31af7Sopenharmony_ci
938e5c31af7Sopenharmony_ci  --pipeline-args
939e5c31af7Sopenharmony_ci    Additional compiler parameters
940e5c31af7Sopenharmony_ci    default: ''
941