Home | History | Annotate | Download | only in docs
      1 dEQP
      2 ====
      3 
      4 These steps are specifically for testing SwiftShader's OpenGL ES 3.0 implementation using dEQP on Windows (Linux differences at the bottom).
      5 
      6 Prerequisites
      7 -------------
      8 
      9 1. Install the latest [Python 2.X](https://www.python.org/downloads/)
     10 2. Install [Visual Studio](https://visualstudio.microsoft.com/vs/community/)
     11 3. Install [CMake](https://cmake.org/download/)
     12 4. Install [Go](https://golang.org/doc/install) 32-bit (Important: must be 32 bit)
     13 5. Install [MinGW](http://www.mingw.org/)
     14 6. Install [Git](https://git-scm.com/download/win)
     15 7. Install [Android Studio](https://developer.android.com/studio/index.html)
     16 8. Run Android Studio and install Android SDK.
     17 9. Set environment variables: Config Panel -> System and Security -> System -> Advanced system settigns -> Environment Variables
     18   * Add `<path to python>` to your PATH environment variable
     19   * Add `<path to MinGW>\bin` to your PATH environment variable
     20   * Add `<path to adb>` to your PATH environment variable 
     21 
     22     Note: abd is in the Android SDK, typically in `C:\Users\<username>\AppData\Local\Android\sdk\platform-tools`
     23 
     24 10. Install GCC. In 'cmd', run:
     25 
     26     `mingw-get install gcc`
     27 
     28     Note: Using Cygwin GCC currently doesn't work.
     29 
     30 11. (Optional) Install [TortoiseGit](https://tortoisegit.org/)
     31 
     32 Getting the Code
     33 ----------------
     34 
     35 12. Get dEQP (either in 'cmd' or by using TortoiseGit):
     36 
     37     `git clone https://android.googlesource.com/platform/external/deqp`
     38 
     39 13. Get dEQP's dependencies. In your dEQP root directory, open 'cmd' and run:
     40 
     41     `python external\fetch_sources.py`
     42 
     43 14. Get Cherry (either in 'cmd' or by using TortoiseGit):
     44 
     45     `git clone https://android.googlesource.com/platform/external/cherry`
     46 
     47 15. Set environment variable (see point 9):
     48 
     49     Add new variable GOPATH='`<path to cherry>`'
     50 
     51 Building the code
     52 -----------------
     53 
     54 16. Build dEQP's Visual Studio files using the CMake GUI, or, in the dEQP root dir, run:
     55     ```
     56     mkdir build 
     57     cd build
     58     cmake ..
     59     ```
     60     Note: If you have multiple versions of Visual Studio installed and you want to make sure cmake is using the correct version of Visual Studio, you can specify it by calling, for example:
     61 
     62     `cmake .. -G "Visual Studio 15 2017 Win64"`
     63 
     64     Also note: don't call 'cmake .' directly in the root directory. It will make things fails later on. If you do, simply erase the files created by CMake and follow the steps above.
     65 
     66 17. Build dEQP:
     67 
     68     Open `<path to dEQP>\build\dEQP-Core-default.sln` in Visual Studio and Build Solution
     69 
     70     Note: Choose a 'Release' build, unless you really mean to debug dEQP
     71 
     72 18. Generate test cases:
     73     ```
     74     mkdir <path to cherry>\data
     75     cd <path to dEQP>
     76     python scripts\build_caselists.py <path to cherry>\data
     77     ```
     78 
     79 Preparing the server
     80 --------------------
     81 
     82 19. Edit `<path to cherry>\cherry\data.go`
     83 * Search for `../candy-build/deqp-wgl` and replace that by `<path to deqp>/build`
     84 * Just above, add an option to CommandLine: `--deqp-gl-context-type=egl`
     85 * Just below, modify the BinaryPath from 'Debug' to 'Release' if you did a Release build at step 17
     86 
     87 Testing OpenGL ES
     88 -----------------
     89 
     90 20. a) Assuming you already built SwiftShader, copy these two files:
     91 
     92     `libEGL.dll`  
     93     `libGLESv2.dll`
     94 
     95     From:
     96 
     97     `<path to SwiftShader>\out\Release_x64` or  
     98     `<path to SwiftShader>\out\Debug_x64`
     99 
    100     To:
    101 
    102     `<path to dEQP>\build\modules\gles3\Release` (Again, assuming you did a Release build at step 17)
    103 
    104 Testing Vulkan
    105 --------------
    106 
    107 20. b) Assuming you already built SwiftShader, copy and rename this file:
    108 
    109     `<path to SwiftShader>\out\Release_x64\vk_swiftshader.dll` or  
    110     `<path to SwiftShader>\out\Debug_x64\vk_swiftshader.dll`
    111 
    112     To:
    113 
    114     `<path to dEQP>\build\external\vulkancts\modules\vulkan\vulkan-1.dll`
    115 
    116     This will cause dEQP to load SwiftShader's Vulkan implementatin directly, without going through a system-provided [loader](https://github.com/KhronosGroup/Vulkan-Loader/blob/master/loader/LoaderAndLayerInterface.md#the-loader) library or any layers.
    117 
    118     To use SwiftShader as an [Installable Client Driver](https://github.com/KhronosGroup/Vulkan-Loader/blob/master/loader/LoaderAndLayerInterface.md#installable-client-drivers) (ICD) instead:
    119     * Edit environment variables:
    120       * Define VK_ICD_FILENAMES to `<path to SwiftShader>\src\Vulkan\vk_swiftshader_icd.json`
    121     * If the location of `vk_swiftshader.dll` you're using is different than the one specified in `src\Vulkan\vk_swiftshader_icd.json`, modify it to point to the `vk_swiftshader.dll` file you want to use.
    122 
    123 Running the tests
    124 -----------------
    125 
    126 21. Start the test server. Go to `<path to cherry>` and run:
    127 
    128     `go run server.go`
    129 
    130 22. Open your favorite browser and navigate to `localhost:8080`
    131 
    132     Get Started -> Choose Device 'localhost' -> Select Tests 'dEQP-GLES3' -> Execute tests!
    133 
    134 Mustpass sets
    135 -------------
    136 
    137 dEQP contains more tests than what is expected to pass by a conformant implementation (e.g. some tests are considered too strict, or assume certain undefined behavior). The [android\cts\master\gles3-master.txt](https://android.googlesource.com/platform/external/deqp/+/master/android/cts/master/gles3-master.txt) text file which can be loaded in Cherry's 'Test sets' tab to only run the latest tests expected to pass by certified Android devices.
    138 
    139 Running dEQP on Linux
    140 ---------------------
    141 
    142 Differences to the steps above:
    143 
    144 1. Instead of copying the .dll files, you need to set LD_LIBRARY_PATH to point to SwiftShader's build directory.
    145 2. Use `make` instead of Visual Studio.
    146 3. There are no Debug/Release directories or .exe suffixes, so remove them from DeviceConfig in data.go.