Repository navigation
D3D12.X: detile 3D textures with packed mip tails - #1990
Merged
raylitebull merged 1 commit intoNov 25, 2026
Merged
Conversation
XG and PC D3D12 drivers pack 3D mip tails differently. Do not map XG packed volume tails directly onto the driver-defined packed tail; use the existing committed-resource detile/upload path. Cover packed and unpacked 3D placement policy and verify volume pixels on GPU.
|
Full-suite run, since this PR has no test report yet. Tested exact head Tested
Not tested
AI use
|
Member
|
Code review on
Remaining before merge:
|
Contributor
Author
Thanks for the review. For item 3, here is an AMD verification pass on the exact PR head
This complements the RTX 5070 Ti full-suite report above. Items 1 and 2 remain with the PR author. AI use: OpenCode with Big Pickle (opencode/big-pickle) read the full PR thread and the saved AMD test/smoke logs and prepared this draft; nothing was posted. |
Contributor
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
bobosneefdev
added a commit
to bobosneefdev/xcl
that referenced
this pull request
Nov 25, 2026
By the spec, one linear UpdateTileMappings region from subresource 0 covers every mip of a reserved texture. On RX 6800 (32.0.21045) it leaves upper 3D mips unmapped, and a NULL update over it leaves them mapped. Build one region per standard mip plus the packed tail from GetResourceTiling for both operations; 2D textures and unexpected tilings keep the linear region. Since xcl-dev#1990, 3D textures with an XG packed mip tail take the detile/upload path instead, so this applies to volumes whose mips all stay above the tail. The texture-placement GPU test gains such a volume (256x256x64, four mips) and checks that every mip of a placed 3D texture reads zero after retirement. It fails at mip 2 without this change. Assisted-by: T3 Code through Codex (gpt-6.1-sol) Assisted-by: Claude Code (Claude Opus 5.5)
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.
Part of #1488.
On Tier 2 adapters, 3D title textures with an XG packed mip tail were placed on shared
vram::Pages. XG packs volume tails differently from the D3D12 driver, so mips after the first packed tail were read back with the wrong bytes (placed_title_textures_share_vram_and_preserve_pixels: "3D 64x64x64 4 mips: subresource 2 mismatch").place_pagesnow falls back to the committed detile/upload path only for 3D XG textures whose first packed mip precedes the last level; other resources keep the shared-page path. The GPU test checks both placement policy and volume pixels.Compare: main...Adika713:fix/detile-3d-packed-mip-tails
What is in it
crates/xcl/src/hle/d3d12x/vram.rs: short-circuitplace_pagesfor 3D textures with a packed XG mip tail, add the layout check, and cover packed 3D, single-mip 3D and packed 2D descriptors in a unit test.crates/xcl/src/hle/d3d12x/title_textures.rs: require the committed detile/upload path for packed 3D textures and keep verifying their volume pixels.Tested
cargo check -p xcl --locked: passed in 26.99 s (two pre-existingAtomic::fetch_updatedeprecation warnings).cargo test -p xcl --lib hle::d3d12x::title_textures::tests::placed_title_textures_share_vram_and_preserve_pixels -- --exact --test-threads=1 --nocapture: 1 passed, 0 failed, 0 ignored.cargo test -p xcl --lib hle::d3d12x::vram::tests::packed_console_3d_mip_tails_use_the_detile_upload_path -- --exact --test-threads=1: 1 passed, 0 failed, 0 ignored.cargo test -p xcl --lib --no-fail-fast -- --test-threads=4: 810 passed, 0 failed, 22 ignored.cargo test --workspace --locked --no-fail-fast -- --test-threads=4on head971c0e5: all targets passed; e2e 3 passed, 0 failed; xg_oracle 6 passed, 12 ignored. SKIPPEDheap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows.git diff --check: clean.0x0with no device removals or crashes; PR head 445 frames against main's 444, peak commit 16560 MB against 16498 MB.Regression run
f5136a640a69be3ce072e1ea8939e97d005b4cb1, a commit ofmain):971c0e58765ef01e353722075af95bc658021e2a, clean worktree):Both runs used the same game folder and label produced by
scripts/smoke.ps1at the PR head; the main script's hash label was normalized to that folder label, with no measured field changed.Not tested
971c0e5; upstreammainadvanced afterwards and this branch was not rebased for the handoff.AI use
CONTRIBUTING.md.