Repository navigation
Conversation
…heir destinations A BCPack refusal was logged once per run (warn_once "BCPack"), so a log showed the first refused request and nothing about the rest. Now: - one warning per mode and zlib stage, and a running count line on the first 16 refusals and every power of two; - report.json gets dstorage.bcpack_refused: requests, zlib-combined requests, destination bytes and filled bytes per DSTORAGE_BCPACK_MODE; - XCL_DSTORAGE_BCPACK_FILL=1 fills each refused BCPack destination with solid blocks of its BCn format (magenta, red for BC4/BC5), exactly destination_size bytes, into committed writable memory or the physical pages snapshot at enqueue. The request still fails with E_DECOMPRESSION; nothing changes without the switch. Tests: per-mode counts, the fill blocks decoded by small BC1/BC4/BC6H mode 11/BC7 mode 6 decoders in the test module, and a memory queue run with and without the switch (status unchanged, no byte past the size). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
bb66204 to
a486652
Compare
|
Rebased on main eaa36b6 (a486652, no conflicts). Overlaps: #208 is stacked on this commit (the BCPack decoder; its refusal counts are this PR's). #167 also edits |
|
Correction to this PR's motivation: #211 found the cause of the missing menu letters, and it isn't BCPack. The glyph caches are small render targets the title fills from the CPU, which What still stands: main refuses every DirectStorage request with a BCPack stage, and nothing shows how many. Whether a refused request loses anything visible in this title isn't known. The per-mode counts in AI-assisted (Claude Code). |
|
Merged into main (6da33fa) as bb66204, the head before your last rebase - the same patch (identical patch-id), so GitHub does not show it as merged; closing it by hand. Checked on an RX 9070 (RDNA4) with the 22 PRs merged together: 582 unit tests passed, 0 failed, the integration and e2e tests passed, and the retail game still reaches its first menu (646 frames in 30 s, no device removal). Thanks! |
#195 reports that the retail menus' body text is missing most of its letters. Its one lead is the log line
DirectStorage: BCPack mode 7 unsupported, read as refusing one 64 KiB chunk. Onmain, that line can't say how many chunks were refused. Every BCPack refusal shares onewarn_once("BCPack", …)key, so the log shows the first refused request of any mode, and every later one fails silently withE_DECOMPRESSION. This PR makes the refusals visible and adds an opt-in experiment to test the lead. It doesn't decode BCPack, and without the switch every request behaves as onmain.Only
crates/xcl/src/hle/dstorage.rsandcrates/xcl/src/report.rschange (+387/−14). The tests are about 185 of those lines.Counts
BCPack BC7andBCPack BC7 after zlib. It gives the sizes and swizzle mode of the first such request, and says the request fails withE_DECOMPRESSION.request #klines:BCPack refusals so far: N requests: BC1 … (… bytes), BC7 … (… bytes).report.jsongetsdstorage.bcpack_refused, keyed byDSTORAGE_BCPACK_MODEname (BC1 … BC7, ormode Nfor values outside the GDK enum). It holdsrequests,with_zlib,destination_bytesandfilled_bytes. The field is#[serde(default)], like the other subsystem sections.Request::checkcalls in tests aren't counted.XCL_DSTORAGE_BCPACK_FILL=1(off by default; unset, empty or0means off)Each refused BCPack destination gets solid blocks of the requested BCn format instead of staying as it was:
A solid fill looks the same under any tiling or swizzle, so the layout doesn't matter.
It writes exactly
destination_sizebytes. The fill runs on the queue's worker, in queue order, where the request would have run. The destination is checked the same way as for a request that runs: committed, writable memory (writable), or the physical page array snapshotted at enqueue and written throughwrite_physical_pages. If the snapshot fails, nothing is written.The request still fails with
E_DECOMPRESSION, as before.How to use it with #195: run the menus with
XCL_DSTORAGE_BCPACK_FILL=1. If the body text turns into magenta boxes, the missing letters come from BCPack. If it doesn't change, the cause is elsewhere, for example indexed or shader-made rect lists, orXGTextureAddressComputer#10.bcpack_refusedinreport.jsonshows how many chunks and bytes are involved either way.Tests (
cargo test -p xcl --lib dstorage, MSVC debug, Windows 11; synthetic only)956a476bb66204)hle::dstoragetestsThe new tests:
bcpack_fill_blocks_are_solid_in_their_bcn_formatdecodes every fill block with small decoders in the test module (BC1, BC4/BC3 alpha, BC6H mode 11 UF16, BC7 mode 6). It checks all 16 texels of each block.bcpack_refusals_are_counted_per_mode_and_still_failchecks counts per mode, the zlib-combined count, destination bytes and the summary line. It also checks thatcheck()still returnsE_DECOMPRESSIONfor modes 1–7.a_refused_bcpack_request_is_filled_only_under_the_switchuses a memory queue and a BC7 destination of 0x1008 bytes (a partial block at the end) followed by guard bytes:E_DECOMPRESSION;Five mutations each fail one of the new tests: BC7 p-bits cleared, the fill ignoring the switch, a fill 16 bytes past the size, no zlib count, and the fill clearing the status.
cargo check -p xclis clean.Not covered:
write_physical_pagescode thatphysical_page_destinations_and_sourcescovers.AI-assisted (Claude Code). No game data.
🤖 Generated with Claude Code