commit | e9ad5078c792a2f1bc6d3c899d3d0e004496a680 | [log] [tgz] |
---|---|---|
author | Austin Eng <enga@chromium.org> | Mon Apr 29 18:35:17 2024 +0000 |
committer | Dawn LUCI CQ <dawn-scoped@luci-project-accounts.iam.gserviceaccount.com> | Mon Apr 29 18:35:17 2024 +0000 |
tree | 7c84bc3cac3236815d6f22a576747e86d2434749 | |
parent | 414be5b0431081c8b0f09dedcfe3aa113371e8ba [diff] |
Add c++ "init structs" for chained struct types Chained structs can't currently use designated initializers. This is because aggregate initialization is not supported when the struct has a constructor. The constructor defaults the sType. To allow for a sort of aggregate initialization with designated initializers, add an Init struct from which the struct can be constructed. This allows for aggregate-looking construction with mostly the same syntax. You can now construct a chained struct with double-braces (instead of single) like: ``` MyChainedStruct {{ .foo = 42, .bar = "hello!", }}; ``` Bug: chromium:40195122 Change-Id: I05e99335f48dd56ee7cdc0c4539111c630c70d8a Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/185967 Reviewed-by: Loko Kung <lokokung@google.com> 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.