Skip to content

hk: M5 pNext walks and a stray test file - #95

Merged
DjDeveloperr merged 2 commits into
aurora-wipfrom
fix/hk-m5-pnext-and-stale-test
Oct 29, 2026
Merged

DjDeveloperr merged 2 commits into
aurora-wipfrom
fix/hk-m5-pnext-and-stale-test

Conversation

@DjDeveloperr

Copy link
Copy Markdown

Two small cleanups from maralcbr's review of omacom#19:

  • asahi: remove a stray copy of the M5 instruction test. src/asahi/compiler/test-agx3-m5-instructions.c is an early 5 KB copy. Meson only builds compiler/test/test-agx3-m5-instructions.c (src/asahi/lib/meson.build), and nothing else refers to the stray file.
  • hk: read the M5 compression pNext chains like the G17P one. hk_g17p_compression_eligible() copies each sType and then copies pNext straight into the cursor. Its comment explains why: through a copied VkBaseInStructure, GCC 16's points-to analysis loses the chain and drops the stores of a stack-built chain. The M5 colour, G17S format-list and M5 depth checks now walk their chains the same way. M5 and G17S only.

Testing (host): hk_g17p_compression_test passes all 4069 checks. hk_image.c, hk_cmd_draw.c and hk_g17p_meta_copy_core.c build with -Dwerror=true.

src/asahi/compiler/test-agx3-m5-instructions.c is an early copy of
compiler/test/test-agx3-m5-instructions.c. Meson only builds the one
under test/ (src/asahi/lib/meson.build), and nothing else refers to the
stray copy.
hk_g17p_compression_eligible() walks a VkImageCreateInfo chain by copying
each sType and then copying pNext straight into the cursor. Its comment
explains why: through a copied VkBaseInStructure, GCC 16's points-to
analysis loses the chain and drops the stores of a stack-built chain.
The M5 colour, G17S list and M5 depth eligibility checks still copied a
whole VkBaseInStructure per link. Read their chains the same way.

hk_g17p_compression_test: 4069 checks pass.
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