stride3d/stride · error · NotSupportedException

Binding operation on an unsupported Effect parameter type

Error message

Binding operation on an unsupported Effect parameter type [{bindingOperation.Class}]

What it means

ResourceBinder.BindResources iterates effect binding operations and maps each EffectParameterClass to a CommandList setter. When the parameter class is not one of the supported kinds (constants, samplers, textures, buffers, UAVs, etc.), the library throws NotSupportedException since there is no way to bind that resource type on the GPU.

Solutions

  1. Check the shader/effect source for unsupported parameter/resource types and refactor them to supported kinds (Texture, Buffer, Sampler, UAV)
  2. Regenerate shaders with the Stride version in use so parameter classes match supported bindings
  3. Report/verify whether the EffectParameterClass should be added to the switch in ResourceBinder
Defensive patterns

Strategy: try-catch

Validate before calling

// Validate the effect's parameter classes against supported kinds before binding

Try / catch

try { ResourceBinder.BindResources(commandList, layout, resources); } catch (NotSupportedException ex) { log.Error(ex); }

Prevention

When it happens

Trigger: An effect/shader contains a parameter whose EffectParameterClass falls outside the switch's supported cases, and the effect's resources are being bound during rendering.

Common situations: Using a shader with a parameter type not supported by the current backend or Stride version (e.g. an exotic resource type), or an out-of-date shader cache produced by a newer compiler.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of stride3d/stride@96fad776d2 (2026-09-14). Data as JSON: /api/errors/0c2dbb66c7364fc7. Report an issue: GitHub.

Appendix: source

Thrown at sources/engine/Stride.Graphics/ResourceBinder.cs:162

                            commandList.SetConstantBuffer(bindingOperation.Stage, bindingOperation.SlotStart, (Buffer) value.Value);
                            break;

                        case EffectParameterClass.Sampler:
                            commandList.SetSamplerState(bindingOperation.Stage, bindingOperation.SlotStart,
                                bindingOperation.ImmutableSampler ?? (SamplerState) value.Value ?? commandList.GraphicsDevice.SamplerStates.LinearClamp);
                            break;

                        case EffectParameterClass.ShaderResourceView:
                            commandList.UnsetUnorderedAccessView(value.Value as GraphicsResource);
                            commandList.SetShaderResourceView(bindingOperation.Stage, bindingOperation.SlotStart, (GraphicsResource) value.Value);
                            break;

                        case EffectParameterClass.UnorderedAccessView:
                            commandList.SetUnorderedAccessView(bindingOperation.Stage, bindingOperation.SlotStart, (GraphicsResource) value.Value, value.Offset);
                            break;

                        default:
                            throw new NotSupportedException($"Binding operation on an unsupported Effect parameter type [{bindingOperation.Class}]");
                    }
                }
            }
        }


        /// <summary>
        ///   Represents a binding operation used to configure shader parameters and resources.
        /// </summary>
        private struct BindingOperation
        {
            public int EntryIndex;
            public EffectParameterClass Class;
            public ShaderStage Stage;
            public int SlotStart;
            public SamplerState ImmutableSampler;

            public string ToString() => $"DescriptorEntry [{EntryIndex}] => {Stage} {Class} {SlotStart}";

View on GitHub (pinned to 96fad776d2)