{"record":{"id":"0c2dbb66c7364fc7","repo":"stride3d/stride","slug":"binding-operation-on-an-unsupported-effect-parameter-type","errorCode":null,"errorMessage":"Binding operation on an unsupported Effect parameter type [{bindingOperation.Class}]","messagePattern":"Binding operation on an unsupported Effect parameter type \\[(.+?)\\]","errorType":"exception","errorClass":"NotSupportedException","httpStatus":null,"severity":"error","filePath":"sources/engine/Stride.Graphics/ResourceBinder.cs","lineNumber":162,"sourceCode":"                            commandList.SetConstantBuffer(bindingOperation.Stage, bindingOperation.SlotStart, (Buffer) value.Value);\n                            break;\n\n                        case EffectParameterClass.Sampler:\n                            commandList.SetSamplerState(bindingOperation.Stage, bindingOperation.SlotStart,\n                                bindingOperation.ImmutableSampler ?? (SamplerState) value.Value ?? commandList.GraphicsDevice.SamplerStates.LinearClamp);\n                            break;\n\n                        case EffectParameterClass.ShaderResourceView:\n                            commandList.UnsetUnorderedAccessView(value.Value as GraphicsResource);\n                            commandList.SetShaderResourceView(bindingOperation.Stage, bindingOperation.SlotStart, (GraphicsResource) value.Value);\n                            break;\n\n                        case EffectParameterClass.UnorderedAccessView:\n                            commandList.SetUnorderedAccessView(bindingOperation.Stage, bindingOperation.SlotStart, (GraphicsResource) value.Value, value.Offset);\n                            break;\n\n                        default:\n                            throw new NotSupportedException($\"Binding operation on an unsupported Effect parameter type [{bindingOperation.Class}]\");\n                    }\n                }\n            }\n        }\n\n\n        /// <summary>\n        ///   Represents a binding operation used to configure shader parameters and resources.\n        /// </summary>\n        private struct BindingOperation\n        {\n            public int EntryIndex;\n            public EffectParameterClass Class;\n            public ShaderStage Stage;\n            public int SlotStart;\n            public SamplerState ImmutableSampler;\n\n            public string ToString() => $\"DescriptorEntry [{EntryIndex}] => {Stage} {Class} {SlotStart}\";","sourceCodeStart":144,"sourceCodeEnd":180,"githubUrl":"https://github.com/stride3d/stride/blob/96fad776d210c221682aac1ccdf4c79dc046fc38/sources/engine/Stride.Graphics/ResourceBinder.cs#L144-L180","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Check the shader/effect source for unsupported parameter/resource types and refactor them to supported kinds (Texture, Buffer, Sampler, UAV)","Regenerate shaders with the Stride version in use so parameter classes match supported bindings","Report/verify whether the EffectParameterClass should be added to the switch in ResourceBinder"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Validate the effect's parameter classes against supported kinds before binding","typeGuard":null,"tryCatchPattern":"try { ResourceBinder.BindResources(commandList, layout, resources); } catch (NotSupportedException ex) { log.Error(ex); }","preventionTips":["Only use shader resource types supported by the target backend","Regenerate effect bytecode when upgrading Stride versions"],"tags":["graphics","shaders","not-supported"],"backgroundTag":"unsupported-operation","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"}