diff --git a/src/sampler.rs b/src/sampler.rs index e9f6416..c93f652 100644 --- a/src/sampler.rs +++ b/src/sampler.rs @@ -5,7 +5,7 @@ // http://opensource.org/licenses/MIT>, at your option. This file may not be // copied, modified, or distributed except according to those terms. -use super::{depthstencil::MTLCompareFunction, DeviceRef, NSUInteger}; +use super::{depthstencil::MTLCompareFunction, DeviceRef, MTLResourceID, NSUInteger}; /// See #[repr(u64)] @@ -158,4 +158,8 @@ impl SamplerStateRef { crate::nsstring_as_str(label) } } + + pub fn gpu_resource_id(&self) -> MTLResourceID { + unsafe { msg_send![self, gpuResourceID] } + } }