Add oq_hold, which makes a samples-passed report whose draws the full occlusion query ring left uncounted repeat its record's last complete count, and log how often such reports happen.

A draw that finds every query slot still waiting for the completion thread goes uncounted, and the report after it said only what the other draws counted, at least 1: the game takes the object it tested for all but hidden for that frame. With the setting the report writes the larger of that and the last complete count reported into the same record. Off by default and read at start; the count of such reports is logged at the 1st, 10th, 100th and so on either way. tests/oq_hold_check.py checks the rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
chrg6
2026-11-13 08:33:35 -05:00
parent cc5c8f87ad
commit 9d5f16bda4
7 changed files with 199 additions and 3 deletions

View File

@@ -143,7 +143,12 @@ Grep-level look on 2026-10-22, statuses updated 2026-10-26; "saw" is what the gr
per frame in the field, ~21 in a fight); the game's CPU reads them (guest f_70010c3298) to cull objects.
A report reaches guest memory as a CPU write after its submission's fence, a ClearBuffer or ReportValue as a fill the
GPU makes in stream order, so a report followed by a clear of the same record ended as the report, and a condition
replayed after the clear read memory from before the fill. A clear of at most 256 bytes is now also applied in the
replayed after the clear read memory from before the fill. A draw that finds the query ring full (every slot still
waiting for the completion thread, in a hitch at a high frame rate) is left uncounted and the report after it says
what the rest counted, at least 1, which the game reads as an object all but hidden for that frame;
`NX2NAVI_OQ_HOLD=1` makes such a report repeat the larger of that and its record's last complete count
(`vk_exec_xfer.c` `oq_report_count`, `vk_oq_hold.h`), and the log counts them ("missed draws the full occlusion
query ring left uncounted"). A clear of at most 256 bytes is now also applied in the
replay to the counter records it covers (`vk_exec_xfer.c` `clear_small`, `NX2NAVI_CLEAR_SMALL_CPU`): earlier reports
leave the cleared bytes alone, conditions read them from memory. Other small clears stay GPU fills alone, since the
GPU reads guest memory too and a write ahead of it would reach passes that still want the old value. Whether the