{"record":{"id":"01b8752420af5539","repo":"stride3d/stride","slug":"unsupported-output-topology-value-stringliteral-anyattribute","errorCode":null,"errorMessage":"Unsupported output topology value '{((StringLiteral)anyAttribute.Parameters[0]).Value}'","messagePattern":"Unsupported output topology value '(.+?)'","errorType":"exception","errorClass":"NotSupportedException","httpStatus":null,"severity":"error","filePath":"sources/shaders/Stride.Shaders.Parsers/Parsing/SDSL/AST/ShaderElements.MethodOrMember.cs","lineNumber":604,"sourceCode":"                            \"fractional_odd\" => Specification.ExecutionMode.SpacingFractionalOdd,\n                            \"fractional_even\" => Specification.ExecutionMode.SpacingFractionalEven,\n                            \"integer\" => Specification.ExecutionMode.SpacingEqual,\n                            \"pow2\" => throw new NotSupportedException(\"partitioning pow2 is not supported in SPIR-V\"),\n                            _ => throw new NotSupportedException($\"Unsupported partitioning value '{((StringLiteral)anyAttribute.Parameters[0]).Value}'\"),\n                        }, []));\n                    }\n                    else if (anyAttribute.Name == \"outputtopology\")\n                    {\n                        var value = ((StringLiteral)anyAttribute.Parameters[0]).Value;\n                        if (value != \"line\")\n                        {\n                            // VertexOrderCw/Ccw are only valid on TessellationEvaluation per\n                            // SPIR-V spec; route to DSMain (same reason as partitioning above).\n                            context.Add(new OpExecutionMode(GetTessEvaluationFunctionId(table, function.Id), ((StringLiteral)anyAttribute.Parameters[0]).Value switch\n                            {\n                                \"triangle_cw\" => Specification.ExecutionMode.VertexOrderCw,\n                                \"triangle_ccw\" => Specification.ExecutionMode.VertexOrderCcw,\n                                _ => throw new NotSupportedException($\"Unsupported output topology value '{((StringLiteral)anyAttribute.Parameters[0]).Value}'\"),\n                            }, []));\n                        }\n                    }\n                    else\n                    {\n                        throw new NotImplementedException($\"Can't parse method attribute {anyAttribute} on method {Name}\");\n                    }\n                }\n            }\n        }\n\n        if (Type is not FunctionType ftype)\n            throw new InvalidOperationException();\n\n        table.Push(SymbolFrame!);\n        builder.BeginFunction(context, function);\n\n        var functionInfo = new OpFunctionMetadataSDSL(Specification.FunctionFlagsMask.None, 0);","sourceCodeStart":586,"sourceCodeEnd":622,"githubUrl":"https://github.com/stride3d/stride/blob/96fad776d210c221682aac1ccdf4c79dc046fc38/sources/shaders/Stride.Shaders.Parsers/Parsing/SDSL/AST/ShaderElements.MethodOrMember.cs#L586-L622","documentation":"The [outputtopology(...)] attribute on a tessellation-evaluation stage accepts only 'triangle_cw' or 'triangle_ccw', mapping to SPIR-V VertexOrderCw/VertexOrderCcw. Any other value has no execution-mode mapping and throws NotSupportedException.","triggerScenarios":"A tessellation-evaluation method annotated with e.g. [outputtopology(point)] or a misspelled value.","commonSituations":"Porting D3D tessellation 'outputtopology' values such as 'line' or 'point' that are valid in HLSL pipelines but not mapped here (note 'line' may be handled by a separate branch above this switch).","solutions":["Use triangle_cw or triangle_ccw exactly (lowercase).","Check whether the 'line' case is handled by a preceding branch and route line outputs there.","Fix casing/typos in the attribute string."],"exampleFix":"// before\n[outputtopology(\"triangle\")]\n// after\n[outputtopology(\"triangle_cw\")]","handlingStrategy":"validation","validationCode":"var topologies = new HashSet<string> { \"triangle_cw\", \"triangle_ccw\" };\nif (!topologies.Contains(topologyValue)) throw new ArgumentException($\"Unsupported output topology '{topologyValue}'\");","typeGuard":null,"tryCatchPattern":"try { method.Compile(); }\ncatch (NotSupportedException ex) when (ex.Message.Contains(\"Unsupported output topology\"))\n{\n    // use triangle_cw or triangle_ccw, or a branch that handles line\n}","preventionTips":["Use only triangle_cw/triangle_ccw for outputtopology on tessellation-evaluation stages.","Check for separate handling of line outputs before assuming the switch covers them."],"tags":["shader","sdsl","tessellation","attributes"],"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-15T23:17:13.987Z"}