mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-27 01:03:41 +00:00
9f91c95c24
Introduce a new struct type, `Scalar`, combining a `ScalarKind` and a `Bytes` width, and use this whenever such pairs of values are passed around. In particular, use `Scalar` in `TypeInner` variants `Scalar`, `Vector`, `Atomic`, and `ValuePointer`. Introduce associated `Scalar` constants `I32`, `U32`, `F32`, `BOOL` and `F64`, for common cases. Introduce a helper function `Scalar::float` for constructing `Float` scalars of a given width, for dealing with `TypeInner::Matrix`, which only supplies the scalar width of its elements, not a kind. Introduce helper functions on `Literal` and `TypeInner`, to produce the `Scalar` describing elements' values. Use `Scalar` in `wgpu_core::validation::NumericType` as well. |
||
---|---|---|
.. | ||
access.info.ron | ||
collatz.info.ron | ||
shadow.info.ron |