@@ -1461,7 +1461,7 @@ pub struct MTLAccelerationStructureSizes {
1461
1461
#[ cfg_attr( feature = "link" , link( name = "Metal" , kind = "framework" ) ) ]
1462
1462
extern "C" {
1463
1463
fn MTLCreateSystemDefaultDevice ( ) -> * mut MTLDevice ;
1464
- #[ cfg( not( target_os = "ios" ) ) ]
1464
+ #[ cfg( not( any ( target_os = "ios" , target_os = "visionos" ) ) ) ]
1465
1465
fn MTLCopyAllDevices ( ) -> * mut Object ; //TODO: Array
1466
1466
}
1467
1467
@@ -1475,11 +1475,11 @@ type dispatch_block_t = *const Block<(), ()>;
1475
1475
const DISPATCH_DATA_DESTRUCTOR_DEFAULT : dispatch_block_t = ptr:: null ( ) ;
1476
1476
1477
1477
#[ cfg_attr(
1478
- all( feature = "link" , any( target_os = "macos" , target_os = "ios" ) ) ,
1478
+ all( feature = "link" , any( target_os = "macos" , target_os = "ios" , target_os = "visionos" ) ) ,
1479
1479
link( name = "System" , kind = "dylib" )
1480
1480
) ]
1481
1481
#[ cfg_attr(
1482
- all( feature = "link" , not( any( target_os = "macos" , target_os = "ios" ) ) ) ,
1482
+ all( feature = "link" , not( any( target_os = "macos" , target_os = "ios" , target_os = "visionos" ) ) ) ,
1483
1483
link( name = "dispatch" , kind = "dylib" )
1484
1484
) ]
1485
1485
#[ allow( improper_ctypes) ]
@@ -1520,11 +1520,11 @@ impl Device {
1520
1520
}
1521
1521
1522
1522
pub fn all ( ) -> Vec < Self > {
1523
- #[ cfg( target_os = "ios" ) ]
1523
+ #[ cfg( any ( target_os = "ios" , target_os = "visionos" ) ) ]
1524
1524
{
1525
1525
Self :: system_default ( ) . into_iter ( ) . collect ( )
1526
1526
}
1527
- #[ cfg( not( target_os = "ios" ) ) ]
1527
+ #[ cfg( not( any ( target_os = "ios" , target_os = "visionos" ) ) ) ]
1528
1528
unsafe {
1529
1529
let array = MTLCopyAllDevices ( ) ;
1530
1530
let count: NSUInteger = msg_send ! [ array, count] ;
0 commit comments