Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1048: Make VertexFormat::size a const fn r=kvark a=Imberflur **Connections** Addresses #836 **Description** The `vertex_attr_array!` macro uses this function. This change enables the macro to be used in `const` contexts and for instance allows returning a `VertexBufferDescriptor` constructed in function without having the difficulties of ensuring the array from `vertex_attr_array!` lives long enough. **Testing** I don't believe testing is needed for this. <!-- Non-trivial functional changes would need to be tested through: - [wgpu-rs](https://github.com/gfx-rs/wgpu-rs) - test the examples. - [wgpu-native](https://github.com/gfx-rs/wgpu-native/) - check the generated C header for sanity. Ideally, a PR needs to link to the draft PRs in these projects with relevant modifications. See #666 for an example. If you can add a unit/integration test here in `wgpu`, that would be best. --> Co-authored-by: Imbris <imbrisf@gmail.com>
- Loading branch information