Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1080: Fix the validation of vertex buffer sizes r=kvark a=JCapucho **Connections** None that i know of **Description** ~~The vertex buffer size (in vertices) was being divided by stride causing the limit to be lower than it was supposed to be.~~ This bug wasn't triggered earlier because if the stride was 0 it wouldn't perform any calculation and the stride was only set when a set pipeline command was received and the `VertexState` `inputs` were already created so the following commands would work: ``` SetPipeline with 1 vertex buffer SetVertexBuffer with only 4 vertices Draw 6 vertices ``` This would have passed validation while this wouldn't ``` SetPipeline with 1 vertex buffer of stride 8 SetVertexBuffer with 4 vertices SetPipeline with 1 vertex buffer of stride 8 SetVertexBuffer with 4 vertices Draw 3 vertices ``` Now all draw calls have proper vertex validation and not only after the `inputs` are populated **Testing** This change was tested after debugging an issue with the draw calls failing in a specific order in [veloren](https://gitlab.com/veloren/veloren/-/tree/imbris/wgpu-master-rebased) Co-authored-by: Capucho <[email protected]>
- Loading branch information