xref: /third_party/vk-gl-cts/README.md (revision e5c31af7)
1e5c31af7Sopenharmony_ciVK-GL-CTS README
2e5c31af7Sopenharmony_ci===========
3e5c31af7Sopenharmony_ci
4e5c31af7Sopenharmony_ciThis repository contains Khronos Conformance Testing Suite called VK-GL-CTS
5e5c31af7Sopenharmony_ciwhich originated from dEQP (drawElements Quality Program).
6e5c31af7Sopenharmony_ciVK-GL-CTS contains tests for several graphics APIs, including
7e5c31af7Sopenharmony_ciOpenGL, OpenGL ES, EGL, Vulkan, and Vulkan SC.
8e5c31af7Sopenharmony_ci
9e5c31af7Sopenharmony_ciDocumentation
10e5c31af7Sopenharmony_ci-------------
11e5c31af7Sopenharmony_ci
12e5c31af7Sopenharmony_ciUp-to-date documentation for VK-GL-CTS is available at:
13e5c31af7Sopenharmony_ci
14e5c31af7Sopenharmony_ci* [The VK-GL-CTS wiki for Khronos members](https://gitlab.khronos.org/Tracker/vk-gl-cts/wikis/home)
15e5c31af7Sopenharmony_ci* [The VK-GL-CTS wiki for non-Khronos members](https://github.com/KhronosGroup/VK-GL-CTS/wiki)
16e5c31af7Sopenharmony_ci
17e5c31af7Sopenharmony_ciThe .qpa logs generated by the conformance tests may contain embedded PNG images of the results.
18e5c31af7Sopenharmony_ciThese can be viewed with `scripts/qpa_image_viewer.html`, by opening the file
19e5c31af7Sopenharmony_ciwith a web browser and following its instructions, or using the
20e5c31af7Sopenharmony_ci[Cherry](https://android.googlesource.com/platform/external/cherry/)
21e5c31af7Sopenharmony_citool.
22e5c31af7Sopenharmony_ci
23e5c31af7Sopenharmony_ciKhronos Vulkan Conformance Tests
24e5c31af7Sopenharmony_ci--------------------------------
25e5c31af7Sopenharmony_ci
26e5c31af7Sopenharmony_ciThis repository includes Khronos Vulkan CTS under `external/vulkancts` directory.
27e5c31af7Sopenharmony_ciFor more information see [Vulkan CTS README](external/vulkancts/README.md).
28e5c31af7Sopenharmony_ci
29e5c31af7Sopenharmony_ciKhronos OpenGL / OpenGL ES Conformance Tests
30e5c31af7Sopenharmony_ci--------------------------------
31e5c31af7Sopenharmony_ci
32e5c31af7Sopenharmony_ciThis repository includes Khronos OpenGL / OpenGL ES CTS under `external/openglcts` directory.
33e5c31af7Sopenharmony_ciFor more information see [OpenGL / OpenGL ES CTS README](external/openglcts/README.md).
34e5c31af7Sopenharmony_ci
35e5c31af7Sopenharmony_ciSelecting a subset of targets to build by default
36e5c31af7Sopenharmony_ci--------------------------------
37e5c31af7Sopenharmony_ci
38e5c31af7Sopenharmony_ciWhen configuring the source code of VK-GL-CTS for running either Vulkan
39e5c31af7Sopenharmony_ciConformance Tests or OpenGL(ES) Conformance Tests as described above, CMake will
40e5c31af7Sopenharmony_cigenerate build files that, by default on desktop platforms, will build every
41e5c31af7Sopenharmony_cipossible project binary. This may be undesirable due the amount of time and disk
42e5c31af7Sopenharmony_cispace needed to perform the build.
43e5c31af7Sopenharmony_ci
44e5c31af7Sopenharmony_ciOne way of selecting only a subset of the targets to be built is using CMake's
45e5c31af7Sopenharmony_citarget selection mechanism. For example, the following command will only build
46e5c31af7Sopenharmony_ci`deqp-vk`, the main Vulkan Conformance Tests binary:
47e5c31af7Sopenharmony_ci
48e5c31af7Sopenharmony_ci```
49e5c31af7Sopenharmony_cicmake --build BUILD_DIRECTORY --target deqp-vk
50e5c31af7Sopenharmony_ci```
51e5c31af7Sopenharmony_ci
52e5c31af7Sopenharmony_ciWhen building only a subset of targets is the preferred default behavior for a
53e5c31af7Sopenharmony_cigiven working copy or build directory, there's a second target selection
54e5c31af7Sopenharmony_cimechanism that can be used to avoid passing the `--target` option every time:
55e5c31af7Sopenharmony_cithe `SELECTED_BUILD_TARGETS` CMake option. If set to a non-empty value, only the
56e5c31af7Sopenharmony_citargets listed in that configuration option, separated by spaces, will be built.
57e5c31af7Sopenharmony_ci
58e5c31af7Sopenharmony_ciFor example, passing `-DSELECTED_BUILD_TARGETS="deqp-vk deqp-vksc"` when
59e5c31af7Sopenharmony_ciconfiguring the project will make `cmake --build BUILD_DIRECTORY` act as if it
60e5c31af7Sopenharmony_cihad been passed `--target deqp-vk --target deqp-vksc` as additional arguments.
61e5c31af7Sopenharmony_ci
62e5c31af7Sopenharmony_ci**IMPORTANT**: Target subset selection may not have been thoroughly tested in
63e5c31af7Sopenharmony_ciall enviroments and situations, and it does not replace the instructions given
64e5c31af7Sopenharmony_cifor the purposes of creating a conformance submission.
65e5c31af7Sopenharmony_ci
66e5c31af7Sopenharmony_ciANGLE for Android
67e5c31af7Sopenharmony_ci--------------------------------
68e5c31af7Sopenharmony_ci
69e5c31af7Sopenharmony_ciANGLE can be built for Android by following the instructions
70e5c31af7Sopenharmony_ci[here](https://chromium.googlesource.com/angle/angle.git/+/HEAD/doc/DevSetup.md#building-angle-for-android).
71e5c31af7Sopenharmony_ci
72e5c31af7Sopenharmony_ciThe resulting ANGLE shared object libraries can be linked against and embedded into `dEQP.apk` with
73e5c31af7Sopenharmony_cithe `--angle-path` option.   This will cause `dEQP.apk` to use the ANGLE libraries for OpenGL ES
74e5c31af7Sopenharmony_cicalls, rather than the native drivers.
75e5c31af7Sopenharmony_ci
76e5c31af7Sopenharmony_ciAn ABI must be specified and the directory structure containing the ANGLE shared objects must match
77e5c31af7Sopenharmony_ciit so the build system can find the correct `*.so` files.
78e5c31af7Sopenharmony_ci
79e5c31af7Sopenharmony_ciAssuming ANGLE shared objects are generated into `~/chromium/src/out/Release/` and `dEQP.apk` will
80e5c31af7Sopenharmony_cibe generated with `--abis arm64-v8a`, issue the following commands:
81e5c31af7Sopenharmony_ci
82e5c31af7Sopenharmony_ci	cd ~/chromium/src/out/Release/
83e5c31af7Sopenharmony_ci	mkdir arm64-v8a && cd arm64-v8a
84e5c31af7Sopenharmony_ci	cp ../lib*_angle.so .
85e5c31af7Sopenharmony_ci
86e5c31af7Sopenharmony_ciThe `--angle-path ~/chromium/src/out/Release/` option can then be used to link against and embed the
87e5c31af7Sopenharmony_ciANGLE shared object files.   The full command would be:
88e5c31af7Sopenharmony_ci
89e5c31af7Sopenharmony_ci	python scripts/android/build_apk.py --sdk <path to Android SDK> --ndk <path to Android NDK> --abis arm64-v8a --angle-path ~/chromium/src/out/Release/
90