use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct MTLPrimitiveType(pub NSUInteger);
impl MTLPrimitiveType {
#[doc(alias = "MTLPrimitiveTypePoint")]
pub const Point: Self = Self(0);
#[doc(alias = "MTLPrimitiveTypeLine")]
pub const Line: Self = Self(1);
#[doc(alias = "MTLPrimitiveTypeLineStrip")]
pub const LineStrip: Self = Self(2);
#[doc(alias = "MTLPrimitiveTypeTriangle")]
pub const Triangle: Self = Self(3);
#[doc(alias = "MTLPrimitiveTypeTriangleStrip")]
pub const TriangleStrip: Self = Self(4);
}
unsafe impl Encode for MTLPrimitiveType {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for MTLPrimitiveType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct MTLVisibilityResultMode(pub NSUInteger);
impl MTLVisibilityResultMode {
#[doc(alias = "MTLVisibilityResultModeDisabled")]
pub const Disabled: Self = Self(0);
#[doc(alias = "MTLVisibilityResultModeBoolean")]
pub const Boolean: Self = Self(1);
#[doc(alias = "MTLVisibilityResultModeCounting")]
pub const Counting: Self = Self(2);
}
unsafe impl Encode for MTLVisibilityResultMode {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for MTLVisibilityResultMode {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct MTLScissorRect {
pub x: NSUInteger,
pub y: NSUInteger,
pub width: NSUInteger,
pub height: NSUInteger,
}
unsafe impl Encode for MTLScissorRect {
const ENCODING: Encoding = Encoding::Struct(
"?",
&[
<NSUInteger>::ENCODING,
<NSUInteger>::ENCODING,
<NSUInteger>::ENCODING,
<NSUInteger>::ENCODING,
],
);
}
unsafe impl RefEncode for MTLScissorRect {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct MTLViewport {
pub originX: c_double,
pub originY: c_double,
pub width: c_double,
pub height: c_double,
pub znear: c_double,
pub zfar: c_double,
}
unsafe impl Encode for MTLViewport {
const ENCODING: Encoding = Encoding::Struct(
"?",
&[
<c_double>::ENCODING,
<c_double>::ENCODING,
<c_double>::ENCODING,
<c_double>::ENCODING,
<c_double>::ENCODING,
<c_double>::ENCODING,
],
);
}
unsafe impl RefEncode for MTLViewport {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct MTLCullMode(pub NSUInteger);
impl MTLCullMode {
#[doc(alias = "MTLCullModeNone")]
pub const None: Self = Self(0);
#[doc(alias = "MTLCullModeFront")]
pub const Front: Self = Self(1);
#[doc(alias = "MTLCullModeBack")]
pub const Back: Self = Self(2);
}
unsafe impl Encode for MTLCullMode {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for MTLCullMode {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct MTLWinding(pub NSUInteger);
impl MTLWinding {
#[doc(alias = "MTLWindingClockwise")]
pub const Clockwise: Self = Self(0);
#[doc(alias = "MTLWindingCounterClockwise")]
pub const CounterClockwise: Self = Self(1);
}
unsafe impl Encode for MTLWinding {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for MTLWinding {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct MTLDepthClipMode(pub NSUInteger);
impl MTLDepthClipMode {
#[doc(alias = "MTLDepthClipModeClip")]
pub const Clip: Self = Self(0);
#[doc(alias = "MTLDepthClipModeClamp")]
pub const Clamp: Self = Self(1);
}
unsafe impl Encode for MTLDepthClipMode {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for MTLDepthClipMode {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct MTLTriangleFillMode(pub NSUInteger);
impl MTLTriangleFillMode {
#[doc(alias = "MTLTriangleFillModeFill")]
pub const Fill: Self = Self(0);
#[doc(alias = "MTLTriangleFillModeLines")]
pub const Lines: Self = Self(1);
}
unsafe impl Encode for MTLTriangleFillMode {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for MTLTriangleFillMode {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct MTLDrawPrimitivesIndirectArguments {
pub vertexCount: u32,
pub instanceCount: u32,
pub vertexStart: u32,
pub baseInstance: u32,
}
unsafe impl Encode for MTLDrawPrimitivesIndirectArguments {
const ENCODING: Encoding = Encoding::Struct(
"?",
&[
<u32>::ENCODING,
<u32>::ENCODING,
<u32>::ENCODING,
<u32>::ENCODING,
],
);
}
unsafe impl RefEncode for MTLDrawPrimitivesIndirectArguments {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct MTLDrawIndexedPrimitivesIndirectArguments {
pub indexCount: u32,
pub instanceCount: u32,
pub indexStart: u32,
pub baseVertex: i32,
pub baseInstance: u32,
}
unsafe impl Encode for MTLDrawIndexedPrimitivesIndirectArguments {
const ENCODING: Encoding = Encoding::Struct(
"?",
&[
<u32>::ENCODING,
<u32>::ENCODING,
<u32>::ENCODING,
<i32>::ENCODING,
<u32>::ENCODING,
],
);
}
unsafe impl RefEncode for MTLDrawIndexedPrimitivesIndirectArguments {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct MTLVertexAmplificationViewMapping {
pub viewportArrayIndexOffset: u32,
pub renderTargetArrayIndexOffset: u32,
}
unsafe impl Encode for MTLVertexAmplificationViewMapping {
const ENCODING: Encoding = Encoding::Struct("?", &[<u32>::ENCODING, <u32>::ENCODING]);
}
unsafe impl RefEncode for MTLVertexAmplificationViewMapping {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct MTLDrawPatchIndirectArguments {
pub patchCount: u32,
pub instanceCount: u32,
pub patchStart: u32,
pub baseInstance: u32,
}
unsafe impl Encode for MTLDrawPatchIndirectArguments {
const ENCODING: Encoding = Encoding::Struct(
"?",
&[
<u32>::ENCODING,
<u32>::ENCODING,
<u32>::ENCODING,
<u32>::ENCODING,
],
);
}
unsafe impl RefEncode for MTLDrawPatchIndirectArguments {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct MTLQuadTessellationFactorsHalf {
pub edgeTessellationFactor: [u16; 4],
pub insideTessellationFactor: [u16; 2],
}
unsafe impl Encode for MTLQuadTessellationFactorsHalf {
const ENCODING: Encoding = Encoding::Struct("?", &[<[u16; 4]>::ENCODING, <[u16; 2]>::ENCODING]);
}
unsafe impl RefEncode for MTLQuadTessellationFactorsHalf {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct MTLTriangleTessellationFactorsHalf {
pub edgeTessellationFactor: [u16; 3],
pub insideTessellationFactor: u16,
}
unsafe impl Encode for MTLTriangleTessellationFactorsHalf {
const ENCODING: Encoding = Encoding::Struct("?", &[<[u16; 3]>::ENCODING, <u16>::ENCODING]);
}
unsafe impl RefEncode for MTLTriangleTessellationFactorsHalf {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct MTLRenderStages(pub NSUInteger);
bitflags::bitflags! {
impl MTLRenderStages: NSUInteger {
const MTLRenderStageVertex = 1<<0;
const MTLRenderStageFragment = 1<<1;
const MTLRenderStageTile = 1<<2;
const MTLRenderStageObject = 1<<3;
const MTLRenderStageMesh = 1<<4;
}
}
unsafe impl Encode for MTLRenderStages {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for MTLRenderStages {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_protocol!(
#[cfg(feature = "MTLCommandEncoder")]
pub unsafe trait MTLRenderCommandEncoder: MTLCommandEncoder + IsRetainable {
#[cfg(feature = "MTLRenderPipeline")]
#[method(setRenderPipelineState:)]
fn setRenderPipelineState(
&self,
pipeline_state: &ProtocolObject<dyn MTLRenderPipelineState>,
);
#[method(setVertexBytes:length:atIndex:)]
unsafe fn setVertexBytes_length_atIndex(
&self,
bytes: NonNull<c_void>,
length: NSUInteger,
index: NSUInteger,
);
#[cfg(all(feature = "MTLBuffer", feature = "MTLResource"))]
#[method(setVertexBuffer:offset:atIndex:)]
unsafe fn setVertexBuffer_offset_atIndex(
&self,
buffer: Option<&ProtocolObject<dyn MTLBuffer>>,
offset: NSUInteger,
index: NSUInteger,
);
#[method(setVertexBufferOffset:atIndex:)]
unsafe fn setVertexBufferOffset_atIndex(&self, offset: NSUInteger, index: NSUInteger);
#[cfg(all(feature = "MTLBuffer", feature = "MTLResource"))]
#[method(setVertexBuffers:offsets:withRange:)]
unsafe fn setVertexBuffers_offsets_withRange(
&self,
buffers: NonNull<*const ProtocolObject<dyn MTLBuffer>>,
offsets: NonNull<NSUInteger>,
range: NSRange,
);
#[cfg(all(feature = "MTLBuffer", feature = "MTLResource"))]
#[method(setVertexBuffer:offset:attributeStride:atIndex:)]
unsafe fn setVertexBuffer_offset_attributeStride_atIndex(
&self,
buffer: Option<&ProtocolObject<dyn MTLBuffer>>,
offset: NSUInteger,
stride: NSUInteger,
index: NSUInteger,
);
#[cfg(all(feature = "MTLBuffer", feature = "MTLResource"))]
#[method(setVertexBuffers:offsets:attributeStrides:withRange:)]
unsafe fn setVertexBuffers_offsets_attributeStrides_withRange(
&self,
buffers: NonNull<*const ProtocolObject<dyn MTLBuffer>>,
offsets: NonNull<NSUInteger>,
strides: NonNull<NSUInteger>,
range: NSRange,
);
#[method(setVertexBufferOffset:attributeStride:atIndex:)]
unsafe fn setVertexBufferOffset_attributeStride_atIndex(
&self,
offset: NSUInteger,
stride: NSUInteger,
index: NSUInteger,
);
#[method(setVertexBytes:length:attributeStride:atIndex:)]
unsafe fn setVertexBytes_length_attributeStride_atIndex(
&self,
bytes: NonNull<c_void>,
length: NSUInteger,
stride: NSUInteger,
index: NSUInteger,
);
#[cfg(all(feature = "MTLResource", feature = "MTLTexture"))]
#[method(setVertexTexture:atIndex:)]
unsafe fn setVertexTexture_atIndex(
&self,
texture: Option<&ProtocolObject<dyn MTLTexture>>,
index: NSUInteger,
);
#[cfg(all(feature = "MTLResource", feature = "MTLTexture"))]
#[method(setVertexTextures:withRange:)]
unsafe fn setVertexTextures_withRange(
&self,
textures: NonNull<*const ProtocolObject<dyn MTLTexture>>,
range: NSRange,
);
#[cfg(feature = "MTLSampler")]
#[method(setVertexSamplerState:atIndex:)]
unsafe fn setVertexSamplerState_atIndex(
&self,
sampler: Option<&ProtocolObject<dyn MTLSamplerState>>,
index: NSUInteger,
);
#[cfg(feature = "MTLSampler")]
#[method(setVertexSamplerStates:withRange:)]
unsafe fn setVertexSamplerStates_withRange(
&self,
samplers: NonNull<*const ProtocolObject<dyn MTLSamplerState>>,
range: NSRange,
);
#[cfg(feature = "MTLSampler")]
#[method(setVertexSamplerState:lodMinClamp:lodMaxClamp:atIndex:)]
unsafe fn setVertexSamplerState_lodMinClamp_lodMaxClamp_atIndex(
&self,
sampler: Option<&ProtocolObject<dyn MTLSamplerState>>,
lod_min_clamp: c_float,
lod_max_clamp: c_float,
index: NSUInteger,
);
#[cfg(feature = "MTLSampler")]
#[method(setVertexSamplerStates:lodMinClamps:lodMaxClamps:withRange:)]
unsafe fn setVertexSamplerStates_lodMinClamps_lodMaxClamps_withRange(
&self,
samplers: NonNull<*const ProtocolObject<dyn MTLSamplerState>>,
lod_min_clamps: NonNull<c_float>,
lod_max_clamps: NonNull<c_float>,
range: NSRange,
);
#[cfg(all(feature = "MTLResource", feature = "MTLVisibleFunctionTable"))]
#[method(setVertexVisibleFunctionTable:atBufferIndex:)]
unsafe fn setVertexVisibleFunctionTable_atBufferIndex(
&self,
function_table: Option<&ProtocolObject<dyn MTLVisibleFunctionTable>>,
buffer_index: NSUInteger,
);
#[cfg(all(feature = "MTLResource", feature = "MTLVisibleFunctionTable"))]
#[method(setVertexVisibleFunctionTables:withBufferRange:)]
unsafe fn setVertexVisibleFunctionTables_withBufferRange(
&self,
function_tables: NonNull<*const ProtocolObject<dyn MTLVisibleFunctionTable>>,
range: NSRange,
);
#[cfg(all(feature = "MTLIntersectionFunctionTable", feature = "MTLResource"))]
#[method(setVertexIntersectionFunctionTable:atBufferIndex:)]
unsafe fn setVertexIntersectionFunctionTable_atBufferIndex(
&self,
intersection_function_table: Option<&ProtocolObject<dyn MTLIntersectionFunctionTable>>,
buffer_index: NSUInteger,
);
#[cfg(all(feature = "MTLIntersectionFunctionTable", feature = "MTLResource"))]
#[method(setVertexIntersectionFunctionTables:withBufferRange:)]
unsafe fn setVertexIntersectionFunctionTables_withBufferRange(
&self,
intersection_function_tables: NonNull<
*const ProtocolObject<dyn MTLIntersectionFunctionTable>,
>,
range: NSRange,
);
#[cfg(all(feature = "MTLAccelerationStructure", feature = "MTLResource"))]
#[method(setVertexAccelerationStructure:atBufferIndex:)]
unsafe fn setVertexAccelerationStructure_atBufferIndex(
&self,
acceleration_structure: Option<&ProtocolObject<dyn MTLAccelerationStructure>>,
buffer_index: NSUInteger,
);
#[method(setViewport:)]
fn setViewport(&self, viewport: MTLViewport);
#[method(setViewports:count:)]
unsafe fn setViewports_count(&self, viewports: NonNull<MTLViewport>, count: NSUInteger);
#[method(setFrontFacingWinding:)]
fn setFrontFacingWinding(&self, front_facing_winding: MTLWinding);
#[method(setVertexAmplificationCount:viewMappings:)]
unsafe fn setVertexAmplificationCount_viewMappings(
&self,
count: NSUInteger,
view_mappings: *mut MTLVertexAmplificationViewMapping,
);
#[method(setCullMode:)]
fn setCullMode(&self, cull_mode: MTLCullMode);
#[method(setDepthClipMode:)]
fn setDepthClipMode(&self, depth_clip_mode: MTLDepthClipMode);
#[method(setDepthBias:slopeScale:clamp:)]
fn setDepthBias_slopeScale_clamp(
&self,
depth_bias: c_float,
slope_scale: c_float,
clamp: c_float,
);
#[method(setScissorRect:)]
fn setScissorRect(&self, rect: MTLScissorRect);
#[method(setScissorRects:count:)]
unsafe fn setScissorRects_count(
&self,
scissor_rects: NonNull<MTLScissorRect>,
count: NSUInteger,
);
#[method(setTriangleFillMode:)]
fn setTriangleFillMode(&self, fill_mode: MTLTriangleFillMode);
#[method(setFragmentBytes:length:atIndex:)]
unsafe fn setFragmentBytes_length_atIndex(
&self,
bytes: NonNull<c_void>,
length: NSUInteger,
index: NSUInteger,
);
#[cfg(all(feature = "MTLBuffer", feature = "MTLResource"))]
#[method(setFragmentBuffer:offset:atIndex:)]
unsafe fn setFragmentBuffer_offset_atIndex(
&self,
buffer: Option<&ProtocolObject<dyn MTLBuffer>>,
offset: NSUInteger,
index: NSUInteger,
);
#[method(setFragmentBufferOffset:atIndex:)]
unsafe fn setFragmentBufferOffset_atIndex(&self, offset: NSUInteger, index: NSUInteger);
#[cfg(all(feature = "MTLBuffer", feature = "MTLResource"))]
#[method(setFragmentBuffers:offsets:withRange:)]
unsafe fn setFragmentBuffers_offsets_withRange(
&self,
buffers: NonNull<*const ProtocolObject<dyn MTLBuffer>>,
offsets: NonNull<NSUInteger>,
range: NSRange,
);
#[cfg(all(feature = "MTLResource", feature = "MTLTexture"))]
#[method(setFragmentTexture:atIndex:)]
unsafe fn setFragmentTexture_atIndex(
&self,
texture: Option<&ProtocolObject<dyn MTLTexture>>,
index: NSUInteger,
);
#[cfg(all(feature = "MTLResource", feature = "MTLTexture"))]
#[method(setFragmentTextures:withRange:)]
unsafe fn setFragmentTextures_withRange(
&self,
textures: NonNull<*const ProtocolObject<dyn MTLTexture>>,
range: NSRange,
);
#[cfg(feature = "MTLSampler")]
#[method(setFragmentSamplerState:atIndex:)]
unsafe fn setFragmentSamplerState_atIndex(
&self,
sampler: Option<&ProtocolObject<dyn MTLSamplerState>>,
index: NSUInteger,
);
#[cfg(feature = "MTLSampler")]
#[method(setFragmentSamplerStates:withRange:)]
unsafe fn setFragmentSamplerStates_withRange(
&self,
samplers: NonNull<*const ProtocolObject<dyn MTLSamplerState>>,
range: NSRange,
);
#[cfg(feature = "MTLSampler")]
#[method(setFragmentSamplerState:lodMinClamp:lodMaxClamp:atIndex:)]
unsafe fn setFragmentSamplerState_lodMinClamp_lodMaxClamp_atIndex(
&self,
sampler: Option<&ProtocolObject<dyn MTLSamplerState>>,
lod_min_clamp: c_float,
lod_max_clamp: c_float,
index: NSUInteger,
);
#[cfg(feature = "MTLSampler")]
#[method(setFragmentSamplerStates:lodMinClamps:lodMaxClamps:withRange:)]
unsafe fn setFragmentSamplerStates_lodMinClamps_lodMaxClamps_withRange(
&self,
samplers: NonNull<*const ProtocolObject<dyn MTLSamplerState>>,
lod_min_clamps: NonNull<c_float>,
lod_max_clamps: NonNull<c_float>,
range: NSRange,
);
#[cfg(all(feature = "MTLResource", feature = "MTLVisibleFunctionTable"))]
#[method(setFragmentVisibleFunctionTable:atBufferIndex:)]
unsafe fn setFragmentVisibleFunctionTable_atBufferIndex(
&self,
function_table: Option<&ProtocolObject<dyn MTLVisibleFunctionTable>>,
buffer_index: NSUInteger,
);
#[cfg(all(feature = "MTLResource", feature = "MTLVisibleFunctionTable"))]
#[method(setFragmentVisibleFunctionTables:withBufferRange:)]
unsafe fn setFragmentVisibleFunctionTables_withBufferRange(
&self,
function_tables: NonNull<*const ProtocolObject<dyn MTLVisibleFunctionTable>>,
range: NSRange,
);
#[cfg(all(feature = "MTLIntersectionFunctionTable", feature = "MTLResource"))]
#[method(setFragmentIntersectionFunctionTable:atBufferIndex:)]
unsafe fn setFragmentIntersectionFunctionTable_atBufferIndex(
&self,
intersection_function_table: Option<&ProtocolObject<dyn MTLIntersectionFunctionTable>>,
buffer_index: NSUInteger,
);
#[cfg(all(feature = "MTLIntersectionFunctionTable", feature = "MTLResource"))]
#[method(setFragmentIntersectionFunctionTables:withBufferRange:)]
unsafe fn setFragmentIntersectionFunctionTables_withBufferRange(
&self,
intersection_function_tables: NonNull<
*const ProtocolObject<dyn MTLIntersectionFunctionTable>,
>,
range: NSRange,
);
#[cfg(all(feature = "MTLAccelerationStructure", feature = "MTLResource"))]
#[method(setFragmentAccelerationStructure:atBufferIndex:)]
unsafe fn setFragmentAccelerationStructure_atBufferIndex(
&self,
acceleration_structure: Option<&ProtocolObject<dyn MTLAccelerationStructure>>,
buffer_index: NSUInteger,
);
#[method(setBlendColorRed:green:blue:alpha:)]
fn setBlendColorRed_green_blue_alpha(
&self,
red: c_float,
green: c_float,
blue: c_float,
alpha: c_float,
);
#[cfg(feature = "MTLDepthStencil")]
#[method(setDepthStencilState:)]
fn setDepthStencilState(
&self,
depth_stencil_state: Option<&ProtocolObject<dyn MTLDepthStencilState>>,
);
#[method(setStencilReferenceValue:)]
fn setStencilReferenceValue(&self, reference_value: u32);
#[method(setStencilFrontReferenceValue:backReferenceValue:)]
fn setStencilFrontReferenceValue_backReferenceValue(
&self,
front_reference_value: u32,
back_reference_value: u32,
);
#[method(setVisibilityResultMode:offset:)]
fn setVisibilityResultMode_offset(&self, mode: MTLVisibilityResultMode, offset: NSUInteger);
#[cfg(feature = "MTLRenderPass")]
#[method(setColorStoreAction:atIndex:)]
unsafe fn setColorStoreAction_atIndex(
&self,
store_action: MTLStoreAction,
color_attachment_index: NSUInteger,
);
#[cfg(feature = "MTLRenderPass")]
#[method(setDepthStoreAction:)]
unsafe fn setDepthStoreAction(&self, store_action: MTLStoreAction);
#[cfg(feature = "MTLRenderPass")]
#[method(setStencilStoreAction:)]
unsafe fn setStencilStoreAction(&self, store_action: MTLStoreAction);
#[cfg(feature = "MTLRenderPass")]
#[method(setColorStoreActionOptions:atIndex:)]
unsafe fn setColorStoreActionOptions_atIndex(
&self,
store_action_options: MTLStoreActionOptions,
color_attachment_index: NSUInteger,
);
#[cfg(feature = "MTLRenderPass")]
#[method(setDepthStoreActionOptions:)]
unsafe fn setDepthStoreActionOptions(&self, store_action_options: MTLStoreActionOptions);
#[cfg(feature = "MTLRenderPass")]
#[method(setStencilStoreActionOptions:)]
unsafe fn setStencilStoreActionOptions(&self, store_action_options: MTLStoreActionOptions);
#[method(setObjectBytes:length:atIndex:)]
unsafe fn setObjectBytes_length_atIndex(
&self,
bytes: NonNull<c_void>,
length: NSUInteger,
index: NSUInteger,
);
#[cfg(all(feature = "MTLBuffer", feature = "MTLResource"))]
#[method(setObjectBuffer:offset:atIndex:)]
unsafe fn setObjectBuffer_offset_atIndex(
&self,
buffer: Option<&ProtocolObject<dyn MTLBuffer>>,
offset: NSUInteger,
index: NSUInteger,
);
#[method(setObjectBufferOffset:atIndex:)]
unsafe fn setObjectBufferOffset_atIndex(&self, offset: NSUInteger, index: NSUInteger);
#[cfg(all(feature = "MTLBuffer", feature = "MTLResource"))]
#[method(setObjectBuffers:offsets:withRange:)]
unsafe fn setObjectBuffers_offsets_withRange(
&self,
buffers: NonNull<*const ProtocolObject<dyn MTLBuffer>>,
offsets: NonNull<NSUInteger>,
range: NSRange,
);
#[cfg(all(feature = "MTLResource", feature = "MTLTexture"))]
#[method(setObjectTexture:atIndex:)]
unsafe fn setObjectTexture_atIndex(
&self,
texture: Option<&ProtocolObject<dyn MTLTexture>>,
index: NSUInteger,
);
#[cfg(all(feature = "MTLResource", feature = "MTLTexture"))]
#[method(setObjectTextures:withRange:)]
unsafe fn setObjectTextures_withRange(
&self,
textures: NonNull<*const ProtocolObject<dyn MTLTexture>>,
range: NSRange,
);
#[cfg(feature = "MTLSampler")]
#[method(setObjectSamplerState:atIndex:)]
unsafe fn setObjectSamplerState_atIndex(
&self,
sampler: Option<&ProtocolObject<dyn MTLSamplerState>>,
index: NSUInteger,
);
#[cfg(feature = "MTLSampler")]
#[method(setObjectSamplerStates:withRange:)]
unsafe fn setObjectSamplerStates_withRange(
&self,
samplers: NonNull<*const ProtocolObject<dyn MTLSamplerState>>,
range: NSRange,
);
#[cfg(feature = "MTLSampler")]
#[method(setObjectSamplerState:lodMinClamp:lodMaxClamp:atIndex:)]
unsafe fn setObjectSamplerState_lodMinClamp_lodMaxClamp_atIndex(
&self,
sampler: Option<&ProtocolObject<dyn MTLSamplerState>>,
lod_min_clamp: c_float,
lod_max_clamp: c_float,
index: NSUInteger,
);
#[cfg(feature = "MTLSampler")]
#[method(setObjectSamplerStates:lodMinClamps:lodMaxClamps:withRange:)]
unsafe fn setObjectSamplerStates_lodMinClamps_lodMaxClamps_withRange(
&self,
samplers: NonNull<*const ProtocolObject<dyn MTLSamplerState>>,
lod_min_clamps: NonNull<c_float>,
lod_max_clamps: NonNull<c_float>,
range: NSRange,
);
#[method(setObjectThreadgroupMemoryLength:atIndex:)]
unsafe fn setObjectThreadgroupMemoryLength_atIndex(
&self,
length: NSUInteger,
index: NSUInteger,
);
#[method(setMeshBytes:length:atIndex:)]
unsafe fn setMeshBytes_length_atIndex(
&self,
bytes: NonNull<c_void>,
length: NSUInteger,
index: NSUInteger,
);
#[cfg(all(feature = "MTLBuffer", feature = "MTLResource"))]
#[method(setMeshBuffer:offset:atIndex:)]
unsafe fn setMeshBuffer_offset_atIndex(
&self,
buffer: Option<&ProtocolObject<dyn MTLBuffer>>,
offset: NSUInteger,
index: NSUInteger,
);
#[method(setMeshBufferOffset:atIndex:)]
unsafe fn setMeshBufferOffset_atIndex(&self, offset: NSUInteger, index: NSUInteger);
#[cfg(all(feature = "MTLBuffer", feature = "MTLResource"))]
#[method(setMeshBuffers:offsets:withRange:)]
unsafe fn setMeshBuffers_offsets_withRange(
&self,
buffers: NonNull<*const ProtocolObject<dyn MTLBuffer>>,
offsets: NonNull<NSUInteger>,
range: NSRange,
);
#[cfg(all(feature = "MTLResource", feature = "MTLTexture"))]
#[method(setMeshTexture:atIndex:)]
unsafe fn setMeshTexture_atIndex(
&self,
texture: Option<&ProtocolObject<dyn MTLTexture>>,
index: NSUInteger,
);
#[cfg(all(feature = "MTLResource", feature = "MTLTexture"))]
#[method(setMeshTextures:withRange:)]
unsafe fn setMeshTextures_withRange(
&self,
textures: NonNull<*const ProtocolObject<dyn MTLTexture>>,
range: NSRange,
);
#[cfg(feature = "MTLSampler")]
#[method(setMeshSamplerState:atIndex:)]
unsafe fn setMeshSamplerState_atIndex(
&self,
sampler: Option<&ProtocolObject<dyn MTLSamplerState>>,
index: NSUInteger,
);
#[cfg(feature = "MTLSampler")]
#[method(setMeshSamplerStates:withRange:)]
unsafe fn setMeshSamplerStates_withRange(
&self,
samplers: NonNull<*const ProtocolObject<dyn MTLSamplerState>>,
range: NSRange,
);
#[cfg(feature = "MTLSampler")]
#[method(setMeshSamplerState:lodMinClamp:lodMaxClamp:atIndex:)]
unsafe fn setMeshSamplerState_lodMinClamp_lodMaxClamp_atIndex(
&self,
sampler: Option<&ProtocolObject<dyn MTLSamplerState>>,
lod_min_clamp: c_float,
lod_max_clamp: c_float,
index: NSUInteger,
);
#[cfg(feature = "MTLSampler")]
#[method(setMeshSamplerStates:lodMinClamps:lodMaxClamps:withRange:)]
unsafe fn setMeshSamplerStates_lodMinClamps_lodMaxClamps_withRange(
&self,
samplers: NonNull<*const ProtocolObject<dyn MTLSamplerState>>,
lod_min_clamps: NonNull<c_float>,
lod_max_clamps: NonNull<c_float>,
range: NSRange,
);
#[cfg(feature = "MTLTypes")]
#[method(drawMeshThreadgroups:threadsPerObjectThreadgroup:threadsPerMeshThreadgroup:)]
unsafe fn drawMeshThreadgroups_threadsPerObjectThreadgroup_threadsPerMeshThreadgroup(
&self,
threadgroups_per_grid: MTLSize,
threads_per_object_threadgroup: MTLSize,
threads_per_mesh_threadgroup: MTLSize,
);
#[cfg(feature = "MTLTypes")]
#[method(drawMeshThreads:threadsPerObjectThreadgroup:threadsPerMeshThreadgroup:)]
unsafe fn drawMeshThreads_threadsPerObjectThreadgroup_threadsPerMeshThreadgroup(
&self,
threads_per_grid: MTLSize,
threads_per_object_threadgroup: MTLSize,
threads_per_mesh_threadgroup: MTLSize,
);
#[cfg(all(feature = "MTLBuffer", feature = "MTLResource", feature = "MTLTypes"))]
#[method(drawMeshThreadgroupsWithIndirectBuffer:indirectBufferOffset:threadsPerObjectThreadgroup:threadsPerMeshThreadgroup:)]
unsafe fn drawMeshThreadgroupsWithIndirectBuffer_indirectBufferOffset_threadsPerObjectThreadgroup_threadsPerMeshThreadgroup(
&self,
indirect_buffer: &ProtocolObject<dyn MTLBuffer>,
indirect_buffer_offset: NSUInteger,
threads_per_object_threadgroup: MTLSize,
threads_per_mesh_threadgroup: MTLSize,
);
#[method(drawPrimitives:vertexStart:vertexCount:instanceCount:)]
unsafe fn drawPrimitives_vertexStart_vertexCount_instanceCount(
&self,
primitive_type: MTLPrimitiveType,
vertex_start: NSUInteger,
vertex_count: NSUInteger,
instance_count: NSUInteger,
);
#[method(drawPrimitives:vertexStart:vertexCount:)]
unsafe fn drawPrimitives_vertexStart_vertexCount(
&self,
primitive_type: MTLPrimitiveType,
vertex_start: NSUInteger,
vertex_count: NSUInteger,
);
#[cfg(all(
feature = "MTLBuffer",
feature = "MTLResource",
feature = "MTLStageInputOutputDescriptor"
))]
#[method(drawIndexedPrimitives:indexCount:indexType:indexBuffer:indexBufferOffset:instanceCount:)]
unsafe fn drawIndexedPrimitives_indexCount_indexType_indexBuffer_indexBufferOffset_instanceCount(
&self,
primitive_type: MTLPrimitiveType,
index_count: NSUInteger,
index_type: MTLIndexType,
index_buffer: &ProtocolObject<dyn MTLBuffer>,
index_buffer_offset: NSUInteger,
instance_count: NSUInteger,
);
#[cfg(all(
feature = "MTLBuffer",
feature = "MTLResource",
feature = "MTLStageInputOutputDescriptor"
))]
#[method(drawIndexedPrimitives:indexCount:indexType:indexBuffer:indexBufferOffset:)]
unsafe fn drawIndexedPrimitives_indexCount_indexType_indexBuffer_indexBufferOffset(
&self,
primitive_type: MTLPrimitiveType,
index_count: NSUInteger,
index_type: MTLIndexType,
index_buffer: &ProtocolObject<dyn MTLBuffer>,
index_buffer_offset: NSUInteger,
);
#[method(drawPrimitives:vertexStart:vertexCount:instanceCount:baseInstance:)]
unsafe fn drawPrimitives_vertexStart_vertexCount_instanceCount_baseInstance(
&self,
primitive_type: MTLPrimitiveType,
vertex_start: NSUInteger,
vertex_count: NSUInteger,
instance_count: NSUInteger,
base_instance: NSUInteger,
);
#[cfg(all(
feature = "MTLBuffer",
feature = "MTLResource",
feature = "MTLStageInputOutputDescriptor"
))]
#[method(drawIndexedPrimitives:indexCount:indexType:indexBuffer:indexBufferOffset:instanceCount:baseVertex:baseInstance:)]
unsafe fn drawIndexedPrimitives_indexCount_indexType_indexBuffer_indexBufferOffset_instanceCount_baseVertex_baseInstance(
&self,
primitive_type: MTLPrimitiveType,
index_count: NSUInteger,
index_type: MTLIndexType,
index_buffer: &ProtocolObject<dyn MTLBuffer>,
index_buffer_offset: NSUInteger,
instance_count: NSUInteger,
base_vertex: NSInteger,
base_instance: NSUInteger,
);
#[cfg(all(feature = "MTLBuffer", feature = "MTLResource"))]
#[method(drawPrimitives:indirectBuffer:indirectBufferOffset:)]
unsafe fn drawPrimitives_indirectBuffer_indirectBufferOffset(
&self,
primitive_type: MTLPrimitiveType,
indirect_buffer: &ProtocolObject<dyn MTLBuffer>,
indirect_buffer_offset: NSUInteger,
);
#[cfg(all(
feature = "MTLBuffer",
feature = "MTLResource",
feature = "MTLStageInputOutputDescriptor"
))]
#[method(drawIndexedPrimitives:indexType:indexBuffer:indexBufferOffset:indirectBuffer:indirectBufferOffset:)]
unsafe fn drawIndexedPrimitives_indexType_indexBuffer_indexBufferOffset_indirectBuffer_indirectBufferOffset(
&self,
primitive_type: MTLPrimitiveType,
index_type: MTLIndexType,
index_buffer: &ProtocolObject<dyn MTLBuffer>,
index_buffer_offset: NSUInteger,
indirect_buffer: &ProtocolObject<dyn MTLBuffer>,
indirect_buffer_offset: NSUInteger,
);
#[deprecated]
#[method(textureBarrier)]
unsafe fn textureBarrier(&self);
#[cfg(feature = "MTLFence")]
#[method(updateFence:afterStages:)]
fn updateFence_afterStages(
&self,
fence: &ProtocolObject<dyn MTLFence>,
stages: MTLRenderStages,
);
#[cfg(feature = "MTLFence")]
#[method(waitForFence:beforeStages:)]
fn waitForFence_beforeStages(
&self,
fence: &ProtocolObject<dyn MTLFence>,
stages: MTLRenderStages,
);
#[cfg(all(feature = "MTLBuffer", feature = "MTLResource"))]
#[method(setTessellationFactorBuffer:offset:instanceStride:)]
unsafe fn setTessellationFactorBuffer_offset_instanceStride(
&self,
buffer: Option<&ProtocolObject<dyn MTLBuffer>>,
offset: NSUInteger,
instance_stride: NSUInteger,
);
#[method(setTessellationFactorScale:)]
unsafe fn setTessellationFactorScale(&self, scale: c_float);
#[cfg(all(feature = "MTLBuffer", feature = "MTLResource"))]
#[method(drawPatches:patchStart:patchCount:patchIndexBuffer:patchIndexBufferOffset:instanceCount:baseInstance:)]
unsafe fn drawPatches_patchStart_patchCount_patchIndexBuffer_patchIndexBufferOffset_instanceCount_baseInstance(
&self,
number_of_patch_control_points: NSUInteger,
patch_start: NSUInteger,
patch_count: NSUInteger,
patch_index_buffer: Option<&ProtocolObject<dyn MTLBuffer>>,
patch_index_buffer_offset: NSUInteger,
instance_count: NSUInteger,
base_instance: NSUInteger,
);
#[cfg(all(feature = "MTLBuffer", feature = "MTLResource"))]
#[method(drawPatches:patchIndexBuffer:patchIndexBufferOffset:indirectBuffer:indirectBufferOffset:)]
unsafe fn drawPatches_patchIndexBuffer_patchIndexBufferOffset_indirectBuffer_indirectBufferOffset(
&self,
number_of_patch_control_points: NSUInteger,
patch_index_buffer: Option<&ProtocolObject<dyn MTLBuffer>>,
patch_index_buffer_offset: NSUInteger,
indirect_buffer: &ProtocolObject<dyn MTLBuffer>,
indirect_buffer_offset: NSUInteger,
);
#[cfg(all(feature = "MTLBuffer", feature = "MTLResource"))]
#[method(drawIndexedPatches:patchStart:patchCount:patchIndexBuffer:patchIndexBufferOffset:controlPointIndexBuffer:controlPointIndexBufferOffset:instanceCount:baseInstance:)]
unsafe fn drawIndexedPatches_patchStart_patchCount_patchIndexBuffer_patchIndexBufferOffset_controlPointIndexBuffer_controlPointIndexBufferOffset_instanceCount_baseInstance(
&self,
number_of_patch_control_points: NSUInteger,
patch_start: NSUInteger,
patch_count: NSUInteger,
patch_index_buffer: Option<&ProtocolObject<dyn MTLBuffer>>,
patch_index_buffer_offset: NSUInteger,
control_point_index_buffer: &ProtocolObject<dyn MTLBuffer>,
control_point_index_buffer_offset: NSUInteger,
instance_count: NSUInteger,
base_instance: NSUInteger,
);
#[cfg(all(feature = "MTLBuffer", feature = "MTLResource"))]
#[method(drawIndexedPatches:patchIndexBuffer:patchIndexBufferOffset:controlPointIndexBuffer:controlPointIndexBufferOffset:indirectBuffer:indirectBufferOffset:)]
unsafe fn drawIndexedPatches_patchIndexBuffer_patchIndexBufferOffset_controlPointIndexBuffer_controlPointIndexBufferOffset_indirectBuffer_indirectBufferOffset(
&self,
number_of_patch_control_points: NSUInteger,
patch_index_buffer: Option<&ProtocolObject<dyn MTLBuffer>>,
patch_index_buffer_offset: NSUInteger,
control_point_index_buffer: &ProtocolObject<dyn MTLBuffer>,
control_point_index_buffer_offset: NSUInteger,
indirect_buffer: &ProtocolObject<dyn MTLBuffer>,
indirect_buffer_offset: NSUInteger,
);
#[method(tileWidth)]
unsafe fn tileWidth(&self) -> NSUInteger;
#[method(tileHeight)]
unsafe fn tileHeight(&self) -> NSUInteger;
#[method(setTileBytes:length:atIndex:)]
unsafe fn setTileBytes_length_atIndex(
&self,
bytes: NonNull<c_void>,
length: NSUInteger,
index: NSUInteger,
);
#[cfg(all(feature = "MTLBuffer", feature = "MTLResource"))]
#[method(setTileBuffer:offset:atIndex:)]
unsafe fn setTileBuffer_offset_atIndex(
&self,
buffer: Option<&ProtocolObject<dyn MTLBuffer>>,
offset: NSUInteger,
index: NSUInteger,
);
#[method(setTileBufferOffset:atIndex:)]
unsafe fn setTileBufferOffset_atIndex(&self, offset: NSUInteger, index: NSUInteger);
#[cfg(all(feature = "MTLBuffer", feature = "MTLResource"))]
#[method(setTileBuffers:offsets:withRange:)]
unsafe fn setTileBuffers_offsets_withRange(
&self,
buffers: NonNull<*const ProtocolObject<dyn MTLBuffer>>,
offsets: NonNull<NSUInteger>,
range: NSRange,
);
#[cfg(all(feature = "MTLResource", feature = "MTLTexture"))]
#[method(setTileTexture:atIndex:)]
unsafe fn setTileTexture_atIndex(
&self,
texture: Option<&ProtocolObject<dyn MTLTexture>>,
index: NSUInteger,
);
#[cfg(all(feature = "MTLResource", feature = "MTLTexture"))]
#[method(setTileTextures:withRange:)]
unsafe fn setTileTextures_withRange(
&self,
textures: NonNull<*const ProtocolObject<dyn MTLTexture>>,
range: NSRange,
);
#[cfg(feature = "MTLSampler")]
#[method(setTileSamplerState:atIndex:)]
unsafe fn setTileSamplerState_atIndex(
&self,
sampler: Option<&ProtocolObject<dyn MTLSamplerState>>,
index: NSUInteger,
);
#[cfg(feature = "MTLSampler")]
#[method(setTileSamplerStates:withRange:)]
unsafe fn setTileSamplerStates_withRange(
&self,
samplers: NonNull<*const ProtocolObject<dyn MTLSamplerState>>,
range: NSRange,
);
#[cfg(feature = "MTLSampler")]
#[method(setTileSamplerState:lodMinClamp:lodMaxClamp:atIndex:)]
unsafe fn setTileSamplerState_lodMinClamp_lodMaxClamp_atIndex(
&self,
sampler: Option<&ProtocolObject<dyn MTLSamplerState>>,
lod_min_clamp: c_float,
lod_max_clamp: c_float,
index: NSUInteger,
);
#[cfg(feature = "MTLSampler")]
#[method(setTileSamplerStates:lodMinClamps:lodMaxClamps:withRange:)]
unsafe fn setTileSamplerStates_lodMinClamps_lodMaxClamps_withRange(
&self,
samplers: NonNull<*const ProtocolObject<dyn MTLSamplerState>>,
lod_min_clamps: NonNull<c_float>,
lod_max_clamps: NonNull<c_float>,
range: NSRange,
);
#[cfg(all(feature = "MTLResource", feature = "MTLVisibleFunctionTable"))]
#[method(setTileVisibleFunctionTable:atBufferIndex:)]
unsafe fn setTileVisibleFunctionTable_atBufferIndex(
&self,
function_table: Option<&ProtocolObject<dyn MTLVisibleFunctionTable>>,
buffer_index: NSUInteger,
);
#[cfg(all(feature = "MTLResource", feature = "MTLVisibleFunctionTable"))]
#[method(setTileVisibleFunctionTables:withBufferRange:)]
unsafe fn setTileVisibleFunctionTables_withBufferRange(
&self,
function_tables: NonNull<*const ProtocolObject<dyn MTLVisibleFunctionTable>>,
range: NSRange,
);
#[cfg(all(feature = "MTLIntersectionFunctionTable", feature = "MTLResource"))]
#[method(setTileIntersectionFunctionTable:atBufferIndex:)]
unsafe fn setTileIntersectionFunctionTable_atBufferIndex(
&self,
intersection_function_table: Option<&ProtocolObject<dyn MTLIntersectionFunctionTable>>,
buffer_index: NSUInteger,
);
#[cfg(all(feature = "MTLIntersectionFunctionTable", feature = "MTLResource"))]
#[method(setTileIntersectionFunctionTables:withBufferRange:)]
unsafe fn setTileIntersectionFunctionTables_withBufferRange(
&self,
intersection_function_tables: NonNull<
*const ProtocolObject<dyn MTLIntersectionFunctionTable>,
>,
range: NSRange,
);
#[cfg(all(feature = "MTLAccelerationStructure", feature = "MTLResource"))]
#[method(setTileAccelerationStructure:atBufferIndex:)]
unsafe fn setTileAccelerationStructure_atBufferIndex(
&self,
acceleration_structure: Option<&ProtocolObject<dyn MTLAccelerationStructure>>,
buffer_index: NSUInteger,
);
#[cfg(feature = "MTLTypes")]
#[method(dispatchThreadsPerTile:)]
unsafe fn dispatchThreadsPerTile(&self, threads_per_tile: MTLSize);
#[method(setThreadgroupMemoryLength:offset:atIndex:)]
unsafe fn setThreadgroupMemoryLength_offset_atIndex(
&self,
length: NSUInteger,
offset: NSUInteger,
index: NSUInteger,
);
#[cfg(feature = "MTLResource")]
#[deprecated]
#[method(useResource:usage:)]
fn useResource_usage(
&self,
resource: &ProtocolObject<dyn MTLResource>,
usage: MTLResourceUsage,
);
#[cfg(feature = "MTLResource")]
#[deprecated]
#[method(useResources:count:usage:)]
unsafe fn useResources_count_usage(
&self,
resources: NonNull<NonNull<ProtocolObject<dyn MTLResource>>>,
count: NSUInteger,
usage: MTLResourceUsage,
);
#[cfg(feature = "MTLResource")]
#[method(useResource:usage:stages:)]
fn useResource_usage_stages(
&self,
resource: &ProtocolObject<dyn MTLResource>,
usage: MTLResourceUsage,
stages: MTLRenderStages,
);
#[cfg(feature = "MTLResource")]
#[method(useResources:count:usage:stages:)]
unsafe fn useResources_count_usage_stages(
&self,
resources: NonNull<NonNull<ProtocolObject<dyn MTLResource>>>,
count: NSUInteger,
usage: MTLResourceUsage,
stages: MTLRenderStages,
);
#[cfg(feature = "MTLHeap")]
#[deprecated]
#[method(useHeap:)]
fn useHeap(&self, heap: &ProtocolObject<dyn MTLHeap>);
#[cfg(feature = "MTLHeap")]
#[deprecated]
#[method(useHeaps:count:)]
unsafe fn useHeaps_count(
&self,
heaps: NonNull<NonNull<ProtocolObject<dyn MTLHeap>>>,
count: NSUInteger,
);
#[cfg(feature = "MTLHeap")]
#[method(useHeap:stages:)]
fn useHeap_stages(&self, heap: &ProtocolObject<dyn MTLHeap>, stages: MTLRenderStages);
#[cfg(feature = "MTLHeap")]
#[method(useHeaps:count:stages:)]
unsafe fn useHeaps_count_stages(
&self,
heaps: NonNull<NonNull<ProtocolObject<dyn MTLHeap>>>,
count: NSUInteger,
stages: MTLRenderStages,
);
#[cfg(all(feature = "MTLIndirectCommandBuffer", feature = "MTLResource"))]
#[method(executeCommandsInBuffer:withRange:)]
unsafe fn executeCommandsInBuffer_withRange(
&self,
indirect_command_buffer: &ProtocolObject<dyn MTLIndirectCommandBuffer>,
execution_range: NSRange,
);
#[cfg(all(
feature = "MTLBuffer",
feature = "MTLIndirectCommandBuffer",
feature = "MTLResource"
))]
#[method(executeCommandsInBuffer:indirectBuffer:indirectBufferOffset:)]
unsafe fn executeCommandsInBuffer_indirectBuffer_indirectBufferOffset(
&self,
indirect_commandbuffer: &ProtocolObject<dyn MTLIndirectCommandBuffer>,
indirect_range_buffer: &ProtocolObject<dyn MTLBuffer>,
indirect_buffer_offset: NSUInteger,
);
#[method(memoryBarrierWithScope:afterStages:beforeStages:)]
unsafe fn memoryBarrierWithScope_afterStages_beforeStages(
&self,
scope: MTLBarrierScope,
after: MTLRenderStages,
before: MTLRenderStages,
);
#[cfg(feature = "MTLResource")]
#[method(memoryBarrierWithResources:count:afterStages:beforeStages:)]
unsafe fn memoryBarrierWithResources_count_afterStages_beforeStages(
&self,
resources: NonNull<NonNull<ProtocolObject<dyn MTLResource>>>,
count: NSUInteger,
after: MTLRenderStages,
before: MTLRenderStages,
);
#[cfg(feature = "MTLCounters")]
#[method(sampleCountersInBuffer:atSampleIndex:withBarrier:)]
unsafe fn sampleCountersInBuffer_atSampleIndex_withBarrier(
&self,
sample_buffer: &ProtocolObject<dyn MTLCounterSampleBuffer>,
sample_index: NSUInteger,
barrier: bool,
);
}
#[cfg(feature = "MTLCommandEncoder")]
unsafe impl ProtocolType for dyn MTLRenderCommandEncoder {}
);