CNA-GAP-019: A VULKAN occlusion query counts only the first contiguous run of its tagged draws per frame

CNA snapshot 009d40f5  ·  Known Issues › Functional gaps  ·  source links pinned to 009d40f5

✓

Evidence basis: source-verified at the pinned commit; tests exist (not executed for this page). Claims on this page were checked by reading the CNA source at commit 009d40f5; unless a sentence says otherwise, nothing here was built or executed. Nothing on this page was executed unless the Evidence section says so.

Draws inside one Begin/End span that are separated by another query's draws or land in a later render pass after a boundary are not summed, by an approved 'reject additional spans' policy.

Identifier
CNA-GAP-019
Category
Functional gap
Subsystem
Graphics & renderers
Status
Open
Verified against
CNA 009d40f5 (009d40f5dd085c4e674d3479675fac84b12b3e0a)
Evidence basis
Source-verified: read at TARGET, not executed
Tests touching this area
Yes: see Current tests
Affected contract
Microsoft::Xna::Framework::Graphics::OcclusionQuery::PixelCount on VULKAN

Expected behaviour

XNA counts every sample drawn between OcclusionQuery.Begin and End.

Actual behaviour at TARGET

In VulkanRenderer.cpp the record pass wraps each contiguous run of draws sharing a query tag in vkCmdBeginQuery/vkCmdEndQuery; a query already recorded this frame is "deliberately NOT reopened" because Vulkan requires a reset between begins ("this implements the approved 'reject additional spans beyond the first contiguous run' policy"). Later spans of the same query contribute nothing to PixelCount.

Source locations

Evidence

Checked by reading the named sources at 009d40f5; nothing was built or executed for this entry.

Focused reproduction

No focused reproduction is known. Nothing has been invented here; the evidence above is what exists.

Current tests

Vulkan occlusion fixtures check single contiguous spans.

Regression test

A fixture whose query spans a render-target switch (or an interleaved second query) and asserts the summed count, or documents the refusal.

Blast radius

Occlusion queries whose draws are interleaved with other queries or split by render-pass boundaries on VULKAN.

Workaround

Keep each query's draws contiguous and inside one render pass.

The same subject is explained at several altitudes. These are the neighbouring pages at each one.