Repository navigation
asahi, hk: drop Ioto compose forms only unit tests call (-390 lines) - #542
Merged
Merged
Conversation
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>
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.
Re-opened against aurora-wip: #538 was merged into its stacked base branch after that base had already landed, so these commits never reached aurora-wip. Same commits as #538; they merge cleanly onto the current tip. Rebuilt and retested on that merge: same result as base (only
hk_dual_source_gplfails, as at base).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
_trustedforms andagx_ioto_g17p_program_compose_with_preshader.hk_agx3_g17p_graphics_program_desc_boundhas never had a driver caller either.Change
agx_ioto_g17p_direct_add3_program_compose, plus its tails, relocate helper and witness constants.agx_ioto_g17p_no_resource_program_compose. Its test checks now call the_trustedform, so the same bytes and fail-closed cases are still checked against the function the driver uses.classes=1._trustedforms, which take the same inputs and must produce the same expected bytes.agx_ioto_g17p_program_compose_with_preshader, the live entry point that runs that validation.hk_agx3_g17p_graphics_program_desc_boundand 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
meson test --suite asahi: everything passes excepthk_dual_source_gpl, which also fails at base in this container (same failing set as base).Still to run
Nothing.
Evidence
git grepafter the change: 0 references to any removed symbol.desc_boundever had a non-test caller.agx_ioto_g17p_compiler_spectpr_build, which the hk tests use as an independent model of the live_packoutput.g17g_no_resource_program_compose, which is live (_classescalls it).agx3_g17p_graphics_program_desc_boundin the compiler: a possible follow-up, since it touches shared helpers.Assisted-by: LLM (Claude:Opus 5.5)