commit | 622dbaf37b55d374e6ca7e47d6bd830c7a648b90 | [log] [tgz] |
---|---|---|
author | Austin Eng <enga@chromium.org> | Tue Jul 23 00:09:52 2024 +0000 |
committer | Dawn LUCI CQ <dawn-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue Jul 23 00:09:52 2024 +0000 |
tree | 613a5ef5002ec6580270e222864b28a81329fba9 | |
parent | ab2bb0ccc39aff70c376dd235fdc00b3a463c700 [diff] |
Support WGPUStringView in non-struct input arguments - Add WGPUStringView struct. In C++ there is both wgpu::StringView and wgpu::NullableStringView to differentiate different types of strings. These structs appear identically in C. - Add support for serializing / deserializing WGPUStringView in the wire, with tests. - Update methods with input args to take WGPUStringView in addition to the legacy const char* path. Methods with WGPUStringView are suffixed with "2", but overloaded without the suffix in the C++ API. - wgpu::StringView may be implicitly constructed from std::string_view, const char* to ease use in C++. Add tests for these constructors. wgpu::NullableStringView may be constructed from nullptr and std::nullopt - Add tests for passing wgpu::StringView or passing it via implicit conversion into the API. - WGPUStringView is passed into Dawn as std::string_view or as a std::optional<std::string_view> depending on whether the arg is nullable or not. This simplifies usage in Dawn and makes it more type safe. Bug: 42241188 Change-Id: Ia3dc6ef5d55f382dc8d132d3f997bb84c08cda5b Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/198795 Reviewed-by: Kai Ninomiya <kainino@chromium.org> Commit-Queue: Austin Eng <enga@chromium.org>
Dawn is an open-source and cross-platform implementation of the WebGPU standard. More precisely it implements webgpu.h
that is a one-to-one mapping with the WebGPU IDL. Dawn is meant to be integrated as part of a larger system and is the underlying implementation of WebGPU in Chromium.
Dawn provides several WebGPU building blocks:
webgpu.h
version that Dawn implements.webgpu.h
.Helpful links:
Developer documentation:
User documentation: (TODO, figure out what overlaps with the webgpu.h docs)
BSD 3-Clause License, please see LICENSE.
This is not an officially supported Google product.