Skip to content

Commit

Permalink
Tune metal api
Browse files Browse the repository at this point in the history
  • Loading branch information
yury committed Jan 11, 2025
1 parent 7c09065 commit 214f4c2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cidre/src/ca/metal_layer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ define_obj_type!(

pub trait MetalDrawable<T: objc::Obj>: mtl::Drawable<T> {
#[objc::msg_send(texture)]
fn texture(&self) -> arc::R<mtl::Texture>;
fn texture(&self) -> &mtl::Texture;

#[objc::msg_send(layer)]
fn layer(&self) -> arc::R<MetalLayer>;
fn layer(&self) -> &MetalLayer;
}

define_obj_type!(pub AnyMetalDrawable(ns::Id));
Expand Down
4 changes: 2 additions & 2 deletions cidre/src/mtl/render_pipeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,10 +271,10 @@ impl State {
define_mtl!(gpu_res_id);

#[objc::msg_send(device)]
pub fn device(&self) -> arc::R<mtl::Device>;
pub fn device(&self) -> &mtl::Device;

#[objc::msg_send(label)]
pub fn label(&self) -> Option<arc::R<ns::String>>;
pub fn label(&self) -> Option<&ns::String>;

#[objc::msg_send(maxTotalThreadsPerThreadgroup)]
pub fn max_total_threads_per_threadgroup(&self) -> usize;
Expand Down

0 comments on commit 214f4c2

Please # to comment.