commit | 363a995068ade0f0110eef0100973b6c55744a15 | [log] [tgz] |
---|---|---|
author | Corentin Wallez <cwallez@chromium.org> | Mon Oct 31 11:17:50 2022 +0000 |
committer | Dawn LUCI CQ <dawn-scoped@luci-project-accounts.iam.gserviceaccount.com> | Mon Oct 31 11:17:50 2022 +0000 |
tree | e4a5a5ceb2ba8c3904884c7d83f962cee3823585 | |
parent | c14c8822b5e6a5e7fb00c2e15907c4c90ee47cdf [diff] |
ShaderModuleVk: Add a renamer to make other transforms safe. Without this other Tint transforms may end up calling user code instead of builtins (for example for the min() used in robustness). This commit does the following changes: - Changes ShaderModuleVk to return a CompiledSpirv object instead of just a Spirv Blob so that a remappedEntryPoint can be stored in the cache alongside the SPIR-V. - Inlines the logic and simplifies TransformedConcurrentShaderModuleCache slightly (by introducing a struct instead of std::pair, and adding a conversion method to ModuleAndSpirv). - Adds the Renamer transform to ShaderModuleVk and adapt the code to use the remappedEntryPoint where needed (pipeline creation and post-compilation reflection). - Adds a test where the min() used by the robustness transform is overriden to return a constant 0. - Moves the Renamer transform to be just after the SingleEntryPoint transform in D3D12 and Metal as well so as to make the test pass. Fixed: dawn:1583 Bug: dawn:1585 dawn:1587 Change-Id: Ia9de38d391a7901ed04b097f4a8d439759f7556e Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/107020 Reviewed-by: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Dawn is an open-source and cross-platform implementation of the work-in-progress 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)
(TODO)
Apache 2.0 Public License, please see LICENSE.
This is not an officially supported Google product.