Skip to content

Commit

Permalink
fix mtl::Region constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
yury committed Dec 11, 2024
1 parent e3a8843 commit d11015e
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions cidre/src/mtl/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ pub struct ResId {
_impl: usize,
}

#[doc(alias = "MTLRegion")]
#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)]
#[repr(C)]
pub struct Region {
Expand All @@ -53,13 +54,11 @@ impl Region {
#[inline]
pub fn new_1d(x: usize, width: usize) -> Self {
Self {
origin: Origin {
x,
..Default::default()
},
origin: Origin { x, y: 0, z: 0 },
size: Size {
width,
..Default::default()
height: 1,
depth: 1,
},
}
}
Expand All @@ -71,7 +70,7 @@ impl Region {
size: Size {
width,
height,
depth: 0,
depth: 1,
},
}
}
Expand Down

0 comments on commit d11015e

Please # to comment.