Skip to content

fix: Metal vertex descriptor + update deps (v0.19.5)#93

Merged
kolkov merged 2 commits intomainfrom
fix/metal-vertex-descriptor
Mar 5, 2026
Merged

fix: Metal vertex descriptor + update deps (v0.19.5)#93
kolkov merged 2 commits intomainfrom
fix/metal-vertex-descriptor

Conversation

@kolkov
Copy link
Contributor

@kolkov kolkov commented Mar 5, 2026

Summary

  • Fix Metal render pipeline creation — add MTLVertexDescriptor mapping from WebGPU VertexBufferLayout. Without it, Metal fails with "Vertex function has input attributes but no vertex descriptor was set."
  • Complete Metal vertex format constants — all WebGPU vertex formats (8/16/32-bit int/uint/float, normalized, packed 10-10-10-2) mapped to MTLVertexFormat
  • Update goffi v0.4.1 → v0.4.2, naga v0.14.4 → v0.14.5

Fixes gogpu/ui#23

Test plan

  • Cross-compile darwin/arm64 + darwin/amd64 — builds clean
  • Full test suite passes (go test ./...)
  • Lint: 0 new issues (only pre-existing)

kolkov added 2 commits March 5, 2026 09:02
Metal requires an explicit MTLVertexDescriptor when the vertex shader
has input attributes. Without it, pipeline creation fails with:
'Vertex function has input attributes but no vertex descriptor was set.'

- Add buildVertexDescriptor() mapping WebGPU VertexBufferLayout to Metal
- Add vertexFormatToMTL() with all WebGPU vertex format mappings
- Add vertexStepModeToMTL() for per-vertex/per-instance step modes
- Expand MTLVertexFormat constants (20 → 33) for full WebGPU coverage

Fixes gogpu/ui#23
@kolkov kolkov merged commit 0c11cb8 into main Mar 5, 2026
10 checks passed
@codecov
Copy link

codecov bot commented Mar 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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.

Bug on M3 ?

1 participant