commit | fad20a09b2d37250536c459bd884024f7a3c975b | [log] [tgz] |
---|---|---|
author | Ryan Harrison <rharrison@chromium.org> | Tue May 20 14:14:35 2025 -0700 |
committer | Dawn LUCI CQ <dawn-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue May 20 14:14:35 2025 -0700 |
tree | 502d37b5e76bafb70cc31493b63f11d8c2fca86c | |
parent | ab8b92ee2549ca4ad6ad748857d7e23c2a076645 [diff] |
[tint][ir] Check enum deserialized values in decoder proto3 uses 'open' enums, which means when a value is out of the expected range for a enum it still gets written into the message data when deserializing, instead of being written to the unknown set. (This is done for reasons relating to avoiding mangling data when serializing/deserializing using different versions of a .proto.) The consequence of this is that the IR binary decoder needs to check that enum values coming out of the deserialized protobuf message are valid before using them. (There is no provided protobuf message is well formed method, etc). This has been done via inserting checking logic for each of the enums, either in the conversion method if there is an appropriate 'unknown' or 'invalid' value in the IR that can be returned, or by checking before the conversion callsite and doing what is ever appropriate for bad inputs. The TINT_ICEs in the conversion methods have been retained so that if a new value is added to the binary/IR format, but decoding logic is not added that decoder there will be a crash instead of just a potentially silent failure. Fixes: 418918028 Change-Id: I5fb3260ae1ec849771c5d147a984b35459a2bd5f Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/243094 Reviewed-by: dan sinclair <dsinclair@chromium.org> Auto-Submit: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dan sinclair <dsinclair@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: James Price <jrprice@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.