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>
Owner
Author
|
Upstream PR xcl-dev#1055 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.
Queue method #31 of the newer layout (#29 of the older),
CopyPageMappingsBatchX, maps pages of the title's memory into GPU views. It was a stub. This PR decodes its batches and records, for each 64 KiB page of a GPU view, the physical page it shows. It can then say where XCL keeps that page's data now. Nothing reads that record yet, so textures are unchanged. First of the PRs planned in xcl-dev#1031 (see the correction there).What is in it
crates/xcl/src/hle/kernelx.rs,mirrors:apply_batches(count, batches, pool, pool_pages)decodes one call:kind, start, count(u32 each). Kind 0 mapscountpool pages fromstart; kind 1 maps pool pagestartat each ofcountpages; kind 2 unmaps; kind 3 keeps.pool_pages, the kind must be known, and the call may name at most 2^20 pages. A bad call records nothing.Shown).mapped_source(va)answers what the method put underva:Some(Some(a)):ais where XCL keeps that physical page now (page_now), or the pool page itself when the title had mapped none there;Some(None): the page is unmapped;None: the method never touched the page.releasednow also drops a released view's recorded pages.crates/xcl/src/hle/kernelx.rs, physical pages:Away::titleremembers, per address, the page the title mapped there last.move_away).page_now(page)gives where the page's data is: its address away from home, else its home.crates/xcl/src/hle/d3d12x/real.rs: queue [upstream #1133] Scripts: pr_check refuses smoke blocks without a title, time or frames #29 (older numbering) callsapply_batchesand returnsS_OKas the stub did. It logs its totals at the first call and at powers of two, including how many mapped pages had a physical page, and warns once on a bad call.page_mappings_point_gpu_view_pages_at_pool_pages: synthetic batches covering:a_gpu_view_page_shows_the_physical_page_where_it_is_kept: a real physical page is mapped into a pool and given to a GPU-view page. The page shows the pool. Once the page is also mapped at another address, the GPU-view page shows that address, with the same data.On the retail title (the one in xcl-dev#505;
main67a3735+ this change, RTX 4080, A pressed throughXCL_PRESS_AT; the run ends at+0x23cf683as onmain)Every call decodes, and every page lands in the title's one GPU view (
0xdffff0000, the view of0x7ffff0000):Where XCL keeps the physical pages. A local tracker, not part of this PR, followed each page. After 256 calls, of 34,872 mapped GPU-view pages:
mirrors::source), whichtitle_texturesreads today, is right.How textures sit on the map (local count, 111 s, 22,353 textures in the view):
The next PR has
title_texturesread GPU-view textures page by page throughmapped_source. It will re-check only the textures on pages that changed: the existing re-check of all GPU-view textures took 225 ms over 64k textures at 111 s, and there were 256 calls by 84 s.Tested
cargo test --workspace --no-fail-fast -- --test-threads=4onc8d5020: 737 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
page_nowthen finds no page, and the pool address is answered.Reference
The batch and range layout comes from VIctory's description of this method (
crates/victory-gpu/src/queue.rs). I read it as a reference only; no code was taken. The decode matches what the retail title passes (xcl-dev#1031).AI use
🤖 Generated with Claude Code
Mirror of xcl-dev#1055 (auto-synced, do not edit).