panvk-bifrost campaigns (r1..r4 Vulkan compositor + r5.video1 Vulkan
video decode) shipped before this repo existed; the deliverable
patches live in marfrit-packages, but the reasoning chain, phase docs,
and source-state evidence lived only in local working trees on the
development host.
This retrofit imports:
- mesa-panvk-bifrost/ — r1..r4 era phase docs (iter1..iter18)
(libmali stub blobs at iter18/blob/ excluded
— 109MB of RE artifacts replaced with a README
pointer)
- mesa-panvk-bifrost-video/ — sibling campaign phase docs + probe
- evidence/ — frozen .tgz source snapshots at each milestone
(basis for the 0005 patch diff generation)
Future iterations should branch off here from day one, so each iter is
a commit rather than a snapshot. See [[feedback-session-local-process-pins]]
for the process drift this retrofit closes.
Total: 1.9 MB across 124 files.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
3.2 KiB
Phase 0 — substrate for iter5
Opened 2026-05-19 after iter4 close GREEN.
Locked research question — iter5
Render a non-fullscreen triangle into a 64×64 R8G8B8A8_UNORM attachment via a vertex buffer + UBO. Vertex buffer: 3 vertices, each (pos vec2 + color vec3) = 20 bytes (with 8-byte align padding → 32-byte stride). UBO: single mat4 transform (scaling 0.8 in x/y, identity otherwise). Triangle in scaled-NDC: v0(-0.5,-0.5) red, v1(0.5,-0.5) green, v2(0,0.5) blue. Fragment shader outputs interpolated color (mixed RGB at centroid).
Verify:
- Centroid pixel (32, 28) has all of R, G, B > 0x10 (interpolated, non-black).
- Top-left pixel (0, 0) is exactly 0x00000000 (clear, outside triangle).
- Top-right pixel (63, 0) is exactly 0x00000000 (clear, outside triangle).
- Covered pixel count (non-clear pixels) ∈ [800, 1600] (triangle area ≈ 1310 pixels).
If GREEN: iter6 stress-tests with a multi-draw scene or a Zink-on-PanVk smoke. If RED: characterize vertex input / UBO descriptor / NIR varying interpolation.
Why this shape
iter4 closed the descriptor model for fragment-stage texture binding. iter5 adds vertex-stage descriptor binding + vertex input (the vertex-side counterpart). What's new:
- Vertex buffer (
VK_BUFFER_USAGE_VERTEX_BUFFER_BIT) +vkCmdBindVertexBuffers VkPipelineVertexInputStateCreateInfowith non-empty bindings + attributes (pos location 0, color location 1)- UBO (
VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER) bound to vertex stage - Vertex shader reads attribute layouts + UBO via descriptor
- Interpolated varying (color) from vertex → fragment
Hypothesis space
- Vertex input bindings on Bifrost. Bifrost's attribute descriptor model has been a divergence point per
panvk_vX_cmd_draw.c'sPANVK_BIFROST_DESCreferences. First time we exercise non-zeroVkPipelineVertexInputStateCreateInfo. - UBO descriptor binding for vertex stage. Different from iter4's fragment-stage COMBINED_IMAGE_SAMPLER.
- Vertex-stage descriptor lowering in NIR (Bifrost-specific code paths).
- Varying interpolation (color) from vertex output → fragment input.
- UBO data fetch — does the GPU actually read the matrix from the bound buffer correctly?
- Non-fullscreen rasterization — partial coverage, edge pixels, anti-aliased-or-not boundaries on Bifrost's tile binner.
In-scope (LOCKED 2026-05-19 for iter5)
- 1 vertex buffer (3 verts), interleaved pos+color, 32-byte stride.
- 1 UBO (64 bytes, mat4).
- 1 descriptor set with 1 UBO binding bound to vertex stage.
- Triangle in NDC, scaled by 0.8 via UBO matrix.
- 4-point pixel-level verification + range-bound coverage count.
Out-of-scope (LOCKED 2026-05-19 for iter5)
- Index buffer /
vkCmdDrawIndexed. - Multiple draws.
- Push constants.
- Texture sampling (iter4 already covered).
- Depth / stencil.
- Blending (clear=opaque-black, triangle has α=1).
- MSAA.
- Compressed formats.
- Mipmaps.
- Real workloads (vkcube/vkmark/Zink) — that's iter6+.