Skip to content

asahi, hk: drop Ioto compose forms only unit tests call (-390 lines, stacked on #528) - #538

Merged
RyanTheTide merged 3 commits into
deadweight/hk-test-onlyfrom
deadweight/ioto-test-only
Nov 19, 2026
Merged

RyanTheTide merged 3 commits into
deadweight/hk-test-onlyfrom
deadweight/ioto-test-only

Conversation

@RyanTheTide

Copy link
Copy Markdown

Problem

After #528 removed the hk G17P Ioto helpers that only tests called, several shared Ioto compose entry points in src/asahi/lib are in the same state: the driver never calls them, and only unit tests do. The driver uses the _trusted forms and agx_ioto_g17p_program_compose_with_preshader. hk_agx3_g17p_graphics_program_desc_bound has never had a driver caller either.

Change

Three commits. Stacked on #528 (base branch deadweight/hk-test-only); merge #528 first.

  1. Drop the G17P composers whose last driver callers hk: drop G17P Ioto helpers and a version check only unit tests call (-1876 lines) #528 removed:
    • agx_ioto_g17p_direct_add3_program_compose, plus its tails, relocate helper and witness constants.
    • The validating agx_ioto_g17p_no_resource_program_compose. Its test checks now call the _trusted form, so the same bytes and fail-closed cases are still checked against the function the driver uses.
  2. Drop the untrusted compose forms only tests call: g17p fragment/coverage-fragment/resource/fragment-resource/background-resource, and the g17g wrapper that passed classes=1.
    • Their byte and capacity checks move to the _trusted forms, which take the same inputs and must produce the same expected bytes.
    • Their body-validation rejections move to agx_ioto_g17p_program_compose_with_preshader, the live entry point that runs that validation.
  3. Drop hk_agx3_g17p_graphics_program_desc_bound and its two test checks.

Net: +68 / -458 lines (-390), 6 files. No driver code paths change; the tests now check the functions the driver calls rather than parallel copies.

Testing

  • x86 build (clang, release with asserts) with tools=asahi,drm-shim and build-tests=true, then meson test --suite asahi: everything passes except hk_dual_source_gpl, which also fails at base in this container (same failing set as base).
  • No driver code paths change, so no hardware rows are needed.

Still to run

Nothing.

Evidence

Assisted-by: LLM (Claude:Opus 5.5)

agx_ioto_g17p_direct_add3_program_compose and the validating
agx_ioto_g17p_no_resource_program_compose lost their last non-test
callers (agx3_g17p_direct_add3_program_prepare and
hk_agx3_g17p_no_resource_program_generate) in 9954a17. The driver
composes no-resource programs with the _trusted form only.

Drop them with the direct-add3 witness tables, relocation helper and
size/VA macros only they used, and test_g17p_direct_add3_program. Point
the byte and fail-closed checks of test_g17p_no_resource_program at the
_trusted form, which shares the composer and so still guards the live
bytes; the SPECLM grammar check that only the validating form made goes.
Added by 7416b6a (DjDeveloperr), re-added in 44236b2.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The drivers compose G17P programs with the _trusted forms, or with
agx_ioto_g17p_program_compose_with_preshader when the body needs
validating, and G17G resource programs with
agx_ioto_g17g_resource_program_compose_classes. The validating
agx_ioto_g17p_{fragment_no_resource,resource,fragment_resource,
coverage_fragment,background_resource}_program_compose forms and the
classes=1 agx_ioto_g17g_resource_program_compose wrapper have had no
non-test caller since 44236b2 (Acelogic) added them.

They share the composer with the live forms, so their tests guard live
bytes: point the byte and bounds checks at the _trusted forms (and at
_classes with mask 1), which take the same inputs and must produce the
same bytes, and the malformed-body checks at
agx_ioto_g17p_program_compose_with_preshader, which runs the same
validation. agx_ioto_g17p_no_resource_program_compose stays: it still
has a caller until hk_agx3_g17p_no_resource_program_generate goes.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Honeykrisp never called it: since 44236b2 (Acelogic), which added it,
only test-hk-agx3-ioto-program-core did, to check two generated programs
against the bound. Drop it with those two bound checks; the generation,
relocation and suffix checks stay, and test-agx3-graphics-program keeps
covering the shared agx3_g17p_graphics_program_desc_bound.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide
RyanTheTide merged commit 17e83ba into deadweight/hk-test-only Nov 19, 2026
@RyanTheTide
RyanTheTide deleted the deadweight/ioto-test-only branch November 19, 2026 19:02
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.

1 participant