Skip to content

v0.18.1

Choose a tag to compare

@kolkov kolkov released this 27 Feb 19:55
· 241 commits to main since this release
bf7e24e

Vulkan Buffer-to-Image Copy Fix

Fix pixel corruption on non-power-of-2 width textures (e.g., rounded rectangles at 204px width).

Root Cause

convertBufferImageCopyRegions incorrectly inferred bytesPerTexel via integer division BytesPerRow / Width. When BytesPerRow was padded to 256-byte alignment, this gave wrong results for most widths:

  • width=204, RGBA8: 1024 / 204 = 5 (should be 4) → wrong Vulkan bufferRowLength → pixel corruption
  • 126 out of 204 possible widths were affected

Fix

Added blockCopySize() static format lookup matching Rust wgpu reference TextureFormat::block_copy_size(). Covers all non-compressed WebGPU texture formats (1/2/4/8/16 bytes per texel).

Full Changelog

See CHANGELOG.md for details.