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 -q, --quiet 557 Suppress messages to standard output 558 559 -n, --deqp-case=<value> 560 Test case(s) to run, supports wildcards (e.g. dEQP-GLES2.info.*) 561 562 --deqp-caselist=<value> 563 Case list to run in trie format (e.g. {dEQP-GLES2{info{version,renderer}}}) 564 565 --deqp-caselist-file=<value> 566 Read case list (in trie format) from given file 567 568 --deqp-caselist-resource=<value> 569 Read case list (in trie format) from given file located application's assets 570 571 --deqp-stdin-caselist 572 Read case list (in trie format) from stdin 573 574 --deqp-log-filename=<value> 575 Write test results to given file 576 default: 'TestResults.qpa' 577 578 --deqp-runmode=[execute|xml-caselist|txt-caselist|stdout-caselist] 579 Execute tests, or write list of test cases into a file 580 default: 'execute' 581 582 --deqp-caselist-export-file=<value> 583 Set the target file name pattern for caselist export 584 default: '${packageName}-cases.${typeExtension}' 585 586 --deqp-watchdog=[enable|disable] 587 Enable test watchdog 588 default: 'disable' 589 590 --deqp-crashhandler=[enable|disable] 591 Enable crash handling 592 default: 'disable' 593 594 --deqp-base-seed=<value> 595 Base seed for test cases that use randomization 596 default: '0' 597 598 --deqp-test-iteration-count=<value> 599 Iteration count for cases that support variable number of iterations 600 default: '0' 601 602 --deqp-visibility=[windowed|fullscreen|hidden] 603 Default test window visibility 604 default: 'windowed' 605 606 --deqp-surface-width=<value> 607 Use given surface width if possible 608 default: '-1' 609 610 --deqp-surface-height=<value> 611 Use given surface height if possible 612 default: '-1' 613 614 --deqp-surface-type=[window|pixmap|pbuffer|fbo] 615 Use given surface type 616 default: 'window' 617 618 --deqp-screen-rotation=[unspecified|0|90|180|270] 619 Screen rotation for platforms that support it 620 default: '0' 621 622 --deqp-gl-context-type=<value> 623 OpenGL context type for platforms that support multiple 624 625 --deqp-gl-config-id=<value> 626 OpenGL (ES) render config ID (EGL config id on EGL platforms) 627 default: '-1' 628 629 --deqp-gl-config-name=<value> 630 Symbolic OpenGL (ES) render config name 631 632 --deqp-gl-context-flags=<value> 633 OpenGL context flags (comma-separated, supports debug and robust) 634 635 --deqp-cl-platform-id=<value> 636 Execute tests on given OpenCL platform (IDs start from 1) 637 default: '1' 638 639 --deqp-cl-device-ids=<value> 640 Execute tests on given CL devices (comma-separated, IDs start from 1) 641 default: '' 642 643 --deqp-cl-build-options=<value> 644 Extra build options for OpenCL compiler 645 646 --deqp-egl-display-type=<value> 647 EGL native display type 648 649 --deqp-egl-window-type=<value> 650 EGL native window type 651 652 --deqp-egl-pixmap-type=<value> 653 EGL native pixmap type 654 655 --deqp-log-images=[enable|disable] 656 Enable or disable logging of result images 657 default: 'enable' 658 659 --deqp-log-shader-sources=[enable|disable] 660 Enable or disable logging of shader sources 661 default: 'enable' 662 663 --deqp-test-oom=[enable|disable] 664 Run tests that exhaust memory on purpose 665 default: 'enable' 666 667 --deqp-archive-dir=<value> 668 Path to test resource files 669 default: '.' 670 671 --deqp-log-flush=[enable|disable] 672 Enable or disable log file fflush 673 default: 'enable' 674 675 --deqp-log-compact=[enable|disable] 676 Enable or disable the compact version of the log 677 default: 'disable' 678 679 --deqp-renderdoc=[enable|disable] 680 Enable RenderDoc frame markers 681 default: 'disable' 682 683 --deqp-fraction=<value> 684 Run a fraction of the test cases (e.g. N,M means run group%M==N) 685 default: '' 686 687 --deqp-fraction-mandatory-caselist-file=<value> 688 Case list file that must be run for each fraction 689 default: '' 690 691 --deqp-waiver-file=<value> 692 Read waived tests from given file 693 default: '' 694 695 --deqp-runner-type=[any|none|amber] 696 Filter test cases based on runner 697 default: 'any' 698 699 --deqp-terminate-on-fail=[enable|disable] 700 Terminate the run on first failure 701 default: 'disable' 702 703 --deqp-terminate-on-device-lost=[enable|disable] 704 Terminate the run on first device lost error 705 default: 'disable' 706 707 --deqp-egl-config-id=<value> 708 Legacy name for --deqp-gl-config-id 709 default: '-1' 710 711 --deqp-egl-config-name=<value> 712 Legacy name for --deqp-gl-config-name 713 714 --deqp-waiver-file=<value> 715 Path to xml file containing waived tests 716``` 717 718### Understanding the Results 719 720At the end of a completed test run, a file called `cts-run-summary.xml` is 721generated. It will contain summaries per configuration and the full command 722lines for the `glcts` application 723(See Section [Running Subsets](#running-subsets)) for debugging purposes. 724Additionally, a summary string similar to one below is printed: 725``` 7264/4 sessions passed, conformance test PASSED 727``` 728 729If the run fails, the message will say `FAILED` instead of `PASSED`. Under 730Linux or Windows, this string is printed to stdout if available. Under Android, 731it is emitted to the Android logging system for access via *logcat*. 732 733Each test case will be logged into the `.qpa` files in XML. Below is a minimal 734example of a test case log. The Result element contains the final verdict in 735the `StatusCode` attribute. Passing cases will have `Pass` and failing cases 736`Fail`. Other results such as `QualityWarning`, `CompatibilityWarning`, 737`NotSupported` or `ResourceError` are possible. Only `Fail` status will count 738as failure for conformance purposes. 739``` 740<TestCaseResult Version="0.3.2" CasePath="ES2-CTS.info.vendor" CaseType="SelfValidate"> 741 <Text>Vendor A</Text> 742 <Result StatusCode="Pass">Pass</Result> 743</TestCaseResult> 744``` 745 746If the failure count is zero for all config sequences, the implementation 747passes the test. Note that in addition to a successful test result, 748a Submission Package must satisfy the conditions specified below under 749[Passing Criteria](#passing-criteria) in order to achieve conformance certification. 750 751### Test Logs 752 753The CTS writes test logs in XML encapsulated in a simple plain-text container 754format. Each tested configuration listed in `cts-run-summary.xml` 755 756To analyse and process the log files, run the following scripts 757- `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. 758- `scripts/log/log_to_csv.py`: This utility converts `.qpa` log into CSV format. This is 759useful for importing results into other systems. 760- `scripts/log/log_to_xml.py`: Converts `.qpa` into well-formed XML document. The document 761can be then viewed in browser using the testlog.{xsl,css} files. 762 763Some browsers, like Chrome, limit local file access. In such case, the files 764must be accessed over HTTP. Python comes with a simple HTTP server suitable 765for the purpose. Run `python -m SimpleHTTPServer` in the directory containing 766the generated XML files and point the browser to `127.0.0.1:8000`. 767 768Parser for the `.qpa` log file format in python is provided in 769`scripts/log/log_parser.py`. 770 771Python scripts require python 2.7 or newer in 2.x series. They are not 772compatible with python 3.x. 773 774Debugging Test Failures 775------------------------ 776The best first step is to run the failing test cases via `glcts` executable to 777get the more verbose logs. Use, for example, the `log_to_xml.py` script 778detailed in Section [Test Logs](#test-logs), to view the generated logs. 779If the visual inspection of the logs does not give sufficient hints on the 780nature of the issue, inspecting the test code and stepping through it in 781debugger should help. 782 783Waivers 784------------------------ 785The procedure for requesting a waiver is to report the issue by filing a bug 786report in the Gitlab VK GL CTS project 787(https://gitlab.khronos.org/Tracker/vk-gl-cts). When you create your submission 788package, include references to the waivers as described in the adopters' agreement. 789[Fully-qualified links](https://en.wikipedia.org/wiki/Fully_qualified_domain_name) 790to bug reports are highly recommended. 791Including as much information as possible in your bug report will ensure the issue 792can be progressed as speedily as possible. Such bug report must 793include a link to suggested file changes. Issues must be labeled `Waiver` and `OpenGL-ES` 794(for OpenGL ES submissions) or `Waiver` and `OpenGL` (for OpenGL submissions) and 795identify the CTS release tag and affected tests. 796 797Creating a Submission Package 798------------------------ 799Please see the [Creating a Submission Package page](https://github.com/KhronosGroup/VK-GL-CTS/wiki/Creating-a-OpenGL-and-OpenGL-ES-Submission-Package). 800 801Submission Update Package 802------------------------ 803Please see the [Submission Update Package page](https://github.com/KhronosGroup/VK-GL-CTS/wiki/Submission-Update-Package). 804 805Passing Criteria 806------------------------ 807Please see the [Conformance Submission Passing Criteria page](https://github.com/KhronosGroup/VK-GL-CTS/wiki/OpenGL-and-OpenGL-ES-Conformance-Submission-Passing-Criteria). 808 809Troubleshooting 810------------------------ 811### Crashes early on in the run 812If using run-time entry point loading, it is possible that not all required 813entry points are available. This will result in `NULL` pointer dereferencing. 814 815### Build fails 816First try re-running the build. If that does not help and you have used the 817same build directory with different version of the CTS, remove the build 818directory and run the CMake again. 819 820Adding new tests 821------------------------ 822 823See the [Contribution Guide](CONTRIBUTING.md) 824 825Acknowledgments 826------------------------ 827The Khronos Group gratefully acknowledges the support of drawElements Oy, 828who donated a large number of GLSL tests and a new test framework and build system. 829 830The Khronos Group also gratefully acknowledges the support of 3DLabs Inc., 831who gave permission to use the 3DLabs Graphics Test Framework (GTF). 832 833The first internal version of the test was created by Bruno Schwander of 834Hooked Wireless, under a development contract with the Khronos Group. 835 836Symbio added tests specific to OpenGL and OpenGL ES 3.0. 837 838drawElements added their donated language tests and build system. 839 840The CTS results from these efforts, together with additional hard work by 841volunteers from the OpenGL ES Working Group, the OpenGL ARB Working Group, 842and their member companies, including: 843 844- Sumit Agarwal, Imagination Technologies 845- Eric Anholt, Intel 846- Oleksiy Avramchenko, Sony 847- Anthony Berent, ARM 848- Joseph Blankenship, AMD 849- Jeff Bolz, NVIDIA 850- Pierre Boudier, AMD 851- Benji Bowman, Imagination Technologies 852- Pat Brown, NVIDIA 853- David Cairns, Apple 854- Mark Callow, ArtSpark 855- Antoine Chauveau, NVIDIA 856- Aske Simon Christensen, ARM 857- Lin Chen, Qualcomm 858- Mathieu Comeau, QNX 859- Graham Connor, Imagination Technologies 860- Slawomir Cygan, Intel 861- Piotr Czubak, Intel 862- Piers Daniell, NVIDIA 863- Matthias Dejaegher, ZiiLabs 864- Chris Dodd, NVIDIA 865- David Donohoe, Movidius 866- Alex Eddy, Apple 867- Sean Ellis, ARM 868- Bryan Eyler, NVIDIA 869- Erik Faye-Lund, ARM 870- Nicholas FitzRoy-Dale, Broadcom 871- Michael Frydrych, NVIDIA 872- Toshiki Fujimori, Takumi 873- David Garcia, Qualcomm 874- Frido Garritsen, Vivante 875- Klaus Gerlicher, NVIDIA 876- Slawomir Grajewski, Intel 877- Jonas Gustavsson, Sony 878- Nick Haemel, NVIDIA 879- Matthew Harrison, Imagination Technologies 880- Pyry Haulos, drawElements 881- Jim Hauxwell, Broadcom 882- Valtteri Heikkil, Symbio 883- Tsachi Herman, AMD 884- Mathias Heyer, NVIDIA 885- Atsuko Hirose, Fujitsu 886- Ari Hirvonen, NVIDIA 887- Rune Holm, ARM 888- Jaakko Huovinen, Nokia 889- James Jones, Imagination Technologies 890- Norbert Juffa, NVIDIA 891- Jordan Justen, Intel 892- Sandeep Kakarlapudi, ARM 893- Anssi Kalliolahti, NVIDIA 894- Philip Kamenarsky, NVIDIA 895- Krzysztof Kaminski, Intel 896- Daniel Kartch, NVIDIA 897- Maxim Kazakov, DMP 898- Jon Kennedy, 3DLabs 899- John Kessenich 900- Daniel Koch, NVIDIA 901- Benjamin Kohler-Crowe, NVIDIA 902- Georg Kolling, Imagination Technologies 903- Misa Komuro, DMP 904- Boguslaw Kowalik, Intel 905- Aleksandra Krstic, Qualcomm 906- Karol Kurach, NVIDIA 907- VP Kutti 908- Sami Kyostila, Google 909- Teemu Laakso, Symbio 910- Antoine Labour, Sony 911- Alexandre Laurent, Imagination Technologies 912- Jon Leech, Khronos 913- Graeme Leese, Broadcom 914- I-Gene Leong, Intel 915- Radoslava Leseva, Imagination Technologies 916- Jake Lever, NVIDIA 917- Fred Liao, MediaTek 918- Bill Licea-Kane, Qualcomm 919- Benj Lipchak, Apple 920- Wayne Lister, Imagination Technologies 921- Isaac Liu, NVIDIA 922- Weiwan Liu, NVIDIA 923- Zhifang Long, Marvell 924- Toni Lönnberg, AMD 925- Erik Lovlie 926- Christer Lunde, ARM 927- Zong-Hong Lyu, DMP 928- Daniel Mahashin, NVIDIA 929- Rob Matthesen, NVIDIA 930- Tom McReynolds, NVIDIA (CTS TSG Chair, ES 1.1) 931- Bruce Merry, ARM 932- Assif Mirza, Imagination Technologies 933- Zhenyao Mo, Google 934- Kazuhiro Mochizuki, Fujitsu 935- Affie Munshi, Apple 936- Yeshwant Muthusamy, Samsung 937- Mirela Nicolescu, Broadcom 938- Glenn Nissen, Broadcom 939- Michael O'Hara, AMD 940- Eisaku Ohbuchi, DMP 941- Tom Olson, ARM 942- Tapani Palli, Intel 943- Brian Paul, VMWare 944- Remi Pedersen, ARM 945- Adrian Peirson, ARM 946- Russell Pflughaupt, NVIDIA 947- Anuj Phogat, Intel 948- Tero Pihlajakoski, Nokia 949- Peter Pipkorn, NVIDIA 950- Acorn Pooley, NVIDIA 951- Guillaume Portier, ArtSpark 952- Greg Prisament, Lychee Software 953- Jonathan Putsman, Imagination Technologies 954- Mike Quinlan, AMD 955- Tarik Rahman, CodePlay 956- Kalle Raita, drawElements 957- Daniel Rakos, AMD 958- Manjunatha Ramachandra 959- John Recker, NVIDIA 960- Maurice Ribble, Qualcomm (CTS TSG Chair, ES 2.0) 961- James Riordon, Khronos 962- Lane Roberts, Samsung 963- Ian Romanick, Intel 964- Greg Roth, NVIDIA 965- Kenneth Russell, Google 966- Matteo Salardi, Imagination Technologies 967- Jeremy Sandmel, Apple 968- Shusaku Sawato, DMP 969- Chris Scholtes, Fujitsu 970- Mathias Schott, NVIDIA 971- Bruno Schwander, Hooked Wireless 972- Graham Sellers, AMD 973- Shereef Shehata, Texas Instruments 974- Benjamin Shen, Vivante 975- Robert Simpson, Qualcomm 976- Stuart Smith, Imagination Technologies 977- Janusz Sobczak, Mobica 978- Jacob Strom, Ericsson 979- Timo Suoranta, Broadcom 980- Jan Svarovsky, Ideaworks3D 981- Anthony Tai, Apple 982- Payal Talati, Imagination Technologies 983- Gregg Tavares, Google 984- Ross Thompson, NVIDIA 985- Jeremy Thorne, Broadcom 986- Jani Tikkanen, Symbio 987- Antti Tirronen, Qualcomm (CTS TSG Chair, ES 3.0/3.1) 988- Robert Tray, NVIDIA 989- Matt Turner, Intel 990- Eben Upton, Broadcom 991- Jani Vaarala, Nokia 992- Dmitriy Vasilev, NVIDIA 993- Chad Versace, Intel 994- Holger Waechtler, Broadcom 995- Joerg Wagner, ARM 996- Jun Wang, Imagination Technologies 997- Yuan Wang, Imagination Technologies 998- Hans-Martin Will 999- Ewa Wisniewska, Mobica 1000- Dominik Witczak, Mobica 1001- Oliver Wohlmuth, Fujitsu 1002- Yanjun Zhang, Vivante 1003- Lefan Zhong, Vivante 1004- Jill Zhou 1005- Marek Zylak, NVIDIA 1006- Iliyan Dinev, Imagination Technologies 1007- James Glanville, Imagination Technologies 1008- Mark Adams, NVIDIA 1009- Alexander Galazin, ARM 1010- Riccardo Capra, ARM 1011- Lars-Ivar Simonsen, ARM 1012- Fei Yang, ARM 1013 1014Revision History 1015------------------------ 1016- 0.0 - Tom Olson 1017 1018 Initial version cloned from `ES2_Readme`, plus feedback from Mark Callow. 1019 1020- 0.2 - Tom Olson 1021 1022 Modified to incorporate feedback in bug 8534. 1023 1024- 0.3 - Jon Leech 1025 1026 Added details for OpenGL Conformance. 1027 1028- 0.4 - Jon Leech 2012/10/31 1029 1030 Add configuration & build section, and table of contents 1031 1032- 0.5 - Jon Leech 2012/10/31 1033 1034 Fix typos noted by Mark Callow in bug 8534. 1035 1036- 0.6 - Jon Leech 2012/11/13 1037 1038 Discuss automatic version selection and document support for OpenGL 3.3-4.3. 1039 1040- 0.7 - Jon Leech 2012/11/14 1041 1042 Minor cleanup for GL version numbers per Bug 8534 comment #41. 1043 1044- 0.8 - Tom Olson 2013/1/25 1045 1046 Updated GL status in preparation for ES 3.0 release, removed display 1047 parameters from product description, and removed mention of sample submission. 1048 1049- 0.9 - Jon Leech 2013/07/17 1050 1051 Restore GL-specific details in preparation for initial GL CTS release. 1052 1053- 1.0 - Jon Leech 2013/07/17 1054 1055 Change references to Visual Studio 11 to Visual Studio 2012 per bug 9862. 1056 Reset change tracking to reduce clutter. 1057 1058- 1.1 - Kalle Raita 2013/10/30 1059 1060 Updated documentation after the integration of the drawElements framework and 1061 language tests. 1062 1063- 1.2 - Kalle Raita 2013/12/03 1064 1065 Removed TODOs, added some notes on further development, and notes on file 1066 dependencies. Exact list of directory sub-trees that can be modified during porting. 1067 1068- 1.3 - Tom Olson 2014/05/27 1069 1070 Updates for ES CTS 3.1.1.0 . Added Passing Criteria, updated examples to 1071 include 3.1 versioning, and updated Acknowledgements. 1072 1073- 1.4 - Alexander Galazin 2016/05/12 1074 1075 Updates for ES CTS 3.2.1.0. 1076 1077- 2.0 - Alexander Galazin 2016/09/23 1078 1079 Moved the contents to README.md. 1080 Updated to reflect new CTS structure and build instructions. 1081 1082- 2.1 - Alexander Galazin 2016/12/15 1083 1084 Updates in preparation for the new release. 1085 Document restructuring, more detailed process of creating a submission package. 1086 Incorporated OpenGL/CTS issue 39 and 40 in the Passing Criteria. 1087