[spirv] Make all access chain indices unsigned. For any `OpAccessChain` in SPIR-V it is a validation error to have a negative constant index value. In order to make sure we never emit negative indices, always bitcast the index to an unsigned value before passing to the access chain. There are currently only two ways this can happen, by disabling robustness or but the disabling of runtime array robustness. In the case of the former, robustness has been disabled, so it's on the caller to make sure the index was never negative. In the case of the latter we only do this when we have RobustBufferAccess2 enabled and it will handling the clamping for us. Fixed: 459509275 Change-Id: I784cb3c8dbc3e3c907402094940fabed16138827 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/273294 Reviewed-by: James Price <jrprice@google.com> Commit-Queue: dan sinclair <dsinclair@chromium.org>
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.