stride3d/stride · error · NotImplementedException
An unknown EffectParameterType was found.
Error message
An unknown EffectParameterType was found.
What it means
During D3D shader bytecode compilation, Stride maps each reflection parameter's EffectParameterType to its byte size via a switch expression. If the reflection data contains an EffectParameterType not covered by the mapping (Float, Int, Bool, UInt, Double, Void), the default arm throws NotImplementedException. This indicates reflection metadata the compiler was never taught to translate.
Solutions
- Inspect the failing shader's reflection output and replace or retype the offending parameter with a supported type (float, int, bool, uint, double).
- Recompile shaders with the SPIRV/DXC version bundled with your Stride release instead of a custom/newer toolchain.
- Clear cached compiled effects (Effects/ cache, --graphvizoff / delete effect log and cache) and rebuild so reflection is regenerated with matching tooling.
- If a genuinely new EffectParameterType is needed, extend the switch in ShaderCompiler.cs:618 to map it to its byte size and file a Stride issue.
- Pin/align Stride and shader compiler versions so the reflection layer cannot surface unknown types.
Example fix
// before (shader / reflection exposes unmapped type) uint64_t bigCounter; // EffectParameterType.UInt64 -> NotImplementedException // after uint bigCounter; // EffectParameterType.UInt -> mapped to 4 bytes
Defensive patterns
Strategy: validation
Validate before calling
// before compiling, scan reflection for supported parameter types
var supported = new HashSet<EffectParameterType> { EffectParameterType.Float, EffectParameterType.Int, EffectParameterType.Bool, EffectParameterType.UInt, EffectParameterType.Double, EffectParameterType.Void };
foreach (var p in shaderReflection.Parameters)
if (!supported.Contains(p.ParameterType))
throw new InvalidOperationException($"Shader '{shader.Name}' uses unsupported parameter type {p.ParameterType} on '{p.Name}'. Retype it (e.g. uint64 -> uint)."); Type guard
static bool HasSupportedParameterTypes(ShaderReflection reflection) =>
reflection.Parameters.All(p =>
p.ParameterType is EffectParameterType.Float or EffectParameterType.Int
or EffectParameterType.Bool or EffectParameterType.UInt
or EffectParameterType.Double or EffectParameterType.Void); Try / catch
try
{
var result = shaderCompiler.Compile(source, parameters);
}
catch (NotImplementedException ex) when (ex.Message.Contains("EffectParameterType"))
{
log.Error($"Reflection contains a parameter type Stride cannot map: {ex.Message}. Fix the shader source or align compiler toolchain versions.");
throw;
} Prevention
- Stick to scalar types Stride maps (float, int, bool, uint, double) in shader parameters/uniforms.
- Use the SPIRV-Cross/DXC versions bundled with your Stride release.
- Clear the effect/shader cache after upgrading Stride or any shader toolchain.
- Add a CI shader-compile step so unmapped reflection types fail at build time, not runtime.
- Watch Stride release notes for newly supported EffectParameterType values before using newer types.
When it happens
Trigger: ShaderCompiler.Compile encounters a constant/parameter whose EffectParameterType (from SPIRV-cross or DX reflection) falls through to the switch's default arm — i.e. a parameter type outside the known set {Float, Int, Bool, UInt, Double, Void}, typically produced by a newer shader toolchain emitting a newly introduced type (e.g. Int64/UInt64, or an unusual structured type).
Common situations: Using a newer DXC/SPIRV-Cross version that emits parameter types Stride's compiler doesn't know; exotic shader library code declaring 64-bit integer uniforms; compiling shaders on a platform/toolchain combination where reflection produces unmapped types; upgrading Stride while keeping old cached shader bytecode or vice versa.
Related errors
- Resource ' ' has slot in but slot was expected (from SDSL…
- An unknown EffectParameterClass was found.
- Unsupported execution model
- Unsupported shader stage
- D3D12 shader compilation is not supported on this platform
AI-assisted analysis of stride3d/stride@96fad776d2 (2026-09-14).
Data as JSON: /api/errors/911e3de6a7de75c8.
Report an issue: GitHub.
Appendix: source
Thrown at sources/shaders/Stride.Shaders.Compilers/Direct3D/ShaderCompiler.cs:618
}
//
// Computes the size of a type based on its EffectParameterType.
//
static int ComputeTypeSize(EffectParameterType type)
{
return type switch
{
EffectParameterType.Bool or
EffectParameterType.Float or
EffectParameterType.Int or
EffectParameterType.UInt => 4,
EffectParameterType.Double => 8,
EffectParameterType.Void => 0,
_ => throw new NotImplementedException("An unknown EffectParameterType was found.")
};
}
//
// Creates a resource binding description from a Shader input binding description.
//
EffectResourceBindingDescription GetResourceBinding(ref readonly ShaderInputBindDesc bindingDescriptionRaw, string name)
{
var paramClass = EffectParameterClass.Object;
var paramType = EffectParameterType.Void;
switch (bindingDescriptionRaw.Type)
{
case D3DShaderInputType.D3DSitTbuffer:
paramType = EffectParameterType.TextureBuffer;
paramClass = EffectParameterClass.TextureBuffer;
break;
View on GitHub (pinned to 96fad776d2)