@@ -688,7 +688,7 @@ bitflags::bitflags! {
688688 /// an AH programs on the device. May affect the performance of the accel (seems to be larger).
689689 ///
690690 /// Note that `PREFER_FAST_TRACE` and `PREFER_FAST_BUILD` are mutually exclusive.
691- #[ derive( Default ) ]
691+ #[ derive( Default , Clone , Copy , Debug , PartialEq ) ]
692692 pub struct BuildFlags : OptixEnumBaseType {
693693 const NONE = sys:: OptixBuildFlags_OPTIX_BUILD_FLAG_NONE ;
694694 const ALLOW_UPDATE = sys:: OptixBuildFlags_OPTIX_BUILD_FLAG_ALLOW_UPDATE ;
@@ -714,6 +714,9 @@ impl Default for BuildOperation {
714714 }
715715}
716716
717+ #[ derive( DeviceCopy , Clone , Copy , Debug , PartialEq ) ]
718+ pub struct MotionFlags ( u16 ) ;
719+
717720bitflags:: bitflags! {
718721 /// Configure how to handle ray times that are outside of the provided motion keys.
719722 ///
@@ -724,8 +727,7 @@ bitflags::bitflags! {
724727 /// than the first provided motion key
725728 /// * `END_VANISH` - The object will be invisible to rays with a time less
726729 /// than the first provided motion key
727- #[ derive( DeviceCopy ) ]
728- pub struct MotionFlags : u16 {
730+ impl MotionFlags : u16 {
729731 const NONE = sys:: OptixMotionFlags_OPTIX_MOTION_FLAG_NONE as u16 ;
730732 const START_VANISH = sys:: OptixMotionFlags_OPTIX_MOTION_FLAG_START_VANISH as u16 ;
731733 const END_VANISH = sys:: OptixMotionFlags_OPTIX_MOTION_FLAG_END_VANISH as u16 ;
@@ -1558,9 +1560,12 @@ const_assert_eq!(
15581560 std:: mem:: size_of:: <sys:: OptixInstance >( )
15591561) ;
15601562
1563+
1564+ #[ derive( DeviceCopy , Clone , Copy , Debug ) ]
1565+ pub struct InstanceFlags ( OptixEnumBaseType ) ;
1566+
15611567bitflags:: bitflags! {
1562- #[ derive( DeviceCopy ) ]
1563- pub struct InstanceFlags : OptixEnumBaseType {
1568+ impl InstanceFlags : OptixEnumBaseType {
15641569 const NONE = sys:: OptixInstanceFlags_OPTIX_INSTANCE_FLAG_NONE ;
15651570 const DISABLE_TRIANGLE_FACE_CULLING = sys:: OptixInstanceFlags_OPTIX_INSTANCE_FLAG_DISABLE_TRIANGLE_FACE_CULLING ;
15661571 const FLIP_TRIANGLE_FACING = sys:: OptixInstanceFlags_OPTIX_INSTANCE_FLAG_FLIP_TRIANGLE_FACING ;
@@ -1684,7 +1689,7 @@ pub struct InstancePointerArray<'i> {
16841689}
16851690
16861691impl < ' i > InstancePointerArray < ' i > {
1687- pub fn new ( instances : & ' i DeviceSlice < CUdeviceptr > ) -> InstancePointerArray {
1692+ pub fn new ( instances : & ' i DeviceSlice < CUdeviceptr > ) -> InstancePointerArray < ' i > {
16881693 InstancePointerArray { instances }
16891694 }
16901695}
0 commit comments