Repository navigation
d3d12-gpu: writes kept for a one-shot bake are compacted, not dropped - #3048
Open
Kal0s-design wants to merge 1 commit into
Open
Kal0s-design wants to merge 1 commit into
Kal0s-design wants to merge 1 commit into
Conversation
texture_slots_page_written keeps the physical-page writes it does not make due for the next one-shot decoration/ped bake. Past 16,384 ranges it dropped the lowest of them (drain after the sort by join), so the textures written there kept their old bytes through the bake; DirectStorage can finish many batches between two bakes. The ranges are now made fewer with compact (neighbours joined, every changed byte still covered), as the pending texture changes already are, in retain_bake_writes. After TaynanGT's fix in TaynanGT/Vice-Tay (af7a9ed, its bake-writes part). Co-Authored-By: TaynanGT <157688638+TaynanGT@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Claimed in the coordination issue as: D3D12-GPU-BAKE-WRITES-KEEP-COVERAGE (#2570 (comment))
What and why
texture_slots_page_writtenind3d12/crates/leonida-gpu/src/descriptor/host.rskeeps the physical-page writes it does not make due in the heap'sbake_page_written, for the next one-shot decoration/ped bake. Past 16,384 ranges it dropped the lowest of them (drainafterjoin's sort), so textures written there kept their old bytes through the bake. DirectStorage can finish many batches between two bakes.The change: the ranges are made fewer with the existing
compact(neighbours joined, every changed byte still covered), as the pending texture changes already are, in a smallretain_bake_writes. Rebased on #2852 (writes kept per heap).This ports the bake-writes part of TaynanGT's fix from the sibling VIctory tree (TaynanGT/Vice-Tay
af7a9ed, GPL-3.0), credited as co-author.Tested
descriptor::host::tests::bake_writes_keep_every_change_across_batches: three batches of 32,768 disjoint ranges each; after every batch at most 16,384 are kept and every changed range is still covered by one. Withmain's drop in place it fails (batch 0: 16,384 ranges no kept range covers); with the change it passes.cargo test -p leonida-gpu --lib: 669 passed, 0 failed, 59 ignored.cargo clippy -p leonida-gpu --lib --tests: no warning in the changed lines.GPUs tested: n/a (CPU unit tests)
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator change)🤖 Generated with Claude Code