mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
layouter: handle width multiplication overflows
This commit is contained in:
@@ -88,7 +88,7 @@ impl Layouter {
|
||||
} else {
|
||||
2
|
||||
};
|
||||
Alignment::new((count * width) as u32).ok_or(InvalidBaseType(ty_handle))?
|
||||
Alignment::new(count * width as u32).ok_or(InvalidBaseType(ty_handle))?
|
||||
},
|
||||
},
|
||||
Ti::Matrix {
|
||||
@@ -99,7 +99,7 @@ impl Layouter {
|
||||
size,
|
||||
alignment: {
|
||||
let count = if rows >= crate::VectorSize::Tri { 4 } else { 2 };
|
||||
Alignment::new((count * width) as u32).ok_or(InvalidBaseType(ty_handle))?
|
||||
Alignment::new(count * width as u32).ok_or(InvalidBaseType(ty_handle))?
|
||||
},
|
||||
},
|
||||
Ti::Pointer { .. } | Ti::ValuePointer { .. } => TypeLayout {
|
||||
|
||||
Reference in New Issue
Block a user