File tree 6 files changed +15
-17
lines changed
6 files changed +15
-17
lines changed Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " metal"
3
- version = " 0.16.1 "
3
+ version = " 0.17.0 "
4
4
description = " Rust bindings for Metal"
5
5
documentation = " https://docs.rs/crate/metal"
6
6
homepage = " https://github.com/gfx-rs/metal-rs"
Original file line number Diff line number Diff line change 1
1
# metal-rs
2
2
[ ![ Build Status] ( https://travis-ci.org/gfx-rs/metal-rs.svg?branch=master )] ( https://travis-ci.org/gfx-rs/metal-rs )
3
+ [ ![ Crates.io] ( https://img.shields.io/crates/v/metal.svg?label=metal )] ( https://crates.io/crates/metal )
3
4
4
5
Unsafe Rust bindings for the Metal 3D Graphics API.
5
6
Original file line number Diff line number Diff line change @@ -1395,17 +1395,12 @@ impl Device {
1395
1395
unsafe { MTLCreateSystemDefaultDevice ( ) . as_mut ( ) . map ( |x| Self ( x) ) }
1396
1396
}
1397
1397
1398
- #[ cfg( target_os = "ios" ) ]
1399
- pub fn all ( ) -> Vec < Device > {
1400
- if let Some ( system_default) = Device :: system_default ( ) {
1401
- vec ! [ system_default]
1402
- } else {
1403
- vec ! [ ]
1398
+ pub fn all ( ) -> Vec < Self > {
1399
+ #[ cfg( target_os = "ios" ) ]
1400
+ {
1401
+ Self :: system_default ( ) . into_iter ( ) . collect ( )
1404
1402
}
1405
- }
1406
-
1407
- #[ cfg( not( target_os = "ios" ) ) ]
1408
- pub fn all ( ) -> Vec < Device > {
1403
+ #[ cfg( not( target_os = "ios" ) ) ]
1409
1404
unsafe {
1410
1405
let array = MTLCopyAllDevices ( ) ;
1411
1406
let count: NSUInteger = msg_send ! [ array, count] ;
@@ -1641,7 +1636,6 @@ impl DeviceRef {
1641
1636
}
1642
1637
}
1643
1638
1644
- #[ cfg( feature = "private" ) ]
1645
1639
pub unsafe fn new_compute_pipeline_state (
1646
1640
& self ,
1647
1641
descriptor : & ComputePipelineDescriptorRef ,
Original file line number Diff line number Diff line change @@ -228,8 +228,7 @@ impl RenderCommandEncoderRef {
228
228
}
229
229
}
230
230
231
- //TODO: change argument order
232
- pub fn set_visibility_result_mode ( & self , offset : NSUInteger , mode : MTLVisibilityResultMode ) {
231
+ pub fn set_visibility_result_mode ( & self , mode : MTLVisibilityResultMode , offset : NSUInteger ) {
233
232
unsafe {
234
233
msg_send ! [ self , setVisibilityResultMode: mode
235
234
offset: offset]
Original file line number Diff line number Diff line change @@ -48,9 +48,12 @@ fn nsstring_from_str(string: &str) -> *mut objc::runtime::Object {
48
48
let bytes = string. as_ptr ( ) as * const c_void ;
49
49
unsafe {
50
50
let obj: * mut objc:: runtime:: Object = msg_send ! [ cls, alloc] ;
51
- let obj: * mut objc:: runtime:: Object = msg_send ! [ obj, initWithBytes: bytes
52
- length: string. len( )
53
- encoding: UTF8_ENCODING ] ;
51
+ let obj: * mut objc:: runtime:: Object = msg_send ! [
52
+ obj,
53
+ initWithBytes: bytes
54
+ length: string. len( )
55
+ encoding: UTF8_ENCODING
56
+ ] ;
54
57
let _: * mut c_void = msg_send ! [ obj, autorelease] ;
55
58
obj
56
59
}
Original file line number Diff line number Diff line change @@ -100,6 +100,7 @@ pub enum MTLLanguageVersion {
100
100
V1_2 = 0x10002 ,
101
101
V2_0 = 0x20000 ,
102
102
V2_1 = 0x20001 ,
103
+ V2_2 = 0x20002 ,
103
104
}
104
105
105
106
pub enum MTLFunctionConstantValues { }
You can’t perform that action at this time.
0 commit comments