When you are creating a VertexAttributeDescriptor, you don't always have the VertexFormat type available at compile time. This can happen if you're loading reflected vertex attribute data at runtime. wgpu-rs exposes the vertex_format_size and vert_attr_array macros, both of which are unsuitable for this case. I believe a simple size method on the VertexFormat enum can fix this problem.
When you are creating a VertexAttributeDescriptor, you don't always have the VertexFormat type available at compile time. This can happen if you're loading reflected vertex attribute data at runtime. wgpu-rs exposes the vertex_format_size and vert_attr_array macros, both of which are unsuitable for this case. I believe a simple size method on the VertexFormat enum can fix this problem.