Skip to content

Commit

Permalink
Merge #74
Browse files Browse the repository at this point in the history
74: Expose minimumLinearTextureAlignmentForPixelFormat r=grovesNL a=kvark



Co-authored-by: Dzmitry Malyshau <kvark@mozilla.com>
  • Loading branch information
bors[bot] and kvark committed Oct 11, 2018
2 parents b6c32f6 + 2ffd3dd commit d7e47ae
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "metal"
version = "0.13.0"
version = "0.13.1"
description = "Rust bindings for Metal"
documentation = "https://docs.rs/crate/metal"
homepage = "https://github.com/gfx-rs/metal-rs"
Expand Down
8 changes: 7 additions & 1 deletion src/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1336,7 +1336,7 @@ foreign_obj_type! {
}

impl Device {
pub fn system_default() -> Device {
pub fn system_default() -> Self {
unsafe { Device(MTLCreateSystemDefaultDevice()) }
}

Expand Down Expand Up @@ -1632,4 +1632,10 @@ impl DeviceRef {
msg_send![self, heapTextureSizeAndAlignWithDescriptor: descriptor]
}
}

pub fn minimum_linear_texture_alignment_for_pixel_format(&self, format: MTLPixelFormat) -> NSUInteger {
unsafe {
msg_send![self, minimumLinearTextureAlignmentForPixelFormat: format]
}
}
}

0 comments on commit d7e47ae

Please sign in to comment.