D3D12.X: detile 3D textures with packed mip tails #1980
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1990"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ivall/xcl. Originally posted by Adika713 on 2026-11-25T00:26:52Z.
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: https://github.com/xcl-dev/xcl/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.Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-25T01:00:56Z.
Full-suite run, since this PR has no test report yet. Tested exact head
971c0e5(on its basec160d86).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::dxil::fuzz_tests: 858 passed, 0 failed, 42 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.packed_console_3d_mip_tails_use_the_detile_upload_path.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1: 859 passed, 0 failed, 42 ignored. SKIPPED:heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).--skipleaves out tests that fail on main7994cd1too, not because of this PR. On NVIDIA:heap_window_out_of_memory_falls_back_to_the_switch_form(#1651), the fourgpu::recomp::lower_dxil::tests::*_programs_on_the_gputests andconst_and_null_mask_operands_agree_with_hlsl_on_the_gpu(follow-up on #1651) fail becauserunner::skip_testturns their skips into failures underXCL_REQUIRE_GPU=mesh, andgpu::dxil::fuzz_testsseeds 70, 545, 1019 and 1507 failCreateComputePipelineStatewithE_OUTOFMEMORYon this card (drivers 616.64 and 621.40). On AMD:fuzz_validate_and_gpu_1fails on seed 540 (res[833]0x7 vs CPU 0x6). The AMD run does not setXCL_REQUIRE_GPU.Not tested
AI use
Imported from ivall/xcl. Originally posted by raylitebull on 2026-11-25T01:13:04Z.
Code review on
971c0e5:title_textures.rs/vram.rsis well-scoped, and the RTX 5070 Ti suite passes.CIworkflow approved (currently running).Remaining before merge:
PR descriptioncheck.Build and test (Windows, no GPU)finishes green.971c0e5.Imported from ivall/xcl. Originally posted by Adika713 on 2026-11-25T01:17:03Z.
Thanks for the review. For item 3, here is an AMD verification pass on the exact PR head
971c0e58765ef01e353722075af95bc658021e2a: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=4: all targets passed;xcllib 810 passed, 0 failed, 22 ignored; e2e 3 passed, 0 failed;xg_oracle6 passed, 12 ignored. SKIPPEDheap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows.cargo check -p xcl --locked: passed (two pre-existingAtomic::fetch_updatedeprecation warnings).git diff --check: clean.0x0, 445 frames shown, 0 device removals, 0 crashes. The main comparison (f5136a640a69be3ce072e1ea8939e97d005b4cb1) exited0x0with 444 frames, 0 removals, 0 crashes.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.
upstream-sync referenced this pull request2026-11-25 04:08:41 +00:00
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T03:33:22Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: 1038 passed, 1 failed in one parallel run; the failing test passes on a single-threaded rerun (1039/0). Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.Thanks!
upstream-sync referenced this pull request2026-11-25 10:09:30 +00:00