use MAX_BFS_QUEUE;
/// Compute the maximum BFS queue slots that fit in the device's workgroup memory.
///
/// The BFS kernel stores a `var<workgroup> queue: array<u32, N>` which occupies
/// `N * 4` bytes of shared memory. This function queries
/// `device.limits().max_compute_workgroup_storage_size` and returns the largest
/// N that fits, clamped to [`MAX_BFS_QUEUE`].
///
/// If `toml_override` is `Some(n)`, that value is used directly but still
/// clamped to the device's physical limit to prevent silent pipeline creation
/// failures.