[tint][msl] Workaround bug in Metal insert_bits When MSL's insert_bits builtin is called with an offset of 32 and a count of 0, it can trigger a GPU hang. This works around the issue by clamping to 31, which is the greatest offset in insert_bits that is not a no-op (inserts only 1 bit at most). If inserting 0 bits, it is a no-op anyways so the clamp has no functional affect besides preventing the hang. Since this does not adhere to the MSL spec a feedback has also been filed to Apple: FB23103184. Corresponding CTS that passes only after this change: https://github.com/gpuweb/cts/pull/4664 Bug: 506180954 Change-Id: I6954f22f56340998cb21bcef8f4a2d618298b89a Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/316515 Commit-Queue: Natalie Chouinard <chouinard@google.com> 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.