stride3d/stride · error · NotImplementedException
Only SRVs, UAVs, and CBVs are supported.
Error message
Only SRVs, UAVs, and CBVs are supported.
What it means
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.
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
Example fix
// before
var binding = new EffectResourceBinding { Class = EffectParameterClass.Sampler, ... }; // hits NotImplementedException
// after
var binding = new EffectResourceBinding { Class = EffectParameterClass.ShaderResourceView, ... }; Defensive patterns
Strategy: validation
Validate before calling
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"); Type guard
bool IsRootSignatureBinding(EffectParameterClass c) => c is EffectParameterClass.ConstantBuffer or EffectParameterClass.ShaderResourceView or EffectParameterClass.UnorderedAccessView;
Try / catch
try { state = PipelineState.New(device, desc); } catch (NotImplementedException) { /* unsupported binding class on D3D12 */ throw; } Prevention
- Restrict effect resources to CBV/SRV/UAV classes on D3D12
- Keep Stride updated so newly supported parameter classes are available
When it happens
Trigger: A PipelineStateDescription whose EffectBytecode contains a resource binding whose EffectParameterClass is not ConstantBuffer, ShaderResourceView, or UnorderedAccessView while building the root signature.
Common situations: 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.
Related errors
- Static Samplers can only have opaque black, opaque white or…
- Invalid ShaderStage.
- Query type not supported
- The view type [ViewType.MipBand] is not supported for…
- Reset is not supported by the asset tracker.
AI-assisted analysis of stride3d/stride@96fad776d2 (2026-09-14).
Data as JSON: /api/errors/a7ab249add902c97.
Report an issue: GitHub.
Appendix: source
Thrown at sources/engine/Stride.Graphics/Direct3D12/PipelineState.Direct3D12.cs:340
{
RangeType = DescriptorRangeType.Sampler,
NumDescriptors = (uint) layoutBuilderEntry.ArraySize,
BaseShaderRegister = (uint) binding.SlotStart,
RegisterSpace = 0,
OffsetInDescriptorsFromTableStart = (uint) descriptorSamplerOffset
};
descriptorRanges.Add(descriptorRange);
}
}
else // Other bindings: SRVs, UAVs, or CBVs
{
var descriptorRangeType = binding.Class switch
{
EffectParameterClass.ConstantBuffer => DescriptorRangeType.Cbv,
EffectParameterClass.ShaderResourceView => DescriptorRangeType.Srv,
EffectParameterClass.UnorderedAccessView => DescriptorRangeType.Uav,
_ => throw new NotImplementedException("Only SRVs, UAVs, and CBVs are supported.")
};
// Add descriptor range
var descriptorRange = new DescriptorRange
{
RangeType = descriptorRangeType,
NumDescriptors = (uint) layoutBuilderEntry.ArraySize,
BaseShaderRegister = (uint) binding.SlotStart,
RegisterSpace = 0,
OffsetInDescriptorsFromTableStart = (uint) descriptorSrvOffset
};
descriptorRanges.Add(descriptorRange);
}
}
}
//
// Prepares a set of root parameters of the Root Signature.View on GitHub (pinned to 96fad776d2)