commit | 8232b503e3a2184f7ee60be6d4696ae7b6336138 | [log] [tgz] |
---|---|---|
author | Ben Clayton <bclayton@google.com> | Thu Jun 29 16:10:29 2023 +0000 |
committer | Ben Clayton <bclayton@google.com> | Thu Jun 29 16:10:29 2023 +0000 |
tree | 27e743a605649b0179ea6a2b74705917eb98107a | |
parent | 49af09d96379ff2f8a7eae988e6e3e260c50648f [diff] |
[tint][ir] static_assert on non-deterministic instruction ordering It's all too easy to write code like: b.Add(b.Call(ty.i32(), fn_a), b.Call(ty.i32(), fn_b)) As C++ does not define the order in which arguments are evaluated, the ordering of IR instructions for this type of code is non-deterministic. This can impact production-code behaviour, so attempt to detect this pattern and statically assert if multiple, non-reference ir::Instruction* arguments are passed to a builder function. Non-reference pointers arguments are typically only obtained by making function calls, which are most commonly from inner builder calls. Change-Id: I0b36526ab0cc5d8077a1a5cc21c55569bdbbe225 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/139521 Reviewed-by: James Price <jrprice@google.com> Reviewed-by: Dan Sinclair <dsinclair@chromium.org> Commit-Queue: Ben Clayton <bclayton@google.com> 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.