Lower the maxVertexBuffer limit to 8.

This is to match the upstream WebGPU specification.

Also remove maxVertexAttributeEnd in favor maxVertexBufferStride.

Bug:dawn:678
Change-Id: Ia498ff522ba257d40e9ddd6e145a0ba77f6753ca
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/41182
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
This commit is contained in:
Corentin Wallez
2021-02-10 19:47:13 +00:00
committed by Commit Bot service account
parent 725e03b0c9
commit fb3991e7d2
3 changed files with 8 additions and 15 deletions

View File

@@ -284,11 +284,11 @@ TEST_F(VertexStateTest, SetAttributeOffsetOutOfBounds) {
utils::ComboVertexStateDescriptor state;
state.vertexBufferCount = 1;
state.cVertexBuffers[0].attributeCount = 1;
state.cAttributes[0].offset = kMaxVertexAttributeEnd - sizeof(wgpu::VertexFormat::Float);
state.cAttributes[0].offset = kMaxVertexBufferStride - sizeof(wgpu::VertexFormat::Float);
CreatePipeline(true, state, kDummyVertexShader);
// Test attribute offset out of bounds
state.cAttributes[0].offset = kMaxVertexAttributeEnd - 1;
state.cAttributes[0].offset = kMaxVertexBufferStride - 1;
CreatePipeline(false, state, kDummyVertexShader);
}