shader: query host readability once per region during the SRT walk #473
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
GPU
GUI
help wanted
question
Shaders
Video
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/KytyPS5--KytyPS5!473
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/473/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?
@brandostrong on GitHub · 2026-09-02 21:50 UTC · original
brandostrong:fix/srt-walk-readable-region-cache→main· +57 −6 · 3 files · 1 commits · closed without mergingProblem. With no memory reader installed (the draw path installs only the specialization reader), every SRT word the walk read called
HostMemoryRangeIsReadable, oneVirtualQuerysyscall each. Astro Bot's first scene walks thousands of words per draw:Srt.EvaluateRuntimeSourcestook 1.94 ms per call, 94% of the GPU thread, about 1 fps.Change. Add
HostMemoryReadableRegion, which returns the bounds of the committed readable region containing an address, and have the evaluator cache those bounds so later words in the same region need no query. Words outside every cached region still query.Effect. Astro Bot's first scene runs at interactive speed instead of ~1 fps.
Verification. Suites pass; measured across several Astro Bot runs.
References
VirtualQueryandMEMORY_BASIC_INFORMATION: one query returns the whole region of pages with identical attributes (RegionSize), so it answers every address inside it.Pull request closed