WebGPU: Texture Compression Unaligned
- Category
- Graphics
- Type
- New or changed feature
- Status
- Proposed (Chrome Proposed)
- Intent stage
- None
WPT details: WebGPU/WGSL have a conformance test suite (https://github.com/gpuweb/cts) that is regularly pulled into Chromium and part of the testing of Dawn/Tint in Chromium. While the CTS can be embedded in WPT, the WebGPU team opted to keep it separate in Chromium testing to use a customized harness for robustness and performance.
Summary
Compressed texture (using the BC, ETC or ASTC formats) in unextended WebGPU must have a size that's a multiple of the block size (4x4 or up to 12x12). This is very constraining when compressing arbitrary images as a resizing step must happen which looses high-frequency information. Most hardware supports compressed textures with partial blocks at the border such that the textures can have any size, removing this issue.
Motivation
Compressed texture (using the BC, ETC or ASTC formats) in unextended WebGPU must have a size that's a multiple of the block size (4x4 or up to 12x12). This is very constraining when compressing arbitrary images as a resizing step must happen which looses high-frequency information. Most hardware supports compressed textures with partial blocks at the border such that the textures can have any size, removing this issue.
Standards & signals
- Specification: https://gpuweb.github.io/gpuweb/#dom-gpufeaturename-texture-compression-unaligned
- Firefox: No signal — Implementation is ongoing https://github.com/gfx-rs/wgpu/pull/10247 Feedback indicated via WebGPU standardization process.
- Safari: Positive — Specification approval constitutes a positive signal, per https://github.com/WebKit/standards-positions/issues/294#issuecomment-1877411933
- Web developers: Positive — Bevy, Unity, Spark.js positive about this feature.
- Tracking bug: https://crbug.com/528245806
Ecosystem
- Web Platform Tests: https://wpt.fyi/results/?q=webgpu%2FWGSL
- Chrome Platform Showcase: https://chrome-platform-showcase.paulkinlan-ea.deno.net/features
- GenDN reference: https://gendn.paulkinlan-ea.deno.net/features
- chrome.dev demos search: https://www.google.com/search?q=site%3Achrome.dev+WebGPU%3A%20Texture%20Compression%20Unaligned
- MDN Web Docs: https://developer.mozilla.org/en-US/search?q=WebGPU%3A%20Texture%20Compression%20Unaligned
- Baseline status: https://webstatus.dev/?q=WebGPU%3A%20Texture%20Compression%20Unaligned
Explainers: https://gpuweb.github.io/gpuweb/#dom-gpufeaturename-texture-compression-unaligned