mesa-panvk-bifrost: iter13 — implement VK_EXT_transform_feedback for Bifrost #51

Merged
marfrit merged 1 commits from claude-noether/marfrit-packages:noether/mesa-panvk-bifrost-iter13 into main 2026-05-20 17:33:05 +00:00
Owner

iter12 hit a wall: Brave's ANGLE-Vulkan path requires GLES3, which
requires VK_EXT_transform_feedback, which PanVk-Bifrost did not
implement. This iter implements that extension, unlocking the full
ANGLE-Vulkan-on-Bifrost stack.

The implementation follows Panfrost-Gallium's well-validated XFB lowering
(nir_io_add_intrinsic_xfb_info + pan_nir_lower_xfb) wired into the PanVk
shader pipeline after nir_lower_io. Adds 4 XFB buffer address sysvals
plus per-draw num_vertices to the graphics sysval struct. Buffer state
is tracked on the cmd buffer; per-draw sysval upload populates either
the bound buffer's GPU address or PAN_SHADER_OOB_ADDRESS (memory-sink)
so XFB-capable pipelines used outside Begin/End survive without GPU
fault — the Panfrost-Gallium idiom from gallium/drivers/panfrost/
pan_cmdstream.c:1350.

Verified on PineTab2 (Mali-G52 r1 MC1, RK3566):

  • /tmp/panvk-iter13/probe_xfb: 3 vertices captured byte-exact
  • /tmp/panvk-iter13/probe_xfb_nodraw: XFB pipeline used without Bind/
    Begin/End survives — DEVICE_LOST regression closed
  • Brave 148 with --use-angle=vulkan: WebGL 2.0 (OpenGL ES 3.0) creates
    cleanly, renderer reports
    "ANGLE (ARM, Vulkan 1.2.335 (Mali-G52 r1 MC1), panvk)"
  • chrome://gpu graphics feature status: Canvas/Compositing/OpenGL/
    Rasterization/WebGL/WebGL2/WebGPU/Video Decode all hardware accelerated

Phase docs:

  • ~/src/panvk-bifrost/phase4_iter13_close.md (build green)
  • ~/src/panvk-bifrost/phase5_iter13_close.md (review fixes applied)
  • ~/src/panvk-bifrost/phase6_iter13_close.md (Brave integration green)

pkgver bumped 26.0.6.r2 -> 26.0.6.r3; iter13 patch applied via
unified-diff (the 328-line change scope is past sed-of-individual-
lines territory). Sanity checks in prepare() verify the patch landed.

Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com

iter12 hit a wall: Brave's ANGLE-Vulkan path requires GLES3, which requires VK_EXT_transform_feedback, which PanVk-Bifrost did not implement. This iter implements that extension, unlocking the full ANGLE-Vulkan-on-Bifrost stack. The implementation follows Panfrost-Gallium's well-validated XFB lowering (nir_io_add_intrinsic_xfb_info + pan_nir_lower_xfb) wired into the PanVk shader pipeline after nir_lower_io. Adds 4 XFB buffer address sysvals plus per-draw num_vertices to the graphics sysval struct. Buffer state is tracked on the cmd buffer; per-draw sysval upload populates either the bound buffer's GPU address or PAN_SHADER_OOB_ADDRESS (memory-sink) so XFB-capable pipelines used outside Begin/End survive without GPU fault — the Panfrost-Gallium idiom from gallium/drivers/panfrost/ pan_cmdstream.c:1350. Verified on PineTab2 (Mali-G52 r1 MC1, RK3566): - /tmp/panvk-iter13/probe_xfb: 3 vertices captured byte-exact - /tmp/panvk-iter13/probe_xfb_nodraw: XFB pipeline used without Bind/ Begin/End survives — DEVICE_LOST regression closed - Brave 148 with --use-angle=vulkan: WebGL 2.0 (OpenGL ES 3.0) creates cleanly, renderer reports "ANGLE (ARM, Vulkan 1.2.335 (Mali-G52 r1 MC1), panvk)" - chrome://gpu graphics feature status: Canvas/Compositing/OpenGL/ Rasterization/WebGL/WebGL2/WebGPU/Video Decode all hardware accelerated Phase docs: - ~/src/panvk-bifrost/phase4_iter13_close.md (build green) - ~/src/panvk-bifrost/phase5_iter13_close.md (review fixes applied) - ~/src/panvk-bifrost/phase6_iter13_close.md (Brave integration green) pkgver bumped 26.0.6.r2 -> 26.0.6.r3; iter13 patch applied via unified-diff (the 328-line change scope is past sed-of-individual- lines territory). Sanity checks in prepare() verify the patch landed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
marfrit added 1 commit 2026-05-20 17:32:57 +00:00
iter12 hit a wall: Brave's ANGLE-Vulkan path requires GLES3, which
requires VK_EXT_transform_feedback, which PanVk-Bifrost did not
implement. This iter implements that extension, unlocking the full
ANGLE-Vulkan-on-Bifrost stack.

The implementation follows Panfrost-Gallium's well-validated XFB lowering
(nir_io_add_intrinsic_xfb_info + pan_nir_lower_xfb) wired into the PanVk
shader pipeline after nir_lower_io. Adds 4 XFB buffer address sysvals
plus per-draw num_vertices to the graphics sysval struct. Buffer state
is tracked on the cmd buffer; per-draw sysval upload populates either
the bound buffer's GPU address or PAN_SHADER_OOB_ADDRESS (memory-sink)
so XFB-capable pipelines used outside Begin/End survive without GPU
fault — the Panfrost-Gallium idiom from gallium/drivers/panfrost/
pan_cmdstream.c:1350.

Verified on PineTab2 (Mali-G52 r1 MC1, RK3566):
- /tmp/panvk-iter13/probe_xfb: 3 vertices captured byte-exact
- /tmp/panvk-iter13/probe_xfb_nodraw: XFB pipeline used without Bind/
  Begin/End survives — DEVICE_LOST regression closed
- Brave 148 with --use-angle=vulkan: WebGL 2.0 (OpenGL ES 3.0) creates
  cleanly, renderer reports
  "ANGLE (ARM, Vulkan 1.2.335 (Mali-G52 r1 MC1), panvk)"
- chrome://gpu graphics feature status: Canvas/Compositing/OpenGL/
  Rasterization/WebGL/WebGL2/WebGPU/Video Decode all hardware accelerated

Phase docs:
- ~/src/panvk-bifrost/phase4_iter13_close.md  (build green)
- ~/src/panvk-bifrost/phase5_iter13_close.md  (review fixes applied)
- ~/src/panvk-bifrost/phase6_iter13_close.md  (Brave integration green)

pkgver bumped 26.0.6.r2 -> 26.0.6.r3; iter13 patch applied via
unified-diff (the 328-line change scope is past sed-of-individual-
lines territory). Sanity checks in prepare() verify the patch landed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
marfrit merged commit 9ca97374c8 into main 2026-05-20 17:33:05 +00:00
marfrit deleted branch noether/mesa-panvk-bifrost-iter13 2026-05-20 17:33:05 +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#51