{"record":{"id":"a1d66500b32d982b","repo":"stride3d/stride","slug":"unsupported-patch-type-name","errorCode":null,"errorMessage":"Unsupported patch type '{Name}'","messagePattern":"Unsupported patch type '(.+?)'","errorType":"exception","errorClass":"NotSupportedException","httpStatus":null,"severity":"error","filePath":"sources/shaders/Stride.Shaders.Parsers/Parsing/SDSL/AST/Literals.cs","lineNumber":736,"sourceCode":"                context.GetOrImportShader(shaderDef);\n            }\n            else if (Name == \"PointStream\" || Name == \"LineStream\" || Name == \"TriangleStream\")\n            {\n                symbolType = new GeometryStreamType(((TypeName)Generics[0]).ResolveType(table, context), Name switch\n                {\n                    \"PointStream\" => Specification.GeometryStreamOutputKindSDSL.Point,\n                    \"LineStream\" => Specification.GeometryStreamOutputKindSDSL.Line,\n                    \"TriangleStream\" => Specification.GeometryStreamOutputKindSDSL.Triangle,\n                    _ => throw new NotSupportedException($\"Unsupported geometry stream type '{Name}'\"),\n                });\n            }\n            else if (Name == \"InputPatch\" || Name == \"OutputPatch\")\n            {\n                symbolType = new PatchType(((TypeName)Generics[0]).ResolveType(table, context), Name switch\n                {\n                    \"InputPatch\" => Specification.PatchTypeKindSDSL.Input,\n                    \"OutputPatch\" => Specification.PatchTypeKindSDSL.Output,\n                    _ => throw new NotSupportedException($\"Unsupported patch type '{Name}'\"),\n                }, ((NumberLiteral)Generics[1]).IntValue);\n            }\n            else if (SymbolType.TryGetNumeric(Name, out var numeric))\n            {\n                table.DeclaredTypes.Add(fullTypeName, numeric);\n                symbolType = numeric;\n            }\n            else if (!IsArray && Generics.Count == 0 && SymbolType.TryGetBufferType(Name, null, out var bufferType))\n            {\n                table.DeclaredTypes.Add(fullTypeName, bufferType);\n                symbolType = bufferType;\n            }\n            else if (Generics.Count == 1 && SymbolType.TryGetBufferType(Name, (TypeName)Generics[0], out var genericBufferType))\n            {\n                table.DeclaredTypes.Add(fullTypeName, genericBufferType);\n                symbolType = genericBufferType;\n            }\n            else if (Generics.Count == 2 && (Name == \"Texture2DMS\" || Name == \"Texture2DMSArray\")","sourceCodeStart":718,"sourceCodeEnd":754,"githubUrl":"https://github.com/stride3d/stride/blob/96fad776d210c221682aac1ccdf4c79dc046fc38/sources/shaders/Stride.Shaders.Parsers/Parsing/SDSL/AST/Literals.cs#L718-L754","documentation":"Thrown when resolving a generic patch type name (InputPatch/OutputPatch family) whose Name is neither InputPatch nor OutputPatch. The name is mapped to a PatchTypeKindSDSL value and any other name is unsupported.","triggerScenarios":"Type resolution of a TypeName reaching the InputPatch/OutputPatch branch with a Name that matches neither (e.g. misspelled or a custom patch wrapper type), while constructing PatchType with Generics[0] as element type and Generics[1] as patch size.","commonSituations":"Typos in tessellation patch declarations (e.g. InputPatches); porting HLSL shaders with differently-named patch types; DSL extensions adding patch kinds the backend does not implement.","solutions":["Fix the patch type name in the shader to InputPatch or OutputPatch","Confirm tessellation patch declarations follow SDSL syntax: InputPatch<type, size> / OutputPatch<type, size>","Extend the switch (and PatchTypeKindSDSL) if a new patch kind must be supported"],"exampleFix":"// before\nInputPatches<VertexInput, 3> patch\n// after\nInputPatch<VertexInput, 3> patch","handlingStrategy":"validation","validationCode":"if (typeName.Name != \"InputPatch\" && typeName.Name != \"OutputPatch\")\n    throw new NotSupportedException($\"'{typeName.Name}' is not a supported patch type\");","typeGuard":"bool IsPatchType(string name) => name is \"InputPatch\" or \"OutputPatch\";","tryCatchPattern":"try { ResolveType(table, context); }\ncatch (NotSupportedException ex) { table.AddError(new(info, ex.Message)); }","preventionTips":["Use exact names InputPatch/OutputPatch with <type, size> generics","Lint tessellation declarations","Check HLSL->SDSL ports for renamed patch types"],"tags":["sdsl","tessellation","invalid-enum"],"backgroundTag":"invalid-enum-value","analyzedSha":"96fad776d210c221682aac1ccdf4c79dc046fc38","analyzedAt":"2026-09-14T02:59:31.279Z","contentChangedAt":"2026-09-14T02:59:31.279Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}