Skip to content

borealis: fix aurora-wip build breaks after #693 and #703 merges - #944

Merged
DjDeveloperr merged 2 commits into
aurora-wipfrom
fix/borealis-restore-hk-nir-compact-bits
Nov 24, 2026
Merged

DjDeveloperr merged 2 commits into
aurora-wipfrom
fix/borealis-restore-hk-nir-compact-bits

Conversation

@DjDeveloperr

Copy link
Copy Markdown

What: Restores the aurora-wip build after two cross-PR rename mismatches introduced by the #693 and #703 merges (hk_cmd_meta.c:2853-2855 calling removed hk_nir_compact_bits() and hk_shader.c:6114 assigning removed info.fs.g17p_colour_unit_range).
Tested: 182/182 assert-enabled fedora:44 asahi unit suite PASS on ddc1c34a1167 (0 fail, 0 skipped); agent-policy.sh pr HEAD clean.
Risk: two-way · M1–M5 & A18 Pro (3-line build fix restoring aurora-wip compilation; revertible).
Not yet: Live hardware re-run (build-only rename alignment; no behavioural change).

Details
  1. borealis/meta: use hk_nir_compact_bits_8 in build_agx3_gen10_mip_shader:

    • PR #890 replaced hk_nir_compact_bits() with the 8-bit helper hk_nir_compact_bits_8(). When PR #693 merged in da5d55ef8c1, build_agx3_gen10_mip_shader() still called hk_nir_compact_bits().
    • build_agx3_gen10_mip_shader() uses a 16×16 workgroup (wg_dim = 16), so index is strictly in [0, 255] (8 bits) and index >> 1 is in [0, 127]. On all 8-bit inputs, hk_nir_compact_bits_8() is bit-for-bit identical to the old 10-bit helper with one fewer shift/or/and stage.
  2. borealis: update local-read shader copy to info.fs.colour_unit_range:

    • PR #703 copied meta->g17p_colour_unit_range into s->info.fs.g17p_colour_unit_range, which was renamed to s->info.fs.colour_unit_range in hk_shader_info::fs on aurora-wip.
Evidence
  • aurora-wip (b66cf010e90) failed to build libhk.a at hk_cmd_meta.c:2853 and hk_shader.c:6114.
  • Assert-enabled fedora:44 asahi unit suite on ddc1c34a1167: 182/182 PASS (0 fail, 0 skipped, build 38s, test 20s).

PR #890 replaced hk_nir_compact_bits() with the 8-bit helper
hk_nir_compact_bits_8() when switching build_g17p_mip_shader() to 16x16
workgroups. When PR #693 merged in da5d55e, build_agx3_gen10_mip_shader()
kept calling the removed hk_nir_compact_bits() name, breaking the build on
aurora-wip.

build_agx3_gen10_mip_shader() also uses a 16x16 workgroup (wg_dim = 16), so
the linear invocation index is strictly in [0, 255] (8 bits) and
index >> 1 is in [0, 127]. For all 8-bit inputs, hk_nir_compact_bits_8() is
bit-for-bit identical to the 10-bit helper with one fewer shift/or/and stage.

Signed-off-by: Diljit Singh <hey@djdev.me>
PR #703 copied meta->g17p_colour_unit_range into the old field name
s->info.fs.g17p_colour_unit_range, which was renamed to
s->info.fs.colour_unit_range on aurora-wip. Update the assignment in
hk_g17p_layout_shader_create_local_read() to match hk_shader_info::fs.

Signed-off-by: Diljit Singh <hey@djdev.me>
@DjDeveloperr
DjDeveloperr requested review from a team as code owners November 24, 2026 14:18

@satchlj satchlj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Verdict at ddc1c34a1167

Approved.

Blockers

None.

