Repository navigation
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Add a WGSL backend and
anyps5-wgsltools for WebGPU while preserving main's native cache keys, SPIR-V and disk-cache encoding. WGSL requests use distinct keys. Production compiler source-version stamps still change when compiler sources change.This is the WGSL prerequisite of boykopovar#6879, replacing closed boykopovar#9094. The relinker fix boykopovar#10017 and Emscripten library portability boykopovar#11341 have merged. Unsupported WGSL cases are recorded in
docs/dev/debt/changes/wgsl-native-cache.md. wasm-aot and runtime delivery remain separate follow-ups.Main
75b480e9c78ea1f13a7079f8f8457b990ea9f28dwas merged on 2026-12-01, preserving the reviewed commits and bringing in the upstream macOS replay fixdde92d5b17. The native target fields remain before the WGSL-only key suffix, with main's NaN-failure checks and native serialization. The existing fixture references passed on the refreshed main.The cache-key review is addressed by including all WGSL emission inputs in
WgslSource::Module's key. The key records input presence, compute workgroup and LDS sizes, pixel render-target modes and interpolation settings, and vertex embedded-fetch and clip-space settings. Float fields use their bit patterns. Existing specialization constant/binding keys are preserved, and requests with the same input values still reuse modules. This is confined to the WGSL module cache.Tested
Ubuntu 26.04.1 x86-64, GCC 15.2, Node 22.22.1 and Chromium 151.0.7922.34; baseline main
75b480e9c78ea1f13a7079f8f8457b990ea9f28d, tested head6f9c4ff1d06ea0704866c80a22742e9e8fb1d884.48938a5a32failed withinteger render target: reused stale WGSL modulewhen changing a pixel shader from float to integer output with identical constants and bindings. On the corrected head the tests pass for pixel render-target type, interpolation slot/mode/default and custom mask, vertex embedded fetch and clip-space transform (including +0/-0), compute workgroup dimensions and LDS size, missing/unsupported inputs, repeated identical inputs and restored inputs. Equal input values at different addresses also reuse the module.shader_native_snapshotpassed 1/1; the change'sshader_native_snapshotandwgsl_native_compatpassed 2/2. Three public compute fixtures produced 9/9 byte-identical native files: cache keys, SPIR-V and encoded artifacts. Native-to-WGSL-to-native cache reuse and separate target keys passed.shader_cache_file_read,shader_cache_native_pathsandrequest_serializertests: the four CTests passed 4/4 on each tree. Two Windows-only Python subcases skipped on each Linux run.ANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1,VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validationandVK_LOADER_DEBUG=layerwith verbose CTest, on the same Mesa lavapipe / llvmpipe device (vendor10005, LLVM 21.1.8, Mesa26.0.8-1ubuntu0.3). Both native Vulkan logs confirm validation-layer insertion, with 0 VUID errors and no missing-layer diagnostic. The installed validation layer is 1.4.341, newer than pinned Vulkan headers 1.4.335. Snapshot and cache tests themselves are CPU-only.shader 0:. The checker selects Chromium's SwiftShader backend. The browser check used the four validation variables above; its log confirms layer insertion, without missing-layer or VUID diagnostics. Runtime format placeholders were set to representative values. This checks pipeline creation, not shader dispatch results.e71ac2f18epassed the full nativelibsbuild, including the production shader recompiler, AGC driver and NID patching, from recorded submodule source. Configuration: Release,BUILD_TESTING=ON,ANYPS5_USE_SYSTEM_DEPS=OFF,ANYPS5_ENABLE_SPIRV_TOOLS=OFF. That full project build also passedshader_cache_file_read,shader_cache_native_pathsandrequest_serializer3/3 with the four validation variables above; the same two Windows-only Python subcases skipped. This is not the complete product/runtime CTest suite.2125187a95. Full product runtime suites, title execution, vertex/pixel WGSL pipeline validation and physical GPU testing have not run.CI claim ownership:
native-compatibility-and-wgsllinuxandwindowsconventionsrelinker (macos-latest, clang++)The dedicated WGSL job tests the submitted head against its shared ancestor with main. The Build workflow tests the current merge. The external native Vulkan qualification is local evidence. The checker uses Node built-ins and Chromium with no new third-party source or Cargo packages.
The previous macOS relinker job failed
frame_capture_minimize_replaywhenkillpg(pid, 0)returnedEPERMduring process-group shutdown. The upstream fix retries that macOS condition within the existing timeout while still requiring the group to disappear. It adds regression tests covering both temporary and persistent errors. On Linux, the updated 22-case replay suite passed on main and prior head48938a5a32with 6 platform-specific cases skipped. On main's macOS runner, the replay test passed on the first attempt and the suite passed 1,026/1,026.On head
48938a5a32, the macOS relinker job passed 1,026/1,026. The previously failing replay test passed on the first attempt. The WGSL job, Conventions, Linux relinker and relinker ASan also passed. The automatic Windows build and tests and Windows relinker jobs passed. The automatic full Linux job was skipped and requires separate maintainer dispatch.Current head
6f9c4ff1d06passed local validation above and the WGSL backend job. Its log identifies the pinned baseline and exact candidate, passes the new pixel/vertex/compute cache regression, compares all nine native outputs, and creates 3/3 WebGPU compute pipelines. Conventions, macOS relinker, Linux relinker, Windows relinker and relinker ASan passed. The automatic Windows job passed. The full Linux job was skipped and requires maintainer dispatch.Landing order and overlap:
98b083ca99independently into main75b480e9c7and the WGSL head48938a5a32. With the default target in the three public fixtures, native keys, SPIR-V and artifacts matched 9/9 and both previews created 3/3 native Vulkan compute pipelines on the same llvmpipe device with the validation layer and zero VUID errors. The merged key appendscoherentBufferAtomicsbefore the WGSL-only suffix. feat(agc): emulate mesh pipeline draws with a compute pass when VK_EXT_mesh_shader is unavailable boykopovar/AnyPS5#17611 head59203ed861still conflicts with this main in 12 files, so the two-prerequisite integration remains pending.tools/pr_overlap.py --branch review/wgsl-main-20261107 --base main --head-repo SteelCrab/AnyPS5scan against main1b8f79a5b5examined 2,147 open PRs and reports nine direct overlaps: perf(agc): share one render pass between mesh-path draws run as compute boykopovar/AnyPS5#15548, fix(agc): reuse a data-only draw stage through a moved table and its data boykopovar/AnyPS5#20130, fix(agc): poison only the pointer-table records a dispatch writes boykopovar/AnyPS5#22690, fix(agc): poison only the buffer-table records a dispatch writes boykopovar/AnyPS5#22703, perf(agc): note only the ranges table-read V#s can reach as pending reach boykopovar/AnyPS5#23242, fix(shader): inline read_bda_span on NVIDIA in wave64 modules that hold two lanes per invocation boykopovar/AnyPS5#27811, fix(shader): give equivalent specialized modules one identity boykopovar/AnyPS5#28102, fix(shader): read bound compute buffer fields at run time boykopovar/AnyPS5#28295 and feat(shader): name the values that differ between a program's compute pipelines boykopovar/AnyPS5#28296. Another 70 PRs already conflict with main and could not be fully compared, including the unmerged prerequisites. The scan exits 2; this is not a compatibility pass. It checked merge commit5d564ffbff, before the reference-only test commite71ac2f18e; product sources are identical. The target-field, compiled-variant and artifact/result-size changes need integration review and combined testing after landing. Existing stacks (feat(agc): emulate mesh pipeline draws with a compute pass when VK_EXT_mesh_shader is unavailable boykopovar/AnyPS5#17611 → perf(agc): share one render pass between mesh-path draws run as compute boykopovar/AnyPS5#15548, fix(agc): poison only the pointer-table records a dispatch writes boykopovar/AnyPS5#22690 → fix(agc): poison only the buffer-table records a dispatch writes boykopovar/AnyPS5#22703 and fix(shader): give equivalent specialized modules one identity boykopovar/AnyPS5#28102 → fix(shader): read bound compute buffer fields at run time boykopovar/AnyPS5#28295/feat(shader): name the values that differ between a program's compute pipelines boykopovar/AnyPS5#28296) are preserved; no further author agreement is claimed.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)