WIP: perf(nvn): a handle bind's record is written field by field, and HOS_NVN_WATCH_TEX's test is inline #1954
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!1954
Loading…
Reference in a new issue
No description provided.
Delete branch "siantm/Longshot:perf/nvn-bind-fields"
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?
Summary
Every texture, image and separate texture or sampler bind the game makes (
BindTexture(s),BindImage(s),BindSeparate*and theirDeferredforms) is recorded bybind_handles(host/nvn_native.c). It zeroed the record(
rec()'smemset), then filled it, the handles through amemcpyof a size known only at run time. Every byte ofthe record is one of its fields, so they are now stored directly with no zeroing first, and a single handle (as
BindTexturebinds) as one 8-byte copy; the record's size comes from the header's and the handles' types, with its8-byte invariant asserted. Before every texture bind,
watch_tex(theHOS_NVN_WATCH_TEXdebugging switch) was acall that read its switch; its test is now an inline atomic load and the chain walk a cold function of its own. Moved
there, the watch's own faults from
mainare fixed in the same function: the switch is read once under a lock (threadsrecording at once raced on it, and a value wider than 32 bits was read again at every bind), the chains seen are looked
up and added under that lock (after 64, one line says new ones are no longer logged), the frame walk reads only whole
frames inside the recording thread's own guest stack (
hos_thread_stack, assvcQueryMemorybounds it) that are mapped,going up it, and a count out of range is not read.
The bytes recorded are the same:
tests/test_nvn_bind_handles.py(new) checks the record against a model of its bytesand the command buffer's counters through the real allocator, and against the
bind_handlesbefore this PR, for everycount 0 to 32; it runs the watch with the switch unset,
0, not matching, too wide, matching (with a second mappedallocation above the stack, which a frame link into must not reach) and from 8 threads.
From a7d746ac on
exp/x86-asm-sync(its other half,ReportCounter's flag, is its own PR).Read first:
bind_handles,watch_texandwatch_tex_chainsinhost/nvn_native.c;tests/test_nvn_bind_handles.py.Testing
Tested: Windows 11, i7-9700, RTX 4060 (NVIDIA 610.88), llvm-mingw clang 23.1.5; game-free checks and a
micro-benchmark only. This change has not run in the game on this PC yet (the run is queued: Still to test). Each check
ran in a hidden console of its own, in one job of the PC's job queue (fb-1954-3), on this branch on
main@6e1521a7(with #1949), head
fe1dd999:python -I -B tests/test_nvn_bind_handles.py(fe1dd999), with no--cc(LONGSHOT_MINGW's clang) and againwith
CCset: "PASS: every case (records, unset, zero, other, wide, match, race)". At the test commit0c4ecdf9(theframe walk bounded by any mapped region, as at
519f5c7e) it fails as it should, in match: a frame link up into thesecond mapped allocation was followed and its words logged as callers ("106 < c1 < c2 < c3", reads there); the
other cases pass there. (The round before, at the test commit
7c5dc91c, it failed in zero, other, wide, match and raceagainst this PR's first code, fb-1954-2.)
python -I -B tests/run_all.py --strict --changed origin/mainatfe1dd999(the checks that read a changed file, 8 atonce): 19 passed, 2 failed, 1 skipped (
test_tracy_funcs.py: Linux only). The 2 failing checks(
test_dev_packs.py,test_host_guest_writes.py) fail onmain@6e1521a7too, with the same messages (anunclassified
longshot_fsr4_pipelines.bin; allow-list entries ofhost/hos_main.candhost/oot_menu.c), run by namein fb-1954-2; none fails on this branch alone.
Earlier, the same change on
main@8859673e(3427c186): the micro-benchmark in Measurements.Still to test:
maininterleaved,no switches set, expecting the same picture and fps and frame times within the runs' spread or better (by hand,
queued)
HOS_NVN_WATCH_TEXset to a handle it binds, expecting itsnvn: texture ... bound fromlines, each chain once (by hand)python3 -I -B tests/test_nvn_bind_handles.py, expecting it to pass (by hand)against
main, expecting the same frame times asmainor better and the same picture (@Beanstalk play Castle Town'smarket and Hyrule Field on Linux and the Steam Deck, this PR against main, comparing frame times and screenshots)
main, expecting the same frametimes as
mainor better and the same picture (by hand or on the farm, not run yet)Measurements
Verdict: micro-benchmark only, not measured in play yet: no gain shown. This micro-benchmark measured no difference
(1.83 ns a bind of one handle and 1.88 ns of four, on
mainand with this change); whether the full path gainsanything is open until the in-game runs in Still to test. The change has no switch (
HOS_NVN_WATCH_TEXstays off bydefault).
Setup: Windows 11, i7-9700, llvm-mingw clang 23.1.5,
-O2 -march=nativeas the host is built;bind_handlesof 1 and4 handles cut out of each checkout's
host/nvn_native.c, recording into a bump allocator (which may hide the zeroing'scost: a harness closer to the command buffer's could show more); 21 interleaved rounds, the median and the rounds'
range, in one job of the PC's job queue (
microbench.py bind). Measured onmain@8859673ewith this change as it wasthere (3427c186); the rebase onto
fc4a6769changed none of its lines.8859673e8859673e)bind_handles, 1 handle, ns (median of 21 rounds, range)bind_handles, 4 handles, ns (median of 21 rounds, range)Risks
A byte of a record left unwritten would reach the replay as whatever the command buffer's memory held: a wrong texture
or sampler bound. The test checks every byte of the record against the old code for every count.
HOS_NVN_WATCH_TEXstill reads its switch at the first texture bind and logs the same lines, with two differences: a value wider than
the 32 bits compared turns it off (it could never match), and after 64 chains one line says new ones are no longer
logged (each was logged at every bind before). The frame walk now asks
hos_thread_stackandhos_mem_region(thememory lock) per frame, only when a watched handle is bound. The array entry points (
Bind*s) still check only the array's first byte, as onmain: #2018 makes them checkthe whole array (8 bytes a handle) and merges with this PR without a conflict in either order; proposed order #2018
first, after which this PR's 0 to 32 check in the watch only repeats it. No switch: a revert is enough. Players notice
nothing (no saves,
longshot_options.inior caches change).Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named).main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
tests/that reads changed source is updated, not weakened.Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold.Possibly related, for context:
Recommendation: Request changes. The rewritten texture watch still races across recording threads, and the new test can pass with broken command-memory accounting. The reported benchmark shows no speedup, and the full path still needs an in-game comparison.
The host writes texture, image and sampler bind records directly and moves texture-watch logging off the usual bind path. This removes redundant initialization but adds a specialized record writer whose layout must stay in sync with the reader. No player benefit has been shown.
Does it help: Unproven. The PR reports 21 interleaved Windows microbenchmark rounds on an i7-9700, comparing
8859673ewith 3427c186. The medians were identical at 1.83 ns for one handle and 1.88 ns for four. The harness omitted the real allocator and texture watch. No in-game FPS or frame-time data was supplied.Other systems: The common Vulkan replay path consumes these records on NVIDIA, AMD and Steam Deck, including synchronous and threaded replay. The current payload fields and submit-time deferred source are preserved by inspection. A recording failure can still affect textures, images and samplers on every backend. The diff leaves queue ordering, descriptor registration, renderer APIs, saves, caches, audio and input untouched.
Switches: HOS_NVN_WATCH_TEX remains a hex-handle developer diagnostic, off by default, with its existing gpu/vk/switches.def row. Off is the right default. The change moves the check into the bind path and keeps lazy initialization. No switches were added or removed.
Reviewed:
5aa17e9634against2e1f6c32d3: Read AGENTS.md, CONTRIBUTING.md, docs/dev/standards.md, the Forgejo PR template, the full two-file diff and commit, and all of tests/test_nvn_bind_handles.py. Read the changed parts of host/nvn_native.c and the relevant bind, allocator, thread, guest-memory, submit and replay code. Skimmed the rest of the host file, test-runner and CI setup, and profiling metadata. Read the run results quoted in the PR. There were no comments, earlier reviews, changed generated files or translations. No separate review checklist or sibling Tooling checkout was present.; nothing run (a code review).Checked and fine:
Blocking (to change before merge)
Waiting on the author (a run, a measurement or a decision; no edit does it)
Suggestions (the author may take or leave)
host/nvn_native.c:2176: Check that the whole 16-byte frame is readable in the guest stack. An aligned frame pointer in the reserved window can still point at an unmapped page.host/nvn_native.c:2182: Protect the lookup and insertion together. Concurrent matches can duplicate a log or race for a slot, and an unseen chain logs on every match after the table fills.Testing: Read-only review. The author reports 20,000 passing fixture cases at 7a8eb80c and a changed-file suite with 19 passes, two failures also reported on its base, and one skip. The skip is unnamed. No run was reported at
5aa17e96, and no Linux build, game run or head CI result was supplied.Overlaps and merge order: The PR names a separate ReportCounter change from the same experiment. No sibling number or ordering dependency was visible in the checkout. The supplied base already includes #1946.
Automated code review by BeanBot (gpt-6.2-sol), on the pull request's opening. Nothing was run; a maintainer decides.
@ -2156,2 +2170,4 @@if (want == ~0ull)want = watch_tex_want = getenv("HOS_NVN_WATCH_TEX") ? strtoull(getenv("HOS_NVN_WATCH_TEX"), NULL, 16) : 0;if (!want) return;for (int i = 0; i < n; i++) {Validate the count and full readable handle span before the watch or the recorder reads it. An oversized count can currently make the watch run past the array before the recorder rejects it.
@ -2141,2 +2141,4 @@NV(nvnCommandBufferBindUniformBuffersDeferred) { bind_bufs_deferred(c, 0); }NV(nvnCommandBufferBindStorageBuffersDeferred) { bind_bufs_deferred(c, 1); }/* (longshot) The record written field by field, pad_ too, with no zeroing first (every byte is one of them) and onehandle stored as one: the memset and memcpy calls of a record of variable size were a third of a BindTexture. ThePlease source or remove the one-third figure. The supplied benchmark does not measure the whole BindTexture call.
@ -2156,0 +2163,4 @@static uint64_t watch_tex_want = ~0ull;static __attribute__((noinline, cold)) void watch_tex_chains(Ctx *c, const uint64_t *h, int n);static inline void watch_tex(Ctx *c, const uint64_t *h, int n) {if (__builtin_expect(watch_tex_want != 0, 0)) watch_tex_chains(c, h, n);Two recording threads can race with first-use initialization even when the watch is off. Initialize before recording or use an atomic fast-path read and once-only initialization.
@ -0,0 +14,4 @@import tempfilefrom pathlib import PathRUN_ALL_ARGS = ["--cc", "gcc"]Honor CC and choose an available native compiler by default. Forcing gcc breaks an llvm-mingw-only Windows setup.
@ -0,0 +19,4 @@ROOT = Path(__file__).resolve().parents[1]def block(text, marker):Use tests/srccut.py. This counter treats braces in diagnostic strings and comments as C syntax.
@ -0,0 +62,4 @@static uint8_t blk[2][4096];static uint32_t asked[2];/* (the recording's next bytes: cmd_alloc's, rounded to 8 as it does; the new code's block holds a pattern) */static uint8_t *cmd_alloc(nvn_cmd *o, uint32_t size) { (void)o; asked[0] = (size + 7) & ~7u; memset(blk[0], 0xA5, sizeof blk[0]); return blk[0]; }The stub skips the real allocator's counter writes, and both sides share hw_fix. Test independent expected counter deltas and check that the writer leaves the bytes beyond the record untouched.
@ -0,0 +105,4 @@p.add_argument("--cc", default="gcc")a = p.parse_args()nvn = (ROOT / "host" / "nvn_native.c").read_text(encoding="utf-8")cut = "\n".join(block(nvn, m) for m in ("static void put_hdr(", "static void hw_fix(", "static void bind_handles("))All cases pass if the inline watch condition is reversed. Exercise unset, matching, nonmatching and repeated binds with the child environment set explicitly.
5aa17e9634519f5c7e7dThank you for the review. Pushed, rebased onto current
main@6e1521a7(with #1949): head519f5c7e(was5aa17e96).git range-diffshows the PR's own commit unchanged by the rebase; on top of it,7c5dc91c(the test, first) and519f5c7e(the fix).Blocking points of the review:
:2166): fixed in519f5c7e. The inline test readswatch_tex_wantas an atomic (relaxed) load; the first bind reads the switch once underwatch_tex_lock, re-checking it there, and stores the handle atomically. A value wider than the 32 bits compared (sofffffffffffffffftoo, which stayed at the sentinel) now turns the watch off; before, such a handle could never match. Test: 8 threads binding at once for the first time read the switch once and log once;ffffffffffffffffreads it once over 1000 binds.:2173,:1745): the count part is fixed in519f5c7e: the watch reads nothing when the count is out of 0 to 32 (bind_handlesthen stops the game, as before);bind_handlescopies no handle for a count of 0 and copies one handle with an 8-bytememcpy, so a game array of any alignment is read as before. Test: a count of 33 whose 33rd handle matches logs nothing. The span part is not changed here: the array entry points check only the first byte ofP(4)onmaintoo, and this PR does not touch those entry lines (it changesbind_handlesand the watch). Checking8 * countbytes needs everyBind*sentry line changed, which is its own change; I list it for the owner.:2176): the walk is the same as onmain, but this PR moved it intowatch_tex_chains, so the fix stays in that function:519f5c7ereads a frame only when all 16 bytes are mapped guest memory (hos_mem_region), and stops at a link that does not go up the stack. Test: a frame linking to an unmapped page in the window, a frame running past the mapped stack (neither is read) and a link to itself (the walk ends).:2182): likewise frommain, inside the moved function, so fixed in519f5c7e: the lookup and the insertion happen together underwatch_tex_lock, and the line is logged outside it. Policy for a full table: after 64 chains, one line says new ones are no longer logged, then nothing more. Test: 64 chains, then new and repeated ones: one more line in total.tests:65): fixed in7c5dc91c. The check cuts the realcmd_allocandcmd_reserve_recand stubs the pool below them with malloc'd blocks filled with a pattern. All 20000 binds go into one recording, which grows. Each record is checked against bytes built from the inputs alone (header, fields,pad_0, handles).cmd_usedmust grow by the record's size, andhw_usedandlast_recby the hardware size given (or 16 + 4 per handle), not throughhw_fix. The 64 bytes after the record must keep the pattern. The comparison with the oldbind_handlesstays.tests:17): fixed in7c5dc91c, in the ordertests/test_fpx_sticky.pyuses:--cc, then$CC, then on WindowsLONGSHOT_MINGW's clang (whichrun_all.pysets to the clone's llvm-mingw), thenclang,gccorccon PATH. It fails, not passes, with no compiler.RUN_ALL_ARGS = ["--cc", "gcc"]is gone, so the runner no longer forces gcc.tests:108): fixed in7c5dc91c. The check runs the fixture once per case, withHOS_NVN_WATCH_TEXset in the child's environment: unset,0,beef(a handle no bind names),ffffffffffffffff,1234(new chain, repeated bind, the same chain from a four-handle bind, and the variable changed after the first bind, which is not read again) and 8 threads at once. With the condition reversed the switch would never be read, so the unset case (one read expected) and the matching case (lines expected) would fail. That is read from the code; the reversed condition was not run.tests:22): fixed in7c5dc91c:blockandbetweenfromtests/srccut.py, imported as the other checks do (the check's folder put onsys.path, so it works underpython -I). The brace counter is gone.Inline
:2144(the one-third figure): removed in519f5c7e. The micro-benchmark did not time the wholeBindTexture. The comment now says only what changed (nomemset, no run-time-sizedmemcpyfor one handle).Suggestions: taken in
519f5c7e. The record's size comes fromsizeof(nvn_op_hdr),offsetof(nvn_p_bind_handles, h)and the handle's size, and a_Static_assertholds the 8-byte invariant the writer relies on (no rounding). The frame walk and the dedup suggestions are points 3 and 4.Checked through the PC's job queue (job fb-1954-2, on this head):
tests/test_nvn_bind_handles.pypasses at519f5c7e(every case: records, unset, zero, other, wide, match, race), run with no--ccand again withCCset. At the test commit7c5dc91c(this PR's code before the fix) it fails in zero, other, wide, match and race, and records and unset pass there.tests/run_all.py --strict --changed origin/main: 19 passed, 2 failed, 1 skipped. The 2 failures (test_dev_packs.py,test_host_guest_writes.py) fail onmain@6e1521a7with the same messages. The description's Summary, Tested, Measurements and Risks are updated; nothing has run in the game."Does it help": BeanBot reads the PR's numbers right. The micro-benchmark shows no gain (1.83 ns a bind of one handle and 1.88 ns of four, on
mainand with this change), and nothing has been measured in play. Measurements now says so plainly. The change has no switch;HOS_NVN_WATCH_TEXstays off by default.Waiting on the author, all pending and in Still to test (none has run): interleaved in-game runs against the merge base in the Market and a heavy area (bind-path CPU time, average fps, 1 % lows, median and p99 frame times), dropping the change if the full path shows no gain; the local game run with the watch off (same picture) and on (its lines); the Windows and Linux builds, the full checks and CI on this head; the Tier 1 runs, Windows AMD included.
@Beanstalk This writes the NVN texture, image and sampler bind records field by field (host/nvn_native.c) instead of building each record and copying it, and the test of the off-by-default HOS_NVN_WATCH_TEX debug watch is inline; the bytes written must be the same. It has not run in the game here with this head yet. Please play Castle Town Market and Hyrule Field, a minute each, with a picture in each compared with main's, on Linux with NVIDIA, on Linux with AMD (RADV), on Windows with an Intel GPU and on the Steam Deck, the PR against main. The pictures must match main's (no wrong or missing textures), no crash; frame time p99 equal to main's or better, within the spread.
@siantm only members of
BigBeanscan start the farm.One of them can approve this request by reacting 👍 to it or to this comment.This request was for519f5c7, and the PR has changed since (fe1dd99), so a 👍 no longer approves it. Comment@Beanstalkagain to ask for the new commit.Recommendation: Request changes. Bound the diagnostic frame walk to the recording thread’s guest stack and make the concurrency fixture safe when it observes duplicate logs. The performance gain is still unproven.
The rebase includes the renderer build fix. The revised writer preserves the record layout and submit-time deferred handles. The fixture now runs the real allocator, checks independent counter deltas and record bytes, and checks the trailing bytes. The watch now initializes once under a lock, uses an atomic fast-path read and bounds the deduplication table. The missing full-span check in the bind-array wrappers is inherited. Prior review
Blocking
host/nvn_native.c:2191allows a rising frame link into any mapped guest allocation.hos_mem_regionalso accepts the image, heap, system objects and other threads’ stacks. The watch can read unrelated words and report them as callers. Bound the full 16-byte frame to the current guest stack usinghos_thread_stack, assvcQueryMemorydoes, and keep the mapped-range check. Model a second mapped allocation in the fixture so it catches an out-of-stack link.tests/test_nvn_bind_handles.py:137formats every log into the samelast_logarray. If deduplication regresses, multiple workers can write it concurrently, causing undefined behavior in the case the fixture should report as a clean failure. Count only in the threaded case or protect the fixture’s buffer with its own lock.Does it help? Unproven. The earlier 21-round microbenchmark had the same medians on both sides, 1.83 ns for one handle and 1.88 ns for four. After the source fixes, compare warmed and interleaved runs in the Market and a heavy scene against the updated merge base. Include bind-path CPU time, average FPS, 1% lows, median and p99 frame times. If the comparison stays within the spread, the measured result does not justify the record-writer optimization. The diagnostic fixes can be reviewed on their own merits.
Testing. The author reports all seven focused cases passed on Windows at this head. The selected suite reports 19 passes, two failures reproduced on base and one Linux-only skip. Head CI, native Linux build and gameplay remain open. The author’s farm request is awaiting approval and names Linux NVIDIA, Linux RADV, Windows Intel and Steam Deck. Add AMD Windows to the Tier 1 plan. The separate ReportCounter PR has no ordering dependency. Farm request ReportCounter PR
Reviewed
519f5c7eagainst6e1521a7. Checked the interdiff, all changes to both files and revision-matched Graphify maps. Read the relevant allocator, bind, submit, replay, memory-map and thread-stack source. Nothing from the PR was run.@ -2158,3 +2189,3 @@if ((h[i] & 0xFFFFFFFFull) != want) continue;uint64_t chain[8] = {c->x[30]}, fp = c->x[29];for (int k = 1; k < 8 && fp && fp < 0x8000000000ull && !(fp & 7); k++) chain[k] = G64(fp + 8), fp = G64(fp);for (int k = 1; k < 8 && fp && !(fp & 7) && hos_mem_region(fp, 16); k++) { /* (the whole frame mapped) */A higher frame link can land in another mapped guest allocation. hos_mem_region accepts the heap, image and other threads' stacks too. Keep the mapping check and bound the whole frame to the current guest stack via hos_thread_stack. Add a fixture case with a link into a second mapped allocation.
@ -0,0 +134,4 @@static void hos_log(const char *fmt, ...) {va_list ap;va_start(ap, fmt);vsnprintf(last_log, sizeof last_log, fmt, ap);If deduplication regresses, several workers can write last_log concurrently here. Make the fixture race-free even on failure by counting only in the threaded case or guarding the buffer with a fixture lock.
@Beanstalk This writes the NVN texture, image and sampler bind records field by field (host/nvn_native.c) instead of building each record and copying it, and the test of the off-by-default HOS_NVN_WATCH_TEX debug watch is inline; the bytes written must be the same. It has not run in the game here with this head yet. Please play Castle Town Market and Hyrule Field, a minute each, with a picture in each compared with main's, on Linux with NVIDIA, on Linux with AMD (RADV), on Windows with an Intel GPU and on the Steam Deck, the PR against main. The pictures must match main's (no wrong or missing textures), no crash; frame time p99 equal to main's or better, within the spread.
@siantm only members of
BigBeanscan start the farm. One of them can approve this request by reacting 👍 to it or to this comment.@futondestroyer thanks for the second look (62883). Both points are fixed at
fe1dd999(test0c4ecdf9first, then the fixfe1dd999; still onmain@6e1521a7, so no rebase was needed this round):fe1dd999now walks a frame only when the whole 16-byte frame lies inside the current guest thread's stack, taken fromhos_thread_stack(hos_self(), ...)assvcQueryMemorydoes, and is also mapped (hos_mem_regionis still checked). A link that leaves the stack ends the walk. With no guest thread, nothing past the link register is walked. The fixture (0c4ecdf9) now maps a second allocation above the thread's stack and has a frame whose link points into it. At0c4ecdf9, with the walk still bounded only by a mapped region, thematchcase fails: it logged106 < c1 < c2 < c3and read the other allocation. Atfe1dd999it logs106 < c1and reads nothing there.last_log): the fixture'shos_lognow formats intolast_logunder its ownSRWLOCK, so lines logged from several workers when dedup regresses can no longer race on the buffer. The race case then fails on its counts.Run through this PC's job queue (fb-1954-3, Windows 11, llvm-mingw clang 23.1.5): at
fe1dd999,tests/test_nvn_bind_handles.pypasses all seven cases, both with no--ccand withCCset.run_all.py --strict --changed origin/maingives 19 passed and 2 failed. The two failures aretest_dev_packs,test_host_guest_writes, and they also fail onmain@6e1521a7. I added Windows with an AMD GPU to Still to test. The description's Testing section is updated.Still pending on my side: the interleaved in-game runs against the merge base (Market and a heavy scene: bind-path CPU time, average fps, 1% lows, median and p99 frame times). If those stay within the spread, I'll say plainly that the record-writer part has no measured gain. Also pending: Linux, Tier 1 and CI at this head.
On BeanBot's point 2, count and span before the read and the inherited span check named in your review: the span part is now its own fix, #2018 (
fix/nvn-bind-array-span, test405eb181, fixcfd24dda, onmain@40bfceb0). EveryBind*sentry point checks the count (0 to 32) and then all 8 x count bytes of the game's array in the guest window before the watch or the record reads it, andBindVertexBufferschecks its 16-byte ranges whole.tests/test_nvn_bind_span.pyruns the real entry points over a guest window followed by no-access pages: onmain13 of its cases read past the window's end and fault before any stop, with the fix all 55 pass (this PC's job queue, fb3-sep-2). It and this PR merge without a conflict in either order; not run in the game yet.Description: Risks names #2018 (the Bind*s whole-array check) and the proposed landing order; no code change.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.