Repository navigation
hk: resolve deferred occlusion availability from the end on G17P - #83
Merged
Merged
Conversation
Deferred occlusion-availability streams were resolved in recording order. While an earlier stream was judged, every later deferred stream was still in the list and waited on its own, later render, which counts as compute waiting on the render subqueue: only the last deferred stream of a command buffer could ever ride on its render, and every earlier occlusion query paid a compute command for its availability. The branch that collects movable stores into a later stream could not be reached. On G17P, resolve from the end instead. A later stream whose render carries its stores is dropped before earlier streams are judged, so each render whose queries nothing else waits on carries its own availability. A stream that stays (kept, or movable) still counts as a waiter, and a later query reset or barrier waiting on a stream still keeps it in place. Movable stores collect into the latest movable stream when it waits on a render that completes after theirs. The other native AGX3 chips (G15S, G15C, G16G) keep recording order until it is measured there; the AGX3c parts do not use render-carried availability. The resolver tests now show every render of a G17P command buffer carrying its own store, the earlier store kept behind a remaining later stream or a later reset, and recording order on G16G.
astaff
pushed a commit
to astaff/mesa
that referenced
this pull request
Oct 28, 2026
aa733fc is the Mesa the J616s runs every day. Bring aurora-wip 2a5fd4a into it: DJ's G17P refit and H-PLOC fixes (aurora-silicon#79, aurora-silicon#81), the deferred occlusion resolver (aurora-silicon#82, aurora-silicon#83), the zink split-query readback fix (aurora-silicon#84) and the virtio queue-limits fix (aurora-silicon#86). The conflicts in the acceleration-structure sources and hk_query_pool.c are resolved as in the earlier PR aurora-silicon#80 merge 8b7395e. That merge also carried 2a541c6, which is held back here (see the PR). Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Deferred occlusion-availability streams were resolved in recording order. While an earlier stream was being judged, every later deferred stream was still in the list, waiting on its own later render. That counts as compute waiting on the render subqueue, so only the last deferred stream of a command buffer could ever ride on its render. Every earlier occlusion query paid a compute command for its availability. The branch that collects movable stores into a later stream could not be reached. The resolver tests from #82 showed this.
On G17P the resolver now runs from the end of the command buffer:
Scope:
hk_resolve_oq_forward()is the previous loop, unchanged.Tests (host):
hk_query_oqpasses 48/48. The new checks cover:hk_sync_priorandhk_query_resetalso pass.A18 Pro (Neo): integration/aurora module b3a06ac6, base = aurora-wip eebf55e, 0 GPU recoveries.
A/B on the occlusion_query cases plus every 4th query_pool case (4898 cases):
The CTS rarely records several deferred occlusion streams in one command buffer, so the count barely moves here. In a command buffer with many occlusion queries, each earlier query no longer costs a compute command.
On this PR: