spb/forge Public MIT
Forge — LLM training from scratch in pure C++20 + Metal on Apple Silicon.
C++ 61.2%
C 23%
Python 7.6%
TeX 7.2%
CMake 1.1%
1//-------------------------------------------------------------------------------------------------------------------------------------------------------------2//3// Metal/MTL4RenderPipeline.hpp4//5// Copyright 2020-2025 Apple Inc.6//7// Licensed under the Apache License, Version 2.0 (the "License");8// you may not use this file except in compliance with the License.9// You may obtain a copy of the License at10//11// http://www.apache.org/licenses/LICENSE-2.012//13// Unless required by applicable law or agreed to in writing, software14// distributed under the License is distributed on an "AS IS" BASIS,15// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.16// See the License for the specific language governing permissions and17// limitations under the License.18//19//-------------------------------------------------------------------------------------------------------------------------------------------------------------2021#pragma once2223#include "../Foundation/Foundation.hpp"24#include "MTL4PipelineState.hpp"25#include "MTLDefines.hpp"26#include "MTLHeaderBridge.hpp"27#include "MTLPixelFormat.hpp"28#include "MTLPrivate.hpp"29#include "MTLRenderPipeline.hpp"3031namespace MTL432{33class FunctionDescriptor;34class RenderPipelineBinaryFunctionsDescriptor;35class RenderPipelineColorAttachmentDescriptor;36class RenderPipelineColorAttachmentDescriptorArray;37class RenderPipelineDescriptor;38class StaticLinkingDescriptor;39}4041namespace MTL42{43class VertexDescriptor;44}4546namespace MTL447{48_MTL_ENUM(NS::Integer, LogicalToPhysicalColorAttachmentMappingState) {49 LogicalToPhysicalColorAttachmentMappingStateIdentity = 0,50 LogicalToPhysicalColorAttachmentMappingStateInherited = 1,51};5253class RenderPipelineColorAttachmentDescriptor : public NS::Copying<RenderPipelineColorAttachmentDescriptor>54{55public:56 static RenderPipelineColorAttachmentDescriptor* alloc();5758 MTL::BlendOperation alphaBlendOperation() const;5960 BlendState blendingState() const;6162 MTL::BlendFactor destinationAlphaBlendFactor() const;6364 MTL::BlendFactor destinationRGBBlendFactor() const;6566 RenderPipelineColorAttachmentDescriptor* init();6768 MTL::PixelFormat pixelFormat() const;6970 void reset();7172 MTL::BlendOperation rgbBlendOperation() const;7374 void setAlphaBlendOperation(MTL::BlendOperation alphaBlendOperation);7576 void setBlendingState(MTL4::BlendState blendingState);7778 void setDestinationAlphaBlendFactor(MTL::BlendFactor destinationAlphaBlendFactor);7980 void setDestinationRGBBlendFactor(MTL::BlendFactor destinationRGBBlendFactor);8182 void setPixelFormat(MTL::PixelFormat pixelFormat);8384 void setRgbBlendOperation(MTL::BlendOperation rgbBlendOperation);8586 void setSourceAlphaBlendFactor(MTL::BlendFactor sourceAlphaBlendFactor);8788 void setSourceRGBBlendFactor(MTL::BlendFactor sourceRGBBlendFactor);8990 void setWriteMask(MTL::ColorWriteMask writeMask);9192 MTL::BlendFactor sourceAlphaBlendFactor() const;9394 MTL::BlendFactor sourceRGBBlendFactor() const;9596 MTL::ColorWriteMask writeMask() const;97};9899class RenderPipelineColorAttachmentDescriptorArray : public NS::Copying<RenderPipelineColorAttachmentDescriptorArray>100{101public:102 static RenderPipelineColorAttachmentDescriptorArray* alloc();103104 RenderPipelineColorAttachmentDescriptorArray* init();105106 RenderPipelineColorAttachmentDescriptor* object(NS::UInteger attachmentIndex);107108 void reset();109110 void setObject(const MTL4::RenderPipelineColorAttachmentDescriptor* attachment, NS::UInteger attachmentIndex);111};112113class RenderPipelineBinaryFunctionsDescriptor : public NS::Copying<RenderPipelineBinaryFunctionsDescriptor>114{115public:116 static RenderPipelineBinaryFunctionsDescriptor* alloc();117118 NS::Array* fragmentAdditionalBinaryFunctions() const;119120 RenderPipelineBinaryFunctionsDescriptor* init();121122 NS::Array* meshAdditionalBinaryFunctions() const;123124 NS::Array* objectAdditionalBinaryFunctions() const;125126 void reset();127128 void setFragmentAdditionalBinaryFunctions(const NS::Array* fragmentAdditionalBinaryFunctions);129130 void setMeshAdditionalBinaryFunctions(const NS::Array* meshAdditionalBinaryFunctions);131132 void setObjectAdditionalBinaryFunctions(const NS::Array* objectAdditionalBinaryFunctions);133134 void setTileAdditionalBinaryFunctions(const NS::Array* tileAdditionalBinaryFunctions);135136 void setVertexAdditionalBinaryFunctions(const NS::Array* vertexAdditionalBinaryFunctions);137138 NS::Array* tileAdditionalBinaryFunctions() const;139140 NS::Array* vertexAdditionalBinaryFunctions() const;141};142143class RenderPipelineDescriptor : public NS::Copying<RenderPipelineDescriptor, PipelineDescriptor>144{145public:146 static RenderPipelineDescriptor* alloc();147148 AlphaToCoverageState alphaToCoverageState() const;149150 AlphaToOneState alphaToOneState() const;151152 LogicalToPhysicalColorAttachmentMappingState colorAttachmentMappingState() const;153154 RenderPipelineColorAttachmentDescriptorArray* colorAttachments() const;155156 FunctionDescriptor* fragmentFunctionDescriptor() const;157158 StaticLinkingDescriptor* fragmentStaticLinkingDescriptor() const;159160 RenderPipelineDescriptor* init();161162 MTL::PrimitiveTopologyClass inputPrimitiveTopology() const;163164 bool isRasterizationEnabled() const;165166 NS::UInteger maxVertexAmplificationCount() const;167168 NS::UInteger rasterSampleCount() const;169170 [[deprecated("please use isRasterizationEnabled instead")]]171 bool rasterizationEnabled() const;172173 void reset();174175 void setAlphaToCoverageState(MTL4::AlphaToCoverageState alphaToCoverageState);176177 void setAlphaToOneState(MTL4::AlphaToOneState alphaToOneState);178179 void setColorAttachmentMappingState(MTL4::LogicalToPhysicalColorAttachmentMappingState colorAttachmentMappingState);180181 void setFragmentFunctionDescriptor(const MTL4::FunctionDescriptor* fragmentFunctionDescriptor);182183 void setFragmentStaticLinkingDescriptor(const MTL4::StaticLinkingDescriptor* fragmentStaticLinkingDescriptor);184185 void setInputPrimitiveTopology(MTL::PrimitiveTopologyClass inputPrimitiveTopology);186187 void setMaxVertexAmplificationCount(NS::UInteger maxVertexAmplificationCount);188189 void setRasterSampleCount(NS::UInteger rasterSampleCount);190191 void setRasterizationEnabled(bool rasterizationEnabled);192193 void setSupportFragmentBinaryLinking(bool supportFragmentBinaryLinking);194195 void setSupportIndirectCommandBuffers(MTL4::IndirectCommandBufferSupportState supportIndirectCommandBuffers);196197 void setSupportVertexBinaryLinking(bool supportVertexBinaryLinking);198199 void setVertexDescriptor(const MTL::VertexDescriptor* vertexDescriptor);200201 void setVertexFunctionDescriptor(const MTL4::FunctionDescriptor* vertexFunctionDescriptor);202203 void setVertexStaticLinkingDescriptor(const MTL4::StaticLinkingDescriptor* vertexStaticLinkingDescriptor);204205 bool supportFragmentBinaryLinking() const;206207 IndirectCommandBufferSupportState supportIndirectCommandBuffers() const;208209 bool supportVertexBinaryLinking() const;210211 MTL::VertexDescriptor* vertexDescriptor() const;212213 FunctionDescriptor* vertexFunctionDescriptor() const;214215 StaticLinkingDescriptor* vertexStaticLinkingDescriptor() const;216};217218}219_MTL_INLINE MTL4::RenderPipelineColorAttachmentDescriptor* MTL4::RenderPipelineColorAttachmentDescriptor::alloc()220{221 return NS::Object::alloc<MTL4::RenderPipelineColorAttachmentDescriptor>(_MTL_PRIVATE_CLS(MTL4RenderPipelineColorAttachmentDescriptor));222}223224_MTL_INLINE MTL::BlendOperation MTL4::RenderPipelineColorAttachmentDescriptor::alphaBlendOperation() const225{226 return Object::sendMessage<MTL::BlendOperation>(this, _MTL_PRIVATE_SEL(alphaBlendOperation));227}228229_MTL_INLINE MTL4::BlendState MTL4::RenderPipelineColorAttachmentDescriptor::blendingState() const230{231 return Object::sendMessage<MTL4::BlendState>(this, _MTL_PRIVATE_SEL(blendingState));232}233234_MTL_INLINE MTL::BlendFactor MTL4::RenderPipelineColorAttachmentDescriptor::destinationAlphaBlendFactor() const235{236 return Object::sendMessage<MTL::BlendFactor>(this, _MTL_PRIVATE_SEL(destinationAlphaBlendFactor));237}238239_MTL_INLINE MTL::BlendFactor MTL4::RenderPipelineColorAttachmentDescriptor::destinationRGBBlendFactor() const240{241 return Object::sendMessage<MTL::BlendFactor>(this, _MTL_PRIVATE_SEL(destinationRGBBlendFactor));242}243244_MTL_INLINE MTL4::RenderPipelineColorAttachmentDescriptor* MTL4::RenderPipelineColorAttachmentDescriptor::init()245{246 return NS::Object::init<MTL4::RenderPipelineColorAttachmentDescriptor>();247}248249_MTL_INLINE MTL::PixelFormat MTL4::RenderPipelineColorAttachmentDescriptor::pixelFormat() const250{251 return Object::sendMessage<MTL::PixelFormat>(this, _MTL_PRIVATE_SEL(pixelFormat));252}253254_MTL_INLINE void MTL4::RenderPipelineColorAttachmentDescriptor::reset()255{256 Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(reset));257}258259_MTL_INLINE MTL::BlendOperation MTL4::RenderPipelineColorAttachmentDescriptor::rgbBlendOperation() const260{261 return Object::sendMessage<MTL::BlendOperation>(this, _MTL_PRIVATE_SEL(rgbBlendOperation));262}263264_MTL_INLINE void MTL4::RenderPipelineColorAttachmentDescriptor::setAlphaBlendOperation(MTL::BlendOperation alphaBlendOperation)265{266 Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setAlphaBlendOperation_), alphaBlendOperation);267}268269_MTL_INLINE void MTL4::RenderPipelineColorAttachmentDescriptor::setBlendingState(MTL4::BlendState blendingState)270{271 Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setBlendingState_), blendingState);272}273274_MTL_INLINE void MTL4::RenderPipelineColorAttachmentDescriptor::setDestinationAlphaBlendFactor(MTL::BlendFactor destinationAlphaBlendFactor)275{276 Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setDestinationAlphaBlendFactor_), destinationAlphaBlendFactor);277}278279_MTL_INLINE void MTL4::RenderPipelineColorAttachmentDescriptor::setDestinationRGBBlendFactor(MTL::BlendFactor destinationRGBBlendFactor)280{281 Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setDestinationRGBBlendFactor_), destinationRGBBlendFactor);282}283284_MTL_INLINE void MTL4::RenderPipelineColorAttachmentDescriptor::setPixelFormat(MTL::PixelFormat pixelFormat)285{286 Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setPixelFormat_), pixelFormat);287}288289_MTL_INLINE void MTL4::RenderPipelineColorAttachmentDescriptor::setRgbBlendOperation(MTL::BlendOperation rgbBlendOperation)290{291 Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setRgbBlendOperation_), rgbBlendOperation);292}293294_MTL_INLINE void MTL4::RenderPipelineColorAttachmentDescriptor::setSourceAlphaBlendFactor(MTL::BlendFactor sourceAlphaBlendFactor)295{296 Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setSourceAlphaBlendFactor_), sourceAlphaBlendFactor);297}298299_MTL_INLINE void MTL4::RenderPipelineColorAttachmentDescriptor::setSourceRGBBlendFactor(MTL::BlendFactor sourceRGBBlendFactor)300{301 Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setSourceRGBBlendFactor_), sourceRGBBlendFactor);302}303304_MTL_INLINE void MTL4::RenderPipelineColorAttachmentDescriptor::setWriteMask(MTL::ColorWriteMask writeMask)305{306 Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setWriteMask_), writeMask);307}308309_MTL_INLINE MTL::BlendFactor MTL4::RenderPipelineColorAttachmentDescriptor::sourceAlphaBlendFactor() const310{311 return Object::sendMessage<MTL::BlendFactor>(this, _MTL_PRIVATE_SEL(sourceAlphaBlendFactor));312}313314_MTL_INLINE MTL::BlendFactor MTL4::RenderPipelineColorAttachmentDescriptor::sourceRGBBlendFactor() const315{316 return Object::sendMessage<MTL::BlendFactor>(this, _MTL_PRIVATE_SEL(sourceRGBBlendFactor));317}318319_MTL_INLINE MTL::ColorWriteMask MTL4::RenderPipelineColorAttachmentDescriptor::writeMask() const320{321 return Object::sendMessage<MTL::ColorWriteMask>(this, _MTL_PRIVATE_SEL(writeMask));322}323324_MTL_INLINE MTL4::RenderPipelineColorAttachmentDescriptorArray* MTL4::RenderPipelineColorAttachmentDescriptorArray::alloc()325{326 return NS::Object::alloc<MTL4::RenderPipelineColorAttachmentDescriptorArray>(_MTL_PRIVATE_CLS(MTL4RenderPipelineColorAttachmentDescriptorArray));327}328329_MTL_INLINE MTL4::RenderPipelineColorAttachmentDescriptorArray* MTL4::RenderPipelineColorAttachmentDescriptorArray::init()330{331 return NS::Object::init<MTL4::RenderPipelineColorAttachmentDescriptorArray>();332}333334_MTL_INLINE MTL4::RenderPipelineColorAttachmentDescriptor* MTL4::RenderPipelineColorAttachmentDescriptorArray::object(NS::UInteger attachmentIndex)335{336 return Object::sendMessage<MTL4::RenderPipelineColorAttachmentDescriptor*>(this, _MTL_PRIVATE_SEL(objectAtIndexedSubscript_), attachmentIndex);337}338339_MTL_INLINE void MTL4::RenderPipelineColorAttachmentDescriptorArray::reset()340{341 Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(reset));342}343344_MTL_INLINE void MTL4::RenderPipelineColorAttachmentDescriptorArray::setObject(const MTL4::RenderPipelineColorAttachmentDescriptor* attachment, NS::UInteger attachmentIndex)345{346 Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setObject_atIndexedSubscript_), attachment, attachmentIndex);347}348349_MTL_INLINE MTL4::RenderPipelineBinaryFunctionsDescriptor* MTL4::RenderPipelineBinaryFunctionsDescriptor::alloc()350{351 return NS::Object::alloc<MTL4::RenderPipelineBinaryFunctionsDescriptor>(_MTL_PRIVATE_CLS(MTL4RenderPipelineBinaryFunctionsDescriptor));352}353354_MTL_INLINE NS::Array* MTL4::RenderPipelineBinaryFunctionsDescriptor::fragmentAdditionalBinaryFunctions() const355{356 return Object::sendMessage<NS::Array*>(this, _MTL_PRIVATE_SEL(fragmentAdditionalBinaryFunctions));357}358359_MTL_INLINE MTL4::RenderPipelineBinaryFunctionsDescriptor* MTL4::RenderPipelineBinaryFunctionsDescriptor::init()360{361 return NS::Object::init<MTL4::RenderPipelineBinaryFunctionsDescriptor>();362}363364_MTL_INLINE NS::Array* MTL4::RenderPipelineBinaryFunctionsDescriptor::meshAdditionalBinaryFunctions() const365{366 return Object::sendMessage<NS::Array*>(this, _MTL_PRIVATE_SEL(meshAdditionalBinaryFunctions));367}368369_MTL_INLINE NS::Array* MTL4::RenderPipelineBinaryFunctionsDescriptor::objectAdditionalBinaryFunctions() const370{371 return Object::sendMessage<NS::Array*>(this, _MTL_PRIVATE_SEL(objectAdditionalBinaryFunctions));372}373374_MTL_INLINE void MTL4::RenderPipelineBinaryFunctionsDescriptor::reset()375{376 Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(reset));377}378379_MTL_INLINE void MTL4::RenderPipelineBinaryFunctionsDescriptor::setFragmentAdditionalBinaryFunctions(const NS::Array* fragmentAdditionalBinaryFunctions)380{381 Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setFragmentAdditionalBinaryFunctions_), fragmentAdditionalBinaryFunctions);382}383384_MTL_INLINE void MTL4::RenderPipelineBinaryFunctionsDescriptor::setMeshAdditionalBinaryFunctions(const NS::Array* meshAdditionalBinaryFunctions)385{386 Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setMeshAdditionalBinaryFunctions_), meshAdditionalBinaryFunctions);387}388389_MTL_INLINE void MTL4::RenderPipelineBinaryFunctionsDescriptor::setObjectAdditionalBinaryFunctions(const NS::Array* objectAdditionalBinaryFunctions)390{391 Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setObjectAdditionalBinaryFunctions_), objectAdditionalBinaryFunctions);392}393394_MTL_INLINE void MTL4::RenderPipelineBinaryFunctionsDescriptor::setTileAdditionalBinaryFunctions(const NS::Array* tileAdditionalBinaryFunctions)395{396 Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setTileAdditionalBinaryFunctions_), tileAdditionalBinaryFunctions);397}398399_MTL_INLINE void MTL4::RenderPipelineBinaryFunctionsDescriptor::setVertexAdditionalBinaryFunctions(const NS::Array* vertexAdditionalBinaryFunctions)400{401 Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setVertexAdditionalBinaryFunctions_), vertexAdditionalBinaryFunctions);402}403404_MTL_INLINE NS::Array* MTL4::RenderPipelineBinaryFunctionsDescriptor::tileAdditionalBinaryFunctions() const405{406 return Object::sendMessage<NS::Array*>(this, _MTL_PRIVATE_SEL(tileAdditionalBinaryFunctions));407}408409_MTL_INLINE NS::Array* MTL4::RenderPipelineBinaryFunctionsDescriptor::vertexAdditionalBinaryFunctions() const410{411 return Object::sendMessage<NS::Array*>(this, _MTL_PRIVATE_SEL(vertexAdditionalBinaryFunctions));412}413414_MTL_INLINE MTL4::RenderPipelineDescriptor* MTL4::RenderPipelineDescriptor::alloc()415{416 return NS::Object::alloc<MTL4::RenderPipelineDescriptor>(_MTL_PRIVATE_CLS(MTL4RenderPipelineDescriptor));417}418419_MTL_INLINE MTL4::AlphaToCoverageState MTL4::RenderPipelineDescriptor::alphaToCoverageState() const420{421 return Object::sendMessage<MTL4::AlphaToCoverageState>(this, _MTL_PRIVATE_SEL(alphaToCoverageState));422}423424_MTL_INLINE MTL4::AlphaToOneState MTL4::RenderPipelineDescriptor::alphaToOneState() const425{426 return Object::sendMessage<MTL4::AlphaToOneState>(this, _MTL_PRIVATE_SEL(alphaToOneState));427}428429_MTL_INLINE MTL4::LogicalToPhysicalColorAttachmentMappingState MTL4::RenderPipelineDescriptor::colorAttachmentMappingState() const430{431 return Object::sendMessage<MTL4::LogicalToPhysicalColorAttachmentMappingState>(this, _MTL_PRIVATE_SEL(colorAttachmentMappingState));432}433434_MTL_INLINE MTL4::RenderPipelineColorAttachmentDescriptorArray* MTL4::RenderPipelineDescriptor::colorAttachments() const435{436 return Object::sendMessage<MTL4::RenderPipelineColorAttachmentDescriptorArray*>(this, _MTL_PRIVATE_SEL(colorAttachments));437}438439_MTL_INLINE MTL4::FunctionDescriptor* MTL4::RenderPipelineDescriptor::fragmentFunctionDescriptor() const440{441 return Object::sendMessage<MTL4::FunctionDescriptor*>(this, _MTL_PRIVATE_SEL(fragmentFunctionDescriptor));442}443444_MTL_INLINE MTL4::StaticLinkingDescriptor* MTL4::RenderPipelineDescriptor::fragmentStaticLinkingDescriptor() const445{446 return Object::sendMessage<MTL4::StaticLinkingDescriptor*>(this, _MTL_PRIVATE_SEL(fragmentStaticLinkingDescriptor));447}448449_MTL_INLINE MTL4::RenderPipelineDescriptor* MTL4::RenderPipelineDescriptor::init()450{451 return NS::Object::init<MTL4::RenderPipelineDescriptor>();452}453454_MTL_INLINE MTL::PrimitiveTopologyClass MTL4::RenderPipelineDescriptor::inputPrimitiveTopology() const455{456 return Object::sendMessage<MTL::PrimitiveTopologyClass>(this, _MTL_PRIVATE_SEL(inputPrimitiveTopology));457}458459_MTL_INLINE bool MTL4::RenderPipelineDescriptor::isRasterizationEnabled() const460{461 return Object::sendMessage<bool>(this, _MTL_PRIVATE_SEL(isRasterizationEnabled));462}463464_MTL_INLINE NS::UInteger MTL4::RenderPipelineDescriptor::maxVertexAmplificationCount() const465{466 return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(maxVertexAmplificationCount));467}468469_MTL_INLINE NS::UInteger MTL4::RenderPipelineDescriptor::rasterSampleCount() const470{471 return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(rasterSampleCount));472}473474_MTL_INLINE bool MTL4::RenderPipelineDescriptor::rasterizationEnabled() const475{476 return Object::sendMessage<bool>(this, _MTL_PRIVATE_SEL(isRasterizationEnabled));477}478479_MTL_INLINE void MTL4::RenderPipelineDescriptor::reset()480{481 Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(reset));482}483484_MTL_INLINE void MTL4::RenderPipelineDescriptor::setAlphaToCoverageState(MTL4::AlphaToCoverageState alphaToCoverageState)485{486 Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setAlphaToCoverageState_), alphaToCoverageState);487}488489_MTL_INLINE void MTL4::RenderPipelineDescriptor::setAlphaToOneState(MTL4::AlphaToOneState alphaToOneState)490{491 Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setAlphaToOneState_), alphaToOneState);492}493494_MTL_INLINE void MTL4::RenderPipelineDescriptor::setColorAttachmentMappingState(MTL4::LogicalToPhysicalColorAttachmentMappingState colorAttachmentMappingState)495{496 Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setColorAttachmentMappingState_), colorAttachmentMappingState);497}498499_MTL_INLINE void MTL4::RenderPipelineDescriptor::setFragmentFunctionDescriptor(const MTL4::FunctionDescriptor* fragmentFunctionDescriptor)500{501 Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setFragmentFunctionDescriptor_), fragmentFunctionDescriptor);502}503504_MTL_INLINE void MTL4::RenderPipelineDescriptor::setFragmentStaticLinkingDescriptor(const MTL4::StaticLinkingDescriptor* fragmentStaticLinkingDescriptor)505{506 Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setFragmentStaticLinkingDescriptor_), fragmentStaticLinkingDescriptor);507}508509_MTL_INLINE void MTL4::RenderPipelineDescriptor::setInputPrimitiveTopology(MTL::PrimitiveTopologyClass inputPrimitiveTopology)510{511 Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setInputPrimitiveTopology_), inputPrimitiveTopology);512}513514_MTL_INLINE void MTL4::RenderPipelineDescriptor::setMaxVertexAmplificationCount(NS::UInteger maxVertexAmplificationCount)515{516 Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setMaxVertexAmplificationCount_), maxVertexAmplificationCount);517}518519_MTL_INLINE void MTL4::RenderPipelineDescriptor::setRasterSampleCount(NS::UInteger rasterSampleCount)520{521 Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setRasterSampleCount_), rasterSampleCount);522}523524_MTL_INLINE void MTL4::RenderPipelineDescriptor::setRasterizationEnabled(bool rasterizationEnabled)525{526 Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setRasterizationEnabled_), rasterizationEnabled);527}528529_MTL_INLINE void MTL4::RenderPipelineDescriptor::setSupportFragmentBinaryLinking(bool supportFragmentBinaryLinking)530{531 Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setSupportFragmentBinaryLinking_), supportFragmentBinaryLinking);532}533534_MTL_INLINE void MTL4::RenderPipelineDescriptor::setSupportIndirectCommandBuffers(MTL4::IndirectCommandBufferSupportState supportIndirectCommandBuffers)535{536 Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setSupportIndirectCommandBuffers_), supportIndirectCommandBuffers);537}538539_MTL_INLINE void MTL4::RenderPipelineDescriptor::setSupportVertexBinaryLinking(bool supportVertexBinaryLinking)540{541 Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setSupportVertexBinaryLinking_), supportVertexBinaryLinking);542}543544_MTL_INLINE void MTL4::RenderPipelineDescriptor::setVertexDescriptor(const MTL::VertexDescriptor* vertexDescriptor)545{546 Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setVertexDescriptor_), vertexDescriptor);547}548549_MTL_INLINE void MTL4::RenderPipelineDescriptor::setVertexFunctionDescriptor(const MTL4::FunctionDescriptor* vertexFunctionDescriptor)550{551 Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setVertexFunctionDescriptor_), vertexFunctionDescriptor);552}553554_MTL_INLINE void MTL4::RenderPipelineDescriptor::setVertexStaticLinkingDescriptor(const MTL4::StaticLinkingDescriptor* vertexStaticLinkingDescriptor)555{556 Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setVertexStaticLinkingDescriptor_), vertexStaticLinkingDescriptor);557}558559_MTL_INLINE bool MTL4::RenderPipelineDescriptor::supportFragmentBinaryLinking() const560{561 return Object::sendMessageSafe<bool>(this, _MTL_PRIVATE_SEL(supportFragmentBinaryLinking));562}563564_MTL_INLINE MTL4::IndirectCommandBufferSupportState MTL4::RenderPipelineDescriptor::supportIndirectCommandBuffers() const565{566 return Object::sendMessage<MTL4::IndirectCommandBufferSupportState>(this, _MTL_PRIVATE_SEL(supportIndirectCommandBuffers));567}568569_MTL_INLINE bool MTL4::RenderPipelineDescriptor::supportVertexBinaryLinking() const570{571 return Object::sendMessageSafe<bool>(this, _MTL_PRIVATE_SEL(supportVertexBinaryLinking));572}573574_MTL_INLINE MTL::VertexDescriptor* MTL4::RenderPipelineDescriptor::vertexDescriptor() const575{576 return Object::sendMessage<MTL::VertexDescriptor*>(this, _MTL_PRIVATE_SEL(vertexDescriptor));577}578579_MTL_INLINE MTL4::FunctionDescriptor* MTL4::RenderPipelineDescriptor::vertexFunctionDescriptor() const580{581 return Object::sendMessage<MTL4::FunctionDescriptor*>(this, _MTL_PRIVATE_SEL(vertexFunctionDescriptor));582}583584_MTL_INLINE MTL4::StaticLinkingDescriptor* MTL4::RenderPipelineDescriptor::vertexStaticLinkingDescriptor() const585{586 return Object::sendMessage<MTL4::StaticLinkingDescriptor*>(this, _MTL_PRIVATE_SEL(vertexStaticLinkingDescriptor));587}588