tint/spirv: Refactor constant rewriting in transpose row major Split the RewriteConstant function in TransposeRowMajor into two separate, cleaner functions: TransposeRowMajorMatricesInConstant (handling the structural traversal of structs/arrays) and TransposeRowMajorMatrixOrArray (doing the actual transpositions). This fixes a bug in the handling of arrays demonstrated in the test LetConstant_ArrayOfStruct. There was an early exit in the array case if we had not yet seen the row major attribute. However, that attribute existed in the struct type inside the array, so the matrix in the struct was not being rewritten. Bug: 521775317 Change-Id: Idc5f011ead1bfba0f3123d3627527c3393b2bca5 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/322295 Reviewed-by: dan sinclair <dsinclair@chromium.org> Auto-Submit: Steven Perron <stevenperron@google.com> Commit-Queue: Steven Perron <stevenperron@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.