commit | 710ed0c99dd6e9d03771fd7411da63b58958444d | [log] [tgz] |
---|---|---|
author | Jiawei Shao <jiawei.shao@intel.com> | Fri Sep 13 20:30:27 2024 +0000 |
committer | Dawn LUCI CQ <dawn-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Sep 13 20:30:27 2024 +0000 |
tree | 6d9336e4c46ae6ebb0dbea0e38cfda7921ed6858 | |
parent | 9b4b1f8af9cb48596aedd6461081f85efaa18766 [diff] |
Add validations on `clip_distances` and maximum inter-stage location This patch adds the validation on the use of `clip_distances` and the maximum location of the inter-stage shader variables according to the latest WebGPU SPEC. `clip_distances` will not only consume inter-stage shader variable slots, but also consume the maximum location of inter-stage shader variables, which is required by Vulkan. According to the Vulkan validation layer, the total number of inter-stage shader components is computed by the maximum location of all the inter-stage shader variables, so we should reserve the locations for `clip_distances`. For example, suppose the maximum location of the vertex outputs is 30, and there is builtin position (4) and clip_distances with size 1, so the Vulkan validation layer thinks the total vertex shader output components is 129 (31 * 4 + 4 + 1) which is over the maximum number of the total vertex shader output components on Intel GPUs. Bug: 358408571 Test: dawn_unittests, dawn_end2end_tests Change-Id: If89cb10b63011dd34df71389411072b4a5cc5d18 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/206354 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Kai Ninomiya <kainino@chromium.org> Commit-Queue: Kai Ninomiya <kainino@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.