From d70f2481917d9e73676b9009f6b9e4f79f7df72f Mon Sep 17 00:00:00 2001 From: Yury Date: Sat, 9 Nov 2024 17:17:44 +0300 Subject: [PATCH] More mtl api --- cidre/src/mtl.rs | 1 + cidre/src/mtl/acceleration_structure.rs | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/cidre/src/mtl.rs b/cidre/src/mtl.rs index d760a097..f5517600 100644 --- a/cidre/src/mtl.rs +++ b/cidre/src/mtl.rs @@ -18,6 +18,7 @@ pub use acceleration_structure::AccelerationStruct; pub use acceleration_structure::Desc as AccelerationStructDesc; pub use acceleration_structure::GeometryDesc as AccelerationStructGeometryDesc; pub use acceleration_structure::InstanceOpts as AccelerationStructInstanceOpts; +pub use acceleration_structure::MatrixLayout; pub use acceleration_structure::MotionBorderMode; pub use acceleration_structure::MotionBoundingBoxGeometryDesc; pub use acceleration_structure::Usage as AccelerationStructUsage; diff --git a/cidre/src/mtl/acceleration_structure.rs b/cidre/src/mtl/acceleration_structure.rs index 83acf17e..161b8e51 100644 --- a/cidre/src/mtl/acceleration_structure.rs +++ b/cidre/src/mtl/acceleration_structure.rs @@ -38,6 +38,19 @@ pub enum InstanceOpts { NonOpaque = (1 << 3), } +#[derive(Copy, Clone, Eq, PartialEq)] +#[doc(alias = "MTLMatrixLayout")] +#[repr(isize)] +pub enum MatrixLayout { + /// Column-major order + #[doc(alias = "MTLMatrixLayoutColumnMajor")] + ColumnMajor = 0, + + /// Row-major order + #[doc(alias = "MTLMatrixLayoutRowMajor")] + RowMajor, +} + define_obj_type!(pub Desc(ns::Id)); impl Desc {