diff --git a/dawn.json b/dawn.json index 0e338a7772..c4de76587b 100644 --- a/dawn.json +++ b/dawn.json @@ -893,7 +893,7 @@ "members": [ {"name": "layout", "type": "pipeline layout"}, {"name": "vertex stage", "type": "pipeline stage descriptor", "annotation": "const*"}, - {"name": "fragment stage", "type": "pipeline stage descriptor", "annotation": "const*"}, + {"name": "fragment stage", "type": "pipeline stage descriptor", "annotation": "const*", "optional": true}, {"name": "vertex input", "type": "vertex input descriptor", "annotation": "const*"}, {"name": "primitive topology", "type": "primitive topology"}, {"name": "rasterization state", "type": "rasterization state descriptor", "annotation": "const*", "optional": true}, diff --git a/src/dawn_native/RenderPipeline.cpp b/src/dawn_native/RenderPipeline.cpp index db022c7d57..a9fd5d707d 100644 --- a/src/dawn_native/RenderPipeline.cpp +++ b/src/dawn_native/RenderPipeline.cpp @@ -271,6 +271,11 @@ namespace dawn_native { return DAWN_VALIDATION_ERROR("Input state must not be null"); } + // TODO(crbug.com/dawn/136): Support vertex-only pipelines. + if (descriptor->fragmentStage == nullptr) { + return DAWN_VALIDATION_ERROR("Null fragment stage is not supported (yet)"); + } + std::bitset attributesSetMask; DAWN_TRY(ValidateVertexInputDescriptor(descriptor->vertexInput, &attributesSetMask)); DAWN_TRY(ValidatePrimitiveTopology(descriptor->primitiveTopology));