Various cleanups for updated indexFormat handling

Addresses post-merge comments left by cwallez@ on
https://dawn-review.googlesource.com/c/dawn/+/27182

BUG=dawn:502

Change-Id: I9bce09da9bb46e92a4c613df2279bdefdd06d747
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/27761
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
This commit is contained in:
Brandon Jones
2020-09-01 18:32:49 +00:00
committed by Commit Bot service account
parent be53792880
commit ccda6a0009
6 changed files with 110 additions and 19 deletions

View File

@@ -577,9 +577,16 @@ TEST_F(RenderPipelineValidationTest, StripIndexFormatRequired) {
descriptor.primitiveTopology = primitiveTopology;
descriptor.cVertexState.indexFormat = indexFormat;
// Succeeds even when the index format is undefined because the
// primitive topology isn't a strip type.
device.CreateRenderPipeline(&descriptor);
if (indexFormat == wgpu::IndexFormat::Undefined) {
// Succeeds even when the index format is undefined because the
// primitive topology isn't a strip type.
device.CreateRenderPipeline(&descriptor);
} else {
// TODO(crbug.com/dawn/502): Once setIndexBuffer requires an
// indexFormat. this should fail. For now it succeeds to allow
// backwards compatibility during the deprecation period.
device.CreateRenderPipeline(&descriptor);
}
}
}
}