Skip to content

Commit

Permalink
Initial matrix multiplication support. Still some bugs to iron out bu…
Browse files Browse the repository at this point in the history
…t works
  • Loading branch information
ivarflakstad committed Oct 18, 2023
1 parent d24f1a4 commit 09c5333
Show file tree
Hide file tree
Showing 4 changed files with 819 additions and 33 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ block = "0.1.6"
foreign-types = "0.5"
dispatch = { version = "0.2", optional = true }
paste = "1"
half = "2.3.1"

[dependencies.objc]
version = "0.2.4"
Expand Down
3 changes: 2 additions & 1 deletion examples/mps/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use metal::mps::*;
use metal::*;
use std::ffi::c_void;
use std::mem;
Expand Down Expand Up @@ -67,7 +68,7 @@ fn main() {
acceleration_structure.set_vertex_buffer(Some(&vertex_buffer));
acceleration_structure.set_vertex_stride(vertex_stride as u64);
acceleration_structure.set_index_buffer(Some(&index_buffer));
acceleration_structure.set_index_type(mps::MPSDataType::UInt32);
acceleration_structure.set_index_type(mps::UInt32);
acceleration_structure.set_triangle_count(1);
acceleration_structure.set_usage(mps::MPSAccelerationStructureUsage::None);
acceleration_structure.rebuild();
Expand Down
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ pub extern crate foreign_types;
#[macro_use]
pub extern crate paste;

pub extern crate half;

use std::{
borrow::{Borrow, ToOwned},
marker::PhantomData,
Expand Down
Loading

0 comments on commit 09c5333

Please sign in to comment.