Releases: gogpu/gputypes
Releases · gogpu/gputypes
Release list
v0.5.1
Fixed
TextureFormat.BlockCopySize() uint32— canonical bytes-per-texel-block method. Eliminates 3 independent buggy implementations across wgpu, gogpu, and gg. Covers all 87 TextureFormat constants, verified against Rust wgpu-typesblock_copy_size. Returns 0 for implementation-defined formats (Depth24Plus). Table-driven tests (97 subtests) + completeness guard.
Full changelog: https://github.com/gogpu/gputypes/blob/main/CHANGELOG.md
v0.5.0
v0.5.0 — PrimitiveState zero value = WebGPU spec default (BREAKING)
Changed (BREAKING)
- PrimitiveTopology: zero value is now
TriangleList(wasUndefined). Renumbered: TriangleList=0, PointList=1, LineList=2, LineStrip=3, TriangleStrip=4. - FrontFace: zero value is now
CCW(wasUndefined). Renumbered: CCW=0, CW=1. - CullMode: zero value is now
None(wasUndefined). Renumbered: None=0, Front=1, Back=2. *Undefinedconstants removed (PrimitiveTopologyUndefined,FrontFaceUndefined,CullModeUndefined).DefaultPrimitiveState()now returnsPrimitiveState{}— the zero value IS the spec default.
Why: PrimitiveState{} is now a fully valid WebGPU-spec-default configuration. No normalization pass needed. Go-idiomatic zero initialization.
Downstream impact: verified zero breaking references across wgpu/gogpu/gg/ui/gpucontext — all HAL backends use named constants, not numeric values.
Full Changelog: v0.4.0...v0.5.0
v0.4.0 — BlendComponent.UsesConstant()
What's New
BlendComponent.UsesConstant()— returns true if the blend component usesBlendFactorConstantorBlendFactorOneMinusConstantin eitherSrcFactororDstFactor. Matches Rust wgpu-typesBlendComponent::uses_constant().
Used by wgpu v0.23.5 for draw-time blend constant validation (VAL-005).
v0.3.0
v0.2.0: webgpu.h Spec Compliance
Changes
- All enum values now use explicit hex constants matching webgpu.h specification
- Binary compatibility with wgpu-native and other WebGPU implementations
Highlights
- TextureFormat: 97 formats with spec-compliant values (0x00000000 - 0x00000060)
- BufferUsage, TextureUsage: Explicit bit flags matching WebGPU spec
- LoadOp, StoreOp, BlendFactor, BlendOperation: Spec-compliant values
- VertexFormat: 31 formats with spec-compliant values
- PresentMode, CompositeAlphaMode: Spec-compliant values
Migration
Values changed from iota-based to explicit webgpu.h values. Use named constants.
Full Changelog
v0.1.0: Initial Release
gputypes v0.1.0
WebGPU type definitions for the gogpu ecosystem.
Highlights
- 97 texture formats (including BC, ETC2, ASTC compressed)
- 31 vertex formats
- Full binding, sampler, render pass types
- Adapter, device, surface configuration types
- Limits and Features structs
- Zero dependencies
Installation
go get github.com/gogpu/gputypes@v0.1.0Documentation
See README.md for full documentation.