mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-18 01:15:39 +00:00
Make vertex input descriptor optional
Following WebGPU spec change at https://github.com/gpuweb/gpuweb/issues/378, vertexInput descriptor from GPURenderPipelineDescriptor should not be required anymore. BUG=dawn:22 Change-Id: I5d2500a758f44b7a7db2d2c23b359f1012221227 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10640 Commit-Queue: François Beaufort <beaufort.francois@gmail.com> Reviewed-by: Austin Eng <enga@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
18b2cb51d7
commit
13c472e196
@@ -43,11 +43,31 @@ class RenderPipelineValidationTest : public ValidationTest {
|
||||
|
||||
// Test cases where creation should succeed
|
||||
TEST_F(RenderPipelineValidationTest, CreationSuccess) {
|
||||
utils::ComboRenderPipelineDescriptor descriptor(device);
|
||||
descriptor.cVertexStage.module = vsModule;
|
||||
descriptor.cFragmentStage.module = fsModule;
|
||||
{
|
||||
utils::ComboRenderPipelineDescriptor descriptor(device);
|
||||
descriptor.cVertexStage.module = vsModule;
|
||||
descriptor.cFragmentStage.module = fsModule;
|
||||
|
||||
device.CreateRenderPipeline(&descriptor);
|
||||
device.CreateRenderPipeline(&descriptor);
|
||||
}
|
||||
{
|
||||
// Vertex input should be optional
|
||||
utils::ComboRenderPipelineDescriptor descriptor(device);
|
||||
descriptor.cVertexStage.module = vsModule;
|
||||
descriptor.cFragmentStage.module = fsModule;
|
||||
descriptor.vertexInput = nullptr;
|
||||
|
||||
device.CreateRenderPipeline(&descriptor);
|
||||
}
|
||||
{
|
||||
// Rasterization state should be optional
|
||||
utils::ComboRenderPipelineDescriptor descriptor(device);
|
||||
descriptor.cVertexStage.module = vsModule;
|
||||
descriptor.cFragmentStage.module = fsModule;
|
||||
descriptor.rasterizationState = nullptr;
|
||||
|
||||
device.CreateRenderPipeline(&descriptor);
|
||||
}
|
||||
}
|
||||
|
||||
// Tests that at least one color state is required.
|
||||
|
||||
Reference in New Issue
Block a user