cpu: draw a selected page from a sixteen-page zlib record #1346
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1353"
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 R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T08:59:24Z.
Refs #1198. Depends on #1345. Please merge #1345 into main first, then retarget this PR to main.
The compiler-built EXE can select one requested 4 KiB page inside a 16-page RFC 1950 record. The guest supplies the full compressed source range, the declared decoded capacity in bytes, and the byte offset inside that destination. The Windows queue inflates the complete 64 KiB record. Once both statuses complete, the existing provider extracts the requested pages, uploads the BC7 texture and draws. The fixture supports standalone one-page and sixteen-page intervals.
A two-record source-built file has sixteen differently colored pages in the first stream and a seventeenth color in the second. The independent readback checks exact guest arguments, both queue statuses, every expanded destination byte and both guards, the selected pages, storage object releases, full RGBA output, fence and device references. Cases select page 0, 7 or 15 followed by the second record, then reverse record order to put the 16-page output second. An out-of-range second request leaves the queue unopened. Truncating either compressed checksum fails only that request, keeps the entire destination unchanged, finishes the other request and exits 6 without a draw.
Local Windows 11 build 26200.9974, Release
5f994492. RTX 4060 Laptop GPU driver 32.0.16.1656 and WARP 10.0.26100.9818, debug layer off. Across native PE, mapped PE and AOT: 42 new executions including 24 full frames, 12 checksum truncations and six pre-enqueue rejections. No skips. Both brand-new CTests, both existing directory CPU/GPU comparisons and the queue-directory regression passed (5/5). Markdown link check passed (300 links).Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T09:04:56Z.
Review: COMMENTED
Technical peer-review at commit
5f9944929cdedd216d979a4d8eb799ca76de7f43:Verification
git diff --check origin/main...HEAD: clean.tests/docs_links_check.py: passed (16 Markdown files, 300 links).tests/bidi_controls_check.py: passed (1114 tracked files).--preset dev):cmake --build --preset dev --target startup_stub_consumer archive_directory_gpu archive_directory_lifted pe_mapsucceeded (24.61s);ctest --preset dev -R '^(startup_storage_directory_batch|cpu_archive_directory_gpu_warp|cpu_archive_sixteen_page_gpu_warp)$'3/3 passed (10.03s)./O2(--preset release): build succeeded (36.72s); same CTest selection 3/3 passed (9.85s).Code & Test Notes
tests/cpu/archive/directory_reader.zig:validate()checks theRDS5header, entry count bounds against both the readable prefix and metadata offset, strictly monotonic physical/logical boundaries, terminalphysical <= file_size, andlogical << 12against the header size.locate()binary-searches the directory, restricts intervals to 1 or 16 pages withcodec == 8, and guardsspan - paddingagainst underflow/overflow.tests/cpu/archive/directory_gpu.cpp&tests/cpu/archive_directory_multipage_check.py: verify 32-byte0xa5destination guards, full 16-page decompressed buffers, selected 4 KiB page extraction, file identity, queue statuses, storage refcount releases (0 0 0), out-of-range pre-queue rejection (exit 3), and truncated-stream negative controls (exit 6).CMakeLists.txtline 3974 uses${CMAKE_SOURCE_DIR}while the adjacentcpu_archive_directory_gpu_${adapter}test on line 3971 uses${CMAKE_CURRENT_SOURCE_DIR}.