We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c105b3a commit eb2907dCopy full SHA for eb2907d
crates/tattoy/src/tattoys/gpu/pipeline.rs
@@ -211,9 +211,16 @@ impl GPU {
211
}
212
213
/// Align a buffer or texture dimension to a consistent multiple.
214
+ #[expect(
215
+ clippy::unwrap_used,
216
+ reason = "
217
+ `checked_div()` only returns `None` when the right-hand side is 0, which is clearly
218
+ impossible here.
219
+ "
220
+ )]
221
const fn align_dimension(number: u32) -> u32 {
222
let multiple = 256;
- number.div_ceil(multiple) - 1 + multiple
223
+ (number.checked_div(multiple).unwrap() * multiple) + multiple
224
225
226
/// Create the bind group layout that defines where the various shader data is located.
0 commit comments