Skip to content

Releases: gogpu/gputypes

v0.5.1

Choose a tag to compare

@kolkov kolkov released this 28 Jun 10:36
239da90

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-types block_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

Choose a tag to compare

@kolkov kolkov released this 21 Apr 17:06
9cc2a71

v0.5.0 — PrimitiveState zero value = WebGPU spec default (BREAKING)

Changed (BREAKING)

  • PrimitiveTopology: zero value is now TriangleList (was Undefined). Renumbered: TriangleList=0, PointList=1, LineList=2, LineStrip=3, TriangleStrip=4.
  • FrontFace: zero value is now CCW (was Undefined). Renumbered: CCW=0, CW=1.
  • CullMode: zero value is now None (was Undefined). Renumbered: None=0, Front=1, Back=2.
  • *Undefined constants removed (PrimitiveTopologyUndefined, FrontFaceUndefined, CullModeUndefined).
  • DefaultPrimitiveState() now returns PrimitiveState{} — 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()

Choose a tag to compare

@kolkov kolkov released this 03 Apr 22:10
82f78fa

What's New

  • BlendComponent.UsesConstant() — returns true if the blend component uses BlendFactorConstant or BlendFactorOneMinusConstant in either SrcFactor or DstFactor. Matches Rust wgpu-types BlendComponent::uses_constant().

Used by wgpu v0.23.5 for draw-time blend constant validation (VAL-005).

v0.3.0

Choose a tag to compare

@kolkov kolkov released this 10 Mar 19:53
209398e

Added

  • TextureUsage.ContainsUnknownBits() — returns true if the usage contains any unknown flags. Follows the same pattern as BufferUsage.ContainsUnknownBits(). Used by wgpu core validation layer.

v0.2.0: webgpu.h Spec Compliance

Choose a tag to compare

@kolkov kolkov released this 29 Jan 09:04

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...v0.2.0

v0.1.0: Initial Release

Choose a tag to compare

@kolkov kolkov released this 28 Jan 22:34

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.0

Documentation

See README.md for full documentation.