commit | 4bb39ca97083e5bac8dd2ea47f225586c6c74262 | [log] [tgz] |
---|---|---|
author | Ben Clayton <bclayton@google.com> | Mon Jan 15 13:35:15 2024 +0000 |
committer | Dawn LUCI CQ <dawn-scoped@luci-project-accounts.iam.gserviceaccount.com> | Mon Jan 15 13:35:15 2024 +0000 |
tree | fb35729b250394fa61bfd5ff4b628f6814212669 | |
parent | 2e6ee0e5f8a9b13e93eea5a47e3f2046a646c816 [diff] |
[dawn] Fix clang warnings On clang-14 and earlier, there's a whole bunch of warnings, like: ``` dawn/src/dawn/native/CommandAllocator.h:260:5: warning: unknown attribute 'always_inline' ignored [-Wunknown-attributes] DAWN_FORCE_INLINE uint8_t* AllocateData(size_t commandSize, size_t commandAlignment) { ^~~~~~~~~~~~~~~~~ dawn/src/dawn/common/Compiler.h:129:29: note: expanded from macro 'DAWN_FORCE_INLINE' ^~~~~~~~~~~~~~~~~~~~ ``` Add `DAWN_HAS_CPP_ATTRIBUTE()` macro that wraps `__has_cpp_attribute()`, and use this to detect support for `clang::always_inline`. Change the GCC path's `__always_inline__` attribute to `always_inline`, as this is what we check for, and is the far more common way of specifying this. Change-Id: I0fce12ffbd61b3689bc5a413d0955f8e1c284563 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/169421 Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Ben Clayton <bclayton@google.com>
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.