Measure occlusion queries on the host GPU #3715

Closed
S33G wants to merge 0 commits from upstream-pr/3715 into main
S33G commented 2026-11-30 04:31:45 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by S33G on 2026-11-30T04:31:45Z.


Why

VIctory currently answers sample-count queries with a constant and binary occlusion queries with “visible.” That keeps objects from disappearing, but it also prevents the title from culling things that the depth buffer hides. Peer investigation

Fix

  • Enable real D3D12 occlusion queries with VICTORY_QUERIES=1. Record begin and end in order in the full and thin command-list paths.
  • Capture each completed query into bounded readback storage. Publish the result after the host fence so a later command list can resolve it into the title’s buffer without a per-query wait.
  • Answer “visible” when the measurement is unavailable, split across host list segments, or missing a dropped draw. Leave timestamp and other query behavior as it was.

Verification

Six focused query tests passed on the PR branch, including completed-result visibility, fallback eligibility, and heap lifetime. This is a draft pending qualified RTX 3090 gameplay measurements. Early garage attempts ended before timed holds, so there is no FPS or frame-time claim.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5559028421 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3715). Originally posted by [S33G](https://github.com/S33G) on 2026-11-30T04:31:45Z. --- ## Why VIctory currently answers sample-count queries with a constant and binary occlusion queries with “visible.” That keeps objects from disappearing, but it also prevents the title from culling things that the depth buffer hides. [Peer investigation](https://victory.alxr.eu/git/levraipumba/victory-launcher/src/branch/main/UPSTREAM.md) ## Fix - Enable real D3D12 occlusion queries with `VICTORY_QUERIES=1`. Record begin and end in order in the full and thin command-list paths. - Capture each completed query into bounded readback storage. Publish the result after the host fence so a later command list can resolve it into the title’s buffer without a per-query wait. - Answer “visible” when the measurement is unavailable, split across host list segments, or missing a dropped draw. Leave timestamp and other query behavior as it was. ## Verification Six focused query tests passed on the PR branch, including completed-result visibility, fallback eligibility, and heap lifetime. This is a draft pending qualified RTX 3090 gameplay measurements. Early garage attempts ended before timed holds, so there is no FPS or frame-time claim.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
trustno1-coder/VIctory-NVIDIA!3715
No description provided.