D3D12.X: a 3-D texture XG cannot size is taken at its texels' bytes #2743
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from ivall/xcl. Originally posted by MacieGx on 2026-11-26T10:13:40Z.
A 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
Imported from ivall/xcl. Originally posted by GodlyBDS on 2026-11-26T10:34:25Z.
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.
Imported from ivall/xcl. Originally posted by emirduran707 on 2026-11-26T10:46:03Z.
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
Imported from ivall/xcl. Originally posted by Decodere on 2026-11-26T11:49:26Z.
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.mainreaches on Windows; the obstacle is replaced vtables — proposal: proxies #172Imported from ivall/xcl. Originally posted by Gevroska on 2026-11-26T13:53:09Z.
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 the retail game 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.
Imported from ivall/xcl. Originally posted by jennydeth on 2026-11-26T15:25:22Z.
Windows / NVIDIA results for
e07d03bwith the retail title (1.0.2.1) on an RTX 3060 12 GB. This is a regression check only: my title (9cc6a39e) is not the one in the PR's runs (16b5e5d4).Regression run (default settings, 600 s)
mainb49be18:This PR,
e07d03b:main's 2,047 (97 %) and peak commit of 35,177 MB against 35,859 MB (98 %), with no removal and no crash in either. Neither run reaches the world: presents stop at 100.3 s onmainand at 94.2 s with this PR, while big compute programs are still compiling.CreatePlacedResourceXis logged, and the new path logs nothing. The frames dumped in the pair are start-up and loading screens, so they don't show colour grading.XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_DRED=1, warm caches, 900 s): the device was lost (0x887a0005, #2403) at 194.3 s, last present at 124.7 s, with the same DRED line as onmain(page fault at GPU VA 0x0; allocations there: []; recently freed: []). Threeb49be18runs today with the same switches lost it at 110.6, 211.2 and 216.0 s, so one run can't tell this PR apart frommainthere.Tested
stable-x86_64-pc-windows-msvc); release; DXC 1.9.2609.5.cargo test --workspace --release --no-fail-fast -- --test-threads=4one07d03b: 1436 passed, 0 failed, 47 ignored. SKIPPED (29): 21 × no wave64; 3 × per-lane form refused; 3 × no D3D12 debug layer /d3d12SDKLayers.dll; 1 × no heap windows; 1 ×pso_measurement_compiles_an_exact_synthetic_record(cannot disable the driver cache).scripts/smoke.ps1 -Game <folder>(XCL_NETWORK=0), the same scripted pad presses into the story load in every run;XCL_FRAME_DUMP=300in the pair,100in the direct DXIL runs. Every run was of a copy namedxcl-noprofile.exe: this machine has #2590's 1 GiB shader-heap profile onxcl.exe, and a copy under another name does not match it.Not tested: #505's title; a frame of the world (no run gets that far); AMD / wave64.
AI use: Claude Code (Claude Opus 5.5) built the commit, ran the suite and the runs on my machine, read the logs and wrote this.
Imported from ivall/xcl. Originally posted by Royalflamejlh on 2026-11-26T19:52:46Z.
On Linux + NVIDIA (RTX 4060 Ti 16 GB), this PR took away the large white shapes over the title's opening scenes that we reported on #505 (7199770263): with it, 0 of 25 frames dumped after the world load were over 20 % near-white (2 of 2 runs); without it, 43 of 48 were (5 of 5 runs).
Setup: NVIDIA 615.71.09, Wine 11.21 Staging, vkd3d-proton
v3.1-90-g30b0eb9bwith the relaxed-vtable patch from #175, a local dxil-spirv patch, and its allocator Reset releasing the command pool's memory (#2404, 7189698499);mainb49be18+ #684, #751, #1599, #1860, #2082, #24045b9d4ff, #2633db34184, #2707dff6edc, #1803cb007514, #2229d2dee320, #197572960386and a log line of ours (the tree of that report), ± this PRe07d03bf; two of the four runs without it also had #2513, or #2513 + #768;XCL_DIRECT_DXIL=1 XCL_HUGE_PSO_WANTED_CONCURRENCY=6; 300 s; a frame dumped every 10th present (every 30th in035941-a). Near-white: all three channels > 230, every 4th pixel.035941-a102821-a101117-a115242-a121152-a122418-a123029-adevice_x.rs:1089,console_bytesfalling back tovolume_texel_bytes); every other texture is placed as before. The path logs nothing, so these runs show the frames, not the placements.Not tested: Windows; AMD; this PR on
mainalone.AI use: Claude Code (Claude Opus 5.5) merged the trees, made and read the runs, and wrote this.
Posted without review by a person: the account owner was away and reads replies later.
Edited: "six runs" corrected to "seven runs" (the table has seven).
Imported from ivall/xcl. Originally posted by razormontana on 2026-11-26T20:20:09Z.
Independent native Windows validation of #2753 for #505
Tested
Clean PR head
e07d03bf0fc1bcbfac3d369d2f7eeed5eba6afd7, parentb49be1836844fe0b0cdb3211dce3cb7fb4e21ac7. Windows 11 Pro 22631, Core i7-10700K, NVIDIA GeForce RTX 3070 8 GB, driver 617.42 (32.0.16.1742), Rust 1.100.0 MSVC, debug.cargo test --offline --locked -j 1 -p xcl --lib --no-runsucceeded with two existing Rust deprecation warnings. Each filter below ran withcargo test --offline --locked -j 1 -p xcl --lib <filter> -- --exact --test-threads=1 --nocapture. The five runs reported 5 passed, 0 failed, 0 ignored, 0 skips in total.hle::d3d12x::device_x::tests::volume_targets_xg_does_not_lay_out_keep_to_their_texels(CPU)hle::d3d12x::vram::tests::owned_pages_never_alias_disjoint_ranges(CPU)hle::d3d12x::vram::tests::packed_console_3d_mip_tails_use_the_detile_upload_path(CPU)gpu::texture::tests::gpu_console_textures_upload_every_mip_and_slice(GPU)hle::d3d12x::device_x::tests::gpu_depth_buffer_created_for_unordered_access_is_placed(GPU)A standalone native D3D12 probe selected the RTX 3070 by name and queried a reserved 33×33×33 one-mip RGBA16F render target with UAV access. It reported tiled-resource tier 3 and 18 tiles with 32×16×16 texels per tile and a 2×3×3 grid. Build and run from the probe directory with
cl.exe /nologo /W4 /EHsc /std:c++17 volume-footprint.cpp /Fe:volume-footprint.exe /link d3d12.lib dxgi.liband.\volume-footprint.exe.The focused CPU test checks XG's size fallback and ownership of two targets 512 KiB apart. The 287,496-byte fallback covers five guest-address pages per target, so their owned ranges are disjoint. Using the driver’s 18-tile count as the guest span on the parent would overlap ten pages. The GPU readback test covers tiled volume uploads separately. The two Rust GPU fixtures use the default D3D12 adapter.
Not tested
The exact adjacent 3D render-target pair in a GPU readback, retail world rendering, whole-workspace or parent runs, and net VRAM usage. The footprint query measures tile count. The fallback changes which addresses own those tiles.
AI use
Codex GPT-6.2 reviewed the diff, wrote the standalone footprint probe, ran the checks and drafted this report.
Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-27T00:08:47Z.
Tested: Clean
e07d03bf0fc1bcbfac3d369d2f7eeed5eba6afd7, Windows 11 build 26200, Ryzen 7 3800X, Rust 1.100.0 MSVC, debug, Intel Arc A770 driver 32.0.101.9175.cargo test --offline --locked -j 2 -p xcl --lib --no-run, then five focused exact CPU tests covering volume size, mip tails and placement ranges: 5 passed, 0 failed, 0 ignored, 0 skips. The fallback fixture assigns a 33×33×33 RGBA16F target 287,496 bytes (five guest pages), keeping volumes 512 KiB apart disjoint.cargo test --offline --locked -j 2 -p xcl --test d3d12_create_reserved_resource --no-run, thenpc_reserved_resources_match_host_driver --exact --nocapture --test-threads=1on Arc: 1 passed, 0 failed, 0 ignored, 0 skips. This fixture checks PC reserved-resource parity, including a sampled 3D texture.Not tested: The adjacent XG-rejected render-target pair on Arc, console-native layout, full workspace suite and retail smoke.
AI use: T3 Code / Codex (
gpt-6.2-sol) ran and independently reran the checks and drafted this report.Imported from ivall/xcl. Originally posted by afpruivo on 2026-11-27T14:24:15Z.
RTX 3090 24 GB, Windows: with this PR the retail title crawls after its story load and then ends in the
+0x23cf683null write (#675), in 3 of 3 runs. Without it (the base, and the base + #2229), 2 of 2 runs went the full 900 s with the same inputs. The opening scenes and the story load are the same with and without it; the difference starts when the world's frames begin (~780 draws per frame).Setup
title: 3c290c16.xcl.exein a 2 GiB shader-heap profile (#2590).0567c713(which stacks #2844, #2926, #2936, #2937, #2934 onmain8b957bec) + #609 (XCL_PRESS_HOLD), merged locally. This PRe07d03bfand #222998a629a3merged on top as in the table. Not this PR on its own base.XCL_DIRECT_DXIL=1 XCL_UMA_DRIVER=mixed:1536:1792 XCL_WATCH_TRAP=1 XCL_DECLARED_LDS=1 XCL_BYTE_STORE_CS=e166372fa54a77c7 XCL_TEXTURE_LEVEL_PAGES=1 XCL_ACTIVITY=1, A pressed every 4 s and held 3.5 s (XCL_PRESS_HOLD=3.5), so the title goes past the credits into its story load. 900 s runs, one at a time, warm caches.queue.Wait5 s timeouts+0x23cf683at 315 s+0x23cf683at ~420 s and 272 squeue.Waits time out (5,000 ms; the producing queue is one value behind what was submitted, XCL's own queue waits mostly met), presents stop, and the title's watchdog ends it with the null write and stack of #675.bind_rangegives the LUT 5 owned pages and its other 13 PC tiles asextra_pagesat(va, i)instead of 18 pages at its address. Video memory (~15.5 of 24 GB local) and the target-page pools looked alike with and without the PR at the point it slows. That is a reading of the code, not a measurement.Not tested: this PR on its own base (
b49be18); default switches; other cards. One run of the base without #2229 and one with #2229 only.AI use: Claude Code (Claude Opus 5.5) built the trees, ran the runs and drafted this; checked by me before posting.
Imported from ivall/xcl. Originally posted by afpruivo on 2026-11-27T14:58:32Z.
Correction to my comment above: a rerun with frame dumps does not reproduce the split, so I no longer think this PR is the cause. With
XCL_FRAME_DUMP=10added and everything else as before, this PR's tree ran the full 900 s (0queue.Waittimeouts, 8,561 frames), and the base without it stopped at 143 s into the title with a different failfast,0x80000003at+0x4da6315(the one in #2140), during the load.XCL_FRAME_DUMP=100567c713+ #609)+0x4da6315at 143 s+0x23cf683at 315 s+0x23cf683×2+0x23cf683ends in the earlier runs all start ~180 s into the title, which is where play starts. In the dumped run, frames from ~180 s to the end are the game's grey picture with the on-screen movement hints of the first playable section (the flat grey #2229 explains), so the title reached play and stayed there for 12 minutes at 8–9 fps on this card.XCL_FRAME_DUMP=10.AI use: Claude Code (Claude Opus 5.5) ran the runs, read the logs and dumps and drafted this; checked by me before posting.
Imported from ivall/xcl. Originally posted by brainhay5 on 2026-11-30T02:25:48Z.
merge-check claim
head:
e07d03bf0fImported from ivall/xcl. Originally posted by brainhay5 on 2026-11-30T02:34:42Z.
merge-check
base:
9335bc0d86head:
e07d03bf0fmerge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2800 passed, 2 failed, 50 ignored; 32 SKIPPED lines
failing: hle::d3d12x::standin::tests::concurrent_shell_miss_reuses_winner_and_releases_loser_pipeline
failing: test_title_runs_and_game_folder_is_untouched
both also fail on the base alone (the same two, run on
9335bc0dwith this base) -> neither is this PR'snote: the first run of the suite aborted early — a background
xcl-pso-ahead-2panic ended the lib test binary before its result line (the flake #3041 documents; counts were 138 passed, not usable). Rerun of the same tree gave the totals above.review: two files, +65/-2.
create_placed_resource_xnow sizes a texture through a newconsole_bytes, which keeps XG's size where XG has one and, for a 3-D texture XG does not lay out (render targets, e.g. 33x33x33 RGBA16F colour LUTs 512 KiB apart), falls back to the texels' bytes across levels (volume_texel_bytes, format viaxg::element). Before this, such a texture was given every tile of its PC counterpart as a page at its address, so neighbouring LUTs shared pages and overwrote each other's rows — the bug described in the title. Returns None for non-3-D and unknown formats, so nothing else changes. The test builds a 33³ RGBA16F volume target and asserts its pages do not overlap its neighbour's, plus that a sampled 3-D texture keeps XG's size, so it fails without the change. Scope is contained; no unrelated edits.performance: negligible — the size is computed once per placed-resource creation, no per-frame work, no new allocation in a hot path.
verdict: safe to merge
hardware / tool and model: RTX 5070 Ti 16 GB, driver 610.88 (32.0.16.1088); Ryzen 7 5800X3D, 64 GB; Windows 11 22631; OpenCode agent, DeepSeek V4.1 Flash 1017
Imported from ivall/xcl. Originally posted by johnbf8x on 2026-11-30T02:48:14Z.
merge-check claim
head:
e07d03bf0fImported from ivall/xcl. Originally posted by johnbf8x on 2026-11-30T03:05:22Z.
merge-check
base:
cb8024684chead:
e07d03bf0fmerge: clean (git merge --no-commit --no-ff onto origin/main in a detached worktree; the merged tree was tested uncommitted)
build: cargo build --workspace -> ok (the PR merged and main alike, each in its own target dir)
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 (XCL_DXC_DIR = DXC 1.9.2609) -> main and PR the same: 137 passed, 2 failed, 20 ignored outside the lib; the lib binary ends abnormally on both (0x80004005), so no lib total. SKIPPED: 28 on both (22 no wave64, 3 f16/f32 per-lane forms refused, 2 no heap windows, 1 no D3D12 debug layer). Failing: e2e test_title_draws_with_a_root_signature_under_the_debug_layer and test_title_runs_under_the_debug_layer_with_dred (no D3D12 debug layer on this PC), both fail on main too. The lib in parts: hle::d3d12x::list_x alone on 1 thread 113 passed on both; the rest on 4 threads, 0 failed before the process ends on both (PR 1744 ok, main 1743 ok). Next to the change, on 1 thread: hle::d3d12x::device_x::tests:: and hle::d3d12x::vram::tests:: PR 90 passed, main 89 passed, 0 failed, 1 ignored on both; the new volume_targets_xg_does_not_lay_out_keep_to_their_texels passes
review: none blocking, after reading the whole diff (device_x.rs, vram.rs). console_bytes keeps XG's size wherever XG gives one, so only textures XG refuses change, and volume_texel_bytes returns None for anything but a 3-D texture with a format xg::element knows, so those keep the old path. The arithmetic is checked (checked_mul / checked_add, mips capped at 16, a full chain when the desc says 0 mips). The texels' bytes are a lower bound of any console layout, as the description says; if the console lays such a texture out larger, the pages past its texels are not given to it, and what that does in a title is not tested here. owned_pages only becomes pub(super) for the test. The new test cannot run against main (it calls the new function), so "fails without the change" is by reading: on main this desc gets None and every PC tile as a page. Not run with the title of #505
performance: none expected: one desc parse per CreatePlacedResourceX of a texture, and only for 3-D textures XG refuses (reasoned, not measured)
verdict: safe to merge
hardware / tool and model: NVIDIA GeForce RTX 3070 Ti 8 GB (driver 621.40), Intel Core i7-12700K, Windows 10 Pro 19045, rustc 1.100.0 / Claude Code, Claude Opus 5.5