{"record":{"id":"a7ab249add902c97","repo":"stride3d/stride","slug":"only-srvs-uavs-and-cbvs-are-supported","errorCode":null,"errorMessage":"Only SRVs, UAVs, and CBVs are supported.","messagePattern":"Only SRVs, UAVs, and CBVs are supported\\.","errorType":"exception","errorClass":"NotImplementedException","httpStatus":null,"severity":"error","filePath":"sources/engine/Stride.Graphics/Direct3D12/PipelineState.Direct3D12.cs","lineNumber":340,"sourceCode":"                            {\n                                RangeType = DescriptorRangeType.Sampler,\n                                NumDescriptors = (uint) layoutBuilderEntry.ArraySize,\n                                BaseShaderRegister = (uint) binding.SlotStart,\n                                RegisterSpace = 0,\n                                OffsetInDescriptorsFromTableStart = (uint) descriptorSamplerOffset\n                            };\n                            descriptorRanges.Add(descriptorRange);\n                        }\n                    }\n                    else // Other bindings: SRVs, UAVs, or CBVs\n                    {\n                        var descriptorRangeType = binding.Class switch\n                        {\n                            EffectParameterClass.ConstantBuffer => DescriptorRangeType.Cbv,\n                            EffectParameterClass.ShaderResourceView => DescriptorRangeType.Srv,\n                            EffectParameterClass.UnorderedAccessView => DescriptorRangeType.Uav,\n\n                            _ => throw new NotImplementedException(\"Only SRVs, UAVs, and CBVs are supported.\")\n                        };\n\n                        // Add descriptor range\n                        var descriptorRange = new DescriptorRange\n                        {\n                            RangeType = descriptorRangeType,\n                            NumDescriptors = (uint) layoutBuilderEntry.ArraySize,\n                            BaseShaderRegister = (uint) binding.SlotStart,\n                            RegisterSpace = 0,\n                            OffsetInDescriptorsFromTableStart = (uint) descriptorSrvOffset\n                        };\n                        descriptorRanges.Add(descriptorRange);\n                    }\n                }\n            }\n\n            //\n            // Prepares a set of root parameters of the Root Signature.","sourceCodeStart":322,"sourceCodeEnd":358,"githubUrl":"https://github.com/stride3d/stride/blob/96fad776d210c221682aac1ccdf4c79dc046fc38/sources/engine/Stride.Graphics/Direct3D12/PipelineState.Direct3D12.cs#L322-L358","documentation":"When translating effect bindings into D3D12 root signature descriptor ranges, only ConstantBuffer (CBV), ShaderResourceView (SRV) and UnorderedAccessView (UAV) parameter classes are supported. Any other EffectParameterClass (e.g. Samplers handled elsewhere, or unexpected classes) reaches the switch default and throws NotImplementedException.","triggerScenarios":"A PipelineStateDescription whose EffectBytecode contains a resource binding whose EffectParameterClass is not ConstantBuffer, ShaderResourceView, or UnorderedAccessView while building the root signature.","commonSituations":"Custom/corrupted effect reflection data; new parameter classes introduced in the effect system but not yet handled by the D3D12 backend; hand-built effect descriptors.","solutions":["Use only CBV/SRV/UAV bindings in effects rendered through this D3D12 PipelineState path","Handle samplers via the sampler path rather than as descriptor-range bindings","Update Stride to a version where the missing parameter class is supported"],"exampleFix":"// before\nvar binding = new EffectResourceBinding { Class = EffectParameterClass.Sampler, ... }; // hits NotImplementedException\n// after\nvar binding = new EffectResourceBinding { Class = EffectParameterClass.ShaderResourceView, ... };","handlingStrategy":"validation","validationCode":"if (bindings.Any(b => b.Class is not (EffectParameterClass.ConstantBuffer or EffectParameterClass.ShaderResourceView or EffectParameterClass.UnorderedAccessView))) throw new InvalidOperationException(\"Unsupported binding class for D3D12 root signature\");","typeGuard":"bool IsRootSignatureBinding(EffectParameterClass c) => c is EffectParameterClass.ConstantBuffer or EffectParameterClass.ShaderResourceView or EffectParameterClass.UnorderedAccessView;","tryCatchPattern":"try { state = PipelineState.New(device, desc); } catch (NotImplementedException) { /* unsupported binding class on D3D12 */ throw; }","preventionTips":["Restrict effect resources to CBV/SRV/UAV classes on D3D12","Keep Stride updated so newly supported parameter classes are available"],"tags":["direct3d12","root-signature","unsupported"],"backgroundTag":"method-not-implemented","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"}