Repository navigation
Conversation
Use the placement index to select uploads when a submit dirties a few pages. Check remapped CPU sources separately and preserve resource order. First uploads and dense writes still use the full scan. Co-Authored-By: GPT 6.2 Sol <noreply@openai.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
Upstream PR xcl-dev#1086 was closed or merged. |
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.
Each submit that finds written pages checked every tracked title texture against the list of written pages, even when only a few pages were written. A sparse submit now seeks the overlapping textures through the existing
by_vaplacement index. Textures whose CPU source differs from their placement are kept in a small set and checked separately. Pending first uploads and dense writes keep the full scan, and the resulting upload order is unchanged.Related to xcl-dev#582, but it does not change
GetWriteWatch, which that issue measured as 99.7 % of a look. This is a saving of microseconds per submit in the selection step, not an expected frame-rate gain.What is in it
crates/xcl/src/hle/d3d12x/title_textures.rs: indexed selection of upload candidates;insert_active/remove_activekeep the remapped set in step with the placement index; a test against the full scan (aliases, remapped sources, shadowed and restored placements, GPU-written and pending textures, dense writes); a manual release benchmark (#[ignore]).Tested
xclbuilds.cargo test --workspace --no-fail-fast -- --test-threads=4 --show-output: 735 passed, 3 failed, 42 ignored on this head; 734 passed, 3 failed, 41 ignored onmain384f7f7. The same three fail in both:placed_title_textures_share_vram_and_preserve_pixels(3D texture, subresource 2 mismatch), andtransitions_apply_when_their_list_is_submittedandd32s8_targets_take_their_own_size_of_video_memoryon the lock it poisons.test_title_draws_with_a_root_signature_under_the_debug_layer,uploads_start_from_each_subresources_state.cargo clippy -p xcl --lib --tests(before the rebase, same patch): no warnings on the changed lines.cargo test --release -p xcl --lib bench_dirty_texture_candidates -- --ignored --nocapture, median of seven rounds, synthetic textures, µs per submit for the selection alone:The ratio varies by run: two earlier runs of the 4096 / 4 row measured 72x and 90x.
Regression run
The first pair, main then PR. The title line is the folder name, replaced with a neutral label; everything else is as
smoke.ps1printed it.main:
PR:
All five pairs of those two builds, frames shown (no crash and no device removal in any):
Other builds ran on the PC during several of these, and I found no mechanism for a slowdown, but the PR's median is 4 % lower and its third run is below 80 % of main's, so a small cost is not ruled out. Runs 1 and 2 of the PR and run 3 of main peaked at about 15.5 GB, the others at about 15.1 GB. A run on a quiet PC is welcome.
Not tested
PENDINGand nothing takes that count back (existing behaviour, read in the code, not reproduced). Where that happensPENDINGstays above zero and every look uses the full scan, as before.AI use
Mirror of xcl-dev#1086 (auto-synced, do not edit).