am 97d73d61: (-s ours) am dadf7db4: Remove tests infeasible for M. am: f02e6a9a2b...
[platform/upstream/VK-GL-CTS.git] / external / vulkancts / README.md
1 Vulkan CTS README
2 =================
3
4 This document describes how to build and run Vulkan Conformance Test suite.
5
6 Vulkan CTS is built on dEQP framework. General dEQP documentation is available
7 at http://source.android.com/devices/graphics/testing.html
8
9
10 Requirements
11 ------------
12
13 Common:
14  * Git (for checking out sources)
15  * Python 2.7.x (all recent versions in 2.x should work, 3.x is not supported)
16  * CMake 2.8 or newer
17
18 Win32:
19  * Visual Studio 2013 (glslang uses several C++11 features)
20
21 Linux:
22  * Standard toolchain (make, gcc/clang)
23
24
25 Building
26 --------
27
28 To build dEQP, you need first to download sources for zlib, libpng, glslang,
29 and spirv-tools.
30
31 To download sources, run:
32
33 $ python external/fetch_sources.py
34
35 You may need to re-run fetch_sources.py to update to the latest glslang and
36 spirv-tools revisions occasionally.
37
38 NOTE: glslang integration is not yet available on Android due to a toolchain
39 bug, so pre-compiled SPIR-V binaries must be used. See instructions below.
40
41
42 Running
43 -------
44
45 Win32:
46
47 > cd builddir/external/vulkancts/modules/vulkan
48 > Debug/deqp-vk.exe
49
50 Linux:
51
52 $ cd builddir/external/vulkancts/modules/vulkan
53 $ ./deqp-vk
54
55 Android:
56
57 Using Cherry is recommended. Alternatively you can follow instructions at
58 http://source.android.com/devices/graphics/run-tests.html
59
60
61 Pre-compiling SPIR-V binaries
62 -----------------------------
63
64 For distribution, and platforms that don't support GLSL to SPIR-V compilation,
65 SPIR-V binaries must be pre-built with following command:
66
67 $ python external/vulkancts/build_spirv_binaries.py
68
69 Binaries will be written to external/vulkancts/data/vulkan/prebuilt/.
70
71 Test modules (or in case of Android, the APK) must be re-built after building
72 SPIR-V programs in order for the binaries to be available.
73
74
75 Vulkan platform port
76 --------------------
77
78 Vulkan support from Platform implementation requires providing
79 getVulkanPlatform() method in tcu::Platform class implementation.
80
81 See framework/common/tcuPlatform.hpp and examples in
82 framework/platform/win32/tcuWin32Platform.cpp and
83 framework/platform/android/tcuAndroidPlatform.cpp.
84
85
86 Null (dummy) driver
87 -------------------
88
89 For testing and development purposes it might be useful to be able to run
90 tests on dummy Vulkan implementation. One such implementation is provided in
91 vkNullDriver.cpp. To use that, implement vk::Platform::createLibrary() with
92 vk::createNullDriver().
93
94
95 Cherry GUI
96 ----------
97
98 Vulkan test module can be used with Cherry (GUI for test execution and
99 analysis). Cherry is available at
100 https://android.googlesource.com/platform/external/cherry. Please follow
101 instructions in README to get started.
102
103 To enable support for Vulkan tests, dEQP-VK module must be added to list of
104 test packages.
105
106 In cherry/testrunner.go, add following line to testPackageDescriptors list
107 (line 608 in NewTestRunner function):
108
109 {"dEQP-VK", "deqp-vk", "../external/vulkancts/modules/vulkan", dataDir + "dEQP-VK-cases.xml"},
110
111 Before first launch, and every time test hierarchy has been modified, test
112 case list must be refreshed by running:
113
114 $ python scripts/build_caselists.py path/to/cherry/data
115
116 Cherry must be restarted for the case list update to take effect.