Repository navigation
Conversation
…ew's pages show Queue method #31 (#29 of the older layout) maps pages of the title's memory into GPU views; it was a stub. Its batches are now decoded and checked against the batch count and the pool, and each 64 KiB page of a GPU view keeps the pool page it shows, or none (kernelx::mirrors). A bad call records nothing. Releasing a view drops its pages. Nothing reads the map yet: textures are unchanged; the queue logs its counts. (xcl-dev#1031) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eps it The page-mapping method names pool pages; the console maps the physical page under each. The title maps most of those pages into the CPU view too, and XCL moves a page's data to where it was mapped last, so the pool address alone is the wrong page for most of them. Each title mapping is remembered per address (Away::title); a GPU-view page records the physical page of its pool page and `mapped_source` answers where that page is now (`page_now`), else the pool page itself. The queue log counts the pages that had a physical page. (xcl-dev#1031) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hod put under it Each 64 KiB page of a texture in a GPU view is read from what queue #31 (CopyPageMappingsBatchX) mapped there: the physical page where XCL keeps it, zeros for an unmapped page, the CPU view for a page the method never mapped (`source_of`, `Source::Pages`). The textures on the pages a call changes, or whose physical page moved, are looked at again at the next submit (`mirrors::take_changed`, `page_moved`), not all of them. Their writes are watched where the pages are. (xcl-dev#1031) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
Upstream PR xcl-dev#1102 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.
Stacked on xcl-dev#1055: only the last commit (
59042fd) is this PR. I'll rebase it once xcl-dev#1055 is merged.A texture in a GPU view now reads each of its 64 KiB pages from what queue #31 (
CopyPageMappingsBatchX) mapped there:On the retail title of xcl-dev#505 about 43% of the mapped pages had their physical page at the pool address, while the texture read the CPU view's same offset. That offset is not committed, so those parts of textures went up as zeros (xcl-dev#1031, the correction there).
What is in it
crates/xcl/src/hle/d3d12x/title_textures.rs:Sourcereplaces the single address a texture was read from. It is either one address (At, as before) or runs of the texture's bytes from several addresses (Pages; address 0 means zeros). Uploads, the unchanged-content check, the detile and the write watch all go through it.source_of(va, len)builds it. A texture whose pages form one run comes back asAt, so it costs what it did before. A texture outside GPU views, or one whose pages the method never mapped, isAt(mirror_source(va))as before.recheck_gpu_view_sourcesre-reads the source only of the textures on pages the method changed, or whose physical page moved (mirrors::take_changed, found throughby_va). Looking at all of them took 225 ms on 64k textures, and the method is called hundreds of times. A change ofgpu_view_map_gen(physical pages mapped into a GPU view directly) still looks at all of them, as before.crates/xcl/src/hle/kernelx.rs,mirrors:page_moved(page)is called where a physical page is mapped, unmapped (unmap_away) or freed, so a texture follows its page when the title maps it into the CPU view too.a_page_mapped_texture_is_read_page_by_page: runs, zeros, the CPU view for untouched pages, one run as one address, the watched ranges and the dirty check.gpu_mirror_upload_follows_cpu_writes_and_later_mapping_changesgets three steps on the GPU, each read back from the PC texture:source_ofreduced to the oldmirror_source(checked).On the retail title (
main67a3735+ xcl-dev#1055, with and without this PR; RTX 4080; A pressed throughXCL_PRESS_AT; one run each)Textures whose memory is all zero.
XCL_TRACE_FRAME=1logs how many textures are all zero in 16 samples of 4 KiB over their memory. The snapshots don't fall at the same moments in the two runs:A texture can be zero on purpose, so this is a trend rather than a count of fixed textures.
Nothing slower. Over the whole run (presents / submits / draws), and when the first
#101and the watchdog come:#10132,768+ textures were kept in step "with its pages", most of them as one run.
The run still ends at the title's watchdog (
+0x23cf683), as onmain. That stop is about stalled GPU work (Newer retail title (TitleID 7952987A): reaches world loading, then the title's GPU watchdog ("GPU Loc Sig") after ListX #101 stub xcl-dev/xcl#505), not about textures.Tested
cargo test --workspace --no-fail-fast -- --test-threads=4on59042fd: 738 passed, 0 failed, 41 ignored. SKIPPED:gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware(no wave64).Regression run
main:
PR:
Not tested
XMemMapPhysicalPagesinto the view): the method's mapping wins here, whichever came last.AI use
🤖 Generated with Claude Code
Mirror of xcl-dev#1102 (auto-synced, do not edit).