diff --git a/src/nouveau/nil/extent.rs b/src/nouveau/nil/extent.rs index bef49a70128..b29cfd8f288 100644 --- a/src/nouveau/nil/extent.rs +++ b/src/nouveau/nil/extent.rs @@ -167,8 +167,11 @@ impl Extent4D { } impl Extent4D { - pub fn size_B(&self) -> u32 { - self.width * self.height * self.depth + pub fn size_B(&self) -> u64 { + // size_B of something with layers doesn't make sense because we can't + // know the array stride based only on the other dimensions. + assert!(self.array_len == 1); + u64::from(self.width) * u64::from(self.height) * u64::from(self.depth) } pub fn to_GOB(self, gob_height_is_8: bool) -> Extent4D {