fix(shader): reuse bound specialization fields for null buffer slots #13774
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/13774"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by Celegans12 on 2026-10-31T05:34:42Z.
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 onmain18f5949788.--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.main8dc9f366ce: 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)