[WebGPU] Automate Dawn updates (#33396)
Dawn updates currently require coordinating the archive pin, dependency
hashes, SwiftShader revision, and local patches. Add a single command to
prepare, apply, and validate these changes together:
```sh
python plugin-ep-webgpu/tools/dawn/update_dawn.py
```
The command defaults to the newest dated Dawn tag. Use `--revision
<tag-or-full-commit>` to select a specific version. It records the
concrete revision and checksum, updates the reviewed dependency manifest
and Linux test SwiftShader pin, and refreshes active patches in CMake
order.
Refreshed patches must reproduce the expected source with zero fuzz or
offsets. The command verifies written contents and automatically
validates the manifest against the selected checkout. Unresolved patches
or dependency changes needing classification stop the update; writing or
final-validation failures trigger restoration of every attempted file,
continuing after individual restoration errors and reporting them
alongside the original failure. Reports and a diff are saved under
`build/dawn-upgrade/`, and repeating the same update makes no further
edits.
Dependency classifications and the independently packaged DXC release
are preserved. DXIL handling is outside the scope. A manifest-only
updater remains available for focused maintenance.
This PR contains eight tooling, test, and documentation files.
Build-inventory generation and packaging-pipeline integration are in
#33448. Dawn version updates generated during local validation are
separate from this PR.
Validation:
- 49 tests and 29 subtests passed with ordinary and aliased Windows
temporary paths, including real GNU patch application, latest-tag
resolution, metadata preservation, repeat runs, persistent write
failures, partial writes, and multiple rollback failures. Recovery was
also verified with a real read-only manifest.
- Ruff lint/format and Git whitespace checks passed.
- An isolated update from `v20261013.193955` to `v20261016.190333`
changed nine files and passed automatic manifest and strict patch
validation. A second invocation changed zero files.
- Earlier pinned comparisons reproduced #33390's two changed files
exactly and #32686's dependency identities and revisions.
The command automates source updates and metadata/patch validation.
Build, package, and GPU tests remain necessary to establish runtime
compatibility for each Dawn update.