Skip to content

borealis: assert pre_gfx never defers CDM flush and update stale comment - #1309

Merged
RyanTheTide merged 1 commit into
aurora-silicon:aurora-wipfrom
joshuaswarren:w8B/cdm-defer-dispatch-hygiene
Nov 28, 2026
Merged

RyanTheTide merged 1 commit into
aurora-silicon:aurora-wipfrom
joshuaswarren:w8B/cdm-defer-dispatch-hygiene

Conversation

@joshuaswarren

Copy link
Copy Markdown

What

Two small follow-up hygiene fixes in src/asahi/vulkan/hk_cmd_dispatch.c after #1219 / #1233:

  1. Add a comment and assert(!defer || cs != cs->cmd->current_cs.pre_gfx) at hk_dispatch_with_usc_launch() documenting that draw-feeding GS/tess compute prepasses run on current_cs.pre_gfx and must never defer their trailing CDM cache flush (enforced by cs == cs->cmd->current_cs.cs).
  2. Update the stale comment on the G17P compute launch path noting that hk_dispatch_with_usc_launch() defers hk_cdm_cache_flush() until the next barrier, non-deferred launch, or stream close on AGX_CAP_CDM_DEFER_FLUSH chips (G13G and G13X).

Tested

  • meson test -C build hk_cdm_barrier_stream (-Db_ndebug=false): PASS (0.01s, covers both G13G and G13X deferred flush paths with the new assert active).
  • Not yet: on-device CTS run (comment and debug-build assert only; no release codegen or command-stream change).

Risk

Zero behavioral change in release builds; adds one comment, one updated comment, and one debug-build invariant assert in src/asahi/vulkan/hk_cmd_dispatch.c. Back out by reverting this single commit.

Document and assert in hk_dispatch_with_usc_launch() that draw-feeding
GS/tess compute helpers on current_cs.pre_gfx never defer their trailing
CDM cache flush, and update the stale AGX2 flush comment on the G17P
compute launch path after AGX_CAP_CDM_DEFER_FLUSH landed in #1219/#1233.

Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com>
@joshuaswarren
joshuaswarren requested review from a team and DjDeveloperr as code owners November 28, 2026 17:07
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-28T17:07:38.997799Z
We couldn’t complete this review. Comment @codex review to try again.
22dfe1f PR opened
🔒 Security Review ❌ Failed 2026-11-28T17:07:47.725063Z
We couldn’t complete this review. Comment @codex security review to try again.
22dfe1f PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

The account paying for this security review has reached its Codex usage limits. The payer can check the Codex usage dashboard. For personal accounts, using credits requires enabling “Use credits for security reviews” in Code review settings. If you do not manage the paying account, contact this repository's admins.

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: MERGE at 22dfe1f7

Blockers: none

Checked:

  • src/asahi/vulkan/hk_cmd_dispatch.c: verified the new assert(!defer || cs != cs->cmd->current_cs.pre_gfx); in hk_dispatch_with_usc_launch() directly enforces the pre_gfx invariant with zero release codegen change, and the updated comment in hk_dispatch_g17p_native() matches current deferral behavior after #1219/#1233.
  • Commit metadata and PR checklist (What/Tested/Risk two-way door, human Signed-off-by, MERGEABLE).
Evidence
  • Head: 22dfe1f7 (+6/-1 across src/asahi/vulkan/hk_cmd_dispatch.c).
  • Author verification: hk_cdm_barrier_stream (-Db_ndebug=false) PASS; no release-build behavior change.

@RyanTheTide

Copy link
Copy Markdown

@DjDeveloperr, code-owner heads-up: App approval at 22dfe1f72f97 from a different lane. It goes into the merge train's next combined A/B (aurora-wip 878ddc0c + #1301 #1307 #1309 #1310) on M1 Pro G13S + M4 G16G. If that row is clean, I plan to land it via --admin under the 6-point rule no earlier than one hour from now, unless you post a hold.

@RyanTheTide

Copy link
Copy Markdown

Merge-train landing at 22dfe1f72f97.

Revert: git revert -m 1 <merge commit> on aurora-wip. A regression gets reverted first and fixed after.

@RyanTheTide
RyanTheTide merged commit 44c8d70 into aurora-silicon:aurora-wip Nov 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants