mesa-panvk-bifrost r7: fix XFB store channel-extract for packed varyings (iter19) #96

Merged
marfrit merged 1 commits from claude-noether/marfrit-packages:mesa-panvk-bifrost-r7 into main 2026-05-25 09:22:49 +00:00
Owner

Summary

  • Adds 0007-panvk-bifrost-xfb-component-base-fix.patch to mesa-panvk-bifrost (iter19)
  • Eliminates a reproducible SIGSEGV in vkCreateGraphicsPipeline for any XFB-bound vertex output declared with non-zero layout (component=N)
  • Surfaced by dEQP-VK.transform_feedback.simple.holes_vert on Mali-G52 r1 MC1 (PAN_ARCH 7)
  • Phase 5 2nd-model reviewed; release-mode defensive guards applied

Test plan

  • holes_vert / holes_extra_draw_vert: Crash → Fail (color residual is iter20 territory)
  • basic_*: 36/36 Pass
  • depth_clip_*: 1 Pass + 4 NotSupported, 0 Fail
  • lines_or_triangles*: 16 NotSupported, 0 Fail
  • holes_geom / holes_extra_draw_geom: unchanged NotSupported (no GS on G52)
  • CI green on aarch64
  • post-merge pacman -Syu mesa-panvk-bifrost on consumer (ohm) reports r7

Note: max_output_components_{64,128,256} were never reached on the r5 sweep (watchdog killed transform_feedback after holes_vert crashed). Post-r7 they now run and surface their own pre-existing coredumps — confirmed on shipped r6 too. Not regressions from this patch. iter20+ territory.

Cross-refs: ~/src/panvk-bifrost/iter19/phase{0,1,2,3}_holes_vert*.md on the working tree.

🤖 Generated with Claude Code
Co-Authored-By: Claude Opus 4.7 noreply@anthropic.com

## Summary - Adds `0007-panvk-bifrost-xfb-component-base-fix.patch` to `mesa-panvk-bifrost` (iter19) - Eliminates a reproducible SIGSEGV in `vkCreateGraphicsPipeline` for any XFB-bound vertex output declared with non-zero `layout (component=N)` - Surfaced by `dEQP-VK.transform_feedback.simple.holes_vert` on Mali-G52 r1 MC1 (PAN_ARCH 7) - Phase 5 2nd-model reviewed; release-mode defensive guards applied ## Test plan - [x] holes_vert / holes_extra_draw_vert: Crash → Fail (color residual is iter20 territory) - [x] basic_*: 36/36 Pass - [x] depth_clip_*: 1 Pass + 4 NotSupported, 0 Fail - [x] lines_or_triangles*: 16 NotSupported, 0 Fail - [x] holes_geom / holes_extra_draw_geom: unchanged NotSupported (no GS on G52) - [ ] CI green on aarch64 - [ ] post-merge `pacman -Syu mesa-panvk-bifrost` on consumer (ohm) reports r7 Note: `max_output_components_{64,128,256}` were never reached on the r5 sweep (watchdog killed transform_feedback after holes_vert crashed). Post-r7 they now run and surface their *own pre-existing* coredumps — confirmed on shipped r6 too. **Not regressions from this patch.** iter20+ territory. Cross-refs: `~/src/panvk-bifrost/iter19/phase{0,1,2,3}_holes_vert*.md` on the working tree. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
marfrit added 1 commit 2026-05-25 09:18:43 +00:00
Adds 0007-panvk-bifrost-xfb-component-base-fix.patch — eliminates a
reliable SIGSEGV in vkCreateGraphicsPipeline whenever an XFB-bound
vertex output is declared with non-zero `layout (component=N)`.

Surfaced by dEQP-VK.transform_feedback.simple.holes_vert (Mali-G52 r1
MC1, PAN_ARCH 7). Backtrace lands 11 frames into libvulkan_panfrost.so
called from vkt::TransformFeedback::TransformFeedbackHolesInstance::
iterate.

Root cause: iter17's lower_xfb_output_iter17 (and upstream
pan_nir_lower_xfb, which has the identical `// TODO`) computes the
source-channel mask as `mask << channel_idx`, where channel_idx is
the varying-location component (0..3) but src only contains channels
starting at nir_intrinsic_component(intr). For a scalar declared
component=2, the lowering computed `mask << 2` against a 1-component
src — out-of-range; the malformed nir_def segfaulted in downstream
NIR constant-folding (nir_constant_expressions.c::evaluate_*).

Fix translates channel_idx to source-channel space by subtracting
nir_intrinsic_component(intr) before shifting the mask, and replaces
the elided release-mode asserts with explicit release-mode guards
(closes the same elision class as the original bug).

Verified on PineTab2 (Mali-G52 r1 MC1, PAN_ARCH 7) against vulkan-cts
1.3.10.0:
  - holes_vert / holes_extra_draw_vert no longer SIGSEGV (now Fail
    on color-check; that is a separate iter20 finding).
  - basic_*: 36/36 Pass. depth_clip_*: 1 Pass + 4 NotSupported.
    lines_or_triangles*: 16 NotSupported. 0 Fail across the set.

Caveat (not regressions): max_output_components_64/_128/_256 were
never reached on the r5 sweep — watchdog killed transform_feedback
after the holes_vert crash. With this fix in place, they now run
and surface their own pre-existing coredumps, confirmed on shipped
r6 baseline too. iter20+ territory.

Phase 5 (2nd-model) review: APPROVE WITH CHANGES (non-blocking).
Changes applied: release-mode defensive guards on both preconditions
plus a dispatcher-side comment clarifying the i*2+j semantics.

Cross-refs:
  - ~/src/panvk-bifrost/iter19/phase{0,1,2,3}_holes_vert*.md

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
marfrit merged commit 902de73a02 into main 2026-05-25 09:22:49 +00:00
marfrit deleted branch mesa-panvk-bifrost-r7 2026-05-25 09:22:49 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: marfrit/marfrit-packages#96