GPU: query the allocation type when guarding mapped memory #119
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!119
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/119/head"
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?
@ifBars on GitHub · 2026-11-24 00:40 UTC · original
ifBars:perf/mapped-region-query→main· +82 −6 · 1 files · 1 commits · closed without mergingWhen
GetWriteWatchfalls back to guarded memory,guardasks whether the first address belongs to a mapped view.VirtualQueryalso determines the length of the run of pages with matching protection. On a large, clean view, finding that length can dominate the call.This changes the first query to
QueryVirtualMemoryInformation(MemoryRegionInfo). File-backed, page-file-backed and physical views take the mapped path. Private allocations and images take the existing non-view path. Unrecognized or combined flags and failed queries fall back to the originalVirtualQuerycheck. Windows allocation informationSynthetic benchmark
On an i5-11600K running Windows 10 22H2, both versions of
writes()ran in one optimized test executable against the same 174 MiB file-backed section. Each workload had a warm-up and nine paired samples with alternating order. The sparse case wrote to one guarded page before each call and checked its journal entry. Values are the median microseconds per call, including construction of the page journal.Validation
watch.rson Windows. Both tests passed on the upstream baseline. All three passed with this change, including the new file-view, stack, image and free-address cases.AI-assisted development and testing with Codex.
@DaviTostes on GitHub · 2026-11-24 00:46 UTC · original
Tested under Wine 11.22 + vkd3d-proton 3.1 on Arch Linux x86_64 (AMD RX 9060 XT, RADV 26.3.1), Windows build of
095e44awithcargo xwin ... --target x86_64-pc-windows-msvc: pass, no regression.victory_gputest binary: 37 passed, 3 failed — the PR adds one test (36 → 37).main:argument_clamp_builds(Wine'sd3dcompiler_47cannot compile the clamp shader),a_rejected_blob_gives_an_empty_library(vkd3d returnsE_INVALIDARGfor an empty pipeline library),buffer_data_reaches_the_host_texture(see #128 —VirtualQueryreports vkd3d-mapped memory asMEM_FREE).texture::committedincopy_mapped, notwatch::guard. The newQueryVirtualMemoryInformationpath was exercised by the passing tests.No game data used. AI-assisted (DeepSeek V4.1 Flash coding agent).
Pull request closed