Repository navigation
Conversation
|
Test report on AMD RDNA3: RX 7800 XT (16 GB, wave32 and wave64), driver 32.0.32015.7029, Ryzen 7 9800X3D, Windows 11 Pro 10.0.26300, Rust 1.100.0 MSVC, DXC 1.9.2602.17, debug build. No retail data was used. Tested: the PR head
Not tested: the overlay drawn on screen ( AI use: Claude Code ran the commands and drafted this comment; the runs are real runs on the hardware above. |
|
Two problems in the overlay copy at 1. A reference leaks on every overlay frame, and 2. Also on merge order: besides #674, this PR conflicts textually in AI-assisted (Claude Code), read-only review. |
|
@upipibi both findings confirmed in the code and fixed in
Measured on the RTX 3060 Ti: full suite 691 passed, 0 failed, 41 ignored ( On merge order: noted, the AI use: GPT-6.2 Astra (API model selector) in DSH wrote the fixes and their tests, ran the suite and smokes, and drafted this reply; the human contributor reviewed the diff before posting. |
|
Test run of Tested
Review: Off unless Not tested: no retail title or regression run (I have no unpacked game), no Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code. |
XCL_OVERLAY=1 copies a small stats panel (fps, frame time, draws and dispatches per second, process commit, adapter video memory; refreshed once a second) into the top-left corner of the presented frame on XCL's own command list, after the game-image copy. A 5x7 bitmap font rendered on the CPU into an upload buffer: no extra window, no GDI, no input taken, none of the title's resources touched. Part of the image, so it survives the flip-model swap chain (a child window is hidden by it) and shows in screenshots and recordings. 8-bit back buffers only. Assisted-by: DSH (GPT-6.2 Astra)
Two problems upipibi found by reading the overlay copy: the copy locations cloned the back buffer and the panel buffer into ManuallyDrop, so every overlay frame leaked one reference on the back buffer (DXGI ResizeBuffers then fails while a reference is outstanding) and every recreated panel buffer stayed alive; and the placed footprint's RowPitch was w*4 (64 + 48*cols), almost never a multiple of D3D12_TEXTURE_DATA_PITCH_ALIGNMENT (256), which the debug layer rejects. The copy locations now borrow via transmute_copy as readback_copy does; overlay::panel pads its rows to a 256-byte pitch (transparent padding) and the footprint uses the same panel_row_pitch. Tests: panel_rows_are_at_a_256_byte_pitch (render_panel over given lines; fails without the padding), panel_row_pitch_is_256_aligned. Assisted-by: DSH (GPT-6.2 Astra)
cd41749 to
093f600
Compare
|
Rebased onto current main ( Fresh measurements on this machine (RTX 3060 Ti, Ryzen 7 9800X3D):
AI use: GPT-6.2 Astra (API model selector) in DSH did the rebase, ran the suite and smokes, and drafted this comment; the human contributor reviewed the numbers before posting. |
XCL_OVERLAY=1draws a small stats panel into the top-left corner of the frame XCL shows: the title's fps and frame time, draws and dispatches per second, the process's commit and the adapter's video memory, refreshed once a second. Off unless asked for.What is in it
hle/overlay.rs: the sample-to-text formatting, a 5x7 bitmap font (only the characters the lines use) and the panel rendered on the CPU into BGRA/RGBA pixels matching the back buffer's format, rows padded to a 256-byte pitch. 5 unit tests.present.rs: after the game-image copy, the panel is copied from a small upload buffer into the back buffer at (8, 8) on XCL's own command list - part of the image, so it survives the flip-model swap chain and shows in screenshots and recordings. (A child window was tried first: the flip presentation draws over it - it never appears.) No extra window, no GDI, no input taken, none of the title's resources touched. 8-bit back buffers only; 10-bit / fp16 frames draw nothing.host.rslogs one line when enabled;README.mddocuments the variable.cd41749fixes the two problems upipibi found by reading the copy: the copy locations cloned intoManuallyDrop(one leaked back-buffer reference per overlay frame —ResizeBuffersthen fails — and every recreated panel buffer stayed alive); now they borrow viatransmute_copyasreadback_copydoes. The placed footprint'sRowPitchwasw * 4, almost never a multiple ofD3D12_TEXTURE_DATA_PITCH_ALIGNMENT;overlay::panelnow pads its rows to 256 and the footprint uses the samepanel_row_pitch. Testspanel_rows_are_at_a_256_byte_pitchandpanel_row_pitch_is_256_alignedfail without the change.Tested
cargo test --workspace --no-fail-fast -- --test-threads=1on093f600: 709 passed, 0 failed, 41 ignored; 2 GPU SKIPPED (no wave64 on this adapter).XCL_OVERLAY=1(panel visible, verified by PrintWindow capture in the earlier round): clean exit, steady 60 presents / 2 s.Regression run
Main at the branch's merge-base (
e50836b, current main — includes #762 translated cache, #713 full symbols, #771 Discord invite):This PR (
093f600, rebased ontoe50836b; only a README conflict with #762's bullet, both bullets kept):Not tested
ResizeBuffers/ mode change with the overlay on (the leak fix removes the known blocker; no runtime resize repro was run). The debug-layer rejection of the unaligned pitch was not reproduced on this machine (Graphics Tools not installed); the alignment fix is verified by the unit tests and code reading.AI use
GPT-6.2 Astra (API model selector) in DSH wrote the code and the fixes, ran the builds, tests and runs, and wrote this description; the human contributor watched the runs and reviewed the change. The two fixes follow upipibi's read-only review, credited in the commit message.