GPU: read DRED constant-view words without VirtualQuery #1344
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1344"
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 Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-24T17:34:08Z.
Fixes #913.
Summary
texture::committed(VirtualQueryregion walk) + raw unaligned read indraw::describe(#[cfg(feature = "diagnostics")]) withfirst_constant_words, reading 16 bytes directly viahost::read_into(ReadProcessMemory) and decoding four little-endianf32values withoutunsafe.Constant({address:#x}, {size}) {words:?}formatting (including-0.0) while skipping null, reserved (MEM_RESERVE), or partially unmapped page boundaries without walking the process's memory regions on every draw/dispatch.Verification
draw::tests::constant_view_notes_read_committed_words_and_skip_unmapped_pagestesting unaligned committedf32words, short buffers, null addresses,MEM_RESERVEpages, and cross-page committed/uncommitted boundaries:VICTORY_D3D12_DEBUG=1 VICTORY_D3D12_DRED=1): passed (0debug errors)VICTORY_D3D12_DEBUG=1 VICTORY_D3D12_DRED=1): passed (0debug errors)VICTORY_D3D12_DEBUG=1 VICTORY_D3D12_DRED=1): passed (0debug errors)cargo clippy --workspace --all-targets --all-featuresandcargo xtask policy: passed.Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-24T20:07:46Z.
Review: COMMENTED
Static review only: victory-gpu is Windows-only (D3D12/windows_sys) — nothing compiles or runs on macOS, so this is source review plus the PR's own Windows tests.
Under
diagnostics, constant-view words fordescribeare now read withReadProcessMemoryon the 16-byte span instead oftexture::committed(which walks pages via VirtualQuery). Falls back to the shortDebugform when the read fails. Feature-gated, diagnostics-only, no behavior change to rendering. Fine.upstream-sync referenced this pull request2026-11-24 21:02:38 +00:00
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T00:37:48Z.
Automated triage for the maintainers. Closing because this change is already in
main, ormainhas since replaced the code it patches.Main's describe() already reads the constant view's words through read_into without VirtualQuery (draw.rs, fixed today for the same per-draw cost).
If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.
Pull request closed