Repository navigation
Placed textures larger on the PC than on the console get memory of their own (Minecraft logo squares) - #86
Conversation
…eir own A title places textures in its heaps by the console's size (XG's answer from GetResourceAllocationInfo). When the PC's layout is larger, a texture placed at the console's offset covers the start of whatever the title placed after it, and the two write over each other. Until now it only got memory of its own when the PC refused the placement (past the heap's end). Minecraft's logo (1937x333: 0x29F000 bytes on the console, 0x2E0000 on the PC) ran into the "51%" text texture and the 16x16 textures packed after it: three magenta / black squares and a white speck along the logo's bottom edge on the loading screen. Now every texture whose PC size exceeds its console size gets memory of its own of the heap's kind, as the past-the-end case did. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Tested this branch locally and verified against Great catch on the PC padding overflow stomping adjacent textures in the heap! Two small suggestions for robustness:
|
|
Tested head \8ad0b447\ on a dual-GPU Windows 10 setup (NVIDIA RTX 5070 + AMD Radeon 9800X3D iGPU) with D3D12 Agility SDK 1.619.1 (#75):
No regressions on either adapter, and the \creator!\ macro for \dev_create_committed_resource\ already calls \�dopt(*ppv, Kind::Resource)\ on success. |
|
Merged – great find. On the RX 9070 Minecraft logs the logo and the 16×16 textures after it getting memory of their own, as you describe. I also took @Lum7nt's suggestion (9284dcd): when the PC refuses the title's state for the committed resource, it retries with COMMON instead of falling back to the overlapping placement. Tested on Windows 11 with an RX 9070 (RDNA4): |
|
Thanks @Lum7nt and @certified-retart for testing it. On the two suggestions:
Also re-checked today on current |
Minecraft's loading screen showed three small magenta/black squares and a white speck along the bottom edge of the MINECRAFT logo (HANDOFF lists them as open: "small magenta / black 'missing texture' quads on the loading screen's logo"). Nothing is missing. On the PC the logo texture is larger than on the console and covers the textures the game packed after it.
Cause
Titles place textures in their heaps by the console's size:
GetResourceAllocationInfoanswers with XG's. XCL places the PC texture at the console's offset, but the PC driver's layout can be larger. Minecraft's heap (RTX 5070 Ti):textures/ui/title.png, 1937×333The logo's last 0x40000 bytes are the memory of the next four textures. The three 16×16s are the game's magenta/black missing-texture image; written into the logo's tail they show as 16×16-texel squares exactly 256 texels apart in its bottom rows. The white speck is the text texture.
How it was found: in a full-size frame dump the squares sit inside the logo's quad (painting that pixel shader green with
XCL_DEBUG_MAGENTAhides them), andtitle.pngitself has plain black there. XCL has a fallback for this, "memory of its own", but it only applied when the PC refused the placement (past the heap's end). Here the PC accepts it, and the overlap goes unnoticed. The developer saw the same squares on AMD, so it isn't NVIDIA-only.Fix
own_memory_if_larger_on_the_pc: a texture placed in a heap whose PC size is larger than its XG size gets a committed resource of the heap's kind, as in the past-the-end case. The console's aliasing of that one placement is lost (the same trade-off as before). Buffers and textures that fit are placed as before. The first 8 such textures are logged with both sizes.Checked
cargo build --workspace --releasethencargo test --workspace --releaseon the RTX 5070 Ti: 372 passed, 0 failed. 41 GPU tests print SKIPPED (no wave64 on NVIDIA), as onmain.🤖 Generated with Claude Code