Roll third_party/SPIRV-Tools/ 618ee5094..3724cfbea (7 commits)618ee50942..3724cfbea8
$ git log 618ee5094..3724cfbea --date=short --no-merges --format='%ad %ae %s' 2019-11-05 afdx spirv-fuzz: better computation of data synonym facts (#3010) 2019-11-05 afdx spirv-fuzz: make equivalence classes deterministic (#3011) 2019-11-04 jmadill Add missing headers to GN. (#3009) 2019-11-04 chris Correct "environment" typo (#3007) 2019-11-01 afdx spirv-fuzz: improvements to representation of data synonym facts (#3006) 2019-11-01 stevenperron Add iOS as a supported platform (#3001) 2019-11-01 rharrison Reset pointers before iterating in fuzzer to avoid double free (#3003) Roll third_party/glslang/ b131630e7..5d0e01d9e (8 commits)b131630e7c..5d0e01d9e7
$ git log b131630e7..5d0e01d9e --date=short --no-merges --format='%ad %ae %s' 2019-11-04 rharrison Remove std::move that is breaking chromium roll 2019-11-03 cepheus Tests: Add more test results for the previous generator version bump. 2019-11-02 cepheus Bump up the generator version, which is exposed in SPV test results. 2019-11-03 sk Fix warning: size_t->int implicit cast 2019-11-02 jmadill Add a couple missing headers to the GN build. 2019-11-01 cepheus Bump version. 2019-10-21 dneto SPIR-V: Aggressively prune unreachable merge, continue target 2019-10-25 sk Add option ENABLE_CTEST to skip testing Roll third_party/shaderc/ 0a260d789..f16e79385 (4 commits)0a260d789f..f16e793858
$ git log 0a260d789..f16e79385 --date=short --no-merges --format='%ad %ae %s' 2019-11-04 rharrison Rolling 5 dependencies (#862) 2019-11-04 9856269+sarahM0 Add --emit-line-drective option (#861) 2019-11-01 9856269+sarahM0 Add spvcir unit test - OpCapability (#857) 2019-11-01 rharrison Add flag for updating invalid expecations and rewrite end logic (#856) Roll third_party/spirv-cross/ d253f41e1..24f209eb9 (4 commits)d253f41e17..24f209eb93
$ git log d253f41e1..24f209eb9 --date=short --no-merges --format='%ad %ae %s' 2019-11-04 post Add spvc_type_get_base_type_id. 2019-11-04 post C API: Add missing boolean options. 2019-11-04 post GLSL: Fix issue with array-of-array inputs in tess. 2019-11-01 dmalyshau Avoid including stdexcept in no-exception environment Created with: roll-dep third_party/SPIRV-Tools third_party/glslang third_party/shaderc third_party/spirv-cross third_party/spirv-headers Change-Id: I6109f6d6c0602d39d459bb3f4983ee2c88a6fcb9 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13081 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Dawn, a WebGPU implementation
Dawn (formerly NXT) is an open-source and cross-platform implementation of the work-in-progress WebGPU standard. It exposes a C/C++ API that maps almost one-to-one to the WebGPU IDL and can be managed as part of a larger system such as a Web browser.
Dawn provides several WebGPU building blocks:
- WebGPU C/C++ headers that applications and other building blocks use.
- The main C header for the WebGPU API.
- Definition of a structure of all function pointers for this specific Dawn version (called "proctable").
- A C++ wrapper for the C header.
- A "native" implementation of WebGPU using platforms' GPU APIs:
- D3D12 on Windows 10
- Metal on OSX (and eventually iOS)
- Vulkan on Windows, Linux (eventually ChromeOS, Android and Fuchsia too)
- OpenGL as best effort where available
- A client-server implementation of WebGPU for applications that are in a sandbox without access to native drivers
- A Dawn proc-table backend implementation of WebGPU for applications what want to be able to switch at runtime between native or client-server mode.
Directory structure
dawn.json
: description of the API used to drive code generators.examples
: examples showing how Dawn is used.generator
: code generator for files produces fromdawn.json
templates
: Jinja2 templates for the generator
scripts
: scripts to support things like continuous testing, build files, etc.src
:common
: helper code shared between core Dawn libraries and tests/samplesdawn_native
: native implementation of WebGPU, one subfolder per backenddawn_wire
: client-server implementation of WebGPUinclude
: public headers for Dawntests
: internal Dawn testsend2end
: WebGPU tests performing GPU operationsunittests
: unittests and by extension tests not using the GPUvalidation
: WebGPU validation tests not using the GPU (frontend tests)
utils
: helper code to use Dawn used by tests and samples
third_party
: directory where dependencies live as well as their buildfiles.
Building Dawn
Dawn uses the Chromium build system and dependency management so you need to install depot_tools and add it to the PATH.
On Linux you need to have the pkg-config
command:
# Install pkg-config on Ubuntu
sudo apt-get install pkg-config
Then get the source as follows:
# Clone the repo as "dawn"
git clone https://dawn.googlesource.com/dawn dawn && cd dawn
# Bootstrap the gclient configuration
cp scripts/standalone.gclient .gclient
# Fetch external dependencies and toolchains with gclient
gclient sync
Then generate build files using gn args out/Debug
or gn args out/Release
.
A text editor will appear asking build options, the most common option is is_debug=true/false
; otherwise gn args out/Release --list
shows all the possible options.
Then use ninja -C out/Release
to build dawn and for example ./out/Release/dawn_end2end_tests
to run the tests.
Contributing
Please read and follow CONTRIBUTING.md. Dawn doesn't have a formal coding style yet, except what's defined by our clang format style. Overall try to use the same style and convention as code around your change.
If you find issues with Dawn, please feel free to report them on the bug tracker. For other discussions, please post to Dawn's mailing list.
License
Please see LICENSE.
Disclaimer
This is not an officially supported Google product.