D3D12.X: a 3-D texture XG cannot size is taken at its texels' bytes #2753
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!2753
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2753"
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?
@MacieGx on GitHub · 2026-11-26 10:13 UTC · original
MacieGx:d3d12x/volume-texture-size→main· +65 −2 · 2 files · 1 commits · openA 3-D texture XG does not lay out (a 3-D render target:
xg::Texture::volumerefuses flags 1 / 2 withE_NOTIMPL) got no console size inCreatePlacedResourceX, sovramgave it every tile of the PC texture as a 64 KiB page at its address. The newer retail title of #505 places thirteen 33x33x33 RGBA16F colour LUTs (render target + UAV, flags 0x5) 512 KiB apart; the PC texture has 18 tiles of 64 KiB, so each LUT shared 10 pages with the next one. A LUT's bake overwrote rows of its neighbour, the tone map sampled another LUT's rows (LUT[black] = cyan) and the whole picture came out teal. Such a texture is now taken at the bytes of its texels (287,496 here: 5 pages of its own), which no console layout of it is smaller than.Part of #505.
Why not the console's layout: what the console's library does with a 3-D render target is not known here. The
xg_oraclevolume test covers flags 0 and 4 only, and no console library was at hand to ask. The 2-D rule for render targets (64KB_R_X, thin for 3-D in our tiling model) would give 33 x 64 KiB = 2.06 MiB, which cannot be right for textures the title packs 512 KiB apart, and it would keep the overlap. 4KB_S thick (500 KiB) fits, but that is a guess. Teaching XG this would also change whatXGCreateTextureComputerandGetResourceAllocationInfotell titles. The texels' bytes are a lower bound of any layout, so the pages taken are always the texture's own.What is in it
D3D12.X: a 3-D texture XG cannot size is taken at its texels' bytes(crates/xcl/src/hle/d3d12x/device_x.rs:console_bytes/volume_texel_bytes, used bycreate_placed_resource_x;vram::owned_pagesmadepub(super)for the test), with the unit testvolume_targets_xg_does_not_lay_out_keep_to_their_texels: two such LUTs 512 KiB apart do not share a page, a full mip chain is summed, and a sampled 3-D texture keeps XG's size.Tested
console_bytesis XG's size only) the new test fails:assertion left == right failed, left: None, right: Some(287496); with it, it passescargo test --release -p xcl --lib -- volume_targets owned_pages hle::xgone07d03bf: 80 passed, 0 failed, 0 ignored, 1257 filtered out (CPU tests; the filter also matcheshle::xgameruntime)stable-x86_64-pc-windows-msvc, release. One07d03b(this PR, onmainb49be18).cargo build --release --workspace && cargo test --release --workspace --no-fail-fast -- --test-threads=4one07d03b: 1432 passed, 4 failed, 47 ignored. The 4 failures aregpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0..3(CreateComputePipelineState: out of memory (0x8007000E)), which fail onmainas well.main): 21 "no wave64", 3 refused by the per-lane form,heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows),pso_measurement_compiles_an_exact_synthetic_record(needs Developer Mode).Regression run
main:
this PR:
Not tested
xg_xs.dll(XCL_SAMPLE_XG) was at hand.AI use
🤖 Generated with Claude Code
@GodlyBDS on GitHub · 2026-11-26 10:34 UTC · original
Independent Ampere validation of the NVIDIA-branch precursor
b59d2638RTX 3090 Ti 24 GiB, driver 621.40, Windows 10, 32 GiB RAM. Both release builds use
e877812e390cad68f9082445c43a397ebf8a00bfand the same local Agility path scope and #662 XG startup adapter. The treatment adds only b59d2638. The relevant settings areXCL_TEXTURE_LEVEL_PAGES=1 XCL_DIRECT_DXIL=1 XCL_PREPARE=0 XCL_PSO_PRELOAD=0 XCL_DRED=1 XCL_COHERENT_MB=4095 XCL_UMA_WINDOWS=4 XCL_HEAP_WINDOWS=1 XCL_TWO_PASS_MB=4096, with the verified app-only 1 GiB NVIDIA shader heap. Both arms cloned the same 11,721 native PSOs and matching shader cache, used the same starting profile and scripted inputs, and had no fixed runtime timeout. Cache manifest hashes and environment settings matched.a_3d_texture_of_unknown_console_size_keeps_off_the_next_textures_pagespassed (1 pass, 0 failures, no skips).The direction of the color change is consistent with correcting cyan sampled from the wrong LUT. The frames are from different points in the opening and this is one run per arm. The control also recorded 153 two-pass mesh allocation refusals at the same 4 GiB cap, while the treatment recorded zero. No claim about a matched-frame color error, correct geometry, sustained rendering or device-removal prevention. The exact #2753 head has not been run here. Memory details are in the existing #2688 report.
AI use: Codex (GPT-6) built and ran the pair, reviewed the backbuffer samples and wrote this report.
@emirduran707 on GitHub · 2026-11-26 10:46 UTC · original
Independent AMD RDNA4 (native wave64) verification of exact PR head
e07d03bf0fc1bcbfac3d369d2f7eeed5eba6afd7on Windows 11 Pro 26300 (AMD Radeon RX 9060 XT 16 GB, driver32.0.31044.16, Ryzen 5 5600, Rust 1.100.0 MSVC, DXC1.9.2602.17).Tested
cargo build --workspace(debug): passed (0errors).cargo test --workspace --no-fail-fast -- --test-threads=4:1434 passed, 2 failed, 47 ignored(8 SKIPPED: 6 per-lane DXIL forms refused by host adapter/driver, 1heap_window_out_of_memory_falls_back_to_the_switch_formno heap windows, 1pso_measurement_compiles_an_exact_synthetic_recordWindows Developer Mode off).hle::d3d12x::device_x::tests::volume_targets_xg_does_not_lay_out_keep_to_their_texelspassed.gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1andfuzz_validate_and_gpu_3) are pre-existing on unmodifiedmainon this RX 9060 XT / driver32.0.31044.16.cargo build --release -p xcl+ 60 s retail-title smoke test (scripts/smoke.ps1, offline):(Compare against
mainb49be183on this machine:1603 frames, 18576 MB peak, 0 device removals, 0 crashes.)Not tested
AI use
@Decodere on GitHub · 2026-11-26 11:49 UTC · original
Independent RTX 4060 (8 GB) / Windows 11 release verification of PR #2753 at
e07d03bf0fc1bcbfac3d369d2f7eeed5eba6afd7(exact parentorigin/mainb49be1836844fe0b0cdb3211dce3cb7fb4e21ac7). Measurements and targeted test results only; not a full source review.Setup
7956 MiBreported by D3D12), driver32.0.16.2114(NVIDIA621.14, WDDM 3.2)31.9 GiBusable), Windows 11 Home26200rustc 1.100.0 (0ef1bc386 2026-11-09), DXC1.9.2609.5, release builds, warm DXIL/pipeline caches, quiet machine (zero concurrent builds/tests during timed runs)title: 29640639viascripts/smoke.ps1 -Seconds 60(XCL_NETWORK=0 XCL_ACTIVITY=1, default flags, no input)Targeted RTX 4060 release unit tests (
e07d03bf)cargo test --release -p xcl --lib volume_targets_xg_does_not_lay_out_keep_to_their_texels -- --nocapture: 1 passed, 0 failed, 0 ignored (0.00 s, exit0).cargo test --release -p xcl --lib hle::d3d12x::vram:: -- --test-threads=4: 19 passed, 0 failed, 1 ignored (2.55 s,churn_update_tile_mappings_timingignored,0skipped, exit0).cargo test --release -p xcl --lib hle::d3d12x::device_x:: -- --test-threads=4: 15 passed, 0 failed, 0 ignored (0.19 s,0skipped, exit0).Observations
volume_texel_bytes/console_bytes) passesvolume_targets_xg_does_not_lay_out_keep_to_their_texelsand all 34 targetedhle::d3d12x::vram::andhle::d3d12x::device_x::tests cleanly in--releaseon this RTX 4060 (8 GB) host with0skips.exit: 0x0,1556frames shown,60 60 60steady-state presents per 2 s,0device removals,0crashes,14009 MBpeak commit vs parentb49be183's14018 MB/1518frames).Paired 60 s RTX 4060 smoke (
b49be183vse07d03bf)Parent
origin/main(b49be183):PR #2753 head (
e07d03bf):Limits of coverage
e07d03bf(only targetedhle::d3d12x::vram::andhle::d3d12x::device_x::release tests plus paired quiet 60 s smoke).volume_targets_xg_does_not_lay_out_keep_to_their_texels).RTX 4060) on native Windows 11; no AMD, Intel, or Wine/Linux run on this host.AI use
Ran the targeted release unit tests and paired quiet 60 s smoke runs with assistance from Google Antigravity (Gemini 4 Neon); all test counts and smoke blocks were taken directly from
cargo testandscripts/smoke.ps1outputs.@Gevroska on GitHub · 2026-11-26 13:53 UTC · original
I compared stock
b49be183with PR heade07d03bfusing two 33 × 33 × 33 RGBA16F textures, first on WARP and then on a physical RTX 3080.On stock, adjacent placements shared 10 backing pages. I stopped that case before issuing texture commands, so I have no readback result for the overlapping pair. With the placements farther apart, stock shared zero pages and both textures read back correctly.
On the PR head, both placement cases shared zero pages. After waiting for GPU completion, I read back every component of every texel:
0.25throughout the first texture and0.75throughout the second. An independent repeat of the adjacent pair on the RTX 3080 reproduced the stock overlap and the successful PR readback, with zero skips. These were synthetic tests; whether GTA VI uses this placement pattern remains open.I used Codex GPT-6 Sol Daybreak for the WARP fixture and GPT-6.2 Sol for physical GPU verification and independent review. Codex GPT-6.2 Astra wrote this comment.
I reviewed and approved this comment before posting.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.