From 214f4c2729f706b6972a8cb2c00d18f34659c75d Mon Sep 17 00:00:00 2001 From: Yury Date: Sat, 11 Jan 2025 22:33:52 +0300 Subject: [PATCH] Tune metal api --- cidre/src/ca/metal_layer.rs | 4 ++-- cidre/src/mtl/render_pipeline.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cidre/src/ca/metal_layer.rs b/cidre/src/ca/metal_layer.rs index 22c091cd..06bb8e0b 100644 --- a/cidre/src/ca/metal_layer.rs +++ b/cidre/src/ca/metal_layer.rs @@ -8,10 +8,10 @@ define_obj_type!( pub trait MetalDrawable: mtl::Drawable { #[objc::msg_send(texture)] - fn texture(&self) -> arc::R; + fn texture(&self) -> &mtl::Texture; #[objc::msg_send(layer)] - fn layer(&self) -> arc::R; + fn layer(&self) -> &MetalLayer; } define_obj_type!(pub AnyMetalDrawable(ns::Id)); diff --git a/cidre/src/mtl/render_pipeline.rs b/cidre/src/mtl/render_pipeline.rs index 231961fb..6a84bef2 100644 --- a/cidre/src/mtl/render_pipeline.rs +++ b/cidre/src/mtl/render_pipeline.rs @@ -271,10 +271,10 @@ impl State { define_mtl!(gpu_res_id); #[objc::msg_send(device)] - pub fn device(&self) -> arc::R; + pub fn device(&self) -> &mtl::Device; #[objc::msg_send(label)] - pub fn label(&self) -> Option>; + pub fn label(&self) -> Option<&ns::String>; #[objc::msg_send(maxTotalThreadsPerThreadgroup)] pub fn max_total_threads_per_threadgroup(&self) -> usize;