commit | 45ff7a8c4ae718a9ffb980c174626f2683522854 | [log] [tgz] |
---|---|---|
author | dan sinclair <dsinclair@chromium.org> | Thu Apr 20 16:50:29 2023 +0000 |
committer | Dawn LUCI CQ <dawn-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu Apr 20 16:50:29 2023 +0000 |
tree | 83cbdd89af23795fede7fef2047fcb4ec0914842 | |
parent | 03d68fa33f0b833b72920a22c78db091d3c1762d [diff] |
Remove extra work from `is_reserved` Currently the `is_reserved` method in the WGSL parser uses the `operator==` on the token to check the reserved words. This ends up re-doing a bunch of work as it checks the token type, then gets the `string_view` or `string` from the variant, then compares. This CL adds a precondition that the token is an identifier (which is true in the only case we call this method) and then extracts the string from the token once and uses that for all the comparisons. Change-Id: If425afea38e727169de7991a84f6fa1e47f660ef Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/128140 Reviewed-by: Ben Clayton <bclayton@google.com> Commit-Queue: Dan Sinclair <dsinclair@chromium.org> Kokoro: Kokoro <noreply+kokoro@google.com>
Dawn is an open-source and cross-platform implementation of the work-in-progress 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)
(TODO)
Apache 2.0 Public License, please see LICENSE.
This is not an officially supported Google product.