{"record":{"id":"55bca9ff74223dfd","repo":"stride3d/stride","slug":"resourcegroup-groupid-has-no-resourcegroupsdsl-name","errorCode":null,"errorMessage":"ResourceGroup {groupId} has no ResourceGroupSDSL name decoration","messagePattern":"ResourceGroup (.+?) has no ResourceGroupSDSL name decoration","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"sources/shaders/Stride.Shaders.Parsers/Spirv/Processing/Interfaces/Analysis/StreamAnalyzer.cs","lineNumber":162,"sourceCode":"                groupIdByTarget.TryAdd(resourceGroupIdDecorate.Target, m.To<DecorationParams.ResourceGroupIdSDSL>().ResourceGroup);\n        }\n\n        // Resolve group ID → name (first target with both a group ID and a ResourceGroupSDSL name wins)\n        Dictionary<int, string> groupNames = new();\n        foreach (var (target, groupId) in groupIdByTarget)\n        {\n            if (!groupNames.ContainsKey(groupId) && resourceGroupNamesByTarget.TryGetValue(target, out var name))\n                groupNames.Add(groupId, name);\n        }\n\n        // Build ResourceGroups and assign resources/cbuffers\n        Dictionary<int, ResourceGroup> resourceGroups = new();\n        foreach (var (target, groupId) in groupIdByTarget)\n        {\n            if (!resourceGroups.TryGetValue(groupId, out var resourceGroup))\n            {\n                if (!groupNames.TryGetValue(groupId, out var name))\n                    throw new InvalidOperationException($\"ResourceGroup {groupId} has no ResourceGroupSDSL name decoration\");\n                resourceGroups.Add(groupId, resourceGroup = new(name));\n            }\n\n            if (resources.TryGetValue(target, out var resourceInfo))\n            {\n                resourceGroup.Resources.Add(resourceInfo);\n                resourceInfo.ResourceGroup = resourceGroup;\n            }\n            else if (cbuffers.TryGetValue(target, out var cbufferInfo))\n            {\n                cbufferInfo.ResourceGroup = resourceGroup;\n            }\n\n            // Apply LogicalGroup if present\n            if (logicalGroupNamesByTarget.TryGetValue(target, out var logicalGroup))\n            {\n                resourceGroup.LogicalGroup ??= logicalGroup;\n                if (cbuffers.TryGetValue(target, out var ci))","sourceCodeStart":144,"sourceCodeEnd":180,"githubUrl":"https://github.com/stride3d/stride/blob/96fad776d210c221682aac1ccdf4c79dc046fc38/sources/shaders/Stride.Shaders.Parsers/Spirv/Processing/Interfaces/Analysis/StreamAnalyzer.cs#L144-L180","documentation":"StreamAnalyzer.Analyze groups resources by their ResourceGroup id. Each group id must have an OpName/ResourceGroupSDSL name decoration recorded in groupNames; when a target references a group id with no recorded name, the analyzer cannot construct the ResourceGroup and throws InvalidOperationException.","triggerScenarios":"A descriptor/OpDecorate pipeline associates a resource with a ResourceGroup id for which no ResourceGroupSDSL name decoration was emitted — e.g. decorations stripped, order of analysis passes wrong, or a group created implicitly by a transformation without naming it.","commonSituations":"Upstream passes renaming/removing OpName decorations before StreamAnalyzer runs; shader code or transformations creating descriptor sets without explicit group names; mismatched decoration keys (groupId vs target).","solutions":["Ensure every ResourceGroup id gets a ResourceGroupSDSL name decoration before Analyze runs","Check pass ordering: the naming pass must execute before StreamAnalyzer.Analyze","Verify groupNames is populated from the right decoration type/key for the groupId","Inspect which groupId is missing a name (printed in the message) and find the transformation that created it"],"exampleFix":"// before\ngroup MyResources : ResourceGroupSDSL { } // name decoration missing for the id used\n// after\ngroup MyResources : ResourceGroupSDSL { Texture2D tex; }; // ensure group is declared and decorated so groupNames contains its id","handlingStrategy":"validation","validationCode":"foreach (var groupId in groupIdByTarget.Values)\n    if (!groupNames.ContainsKey(groupId)) throw new InvalidOperationException($\"ResourceGroup {groupId} is missing a ResourceGroupSDSL name decoration\");","typeGuard":null,"tryCatchPattern":"try { analyzer.Analyze(module); } catch (InvalidOperationException ex) { logger.LogError(ex, \"Undecorated resource group\"); throw new ShaderCompilationException(\"Resource group name decoration missing\", ex); }","preventionTips":["Always declare resource groups with explicit names in SDSL","Run decoration-collecting passes before StreamAnalyzer","Avoid transformations that strip OpName from group instructions"],"tags":["shader","spirv","resource-binding"],"backgroundTag":"missing-required-argument","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"}