@webgpu/cts
This index is a quick-reference of helper functions in the test suite.
Use it to determine whether you can reuse a helper, instead of writing new code,
to improve readability and reviewability.
Whenever a new generally-useful helper is added, it should be indexed here.
See linked documentation for full helper listings.
(Uncheck the "Inherited" box to hide inherited methods from documentation pages.)
- webgpu/capability_info: Structured information about texture formats, binding types, etc.
- webgpu/constants:
Constant values (needed anytime a WebGPU constant is needed outside of a test function).
- webgpu/util/texture: Helpers for GPUTextures.
- webgpu/util/unions: Helpers for various union typedefs in the WebGPU spec.
- webgpu/util/math: Helpers for common math operations.
- webgpu/util/check_contents: Check the contents of TypedArrays, with nice messages.
Also can be composed with webgpu/gpu_test!GPUTest#expectGPUBufferValuesPassCheck, used to implement
GPUBuffer checking helpers in GPUTest.
- webgpu/util/conversion: Numeric encoding/decoding for float/unorm/snorm values, etc.
- webgpu/util/copy_to_texture:
Helper class for copyToTexture test suites for execution copy and check results.
- webgpu/util/color_space_conversion:
Helper functions to do color space conversion. The algorithm is the same as defined in
CSS Color Module Level 4.
- webgpu/util/create_elements:
Helpers for creating web elements like HTMLCanvasElement, OffscreenCanvas, etc.
- webgpu/util/shader: Helpers for creating fragment shader based on intended output values, plainType, and componentCount.
- webgpu/util/prng: Seed-able deterministic pseudo random number generator. Replacement for Math.random().
- webgpu/util/texture/base: General texture-related helpers.
- webgpu/util/texture/data_generation: Helper for generating dummy texture data.
- webgpu/util/texture/layout: Helpers for working with linear image data
(like in copyBufferToTexture, copyTextureToBuffer, writeTexture).
- webgpu/util/texture/subresource: Helpers for working with texture subresource ranges.
- webgpu/util/texture/texel_data: Helpers encoding/decoding texel formats.
- webgpu/util/texture/texel_view: Helper class to create and view texture data through various representations.
- webgpu/util/texture/texture_ok: Helpers for checking texture contents.
- webgpu/shader/types: Helpers for WGSL data types.
- webgpu/shader/execution/expression/expression: Helpers for WGSL expression execution tests.
- webgpu/web_platform/util: Helpers for web platform features (e.g. video elements).