objc2_metal/generated/
MTLParallelRenderCommandEncoder.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use objc2::__framework_prelude::*;
5
6use crate::*;
7
8extern_protocol!(
9    /// The MTLParallelRenderCommandEncoder protocol is designed to allow a single render to texture operation to be efficiently (and safely) broken up across multiple threads.
10    ///
11    /// See also [Apple's documentation](https://developer.apple.com/documentation/metal/mtlparallelrendercommandencoder?language=objc)
12    #[cfg(feature = "MTLCommandEncoder")]
13    pub unsafe trait MTLParallelRenderCommandEncoder: MTLCommandEncoder {
14        #[cfg(feature = "MTLRenderCommandEncoder")]
15        /// Return a new autoreleased object that conforms to
16        /// <MTLRenderCommandEncoder
17        /// > that may be used to encode on a different thread.
18        #[unsafe(method(renderCommandEncoder))]
19        #[unsafe(method_family = none)]
20        fn renderCommandEncoder(
21            &self,
22        ) -> Option<Retained<ProtocolObject<dyn MTLRenderCommandEncoder>>>;
23
24        #[cfg(feature = "MTLRenderPass")]
25        /// If the the store action for a given color attachment was set to MTLStoreActionUnknown when the render command encoder was created,
26        /// setColorStoreAction:atIndex: must be used to finalize the store action before endEncoding is called.
27        ///
28        /// Parameter `storeAction`: The desired store action for the given color attachment.  This may be set to any value other than MTLStoreActionUnknown.
29        ///
30        /// Parameter `colorAttachmentIndex`: The index of the color attachment
31        ///
32        /// # Safety
33        ///
34        /// `colorAttachmentIndex` might not be bounds-checked.
35        #[unsafe(method(setColorStoreAction:atIndex:))]
36        #[unsafe(method_family = none)]
37        unsafe fn setColorStoreAction_atIndex(
38            &self,
39            store_action: MTLStoreAction,
40            color_attachment_index: NSUInteger,
41        );
42
43        #[cfg(feature = "MTLRenderPass")]
44        /// If the the store action for the depth attachment was set to MTLStoreActionUnknown when the render command encoder was created,
45        /// setDepthStoreAction: must be used to finalize the store action before endEncoding is called.
46        #[unsafe(method(setDepthStoreAction:))]
47        #[unsafe(method_family = none)]
48        fn setDepthStoreAction(&self, store_action: MTLStoreAction);
49
50        #[cfg(feature = "MTLRenderPass")]
51        /// If the the store action for the stencil attachment was set to MTLStoreActionUnknown when the render command encoder was created,
52        /// setStencilStoreAction: must be used to finalize the store action before endEncoding is called.
53        #[unsafe(method(setStencilStoreAction:))]
54        #[unsafe(method_family = none)]
55        fn setStencilStoreAction(&self, store_action: MTLStoreAction);
56
57        #[cfg(feature = "MTLRenderPass")]
58        /// If the the store action for a given color attachment was set to MTLStoreActionUnknown when the render command encoder was created,
59        /// setColorStoreActionOptions:atIndex: may be used to finalize the store action options before endEncoding is called.
60        ///
61        /// Parameter `storeActionOptions`: The desired store action options for the given color attachment.
62        ///
63        /// Parameter `colorAttachmentIndex`: The index of the color attachment
64        ///
65        /// # Safety
66        ///
67        /// `colorAttachmentIndex` might not be bounds-checked.
68        #[unsafe(method(setColorStoreActionOptions:atIndex:))]
69        #[unsafe(method_family = none)]
70        unsafe fn setColorStoreActionOptions_atIndex(
71            &self,
72            store_action_options: MTLStoreActionOptions,
73            color_attachment_index: NSUInteger,
74        );
75
76        #[cfg(feature = "MTLRenderPass")]
77        /// If the the store action for the depth attachment was set to MTLStoreActionUnknown when the render command encoder was created,
78        /// setDepthStoreActionOptions: may be used to finalize the store action options before endEncoding is called.
79        #[unsafe(method(setDepthStoreActionOptions:))]
80        #[unsafe(method_family = none)]
81        fn setDepthStoreActionOptions(&self, store_action_options: MTLStoreActionOptions);
82
83        #[cfg(feature = "MTLRenderPass")]
84        /// If the the store action for the stencil attachment was set to MTLStoreActionUnknown when the render command encoder was created,
85        /// setStencilStoreActionOptions: may be used to finalize the store action options before endEncoding is called.
86        #[unsafe(method(setStencilStoreActionOptions:))]
87        #[unsafe(method_family = none)]
88        fn setStencilStoreActionOptions(&self, store_action_options: MTLStoreActionOptions);
89    }
90);