Skip to content

v0.2.0: gputypes integration

Choose a tag to compare

@kolkov kolkov released this 29 Jan 14:21
· 13 commits to main since this release
04064eb

gputypes Integration Release

This release integrates go-webgpu with the gogpu ecosystem through github.com/gogpu/gputypes.

⚠️ Breaking Changes

  • All WebGPU types now use github.com/gogpu/gputypes directly
    • Example: wgpu.TextureFormatBGRA8Unormgputypes.TextureFormatBGRA8Unorm
    • Enum values now match webgpu.h specification

✨ Added

  • Integration with gogpu ecosystem via gputypes
  • Full webgpu.h spec compliance for enum values
  • Comprehensive conversion layer for wgpu-native v27 compatibility
    • TextureFormat (~45 formats), VertexFormat (~30 formats)
    • Wire structs with correct FFI padding (uint64 flags)

🐛 Fixed

  • TextureFormat enum values mismatch (BGRA8Unorm was 0x17, now correct 0x1B)
  • Compatibility with gogpu Rust backend
  • All 11 examples now work correctly

📦 Dependencies

  • goffi v0.3.7 (ARM64 Darwin improvements)
  • wgpu-native v27.0.4.0

Migration Guide

// Before (v0.1.x)
import "github.com/go-webgpu/webgpu/wgpu"
format := wgpu.TextureFormatBGRA8Unorm

// After (v0.2.0)
import (
    "github.com/go-webgpu/webgpu/wgpu"
    "github.com/gogpu/gputypes"
)
format := gputypes.TextureFormatBGRA8Unorm

Full Changelog: v0.1.4...v0.2.0