commit | d07a2002494ccc6ece8bbeb13814d3d98e4ab75c | [log] [tgz] |
---|---|---|
author | James Price <jrprice@google.com> | Wed Apr 24 21:15:09 2024 +0000 |
committer | Dawn LUCI CQ <dawn-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Apr 24 21:15:09 2024 +0000 |
tree | 11c532c7e531306aa0d51586c617e187ed508d1a | |
parent | 4f491bf8c370e4975672b3f5abd0f1de4a95f12e [diff] |
[spirv] Fix dynamic indexes into constant arrays When a constant array was dynamically indexed from multiple functions, the VarForDynamicIndex transform was adding a function-scope copy of the array to one function and then trying to use it from the other functions. This CL changes the transform to use module-scope variables for constant array indexing instead. A similar problem exists for non-constant arrays that are indexed from multiple blocks. This is fixed here by moving the function-scope declaration to the earliest point that is immediately after the definition of the array value. A new helper is added to the IR builder to determine the correct insertion point depending on the kind of value we are inserting after (instruction result, function parameter, or block parameter). Fixed: tint:2237 Change-Id: Ib7d9c3ae7f83939c0270c8da6ce6c29994b88de5 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/185525 Commit-Queue: James Price <jrprice@google.com> Reviewed-by: dan sinclair <dsinclair@chromium.org> Reviewed-by: Ben Clayton <bclayton@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.