{"record":{"id":"0e7709254c982bfb","repo":"bevyengine/bevy","slug":"sampler-bindless-resource-type-must-have-a-binding","errorCode":null,"errorMessage":"Sampler bindless resource type must have a binding number","messagePattern":"Sampler bindless resource type must have a binding number","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/bevy_render/src/material_bind_groups.rs","lineNumber":1865,"sourceCode":"                    }\n                }\n\n                None => {\n                    // Fill with a single fallback sampler.\n                    sampler_bindings.push(&**fallback_sampler);\n                }\n            }\n\n            if let Some(required_binding_array_size) = required_binding_array_size {\n                sampler_bindings.extend(iter::repeat_n(\n                    &**fallback_sampler,\n                    required_binding_array_size as usize - sampler_bindings.len(),\n                ));\n            }\n\n            let binding_number = bindless_resource_type\n                .binding_number()\n                .expect(\"Sampler bindless resource type must have a binding number\");\n\n            binding_resource_arrays.push((\n                &**binding_number,\n                BindingResourceArray::Samplers(sampler_bindings),\n            ));\n        }\n    }\n\n    /// Accumulates texture binding arrays into binding resource arrays suitable\n    /// for passing to `wgpu`.\n    fn create_texture_binding_resource_arrays<'a, 'b>(\n        &'a self,\n        binding_resource_arrays: &'b mut Vec<(&'a u32, BindingResourceArray<'a>)>,\n        fallback_image: &'a FallbackImage,\n        bindless_descriptor: &'a BindlessDescriptor,\n        required_binding_array_size: Option<u32>,\n    ) {\n        for (bindless_resource_type, fallback_image) in [","sourceCodeStart":1847,"sourceCodeEnd":1883,"githubUrl":"https://github.com/bevyengine/bevy/blob/396ca727080776bd313bb892423b7d94e03b81b4/crates/bevy_render/src/material_bind_groups.rs#L1847-L1883","documentation":"Internal invariant expect while building sampler binding arrays for bindless materials: a sampler BindlessResourceType has no binding number in the bindless descriptor, so the binding cannot be placed in the layout.","triggerScenarios":"Thrown at crates/bevy_render/src/material_bind_groups.rs:1865 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Report as a Bevy engine bug with a reproducing material/shader","Check that the material's bindless descriptor is generated consistently for samplers"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"396ca727080776bd313bb892423b7d94e03b81b4","analyzedAt":"2026-08-20T16:12:39.808Z","contentChangedAt":"2026-08-20T16:12:39.808Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}