Hash :
912ac85b
Author :
Date :
2019-03-01T12:12:28
Add Orientation and Starter-Projects docs Bug: angleproject:1944 Change-Id: Idd1cf50a1751bf0d5a04159fffbc91a3225f9768 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1496038 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
A basic guide to get up and running fixing bugs and performance issues in ANGLE.
Download and install Visual Studio 2017 Community. Installing takes some time.
Take the time to register a Microsoft account, otherwise you’ll get nagged to death.
Download and install Chromium’s depot_tools for building ANGLE.
Add the depot_tools dir to your system path. Open start menu, type “edit environment variables”,
add it to PATH.
(recommended) Download and install Git for Windows.
Open Git bash, head to C:/src and follow the steps on the ANGLE wiki to set up the ANGLE solution for the first time.
The VS 2017 solution will be in c:/src/angle/out/sln/ANGLE.sln. Open and let the installation
finish. Important: set indent style to spaces, not tabs!
Building should work at this point!
Try running angle_end2end_tests, angle_unittests or a sample program.
Useful VS extensions:
Download and install Chromium’s depot_tools for building ANGLE.
Ensure you add depot_tools to your bashrc as in the wiki link above.
Follow the steps on the ANGLE wiki to setup ANGLE’s build.
Building should work at this point! Follow the steps on the Wiki.
Try running angle_end2end_tests, angle_unittests or a sample program.
Cherry is the UI for viewing test results.
ANGLE checks out a copy in <angledir>/third_party/cherry.
Follow the instructions in the installation README to get it running. On Windows, use 64-bit.
Read up on testing with dEQP on the ANGLE Wiki.
Try running angle_deqp_gles2_tests_no_gtest with the flag
--deqp-case=dEQP-GLES2.functional.negative_api.* and load a test report in Cherry.
To use Cherry, browse to http://localhost:8080/#/results and
click ‘Import existing batch‘, loading TestResults.qpa. Look for the qpa file in the
current working directory, or <angledir>/src/tests if you ran the tests from Visual Studio.
Note: we only use Cherry for viewing test output, not running the tests. On start, you may see some runtime messages about unable to load case lists. These are safe to ignore. If you didn’t load the results URL directly, click the “Results“ tab to find the Import button.
scripts/perf_test_runner.py to run any target of ./angle_perftests (see script
source for details).
In Visual Studio 2017, look under Debug/Profiler/Performance Explorer/New Performance Session.
Right-click “Targets” and add angle_perftests as a Target Project.
Run angle_perftests with the flag --gtest_filter=DrawCallPerfBenchmark.Run/d3d11_null for
D3D11, .../d3d9_null for D3D9, .../gl_null for OpenGL and .../vulkan_null for Vulkan.
Make sure you close all open instances of Chrome, they use a lot of background CPU and GPU. In fact, close every process and application you can.
Install Chrome Canary.
Canary’s install dir is usually %APPDATA%/Local/Google/Chrome SxS/Application
Build ANGLE x64, Release, and run ‘python scripts/update_canary_angle.py’ to replace Canary’s ANGLE with your custom ANGLE. (Note: Canary must be closed)
Start Canary with --gpu-startup-dialog --disable-gpu-sandbox, wait for the dialog.
In Visual Studio, under Debug/Profiler, choose attach to process.
Attach to the Chrome GPU process, then immediately pause profiling.
IMPORTANT: Verify ANGLE details are correct in about:gpu.
In Canary, start your benchmark, then resume profiling, and exit when done. The report will load automatically.
A modern desktop OpenGL Spec (for reference)
These specs can be found in the OpenGL Registry and the Vulkan Docs repositories as well.
#angle channel in chromium.slack.com. Join angle-team@ for access to many important emails and shared documents.
We have a Hangouts Chat channel. Ask for an invite.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146
# ANGLE Orientation
A basic guide to get up and running fixing bugs and performance issues in ANGLE.
## First ANGLE Compile
### Windows
- Download and install
[Visual Studio 2017 Community](https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx).
Installing takes some time.
- Take the time to register a Microsoft account, otherwise you'll get nagged to death.
- Download and install Chromium's
[depot_tools](http://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up)
for building ANGLE.
- Add the `depot_tools` dir to your system path. Open start menu, type "edit environment variables",
add it to PATH.
- (recommended) Download and install [Git for Windows](http://gitforwindows.org/).
- Open Git bash, head to C:/src and follow the steps on
[the ANGLE wiki](https://chromium.googlesource.com/angle/angle/+/master/doc/DevSetup.md#Development-setup-Getting-the-source)
to set up the ANGLE solution for the first time.
- The VS 2017 solution will be in `c:/src/angle/out/sln/ANGLE.sln`. Open and let the installation
finish. **Important**: set indent style to spaces, not tabs!
- Building should work at this point!
- Try running `angle_end2end_tests`, `angle_unittests` or a sample program.
- Useful VS extensions:
1. [Build Only Startup Project](https://marketplace.visualstudio.com/items?itemName=SenHarada.BuildOnlyStartupProject)
2. [SwitchStartupProject](https://marketplace.visualstudio.com/items?itemName=vs-publisher-141975.SwitchStartupProject)
3. [Smart CommandLine Arguments](https://www.visualstudiogallery.msdn.microsoft.com/535f79b1-fbe0-4b0a-a346-8cdf271ea071)
### Linux
- Download and install Chromium's
[depot_tools](http://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up)
for building ANGLE.
- Ensure you add `depot_tools` to your bashrc as in the wiki link above.
- Follow the steps on
[the ANGLE wiki](https://chromium.googlesource.com/angle/angle/+/master/doc/DevSetup.md#Development-setup-Getting-the-source)
to setup ANGLE's build.
- Building should work at this point! Follow the steps on the Wiki.
- Try running `angle_end2end_tests`, `angle_unittests` or a sample program.
## Setting up the [drawElements testing suite](http://go/dEQP)
- [Cherry](https://sites.google.com/a/google.com/deqp/cherry) is the UI for viewing test results.
ANGLE checks out a copy in `<angledir>/third_party/cherry`.
- Follow the instructions in the
[installation README](https://android.googlesource.com/platform/external/cherry/+/refs/heads/master/README)
to get it running. On Windows, use 64-bit.
- Read up on testing with
[dEQP on the ANGLE Wiki](https://chromium.googlesource.com/angle/angle/+/master/doc/dEQP.md).
- Try running `angle_deqp_gles2_tests_no_gtest` with the flag
`--deqp-case=dEQP-GLES2.functional.negative_api.*` and load a test report in Cherry.
- To use Cherry, browse to [http://localhost:8080/#/results](http://localhost:8080/#/results) and
click '**Import existing batch**', loading `TestResults.qpa`. Look for the qpa file in the
current working directory, or `<angledir>/src/tests` if you ran the tests from Visual Studio.
- Note: we only use Cherry for viewing test output, not running the tests. On start, you may see
some runtime messages about unable to load case lists. These are safe to ignore. If you didn't
load the results URL directly, click the "**Results**" tab to find the Import button.
## Profiling
- You can use `scripts/perf_test_runner.py` to run any target of `./angle_perftests` (see script
source for details).
### With Visual Studio
- In Visual Studio 2017, look under Debug/Profiler/Performance Explorer/New Performance Session.
Right-click "Targets" and add `angle_perftests` as a Target Project.
- Run `angle_perftests` with the flag `--gtest_filter=DrawCallPerfBenchmark.Run/d3d11_null` for
D3D11, `.../d3d9_null` for D3D9, `.../gl_null` for OpenGL and `.../vulkan_null` for Vulkan.
- Make sure you close all open instances of Chrome, they use a lot of background CPU and GPU. In
fact, close every process and application you can.
### Profiling with Visual Studio + Chrome
- Install [Chrome Canary](https://www.google.com/chrome/browser/canary.html).
- Canary's install dir is usually `%APPDATA%/Local/Google/Chrome SxS/Application`
- Build ANGLE x64, Release, and run 'python scripts/update_canary_angle.py' to replace Canary's
ANGLE with your custom ANGLE. (Note: Canary must be closed)
- Start Canary with `--gpu-startup-dialog --disable-gpu-sandbox`, wait for the dialog.
- In Visual Studio, under Debug/Profiler, choose attach to process.
- Attach to the Chrome GPU process, then immediately pause profiling.
- **IMPORTANT:** Verify ANGLE details are correct in `about:gpu`.
- In Canary, start your benchmark, then resume profiling, and exit when done. The report will load
automatically.
## Bookmark the latest Khronos specs
- [The GLES 2.0 Spec](https://www.khronos.org/registry/OpenGL/specs/es/2.0/es_full_spec_2.0.pdf)
- [The GLES 3.0 Spec](https://www.khronos.org/registry/OpenGL/specs/es/3.0/es_spec_3.0.pdf)
- [The GLES 3.1 Spec](https://www.khronos.org/registry/gles/specs/3.1/es_spec_3.1.pdf)
- [The GLES Shading Language 1.00 Spec](https://www.khronos.org/files/opengles_shading_language.pdf)
- [The GLES Shading Language 3.00 Spec](https://www.khronos.org/registry/gles/specs/3.0/GLSL_ES_Specification_3.00.4.pdf)
- [The WebGL Specs](https://www.khronos.org/registry/webgl/specs/latest/)
- [A modern desktop OpenGL Spec](https://www.opengl.org/registry/doc/glspec45.core.pdf)
(for reference)
- [The Vulkan Spec](https://www.khronos.org/registry/vulkan/specs/1.0-wsi_extensions/html/vkspec.html)
These specs can be found in the [OpenGL Registry](https://github.com/KhronosGroup/OpenGL-Registry)
and the [Vulkan Docs](https://github.com/KhronosGroup/Vulkan-Docs) repositories as well.
## Join Groups and Chats
- Join the `#angle` channel in `chromium.slack.com`.
### For Googlers
- Join angle-team@ for access to many important emails and shared documents.
- We have a Hangouts Chat channel. Ask for an invite.