Fix an incorrect check in TypedIntegerImpl This patch fixes an incorrect check in the constructor of `TypedIntegerImpl`. When `I` is a signed integer and `T` is an unsigned integer, `std::numeric_limits<I>::min()` is negative while `std::numeric_limits<T>::max()` is an unsigned value, so `std::numeric_limits<I>::min()` will be implicitly converted to an unsigned value, which is not expected. This will also cause a `signed/unsigned integer mismatch` warning when we build Dawn with clang. In this patch we fix this issue by requiring `rhs` to be non-negative and always convert `std::numeric_limits<T>::max()` and `std::numeric_limits<I>::min()` to be uint64_t when `I` is a signed integer and `T` is an unsigned integer. Bug: 436300898 Change-Id: I7deed22a5ae1a5a13d0a39e46a812f6bbb2216ec Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/259897 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Loko Kung <lokokung@google.com> Commit-Queue: Jiawei Shao <jiawei.shao@intel.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.