4 This document describes how to build and run Vulkan Conformance Test suite.
6 Vulkan CTS is built on dEQP framework. dEQP documentation is available
7 at http://source.android.com/devices/graphics/testing.html
14 * Git (for checking out sources)
15 * Python 2.7.x (all recent versions in 2.x should work, 3.x is not supported)
19 * Visual Studio 2013 or newer (glslang uses several C++11 features)
22 * Standard toolchain (make, gcc/clang)
26 * Android SDK with following packages:
32 * Windows: either NMake or JOM in PATH
38 To build dEQP, you need first to download sources for zlib, libpng, glslang,
41 To download sources, run:
43 $ python external/fetch_sources.py
45 You may need to re-run fetch_sources.py to update to the latest glslang and
46 spirv-tools revisions occasionally.
48 NOTE: glslang integration is not yet available on Android due to a toolchain
49 bug, so pre-compiled SPIR-V binaries must be used. See instructions below.
51 With CMake out-of-source builds are always recommended. Create a build directory
52 of your choosing, and in that directory generate Makefiles or IDE project
58 > cmake <path to vulkancts> -G"Visual Studio 12"
59 > start dEQP-Core-default.sln
64 > cmake <path to vulkancts> -G"Visual Studio 12 Win64"
65 > start dEQP-Core-default.sln
70 $ cmake <path to vulkancts> -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS=-m32 -DCMAKE_CXX_FLAGS=-m32
73 Release build can be done by using -DCMAKE_BUILD_TYPE=Release
78 $ cmake <path to vulkancts> -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS=-m64 -DCMAKE_CXX_FLAGS=-m64
84 Following command will build CTS into android/package/bin/dEQP-debug.apk.
86 $ python android/scripts/build.py
88 The package can be installed by either running:
90 $ python android/scripts/install.py
92 By default the CTS package will contain libdeqp.so built for armeabi-v7a, arm64-v8a,
93 and x86 ABIs, but that can be changed in android/scripts/common.py script.
95 To pick which ABI to use at install time, following commands must be used
98 $ adb install --abi <ABI name> android/package/bin/dEQP-debug.apk /data/local/tmp/dEQP-debug.apk
104 Current mustpass is checked into repository and can be found at:
106 external/vulkancts/mustpass/1.0.0/vk-default.txt
108 Vulkan CTS mustpass can be re-generated by running:
110 $ python <vulkancts>/external/vulkancts/build_mustpass.py
113 Pre-compiling SPIR-V binaries
114 -----------------------------
116 For distribution, and platforms that don't support GLSL to SPIR-V compilation,
117 SPIR-V binaries must be pre-built with following command:
119 $ python external/vulkancts/build_spirv_binaries.py
121 Binaries will be written to external/vulkancts/data/vulkan/prebuilt/.
123 Test modules (or in case of Android, the APK) must be re-built after building
124 SPIR-V programs in order for the binaries to be available.
130 Following command line options MUST be used when running CTS:
132 --deqp-caselist-file=<vulkancts>/external/vulkancts/mustpass/1.0.0/vk-default.txt
133 --deqp-log-images=disable
134 --deqp-log-shader-sources=disable
136 In addition on multi-device systems the device for which conformance is claimed
137 can be selected with:
139 --deqp-vk-device-id=<value>
141 No other command line options are allowed.
146 > cd <builddir>/external/vulkancts/modules/vulkan
147 > Debug/deqp-vk.exe --deqp-caselist-file=...
149 Test log will be written into TestResults.qpa
154 $ cd <builddir>/external/vulkancts/modules/vulkan
155 $ ./deqp-vk --deqp-vk-caselist-file=...
160 $ adb push <vulkancts>/external/vulkancts/mustpass/1.0.0/vk-default.txt /sdcard/vk-default.txt
165 $ 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"
167 Process can be followed by running:
171 Test log will be written into /sdcard/TestResults.qpa
174 Conformance Submission Package Requirements
175 -------------------------------------------
177 Conformance submission package must contain following:
179 1) Full test logs (TestResults.qpa) from CTS runs against all driver builds
180 2) Result of "git status" and "git log" from CTS source directory
181 3) Any patches used on top of release tag
182 4) Conformance statement
184 Test logs (1) should be named TestResults-<driver build type>.qpa, for example
185 TestResults-armeabi-v7a.qpa. On platforms where multiple different driver
186 builds (for example 64-bit and 32-bit) are present, CTS must be ran against
189 CTS build must always be done from clean git repository that doesn't have any
190 uncommitted changes. Thus it is necessary to run and capture output of "git
191 status" and "git log" (2) in the source directory:
193 git status > <submission pkg dir>/git-status.txt
194 git log <release tag>..HEAD > <submission pkg dir>/git-log.txt
196 Any changes made to CTS must be committed to the repository, and provided
197 as part of the submission package (3). This can be done by running:
199 git format-patch -o <submission pkg dir> <release tag>..HEAD
201 In general bugfixes and changes to platform-specific code (mostly under
202 framework/platform) are allowed.
204 Note: When cherry-picking patches on top of release tag, please use "git cherry-pick -x"
205 to include original commit hash in the commit message.
207 Conformance statement (4) must be included in a file called STATEMENT-<adopter>
208 and must contain following:
210 CONFORM_VERSION: <git tag of CTS release>
211 PRODUCT: <string-value>
215 Note that product/cpu/os information is also captured in dEQP-VK.info.* tests
216 if vk::Platform::describePlatform() is implemented.
222 Conformance run is considered passing if all tests finish with allowed result
223 codes. The test results are contained in the TestResults.qpa log. Each
224 test case section contains XML tag Result, for example:
226 <Result StatusCode="Pass">Not validated</Result>
228 The result code is the value of the StatusCode attribute. Following status
231 Pass, NotSupported, QualityWarning, CompatibilityWarning
233 TODO: Create script for verifying logs.
239 Vulkan support from Platform implementation requires providing
240 getVulkanPlatform() method in tcu::Platform class implementation.
242 See framework/common/tcuPlatform.hpp and examples in
243 framework/platform/win32/tcuWin32Platform.cpp and
244 framework/platform/android/tcuAndroidPlatform.cpp.
250 For testing and development purposes it might be useful to be able to run
251 tests on dummy Vulkan implementation. One such implementation is provided in
252 vkNullDriver.cpp. To use that, implement vk::Platform::createLibrary() with
253 vk::createNullDriver().
259 Vulkan test module can be used with Cherry (GUI for test execution and
260 analysis). Cherry is available at
261 https://android.googlesource.com/platform/external/cherry. Please follow
262 instructions in README to get started.
264 To enable support for Vulkan tests, dEQP-VK module must be added to list of
267 In cherry/testrunner.go, add following line to testPackageDescriptors list
268 (line 608 in NewTestRunner function):
270 {"dEQP-VK", "deqp-vk", "../external/vulkancts/modules/vulkan", dataDir + "dEQP-VK-cases.xml"},
272 Before first launch, and every time test hierarchy has been modified, test
273 case list must be refreshed by running:
275 $ python scripts/build_caselists.py path/to/cherry/data
277 Cherry must be restarted for the case list update to take effect.