Repository navigation
Conversation
write_frame unconditionally indexed `fp.Offset + step * y * pitch + 4 * step * x` as a 4-byte texel for all `x < w / step`, `y < h / step`. For 1/2-bpp intermediate render targets (e.g. R8_UNORM, R16_FLOAT) dumped by XCL_TRACE_FRAME, `4 * step * x` exceeds RowPitch; for block-compressed targets whose readback footprint contains only ceil(Height / 4) block-rows, `step * y * pitch` reads past the end of the mapped readback buffer. Add readback_texel_offset() checking both `row_off + 4 <= RowPitch` and `off + 4 <= rb.GetDesc().Width` with checked arithmetic, treating out-of- bounds samples as undecoded rather than reading past the mapped buffer. Assisted-by: OpenCode (Gemini 4 Neon)
|
Full-suite run, since this PR has no test report yet. Tested exact head Tested
Not tested
AI use
|
…#1395 in-place vtables Integrates 16 upstream PRs (xcl-dev#1380, xcl-dev#1383, xcl-dev#1384, xcl-dev#1395, xcl-dev#1398, xcl-dev#1400, xcl-dev#1404, xcl-dev#1405, xcl-dev#1419, xcl-dev#1420, xcl-dev#1421, xcl-dev#1423, xcl-dev#1424, xcl-dev#1427, xcl-dev#1428, xcl-dev#1429) on top of the Linux/Proton fork, plus three Proton/vkd3d-proton fixes caught during verification: - Recompiler (xcl-dev#1428): flatten IO_GROUP_LIMIT early-return in compute shaders so vkd3d-proton v3.1 dxil-spirv accepts the emitted CFG. - D3D12.X (xcl-dev#1395 + xcl-dev#867): skip UnadoptGuard on in-place-patched vtables and restore native vtables in runner::submit_list when a prior test adopted the singleton ID3D12Device. - Tests: match Wine centered default in window_position_modes. Verified under GE-Proton11-14 (RX 9060 XT / RADV): - gpu_sparse_vram_descriptors_buffers_and_xmem + gpu_valu_float_and_int + window_position_modes: 3 passed, 0 failed - Broad sweep (present, real, sparse, clamp, dstorage, gpu_valu, gpu_typed_buffer): 82 passed, 0 failed, 1 ignored, 0 skipped - 2.5 min retail title run (XCL_MEM_LIMIT=12G): 3,000+ frames at 30.0 fps, 6.0-6.1 GB flat committed RAM, 6.4 GB local VRAM, 0 DS failures.
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
Tested
Not tested: AMD, and a game run with Claude Code with Claude Opus 5.5 ran the tests and wrote this note. |
|
Nothing has happened on this PR for 3 days, so it is marked |
|
Main fixed the out-of-bounds read another way: commit 337c309 (merged with #3203) makes AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human. |
|
Closing as superseded: this change is already on Two independent checks found this: Foniass's close list on #1607 and ours against current AI use: Claude Code (Claude Opus 5.5); the per-PR comparison was done by Claude Sonnet 5.5 sub-agents. |
present::write_frameunconditionally indexedfp.Offset + step * y * pitch + 4 * step * xas a 4-byte texel for allx < w / step,y < h / step. For 1/2-bpp intermediate render targets (e.g.R8_UNORM,R16_FLOAT) dumped byXCL_TRACE_FRAME,4 * step * xexceedsRowPitch; for block-compressed targets whose readback footprint contains onlyceil(Height / 4)block-rows,step * y * pitchreads past the end of the mapped readback buffer.This adds
readback_texel_offset()checking bothrow_off + 4 <= RowPitchandoff + 4 <= rb.GetDesc().Widthwith checked arithmetic, treating out-of-bounds samples as undecoded rather than reading past the mapped buffer.What is in it
crates/xcl/src/hle/d3d12x/present.rs: addreadback_texel_offset()and use it inwrite_frame; add unit testreadback_texel_offset_bounds_checks_narrow_and_bc_footprints.Tested
stable-x86_64-pc-windows-msvc), DXC 1.9.2609.5, debug (scripts/test.ps1) and release (scripts/smoke.ps1).\scripts\test.ps1(cargo build --workspace+cargo test --workspace -- --test-threads=4): 752 passed, 0 failed, 41 ignored (SKIPPED GPU tests: 2no wave64—gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask,gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware)cargo test -p xcl --lib readback_texel_offset_bounds_checks_narrow_and_bc_footprints: 1 passed, 0 failedRegression run
main:
PR:
Not tested
AI use
present.rs, wrote the fix and unit test, ran the test suite andscripts/smoke.ps1regression runs, and drafted this PR description.