Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't re-export bitflags and log. #312

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/accelerator_structure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

use super::*;

bitflags! {
bitflags::bitflags! {
#[derive(Copy, Clone, Debug, Default, Hash, PartialEq, Eq, PartialOrd, Ord)]
pub struct MTLAccelerationStructureInstanceOptions: u32 {
const None = 0;
Expand Down
5 changes: 3 additions & 2 deletions src/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use super::*;

use block::Block;
use log::warn;
use objc::runtime::{NO, YES};

use std::{ffi::CStr, os::raw::c_char, path::Path, ptr};
Expand Down Expand Up @@ -92,7 +93,7 @@ pub enum MTLDeviceLocation {
Unspecified = u64::MAX,
}

bitflags! {
bitflags::bitflags! {
#[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)]
pub struct PixelFormatCapabilities: u32 {
const Filter = 1 << 0;
Expand Down Expand Up @@ -1430,7 +1431,7 @@ pub enum MTLSparseTextureRegionAlignmentMode {
Inward = 1,
}

bitflags! {
bitflags::bitflags! {
/// Options that determine how Metal prepares the pipeline.
#[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)]
pub struct MTLPipelineOption: NSUInteger {
Expand Down
2 changes: 1 addition & 1 deletion src/encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ pub enum MTLTriangleFillMode {
Lines = 1,
}

bitflags! {
bitflags::bitflags! {
/// https://developer.apple.com/documentation/metal/mtlblitoption
#[allow(non_upper_case_globals)]
#[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)]
Expand Down
2 changes: 1 addition & 1 deletion src/indirect_encoder.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use super::*;

bitflags! {
bitflags::bitflags! {
/// See <https://developer.apple.com/documentation/metal/mtlindirectcommandtype/>
#[allow(non_upper_case_globals)]
#[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)]
Expand Down
4 changes: 0 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]

#[macro_use]
pub extern crate bitflags;
#[macro_use]
pub extern crate log;
#[macro_use]
pub extern crate objc;
#[macro_use]
Expand Down
2 changes: 1 addition & 1 deletion src/library.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ impl FunctionConstantRef {
}
}

bitflags! {
bitflags::bitflags! {
/// Only available on (macos(11.0), ios(14.0))
///
/// See <https://developer.apple.com/documentation/metal/mtlfunctionoptions/>
Expand Down
4 changes: 2 additions & 2 deletions src/mps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub enum MPSRayDataType {
OriginMaskDirectionMaxDistance = 2,
}

bitflags! {
bitflags::bitflags! {
/// See <https://developer.apple.com/documentation/metalperformanceshaders/mpsraymaskoptions>
#[allow(non_upper_case_globals)]
#[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)]
Expand Down Expand Up @@ -116,7 +116,7 @@ pub enum MPSAccelerationStructureStatus {
Built = 1,
}

bitflags! {
bitflags::bitflags! {
/// See <https://developer.apple.com/documentation/metalperformanceshaders/mpsaccelerationstructureusage>
#[allow(non_upper_case_globals)]
#[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)]
Expand Down
2 changes: 1 addition & 1 deletion src/pipeline/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ pub enum MTLBlendOperation {
Max = 4,
}

bitflags! {
bitflags::bitflags! {
/// See <https://developer.apple.com/documentation/metal/mtlcolorwritemask>
#[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)]
pub struct MTLColorWriteMask: NSUInteger {
Expand Down
4 changes: 2 additions & 2 deletions src/resource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ pub const MTLResourceStorageModeMask: NSUInteger = 0xf << MTLResourceStorageMode
pub const MTLResourceHazardTrackingModeShift: NSUInteger = 8;
pub const MTLResourceHazardTrackingModeMask: NSUInteger = 0x3 << MTLResourceHazardTrackingModeShift;

bitflags! {
bitflags::bitflags! {
/// See <https://developer.apple.com/documentation/metal/mtlresourceoptions>
#[allow(non_upper_case_globals)]
#[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)]
Expand All @@ -77,7 +77,7 @@ bitflags! {
}
}

bitflags! {
bitflags::bitflags! {
/// Options that describe how a graphics or compute function uses an argument buffer’s resource.
///
/// Enabling certain options for certain resources determines whether the Metal driver should
Expand Down
2 changes: 1 addition & 1 deletion src/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ impl FenceRef {
}
}

bitflags! {
bitflags::bitflags! {
/// The render stages at which a synchronization command is triggered.
///
/// Render stages provide finer control for specifying when synchronization must occur,
Expand Down
2 changes: 1 addition & 1 deletion src/texture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pub enum MTLTextureCompressionType {
Lossy = 1,
}

bitflags! {
bitflags::bitflags! {
/// See <https://developer.apple.com/documentation/metal/mtltextureusage>
#[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)]
pub struct MTLTextureUsage: NSUInteger {
Expand Down