Checked

  • Audited both commits (70188e657af8 and ddc1c34a1167) across src/asahi/vulkan/hk_cmd_meta.c and src/asahi/vulkan/hk_shader.c.
  • Confirmed build_agx3_gen10_mip_shader() uses a 16x16 workgroup (wg_dim = 16), so linear invocation index is strictly in [0, 255] and index >> 1 is in [0, 127], making hk_nir_compact_bits_8() exact and restoring the build after #693.
  • Confirmed s->info.fs.colour_unit_range = meta->g17p_colour_unit_range in hk_g17p_layout_shader_create_local_read() matches the current hk_shader_info::fs field name after #703.
  • Verified clean build, 259/259 non-layout asahi tests, and live Borealis Vulkan compute smoke on Apple M5 Max (G17C B1), Linux 7.3 (MESA_SHADER_CACHE_DISABLE=1) with 0 GPU faults in dmesg.
  • Untested scope: Live runtime exercise of the hk_agx3_gen10_mip and G17P local-read paths on hardware using those paths.
Evidence
  • meson test --suite asahi (non-layout): 259/259 OK (agx_tests OK)
  • Live Apple M5 Max (G17C B1), Linux 7.3, MESA_SHADER_CACHE_DISABLE=1:
    • dEQP-VK.compute.pipeline.basic.*: 80/81 passed (0 failed, 1 not supported)
    • dmesg GPU fault delta: 0

@DjDeveloperr
DjDeveloperr merged commit d83bba1 into aurora-wip Nov 24, 2026
@DjDeveloperr

Copy link
Copy Markdown
Author

Merged into aurora-wip at ddc1c34a1167.

Verification summary:

  • Peer review: approved at exact head ddc1c34a1167 (259/259 asahi unit tests + live Apple M5 Max G17C B1 Borealis Vulkan compute.pipeline.basic 80/81 PASS, 1 NS, 0 GPU faults).
  • Assert-ON fedora:44 asahi build & test: 182/182 PASS.
  • Fork-mirror CI (DjDeveloperr/mesa): asahi run 45412635541 PASS, aurora-agent-policy run 45412635555 PASS.

@joshuaswarren joshuaswarren 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 at ddc1c34a: APPROVED

Blockers: none.

Checked:

  • hk_cmd_meta.c:2853-2855 — the two hk_nir_compact_bits(b, ...) calls now read hk_nir_compact_bits_8. At the parent, hk_nir_compact_bits_8 is defined at hk_cmd_meta.c:2316 and already used at :2354-2356; the un-suffixed name has no definition in the tree, which is the compile break. The commit's bit-identical claim holds for this call site: index is the packed linear invocation id in [0, 255] and index >> 1 in [0, 127], so both operands fit the 8-bit helper's domain.
  • hk_shader.c:6114 — s->info.fs.colour_unit_range = meta->g17p_colour_unit_range. The destination field was renamed to colour_unit_range on hk_shader_info::fs (the sibling site at :5261 already uses it); the source meta->g17p_colour_unit_range on hk_local_read_shader_meta is unchanged and still populated at :6679.
  • No other stale references: git grep hk_nir_compact_bits( and g17p_colour_unit_range on s->info.fs show only the fixed sites at this head.
  • aarch64 cross-build on mesa-xbuild at ddc1c34a with asserts on (-Db_ndebug=false): clean, libvulkan_asahi.so produced.
  • Asahi suite on Apple Silicon at ddc1c34a (aarch64): 187/187 (182 asahi + 5 poly).
Evidence
  • Parent b66cf010 (post-#703 merge) hk_cmd_meta.c:2850-2855 calls hk_nir_compact_bits(b, index) / (b, nir_ushr_imm(b, index, 1)); git grep hk_nir_compact_bits at parent shows the _8 definition at :2316 but no un-suffixed definition.
  • Parent hk_shader.c:6114 assigns s->info.fs.g17p_colour_unit_range; hk_shader_info::fs carries colour_unit_range (assigned at :5261), so the old member name fails to compile.
  • Build log: ~/mesa-w7t/build-w7t10.log on the build host; suite log on the test host.

@RyanTheTide
RyanTheTide deleted the fix/borealis-restore-hk-nir-compact-bits branch November 27, 2026 13:20
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.

3 participants