Repository navigation
hk: test the deferred occlusion-availability resolver - #82
Merged
Merged
Conversation
The end-of-command-buffer resolution of deferred occlusion availability (hk_defer_oq_available(), the per-stream decision and hk_resolve_deferred_oq_available()) needs only control streams and hk_sync, but lived in hk_query_pool.c, which pulls in most of the driver. Move it, with struct hk_oq_stamp and its description, into hk_query_oq.c and hk_query_oq.h so it can be tested on its own. No functional change.
Link hk_query_oq.c with hk_sync.c against mock control streams, as hk_sync_prior does, with a recording hk_dispatch_imm_writes(). Cover hk_defer_oq_available() accepting stores that all ride on one render and refusing streams with no stores, other immediate writes, commands, an API timestamp, a pending query reset or stores from different renders; the render carrying the store (fragment-end slot first, skipping slots an API timestamp or another store holds); the store kept in place for a later API timestamp on the stream, a later query reset or other compute waiting on it, compute or a tail requirement waiting on the render, or a stream not waiting on its render; and too few free slots, alone and with several deferred streams in and out of render order.
This was referenced Oct 27, 2026
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.
Direct tests for
hk_resolve_deferred_oq_available(), the occlusion-availability resolution from #62, as Greptile asked on omacom/mesa #19.Two commits:
hk_defer_oq_available(), the per-stream decision (hk_stamp_oq_available()) andhk_resolve_deferred_oq_available()move withstruct hk_oq_stampintohk_query_oq.candhk_query_oq.h. They need only control streams and hk_sync, buthk_query_pool.cpulls in most of the driver. No functional change.tests/test-hk-query-oq.clinkshk_query_oq.cwith the realhk_sync.c, the same wayhk_sync_priordoes. It runs against mock control streams, with a recordinghk_dispatch_imm_writes().Coverage (36 checks)
hk_defer_oq_available()):A finding about MOVABLE
With several deferred streams, the "collect into the later stream" branch of the resolver can't currently be reached.
hk_stamp_oq_available()counts that wait as "compute waiting on the render subqueue", so the earlier stream is kept in place.The multi-stream tests document that current behaviour.
If the intent is for earlier streams to ride on their renders too, there are two options:
That would be a functional change, so it isn't part of this PR.
Testing
Host-only meson build (
-Dbuild-tests=true, asahi Vulkan only), under the usual memory cap: