1OpenGL and OpenGL ES 2.0/3.X Conformance Test Instructions 2================= 3 4This document describes how to build, port, and run the OpenGL and OpenGL ES 52.0/3.X conformance tests, and how to verify and submit test results. 6 7The Conformance Tests are built on the dEQP framework. 8Up-to-date documentation for dEQP is available at: 9 10* [The VK-GL-CTS wiki for Khronos members](https://gitlab.khronos.org/Tracker/vk-gl-cts/wikis/home) 11* [The VK-GL-CTS wiki for non-Khronos members](https://github.com/KhronosGroup/VK-GL-CTS/wiki) 12 13 14Contents 15------------------------ 16- [OpenGL and OpenGL ES 2.0/3.X Conformance Test Instructions](#opengl-and-opengl-es-203x-conformance-test-instructions) 17 - [Contents](#contents) 18 - [Test History](#test-history) 19 - [Introduction](#introduction) 20 - [Test Environment Requirements](#test-environment-requirements) 21 - [Configuring and Building the Tests](#configuring-and-building-the-tests) 22 - [Configuration](#configuration) 23 - [Building the Tests](#building-the-tests) 24 - [Windows](#windows) 25 - [Linux](#linux) 26 - [Android](#android) 27 - [Porting](#porting) 28 - [Common Porting Changes](#common-porting-changes) 29 - [Other Allowable Changes](#other-allowable-changes) 30 - [Running the Tests](#running-the-tests) 31 - [Conformance runs](#conformance-runs) 32 - [Linux and Windows](#linux-and-windows) 33 - [Android](#android-1) 34 - [Running Subsets](#running-subsets) 35 - [Command line options](#command-line-options) 36 - [Understanding the Results](#understanding-the-results) 37 - [Test Logs](#test-logs) 38 - [Debugging Test Failures](#debugging-test-failures) 39 - [Waivers](#waivers) 40 - [Creating a Submission Package](#creating-a-submission-package) 41 - [Submission Update Package](#submission-update-package) 42 - [Passing Criteria](#passing-criteria) 43 - [Troubleshooting](#troubleshooting) 44 - [Crashes early on in the run](#crashes-early-on-in-the-run) 45 - [Build fails](#build-fails) 46 - [Adding new tests](#adding-new-tests) 47 - [Acknowledgments](#acknowledgments) 48 - [Revision History](#revision-history) 49 50Test History 51------------------------ 52The OpenGL and OpenGL ES Conformance Tests are expanded versions of the 53OpenGL ES 2.x Conformance Test. Much of the development was done by Symbio, Inc. 54under a contract with The Khronos Group. drawElements donated a considerable 55number of new tests and a new execution framework for version 1.1. 56The tests are built from the same source code base, although some individual 57feature tests are specific to OpenGL or OpenGL ES and their specification 58versions, and compilation options differing between OpenGL and OpenGL ES affect 59how the tests are compiled and executed in some cases. 60 61Introduction 62------------------------ 63 64This document contains instructions for certifying conformance of implementations 65of the OpenGL and OpenGL ES APIs. The steps of the process are as follows: 66 671. Configure the conformance tests and port them to your platform. 682. Build a test executable and run it against your implementation to produce 69result logs. 703. Debug any test failures and modify your implementation as needed until it 71passes the test. 724. Create a Submission Package containing your final result logs and other 73documents describing the tested platform. 745. Submit the results to the appropriate Review Committee via the 75Khronos Adopters web page. The Committee will examine your submission and will 76notify you within thirty days if they find any issues requiring action on your part. 77 78This document describes each of these steps in detail. It also provides advice 79on reproducing, understanding, and debugging test failures, and discusses how 80to extend or modify the tests and the test framework. 81 82The reader is assumed to be a fluent programmer experienced with command line 83utilities and build tools, such as CMake or Make. 84 85Test Environment Requirements 86------------------------ 87 88The conformance tests require a file system. The file system requires support 89for long file names (i.e. > 8.3 name format). Source files in the conformance 90tests use mixed case file names. When the `--verbose` option is used, rendered 91images and test case shaders are copied to the log files. This can lead to quite 92large log files, up to hundreds of megabytes on disk. 93 94Each execution of the conformance test writes a text-format results log to a disk. 95You will need to include this log as part of your conformance submission package. 96 97The conformance test executable can be large. Compiler options and CPU instruction 98sets can cause substantial variation. The disk space required for the build 99including all the temporary files can be up to 400MB. 100 101The build environment is expected to support C++ with exceptions and 102the Standard Template Library (STL). 103 104Configuring and Building the Tests 105------------------------ 106The CTS is built via CMake build system. The requirements for the build are as follows: 107- CMake 3.20.0 or newer 108- C++ compiler with STL and exceptions support 109- Unix: Make + GCC / Clang 110- Windows: Visual Studio or Windows SDK (available free-of-charge) 111- Android: Android SDK and NDK for host platform 112 113The build is controlled by the file CMakeLists.txt found at the root of 114the CTS source. 115 116If the platform and compiler tools you use are not supported, you may be able to 117add support for that platform and tools to the build system. If you do this, 118please submit your changes back to Khronos for inclusion in the official tests 119going forward. 120 121Otherwise, if you choose not to use the supplied Makefiles, you must construct 122an equivalent build system for the chosen development environment(s). 123 124### Configuration 125 126The build is configured by using `CMakeLists.txt` files in the build target 127directory (`targets/`). They specify platform-specific configuration, including 128include paths and link libraries. 129 130The main `CMakeLists.txt` includes the target file based on the `DEQP_TARGET` 131variable. For example `-DDEQP_TARGET=my_target` will use the target description 132file `targets/my_target/my_target.cmake`. 133 134See the main `CMakeLists.txt` file for the description of the variables that 135the target file can set. 136 137Porting to a new platform includes either creating a new target file, or 138modifying an existing target description. 139 140**NOTE**: All paths, except `TCUTIL_PLATFORM_SRCS` are relative to root source 141directory. `TCUTIL_PLATFORM_SRCS` is relative to `framework/platform` directory. 142 143Following target files are provided with the package: 144 145| Name | Description | 146|:---------|-----------------| 147|android | Used in Android build. Requires use of suitable toolchain file (see `cmake/` directory) | 148|default| Checks for presence of GL, ES2, ES3, and EGL libraries and headers in default search paths and configures build accordingly| 149|null | Null build target | 150|nullws | NullWS build target | 151|x11_egl| X11 build for platforms with native EGL support| 152|x11_glx| X11 build for platforms with native GLX support| 153|x11_egl_glx| X11 build for platforms with native EGL/GLX support| 154 155**Example target file (targets/null/null.cmake):** 156``` 157message("*** Using null context target") 158 159set(DEQP_TARGET_NAME "Null") 160 161set(TCUTIL_PLATFORM_SRCS 162 null/tcuNullPlatform.cpp 163 null/tcuNullPlatform.hpp 164 null/tcuNullRenderContext.cpp 165 null/tcuNullRenderContext.hpp 166 null/tcuNullContextFactory.cpp 167 null/tcuNullContextFactory.hpp 168 ) 169``` 170 171**Common configuration variables and their default values in CMake syntax:** 172 173- Target name 174``` 175set(DEQP_TARGET_NAME "UNKNOWN") 176``` 177 178- List of link libraries per API. If no libraries are specified, entry points 179are loaded at run-time by default for OpenGL ES APIs. EGL always requires link 180libraries. OpenGL always uses run-time loading. 181``` 182set(DEQP_GLES2_LIBRARIES ) 183set(DEQP_GLES3_LIBRARIES ) 184set(DEQP_GLES31_LIBRARIES ) 185set(DEQP_GLES32_LIBRARIES ) 186set(DEQP_EGL_LIBRARIES ) 187set(DEQP_OPENGL_LIBRARIES ) 188``` 189 190- Generic platform libraries required to link a working OpenGL (ES) Application 191(e.g. X11 libraries on Unix/X11) 192``` 193set(DEQP_PLATFORM_LIBRARIES ) 194``` 195 196- Libraries / binaries that need to be copied to the build target dir 197``` 198set(DEQP_PLATFORM_COPY_LIBRARIES ) 199``` 200 201- If running on Linux using X11 for creating windows etc., enable this. 202``` 203set(DEQP_USE_X11 OFF) 204``` 205 206- Embed the test files in the test Before building with this set (if GTF module is present), run these commands: 207``` 208cd external/kc-cts/src/GTF_ES/glsl/GTF 209perl mergeTestFilesToCSource.pl 210``` 211 212 In your target `.cmake` file add 213``` 214set(DEQP_EMBED_TESTS ON) 215add_definitions(-DHKEMBEDDEDFILESYSTEM) 216``` 217 218### Building the Tests 219 220To build the framework, you need first to download sources for zlib, libpng, glslang, 221spirv-headers, and spirv-tools. 222 223To download sources, run: 224 225 python external/fetch_sources.py 226 227For OpenGL CTS releases, and OpenGL ES CTS releases prior to opengl-es-cts-3.2.4.0 228download Khronos Confidential Conformance Test Suite: 229 230 python external/fetch_kc_cts.py 231 232For OpenGL CTS releases, and OpenGL ES CTS releases prior to opengl-es-cts-3.2.4.0 233the results for the tests included in this suite must be included in a 234conformance submission. 235 236**NOTE**: You need to be a Khronos Adopter and have an active account 237at [Khronos Gitlab](https://gitlab.khronos.org/) to be able to download 238Khronos Confidential CTS. 239It is possible to run and build the CTS without the Khronos Confidential CTS. 240For OpenGL CTS releases, and OpenGL ES CTS releases prior to opengl-es-cts-3.2.4.0 241Khronos Confidential CTS is mandatory if you plan to make a 242conformance submission (see [Creating a Submission Package](#creating-a-submission-package)). 243For opengl-es-cts-3.2.4.0 and later OpenGL ES CTS releases Khronos Confidential CTS 244results must not be included in a submission package. 245 246 247With CMake out-of-source builds are always recommended. Create a build directory 248of your choosing, and in that directory generate Makefiles or IDE project 249using Cmake. 250 251#### Windows 252 253Requirements: 254- Visual Studio (2015 or newer recommended) or Windows SDK 255- For GL/ES2/ES3.x tests: OpengGL, OpenGL ES 2 or ES 3.x libraries and headers 256 257To choose the backend build system for CMake, choose one of the following Generator Names for the 258command line examples in the next steps: 259- VS2015: "Visual Studio 14" 260- NMake (must be run in VS or SDK command prompt): "NMake Makefiles" 261 262Building GL, ES2, or ES3.x conformance tests: 263 264 cmake <path to VK-GL-CTS> -DDEQP_TARGET=default -G"<Generator Name>" 265 cmake --build external/openglcts 266 267Khronos Confidential CTS doesn't support run-time selection of API context. 268If you intend to run it you need to additionally supply `GLCTS_GTF_TARGET` 269option to you cmake command, e.g.: 270 271 cmake <path to VK-GL-CTS> -DDEQP_TARGET=default -DGLCTS_GTF_TARGET=<target> -G"<Generator Name>" 272 273Available `<target>`s are `gles2`, `gles3`, `gles31`, `gles32`, and `gl`. 274The default `<target>` is `gles32`. 275 276It's also possible to build `GL-CTS.sln` in Visual Studio instead of running 277the `cmake --build external/openglcts` command. 278 279**NOTE**: Do not create the build directory under the source directory 280(i.e anywhere under `<path to VK-GL-CTS>`) on Windows, since it causes 281random build failures when copying data files around. 282 283**NOTE**: You can use the CMake for Windows GUI to do configuration and project 284file generation. 285 286**NOTE**: If using cygwin, you must install and ensure you use the Windows 287version of cmake. The cygwin vesion does not contain the Visual Studio 288generators. Here is a shell function you can put in your cygwin `.bash_profile` 289to use it easily. With this you can simply type `wcmake` to run the Windows version. 290 291``` 292function wcmake () { 293 (TMP=$tmp TEMP=$temp; unset tmp; unset temp; "C:/Program Files (x86)/CMake 2.8/bin/cmake" "$@") 294} 295``` 296 297#### Linux 298 299Required tools: 300- Standard build utilities (make, gcc, etc.) 301- Necessary API libraries (OpenGL, GLES, EGL depending on configuration) 302 303Building ES2 or ES3.x conformance tests: 304 305 cmake <path to VK-GL-CTS> -DDEQP_TARGET=null -DGLCTS_GTF_TARGET=gles32 306 cmake --build external/openglcts 307 308Building OpenGL conformance tests: 309 310 cmake <path to VK-GL-CTS> -DDEQP_TARGET=null -DGLCTS_GTF_TARGET=gl 311 cmake --build external/openglcts 312 313Khronos Confidential CTS doesn't support run-time selection of API context. 314If you intend to run it then the `GLCTS_GTF_TARGET` option is necessary. 315 316Available values for `GLCTS_GTF_TARGET` are `gles2`, `gles3`, `gles31`, `gles32`, and `gl`. 317The default value is `gles32`. 318 319CMake chooses to generate Makefiles by default. Other generators can be used 320as well. See CMake help for more details. 321 322#### Android 323 324The conformance tests come with native Android support. The following packages 325are needed in order to build an Android binary: 326- Python 3.x (for the build related scripts, some other scripts still use Python 2.7.x) 327- Android NDK r17c 328- Android SDK with API 28 packages and tools installed 329- Apache Ant 330 331An Android binary (for ES 3.2) can be built using command: 332 333 python scripts/android/build_apk.py --target=openglcts --sdk <path to Android SDK> --ndk <path to Android NDK> 334 335By default the CTS package will be built for the Android API level 28. 336Another API level may be supplied using --native-api command line option. 337 338If Khronos Confidential CTS is present then the script will set `GLCTS_GTF_TARGET` 339to `gles32` by default. 340It is possible to specify a different `GLCTS_GTF_TARGET` target by invoking the script 341with the `--kc-cts-target` option, e.g.: 342 343 python scripts/android/build_apk.py --target=openglcts --kc-cts-target=gles31 --sdk <path to Android SDK> --ndk <path to Android NDK> 344 345Available values for `--kc-cts-target` are `gles32`, `gles31`, `gles3`, `gles2` and `gl`. 346 347The package can be installed by either running: 348 349 python scripts/android/install_apk.py --target=openglcts 350 351By default the CTS package will contain libdeqp.so built for `armeabi-v7a`, `arm64-v8a`, 352`x86`, and `x86_64` ABIs, but that can be changed with `--abis` command line option. 353 354To pick which ABI to use at install time, following commands must be used 355instead: 356 357 adb install -g --abi <ABI name> <build root>/Khronos-CTS.apk /data/local/tmp/Khronos-CTS.apk 358 359Porting 360------------------------ 361The Conformance Tests have been designed to be relatively platform-, OS-, and 362compiler-independent. Adopters are responsible for final changes needed to allow 363the Test to run on the platform they wish to 364certify as conformant. 365 366### Common Porting Changes 367 368Porting the dEQP framework requires implementation of either `glu::Platform` or, 369on platforms supporting EGL, the `tcu::EglPlatform` interface. The porting layer 370API is described in detail in following files: 371 372 framework/common/tcuPlatform.hpp 373 framework/opengl/gluPlatform.hpp 374 framework/egl/egluPlatform.hpp 375 framework/platform/tcuMain.cpp 376 377This version of the dEQP framework includes ports for Windows (both EGL and WGL), 378X11 (EGL and XGL), and Android. 379 380Base portability libraries in `framework/delibs` seldom need changes. However, 381introducing support for a new compiler or a new processor family may require 382some changes to correctly detect and parameterize the environment. 383 384Porting typically involves three types of changes: 3851. Changes to the make system used to generate the test executable. 3862. Changes needed to adapt the test executable to the operating system used on the platform. 3873. Changes to the platform specific GL and EGL header files. 388 389Changes should normally be confined to build files (CMake or Python) or source 390files (.c, .h, .cpp, and .h files) in the following directories or their 391subdirectories: 392- `framework/platform` 393- `targets` 394 395If you find that you must change other source (.c, .cpp, .h, or .hpp) files, 396you will need to file a waiver as described below. 397 398Note that the conformance tests assume that the implementation supports EGL. 399However EGL is not required for OpenGL or OpenGL ES conformance. 400 401Most of the tests require at least 256x256 pixels resolution in order to run properly 402and produce stable results. It is, therefore, important to ensure that a port to a 403new platform can support surfaces that fulfill width and height requirements. 404 405### Other Allowable Changes 406 407Changes to fix bugs in the conformance test are allowed. A bug in the conformance 408test is a behavior which causes clearly incorrect execution (e.g., hanging, crashing, 409or memory corruption), OR which requires behavior which contradicts or exceeds 410the requirements of the relevant OpenGL or OpenGL ES Specification. Before 411being used for a submission, bugfixes must be accepted and merged into 412the CTS repository. `git cherry-pick` is strongly recommended as a method of 413applying bug fixes. 414 415Other changes must be accompanied by a [waiver](#waivers). 416 417NOTE: When cherry-picking patches on top of release tag, please use `git cherry-pick -x` 418to include original commit hash in the commit message. 419 420Running the Tests 421------------------------ 422All the following commands need to be run in the CTS build directory. If you 423need to move the binaries from the build directory, remember to copy the 424data directories named `gl_cts`, `gles2`, `gles3`, and `gles31` and its subdirectories 425from the build directory to the test target in the same relative locations. 426 427If the build instructions have been followed as-is, the correct path is: 428 429 cd <builddir>/external/openglcts/modules 430 431### Conformance runs 432A conformance run can be launched either by running the `cts-runner` binary with 433appropriate options on Linux/Windows or by running an Android application. 434 435### Linux and Windows 436Conformance run for OpenGL ES 3.2 on Windows: 437 438 Debug/cts-runner.exe --type=es32 439 [For ES 3.1 use --type=es31; ES 3.0 use --type=es3; for ES 2.0, use --type=es2] 440 441Conformance run for OpenGL 3.0 - 4.6 on Windows: 442 443 Debug/cts-runner.exe --type=glxy 444 [x and y are the major and minor specifiction versions] 445 446Full list of parameters for the `cts-runner` binary: 447``` 448--type=[esN[M]|glNM] Conformance test run type. Choose from 449 ES: es2, es3, es31, es32 450 GL: gl30, gl31, gl32, gl33, gl40, gl41, gl42, gl43, gl44, gl45, gl46 451--waivers=[path] Path to xml file containing waived tests 452--logdir=[path] Destination directory for log files 453--summary Print summary without running the tests 454--verbose Print out and log more information 455``` 456 457The conformance run will create one or more `.qpa` files per tested config, a 458summary `.qpa` file containing run results and a summary `.xml` file containing 459command line options for each run, all of which should be included in your 460conformance submission package. The final verdict will be printed out at 461the end of run. 462 463Sometimes it is useful to know the command line options used for the conformance 464before the run completed. Full conformance run configuration is written 465to `cts-run-summary.xml` and this file can be generated by adding `--summary` 466parameter. 467 468By default the `cts-runner` does not include result images or shaders used in 469the logs. Adding parameter `--verbose` will cause them to be included in 470the logs. Images will be embedded as PNG data into the`.qpa` log files. 471See Section [Test Logs](#test-logs) for instructions on how to view the images. 472 473To direct logs to a directory, add `--logdir=[path]` parameter. 474 475To specify waived tests, add `--waivers=[path]` parameter. 476 477**NOTE**: Due to the lack of support for run-time selection of API context in the 478Khronos Confidential CTS, a conformance run may fail if it is executed for an API 479version that doesn't match the `GLCTS_GTF_TARGET` value used during the build step. 480 481#### Android 482 483Once the CTS binary is built and installed on the device, a new application 484called `ES3.2 CTS`, `ES3.1 CTS`, `ES3 CTS`, `ES2 CTS`, `GL4.5 CTS`, or `GL4.6 CTS` 485(depending on the test version you built) should appear in the launcher. 486Conformance test runs can be done by launching the applications. 487 488Alternatively it is possible to start a conformance run from the command line, 489for example to launch a GLES 3.2 conformance run use: 490 491 am start -n org.khronos.gl_cts/org.khronos.cts.ES32Activity -e logdir "/sdcard/logs" 492 493For GLES 2.0, GLES 3.0, GLES 3.1, GL 4.5, or GL 4.6 conformance runs, substitute 494the following activity name (respectively) ES2Activity, ES3Activity, ES31Activity, 495GL45Activity, or GL46Activity. 496 497Test logs will be written to `/sdcard` by default. The log path can be 498customized by supplying a `logdir` string extra in launch intent. Verbose mode 499can be enabled by supplying a `verbose` = `"true"` string extra. See 500the following example: 501 502 am start -n org.khronos.gl_cts/org.khronos.cts.ES32Activity -e logdir "/sdcard/logs" -e verbose "true" 503 504Conformance run configuration can be generated by supplying a `summary` = `"true"` 505string extra. See the following example: 506 507 am start -n org.khronos.gl_cts/org.khronos.cts.ES32Activity -e logdir "/sdcard/logs" -e summary "true" 508 509Waivers can be specified by supplying a `waivers` string extra. See the following example: 510 511 am start -n org.khronos.gl_cts/org.khronos.cts.ES32Activity -e logdir "/sdcard/logs" -e waivers "/sdcard/waivers.xml" 512 513**NOTE**: Supplying a `summary` = `"true"` string extra will result in the `cts-run-summary.xml` file 514being written out but no tests will be executed. 515 516Individual tests can be launched as well by targeting 517`org.khronos.gl_cts/android.app.NativeActivity` activity. Command line 518arguments must be supplied in a `cmdLine` string extra. See following example: 519 520 am start -n org.khronos.gl_cts/android.app.NativeActivity -e cmdLine "cts --deqp-case=KHR-GLES32.info.version --deqp-gl-config-id=1 --deqp-log-filename=/sdcard/ES32-egl-config-1.qpa --deqp-surface-width=128 --deqp-surface-height=128" 521 522In addition to the detailed `*.qpa` output files, the Android port of the CTS 523logs a summary of the test run, including the pass/fail status of each test. 524This summary can be viewed using the Android *logcat* utility. 525 526See Section [Running Subsets](#running-subsets) below for details on command 527line parameters. 528 529### Running Subsets 530 531Run shader compiler loop test cases from the OpenGL ES 3.0 CTS using EGL config with ID 3: 532 533 Debug/glcts.exe --deqp-case=KHR-GLES3.shaders.loops.* --deqp-gl-config-id=3 534 535Note that the GL context version is determined by the case name. `KHR-GLES3` in 536the example above selects OpenGL ES 3.0. The command to run the same test 537against OpenGL version 4.1 is: 538 539 Debug/glcts.exe --deqp-case=GL41-CTS.shaders.loops.* --deqp-gl-config-id=3 540 541To list available test cases (writes out `*-cases.txt` files per module), run: 542 543 Debug/glcts.exe --deqp-runmode=txt-caselist 544 545The type of the run for cts-runner chooses a specific list of test cases to 546be run. The selected tests can be checked from the summary logs. To run 547the same tests, just give equivalent test selection parameters to the `glcts`. 548 549#### Command line options 550 551Full list of parameters for the `glcts` binary: 552``` 553 -h, --help 554 Show this help 555 556 -n, --deqp-case=<value> 557 Test case(s) to run, supports wildcards (e.g. dEQP-GLES2.info.*) 558 559 --deqp-caselist=<value> 560 Case list to run in trie format (e.g. {dEQP-GLES2{info{version,renderer}}}) 561 562 --deqp-caselist-file=<value> 563 Read case list (in trie format) from given file 564 565 --deqp-caselist-resource=<value> 566 Read case list (in trie format) from given file located application's assets 567 568 --deqp-stdin-caselist 569 Read case list (in trie format) from stdin 570 571 --deqp-log-filename=<value> 572 Write test results to given file 573 default: 'TestResults.qpa' 574 575 --deqp-runmode=[execute|xml-caselist|txt-caselist|stdout-caselist] 576 Execute tests, or write list of test cases into a file 577 default: 'execute' 578 579 --deqp-caselist-export-file=<value> 580 Set the target file name pattern for caselist export 581 default: '${packageName}-cases.${typeExtension}' 582 583 --deqp-watchdog=[enable|disable] 584 Enable test watchdog 585 default: 'disable' 586 587 --deqp-crashhandler=[enable|disable] 588 Enable crash handling 589 default: 'disable' 590 591 --deqp-base-seed=<value> 592 Base seed for test cases that use randomization 593 default: '0' 594 595 --deqp-test-iteration-count=<value> 596 Iteration count for cases that support variable number of iterations 597 default: '0' 598 599 --deqp-visibility=[windowed|fullscreen|hidden] 600 Default test window visibility 601 default: 'windowed' 602 603 --deqp-surface-width=<value> 604 Use given surface width if possible 605 default: '-1' 606 607 --deqp-surface-height=<value> 608 Use given surface height if possible 609 default: '-1' 610 611 --deqp-surface-type=[window|pixmap|pbuffer|fbo] 612 Use given surface type 613 default: 'window' 614 615 --deqp-screen-rotation=[unspecified|0|90|180|270] 616 Screen rotation for platforms that support it 617 default: '0' 618 619 --deqp-gl-context-type=<value> 620 OpenGL context type for platforms that support multiple 621 622 --deqp-gl-config-id=<value> 623 OpenGL (ES) render config ID (EGL config id on EGL platforms) 624 default: '-1' 625 626 --deqp-gl-config-name=<value> 627 Symbolic OpenGL (ES) render config name 628 629 --deqp-gl-context-flags=<value> 630 OpenGL context flags (comma-separated, supports debug and robust) 631 632 --deqp-cl-platform-id=<value> 633 Execute tests on given OpenCL platform (IDs start from 1) 634 default: '1' 635 636 --deqp-cl-device-ids=<value> 637 Execute tests on given CL devices (comma-separated, IDs start from 1) 638 default: '' 639 640 --deqp-cl-build-options=<value> 641 Extra build options for OpenCL compiler 642 643 --deqp-egl-display-type=<value> 644 EGL native display type 645 646 --deqp-egl-window-type=<value> 647 EGL native window type 648 649 --deqp-egl-pixmap-type=<value> 650 EGL native pixmap type 651 652 --deqp-log-images=[enable|disable] 653 Enable or disable logging of result images 654 default: 'enable' 655 656 --deqp-log-shader-sources=[enable|disable] 657 Enable or disable logging of shader sources 658 default: 'enable' 659 660 --deqp-test-oom=[enable|disable] 661 Run tests that exhaust memory on purpose 662 default: 'enable' 663 664 --deqp-archive-dir=<value> 665 Path to test resource files 666 default: '.' 667 668 --deqp-log-flush=[enable|disable] 669 Enable or disable log file fflush 670 default: 'enable' 671 672 --deqp-log-compact=[enable|disable] 673 Enable or disable the compact version of the log 674 default: 'disable' 675 676 --deqp-renderdoc=[enable|disable] 677 Enable RenderDoc frame markers 678 default: 'disable' 679 680 --deqp-fraction=<value> 681 Run a fraction of the test cases (e.g. N,M means run group%M==N) 682 default: '' 683 684 --deqp-fraction-mandatory-caselist-file=<value> 685 Case list file that must be run for each fraction 686 default: '' 687 688 --deqp-waiver-file=<value> 689 Read waived tests from given file 690 default: '' 691 692 --deqp-runner-type=[any|none|amber] 693 Filter test cases based on runner 694 default: 'any' 695 696 --deqp-terminate-on-fail=[enable|disable] 697 Terminate the run on first failure 698 default: 'disable' 699 700 --deqp-egl-config-id=<value> 701 Legacy name for --deqp-gl-config-id 702 default: '-1' 703 704 --deqp-egl-config-name=<value> 705 Legacy name for --deqp-gl-config-name 706 707 --deqp-waiver-file=<value> 708 Path to xml file containing waived tests 709``` 710 711### Understanding the Results 712 713At the end of a completed test run, a file called `cts-run-summary.xml` is 714generated. It will contain summaries per configuration and the full command 715lines for the `glcts` application 716(See Section [Running Subsets](#running-subsets)) for debugging purposes. 717Additionally, a summary string similar to one below is printed: 718``` 7194/4 sessions passed, conformance test PASSED 720``` 721 722If the run fails, the message will say `FAILED` instead of `PASSED`. Under 723Linux or Windows, this string is printed to stdout if available. Under Android, 724it is emitted to the Android logging system for access via *logcat*. 725 726Each test case will be logged into the `.qpa` files in XML. Below is a minimal 727example of a test case log. The Result element contains the final verdict in 728the `StatusCode` attribute. Passing cases will have `Pass` and failing cases 729`Fail`. Other results such as `QualityWarning`, `CompatibilityWarning`, 730`NotSupported` or `ResourceError` are possible. Only `Fail` status will count 731as failure for conformance purposes. 732``` 733<TestCaseResult Version="0.3.2" CasePath="ES2-CTS.info.vendor" CaseType="SelfValidate"> 734 <Text>Vendor A</Text> 735 <Result StatusCode="Pass">Pass</Result> 736</TestCaseResult> 737``` 738 739If the failure count is zero for all config sequences, the implementation 740passes the test. Note that in addition to a successful test result, 741a Submission Package must satisfy the conditions specified below under 742[Passing Criteria](#passing-criteria) in order to achieve conformance certification. 743 744### Test Logs 745 746The CTS writes test logs in XML encapsulated in a simple plain-text container 747format. Each tested configuration listed in `cts-run-summary.xml` 748 749To analyse and process the log files, run the following scripts 750- `verify_submission.py` located in [VK-GL-CTS-Tools](https://github.com/KhronosGroup/VK-GL-CTS-Tools): Script that verifies logs based on `cts-run-summary.xml` file. 751- `scripts/log/log_to_csv.py`: This utility converts `.qpa` log into CSV format. This is 752useful for importing results into other systems. 753- `scripts/log/log_to_xml.py`: Converts `.qpa` into well-formed XML document. The document 754can be then viewed in browser using the testlog.{xsl,css} files. 755 756Some browsers, like Chrome, limit local file access. In such case, the files 757must be accessed over HTTP. Python comes with a simple HTTP server suitable 758for the purpose. Run `python -m SimpleHTTPServer` in the directory containing 759the generated XML files and point the browser to `127.0.0.1:8000`. 760 761Parser for the `.qpa` log file format in python is provided in 762`scripts/log/log_parser.py`. 763 764Python scripts require python 2.7 or newer in 2.x series. They are not 765compatible with python 3.x. 766 767Debugging Test Failures 768------------------------ 769The best first step is to run the failing test cases via `glcts` executable to 770get the more verbose logs. Use, for example, the `log_to_xml.py` script 771detailed in Section [Test Logs](#test-logs), to view the generated logs. 772If the visual inspection of the logs does not give sufficient hints on the 773nature of the issue, inspecting the test code and stepping through it in 774debugger should help. 775 776Waivers 777------------------------ 778The procedure for requesting a waiver is to report the issue by filing a bug 779report in the Gitlab VK GL CTS project 780(https://gitlab.khronos.org/Tracker/vk-gl-cts). When you create your submission 781package, include references to the waivers as described in the adopters' agreement. 782[Fully-qualified links](https://en.wikipedia.org/wiki/Fully_qualified_domain_name) 783to bug reports are highly recommended. 784Including as much information as possible in your bug report will ensure the issue 785can be progressed as speedily as possible. Such bug report must 786include a link to suggested file changes. Issues must be labeled `Waiver` and `OpenGL-ES` 787(for OpenGL ES submissions) or `Waiver` and `OpenGL` (for OpenGL submissions) and 788identify the CTS release tag and affected tests. 789 790Creating a Submission Package 791------------------------ 792Please see the [Creating a Submission Package page](https://github.com/KhronosGroup/VK-GL-CTS/wiki/Creating-a-OpenGL-and-OpenGL-ES-Submission-Package). 793 794Submission Update Package 795------------------------ 796Please see the [Submission Update Package page](https://github.com/KhronosGroup/VK-GL-CTS/wiki/Submission-Update-Package). 797 798Passing Criteria 799------------------------ 800Please see the [Conformance Submission Passing Criteria page](https://github.com/KhronosGroup/VK-GL-CTS/wiki/OpenGL-and-OpenGL-ES-Conformance-Submission-Passing-Criteria). 801 802Troubleshooting 803------------------------ 804### Crashes early on in the run 805If using run-time entry point loading, it is possible that not all required 806entry points are available. This will result in `NULL` pointer dereferencing. 807 808### Build fails 809First try re-running the build. If that does not help and you have used the 810same build directory with different version of the CTS, remove the build 811directory and run the CMake again. 812 813Adding new tests 814------------------------ 815 816See the [Contribution Guide](CONTRIBUTING.md) 817 818Acknowledgments 819------------------------ 820The Khronos Group gratefully acknowledges the support of drawElements Oy, 821who donated a large number of GLSL tests and a new test framework and build system. 822 823The Khronos Group also gratefully acknowledges the support of 3DLabs Inc., 824who gave permission to use the 3DLabs Graphics Test Framework (GTF). 825 826The first internal version of the test was created by Bruno Schwander of 827Hooked Wireless, under a development contract with the Khronos Group. 828 829Symbio added tests specific to OpenGL and OpenGL ES 3.0. 830 831drawElements added their donated language tests and build system. 832 833The CTS results from these efforts, together with additional hard work by 834volunteers from the OpenGL ES Working Group, the OpenGL ARB Working Group, 835and their member companies, including: 836 837- Sumit Agarwal, Imagination Technologies 838- Eric Anholt, Intel 839- Oleksiy Avramchenko, Sony 840- Anthony Berent, ARM 841- Joseph Blankenship, AMD 842- Jeff Bolz, NVIDIA 843- Pierre Boudier, AMD 844- Benji Bowman, Imagination Technologies 845- Pat Brown, NVIDIA 846- David Cairns, Apple 847- Mark Callow, ArtSpark 848- Antoine Chauveau, NVIDIA 849- Aske Simon Christensen, ARM 850- Lin Chen, Qualcomm 851- Mathieu Comeau, QNX 852- Graham Connor, Imagination Technologies 853- Slawomir Cygan, Intel 854- Piotr Czubak, Intel 855- Piers Daniell, NVIDIA 856- Matthias Dejaegher, ZiiLabs 857- Chris Dodd, NVIDIA 858- David Donohoe, Movidius 859- Alex Eddy, Apple 860- Sean Ellis, ARM 861- Bryan Eyler, NVIDIA 862- Erik Faye-Lund, ARM 863- Nicholas FitzRoy-Dale, Broadcom 864- Michael Frydrych, NVIDIA 865- Toshiki Fujimori, Takumi 866- David Garcia, Qualcomm 867- Frido Garritsen, Vivante 868- Klaus Gerlicher, NVIDIA 869- Slawomir Grajewski, Intel 870- Jonas Gustavsson, Sony 871- Nick Haemel, NVIDIA 872- Matthew Harrison, Imagination Technologies 873- Pyry Haulos, drawElements 874- Jim Hauxwell, Broadcom 875- Valtteri Heikkil, Symbio 876- Tsachi Herman, AMD 877- Mathias Heyer, NVIDIA 878- Atsuko Hirose, Fujitsu 879- Ari Hirvonen, NVIDIA 880- Rune Holm, ARM 881- Jaakko Huovinen, Nokia 882- James Jones, Imagination Technologies 883- Norbert Juffa, NVIDIA 884- Jordan Justen, Intel 885- Sandeep Kakarlapudi, ARM 886- Anssi Kalliolahti, NVIDIA 887- Philip Kamenarsky, NVIDIA 888- Krzysztof Kaminski, Intel 889- Daniel Kartch, NVIDIA 890- Maxim Kazakov, DMP 891- Jon Kennedy, 3DLabs 892- John Kessenich 893- Daniel Koch, NVIDIA 894- Benjamin Kohler-Crowe, NVIDIA 895- Georg Kolling, Imagination Technologies 896- Misa Komuro, DMP 897- Boguslaw Kowalik, Intel 898- Aleksandra Krstic, Qualcomm 899- Karol Kurach, NVIDIA 900- VP Kutti 901- Sami Kyostila, Google 902- Teemu Laakso, Symbio 903- Antoine Labour, Sony 904- Alexandre Laurent, Imagination Technologies 905- Jon Leech, Khronos 906- Graeme Leese, Broadcom 907- I-Gene Leong, Intel 908- Radoslava Leseva, Imagination Technologies 909- Jake Lever, NVIDIA 910- Fred Liao, MediaTek 911- Bill Licea-Kane, Qualcomm 912- Benj Lipchak, Apple 913- Wayne Lister, Imagination Technologies 914- Isaac Liu, NVIDIA 915- Weiwan Liu, NVIDIA 916- Zhifang Long, Marvell 917- Toni Lönnberg, AMD 918- Erik Lovlie 919- Christer Lunde, ARM 920- Zong-Hong Lyu, DMP 921- Daniel Mahashin, NVIDIA 922- Rob Matthesen, NVIDIA 923- Tom McReynolds, NVIDIA (CTS TSG Chair, ES 1.1) 924- Bruce Merry, ARM 925- Assif Mirza, Imagination Technologies 926- Zhenyao Mo, Google 927- Kazuhiro Mochizuki, Fujitsu 928- Affie Munshi, Apple 929- Yeshwant Muthusamy, Samsung 930- Mirela Nicolescu, Broadcom 931- Glenn Nissen, Broadcom 932- Michael O'Hara, AMD 933- Eisaku Ohbuchi, DMP 934- Tom Olson, ARM 935- Tapani Palli, Intel 936- Brian Paul, VMWare 937- Remi Pedersen, ARM 938- Adrian Peirson, ARM 939- Russell Pflughaupt, NVIDIA 940- Anuj Phogat, Intel 941- Tero Pihlajakoski, Nokia 942- Peter Pipkorn, NVIDIA 943- Acorn Pooley, NVIDIA 944- Guillaume Portier, ArtSpark 945- Greg Prisament, Lychee Software 946- Jonathan Putsman, Imagination Technologies 947- Mike Quinlan, AMD 948- Tarik Rahman, CodePlay 949- Kalle Raita, drawElements 950- Daniel Rakos, AMD 951- Manjunatha Ramachandra 952- John Recker, NVIDIA 953- Maurice Ribble, Qualcomm (CTS TSG Chair, ES 2.0) 954- James Riordon, Khronos 955- Lane Roberts, Samsung 956- Ian Romanick, Intel 957- Greg Roth, NVIDIA 958- Kenneth Russell, Google 959- Matteo Salardi, Imagination Technologies 960- Jeremy Sandmel, Apple 961- Shusaku Sawato, DMP 962- Chris Scholtes, Fujitsu 963- Mathias Schott, NVIDIA 964- Bruno Schwander, Hooked Wireless 965- Graham Sellers, AMD 966- Shereef Shehata, Texas Instruments 967- Benjamin Shen, Vivante 968- Robert Simpson, Qualcomm 969- Stuart Smith, Imagination Technologies 970- Janusz Sobczak, Mobica 971- Jacob Strom, Ericsson 972- Timo Suoranta, Broadcom 973- Jan Svarovsky, Ideaworks3D 974- Anthony Tai, Apple 975- Payal Talati, Imagination Technologies 976- Gregg Tavares, Google 977- Ross Thompson, NVIDIA 978- Jeremy Thorne, Broadcom 979- Jani Tikkanen, Symbio 980- Antti Tirronen, Qualcomm (CTS TSG Chair, ES 3.0/3.1) 981- Robert Tray, NVIDIA 982- Matt Turner, Intel 983- Eben Upton, Broadcom 984- Jani Vaarala, Nokia 985- Dmitriy Vasilev, NVIDIA 986- Chad Versace, Intel 987- Holger Waechtler, Broadcom 988- Joerg Wagner, ARM 989- Jun Wang, Imagination Technologies 990- Yuan Wang, Imagination Technologies 991- Hans-Martin Will 992- Ewa Wisniewska, Mobica 993- Dominik Witczak, Mobica 994- Oliver Wohlmuth, Fujitsu 995- Yanjun Zhang, Vivante 996- Lefan Zhong, Vivante 997- Jill Zhou 998- Marek Zylak, NVIDIA 999- Iliyan Dinev, Imagination Technologies 1000- James Glanville, Imagination Technologies 1001- Mark Adams, NVIDIA 1002- Alexander Galazin, ARM 1003- Riccardo Capra, ARM 1004- Lars-Ivar Simonsen, ARM 1005- Fei Yang, ARM 1006 1007Revision History 1008------------------------ 1009- 0.0 - Tom Olson 1010 1011 Initial version cloned from `ES2_Readme`, plus feedback from Mark Callow. 1012 1013- 0.2 - Tom Olson 1014 1015 Modified to incorporate feedback in bug 8534. 1016 1017- 0.3 - Jon Leech 1018 1019 Added details for OpenGL Conformance. 1020 1021- 0.4 - Jon Leech 2012/10/31 1022 1023 Add configuration & build section, and table of contents 1024 1025- 0.5 - Jon Leech 2012/10/31 1026 1027 Fix typos noted by Mark Callow in bug 8534. 1028 1029- 0.6 - Jon Leech 2012/11/13 1030 1031 Discuss automatic version selection and document support for OpenGL 3.3-4.3. 1032 1033- 0.7 - Jon Leech 2012/11/14 1034 1035 Minor cleanup for GL version numbers per Bug 8534 comment #41. 1036 1037- 0.8 - Tom Olson 2013/1/25 1038 1039 Updated GL status in preparation for ES 3.0 release, removed display 1040 parameters from product description, and removed mention of sample submission. 1041 1042- 0.9 - Jon Leech 2013/07/17 1043 1044 Restore GL-specific details in preparation for initial GL CTS release. 1045 1046- 1.0 - Jon Leech 2013/07/17 1047 1048 Change references to Visual Studio 11 to Visual Studio 2012 per bug 9862. 1049 Reset change tracking to reduce clutter. 1050 1051- 1.1 - Kalle Raita 2013/10/30 1052 1053 Updated documentation after the integration of the drawElements framework and 1054 language tests. 1055 1056- 1.2 - Kalle Raita 2013/12/03 1057 1058 Removed TODOs, added some notes on further development, and notes on file 1059 dependencies. Exact list of directory sub-trees that can be modified during porting. 1060 1061- 1.3 - Tom Olson 2014/05/27 1062 1063 Updates for ES CTS 3.1.1.0 . Added Passing Criteria, updated examples to 1064 include 3.1 versioning, and updated Acknowledgements. 1065 1066- 1.4 - Alexander Galazin 2016/05/12 1067 1068 Updates for ES CTS 3.2.1.0. 1069 1070- 2.0 - Alexander Galazin 2016/09/23 1071 1072 Moved the contents to README.md. 1073 Updated to reflect new CTS structure and build instructions. 1074 1075- 2.1 - Alexander Galazin 2016/12/15 1076 1077 Updates in preparation for the new release. 1078 Document restructuring, more detailed process of creating a submission package. 1079 Incorporated OpenGL/CTS issue 39 and 40 in the Passing Criteria. 1080