Skip to content

Commit

Permalink
Fixed issues in Rust code
Browse files Browse the repository at this point in the history
- Updated `metal` crate to match `gyroflow_core`.
- Added `rotation` to `input` `BufferDescription`.
- Currently not working.
  • Loading branch information
latenitefilms committed Jul 11, 2023
1 parent e27452c commit 6e9e934
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Source/Frameworks/gyroflow/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ lazy_static = "1.4"
lru = "0.10"
nalgebra = { version = "0.32", features = ["serde-serialize"] }
once_cell = "1.16.0"
metal = "0.24.0"
metal = { version = "0.25.0", git = "https://github.com/gfx-rs/metal-rs.git", rev = "a6a0446" }
16 changes: 9 additions & 7 deletions Source/Frameworks/gyroflow/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,17 +205,19 @@ pub extern "C" fn processFrame(
// Stabilization time!
//---------------------------------------------------------
let mut buffers = Buffers {
input: BufferDescription {
size: (output_width, output_height, input_stride),
rect: None,
data: BufferSource::Metal { texture: in_mtl_tex as *mut metal::MTLTexture, command_queue: command_queue as *mut metal::MTLCommandQueue },
texture_copy: true
},
output: BufferDescription {
size: (output_width, output_height, output_stride),
rect: None,
data: BufferSource::Metal { texture: out_mtl_tex as *mut metal::MTLTexture, command_queue: command_queue as *mut metal::MTLCommandQueue },
texture_copy: true
rotation: None,
texture_copy: true,
},
input: BufferDescription {
size: (output_width, output_height, input_stride),
rect: None,
data: BufferSource::Metal { texture: in_mtl_tex as *mut metal::MTLTexture, command_queue: command_queue as *mut metal::MTLCommandQueue },
rotation: None,
texture_copy: true,
}
};

Expand Down

0 comments on commit 6e9e934

Please sign in to comment.