Repository navigation
fix(shader): reuse bound specialization fields for null buffer slots - #13774
Conversation
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
Windows GPU run of head Windows 11 Enterprise 10.0.22621, Ryzen 9 5950X, Radeon RX 6700 XT with AMD proprietary driver 26.10.1 (Vulkan 1.4.315), WinLibs GCC 15.2.0 UCRT r7, Ninja, Release,
AI-assisted: yes (Claude Code). |
✅ NVIDIA GPU test: passedPR head
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (2, not counted against this PR)Validation IDs already present on main (4 IDs in 426 tests)Skipped (42)ReproduceAutomated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
Null buffer descriptors still split modules on unused specialization fields after buffer presence moved to run time. Learn the first valid bound fields per slot and use them for absent descriptors, retaining actual runtime presence and independent bound formats. Snapshot the learned fields once for result memo keys and materialization so identical null captures cannot retain a module made before learning. Cover direct, captured and prepared calls, null stores, and changed formats. Keep the process-local table and an off switch for main's module selection. AI-assisted: yes
ab67d16 to
068f2b3
Compare
|
Checked the interdiff of the null-slot substitutes (plan key, result memo and masked hash all use the same snapshot, learning happens after the first valid bound plan) and the new test, which pins null→bound and bound→null in direct, captured and prepared modes. main moved the test registrations into |
|
Data point from Grand Theft Auto VI (PPSA38500), RTX 3080 Ti, Windows. The substitute table is process-local (the static map in
Storing the learned field sets with the variant in the disk cache, or choosing the substitute deterministically, would keep the variant reduction without the cross-run churn. |
What
After #9957 moved buffer presence to run time, null V#s still select different shader modules from their unused stride, format and alignment words. This is the buffer-substitutes piece next in the order agreed in #675, after #8160/#8161.
Each program learns a slot's fields after its first valid bound plan. Null slots use those fields; never-bound slots use zeros. Bound slots retain their own fields and the actual descriptors still control presence. Full/masked result memos and plan creation share one immutable substitute snapshot, so null -> bound -> the identical null cannot retain a pre-learning module. Tables stay process-local;
APS5_NO_BUFFER_SUBSTITUTES=1restores main's selection.Related: #6412 adds descriptor-status validation and key fields; retain them when composing. #6924 changes persistent plan identity; it must key the effective fields too. #7642/#9508/#10193 change the same ordinary/heap keys. #12662/#12980 extend the Prepare signature. #10757 changes memo-result recycling. These are composition points, not prerequisites.
Tested
-DBUILD_TESTING=ON, based onmain18f5949.--repeat until-fail:3).agc_driver_null_buffer_substitutesand the addedagc_shader_disk_cachecheck fail on main. Direct/captured/prepared calls, null loads/stores, changed formats, masked-memo verification and GPL on/off pass.main8dc9f36: 20/20 on both Windows drivers.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)