SPB Git

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%
31.5 KB · 561 lines cpp
Raw Blame History
1//-------------------------------------------------------------------------------------------------------------------------------------------------------------2//3// MetalFX/MTLFXPrivate.hpp4//5// Copyright 2020-2024 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//-------------------------------------------------------------------------------------------------------------------------------------------------------------2425#include "MTLFXDefines.hpp"2627#include <objc/runtime.h>2829//-------------------------------------------------------------------------------------------------------------------------------------------------------------3031#define _MTLFX_PRIVATE_CLS( symbol )                    ( MTLFX::Private::Class::s_k##symbol )32#define _MTLFX_PRIVATE_SEL( accessor )                  ( MTLFX::Private::Selector::s_k##accessor )3334//-------------------------------------------------------------------------------------------------------------------------------------------------------------3536#if defined( MTLFX_PRIVATE_IMPLEMENTATION )3738#if defined( METALCPP_SYMBOL_VISIBILITY_HIDDEN )39#define _MTLFX_PRIVATE_VISIBILITY                       __attribute__( ( visibility("hidden" ) ) )40#else41#define _MTLFX_PRIVATE_VISIBILITY                       __attribute__( ( visibility("default" ) ) )42#endif // METALCPP_SYMBOL_VISIBILITY_HIDDEN4344#define _MTLFX_PRIVATE_IMPORT                           __attribute__( ( weak_import ) )4546#ifdef __OBJC__47#define _MTLFX_PRIVATE_OBJC_LOOKUP_CLASS( symbol )      ( ( __bridge void* ) objc_lookUpClass( #symbol ) )48#define _MTLFX_PRIVATE_OBJC_GET_PROTOCOL( symbol )      ( ( __bridge void* ) objc_getProtocol( #symbol ) )49#else50#define _MTLFX_PRIVATE_OBJC_LOOKUP_CLASS( symbol )      objc_lookUpClass(#symbol)51#define _MTLFX_PRIVATE_OBJC_GET_PROTOCOL( symbol )      objc_getProtocol(#symbol)52#endif // __OBJC__5354#define _MTLFX_PRIVATE_DEF_CLS( symbol )                void* s_k##symbol _MTLFX_PRIVATE_VISIBILITY = _MTLFX_PRIVATE_OBJC_LOOKUP_CLASS( symbol )55#define _MTLFX_PRIVATE_DEF_PRO( symbol )                void* s_k##symbol _MTLFX_PRIVATE_VISIBILITY = _MTLFX_PRIVATE_OBJC_GET_PROTOCOL( symbol )56#define _MTLFX_PRIVATE_DEF_SEL( accessor, symbol )       SEL s_k##accessor _MTLFX_PRIVATE_VISIBILITY = sel_registerName( symbol )5758#include <dlfcn.h>59#define MTLFX_DEF_FUNC( name, signature )               using Fn##name = signature; \60                                                        Fn##name name = reinterpret_cast< Fn##name >( dlsym( RTLD_DEFAULT, #name ) )6162namespace MTLFX::Private63{64    template <typename _Type>6566    inline _Type const LoadSymbol(const char* pSymbol)67    {68        const _Type* pAddress = static_cast<_Type*>(dlsym(RTLD_DEFAULT, pSymbol));6970        return pAddress ? *pAddress : nullptr;71    }72} // MTLFX::Private7374#if defined(__MAC_26_0) || defined(__IPHONE_26_0) || defined(__TVOS_26_0)7576#define _MTLFX_PRIVATE_DEF_STR( type, symbol )                                                                                  \77    _MTLFX_EXTERN type const                            MTLFX##symbol _MTLFX_PRIVATE_IMPORT;                                    \78    type const                                          MTLFX::symbol = ( nullptr != &MTLFX##symbol ) ? MTLFX##ssymbol : nullptr7980#define _MTLFX_PRIVATE_DEF_CONST( type, symbol )                                                                                \81    _MTLFX_EXTERN type const                            MTLFX##ssymbol _MTLFX_PRIVATE_IMPORT;                                   \82    type const                                          MTLFX::symbol = (nullptr != &MTLFX##ssymbol) ? MTLFX##ssymbol : nullptr8384#define _MTLFX_PRIVATE_DEF_WEAK_CONST( type, symbol )                                                                           \85    _MTLFX_EXTERN type const                            MTLFX##ssymbol;                                                         \86    type const                                          MTLFX::symbol = Private::LoadSymbol< type >( "MTLFX" #symbol )8788#else8990#define _MTLFX_PRIVATE_DEF_STR( type, symbol )                                                                                  \91    _MTLFX_EXTERN type const                            MTLFX##ssymbol;                                                         \92    type const                                          MTLFX::symbol = Private::LoadSymbol< type >( "MTLFX" #symbol )9394#define _MTLFX_PRIVATE_DEF_CONST( type, symbol )                                                                                \95    _MTLFX_EXTERN type const                            MTLFX##ssymbol;                                                         \96    type const                                          MTLFX::symbol = Private::LoadSymbol< type >( "MTLFX" #symbol )9798#define _MTLFX_PRIVATE_DEF_WEAK_CONST( type, symbol )   _MTLFX_PRIVATE_DEF_CONST( type, symbol )99100#endif101102#else103104#define _MTLFX_PRIVATE_DEF_CLS( symbol )                extern void* s_k##symbol105#define _MTLFX_PRIVATE_DEF_PRO( symbol )                extern void* s_k##symbol106#define _MTLFX_PRIVATE_DEF_SEL( accessor, symbol )      extern SEL s_k##accessor107#define _MTLFX_PRIVATE_DEF_STR( type, symbol )          extern type const MTLFX::symbol108#define _MTLFX_PRIVATE_DEF_CONST( type, symbol )        extern type const MTLFX::symbol109#define _MTLFX_PRIVATE_DEF_WEAK_CONST( type, symbol )   extern type const MTLFX::symbol110111#endif // MTLFX_PRIVATE_IMPLEMENTATION112113//-------------------------------------------------------------------------------------------------------------------------------------------------------------114115namespace MTLFX116{117    namespace Private118    {119        namespace Class120        {121            _MTLFX_PRIVATE_DEF_CLS( MTLFXSpatialScalerDescriptor );122            _MTLFX_PRIVATE_DEF_CLS( MTLFXTemporalScalerDescriptor );123            _MTLFX_PRIVATE_DEF_CLS( MTLFXFrameInterpolatorDescriptor );124            _MTLFX_PRIVATE_DEF_CLS( MTLFXTemporalDenoisedScalerDescriptor );125126            _MTLFX_PRIVATE_DEF_CLS( MTL4FXSpatialScalerDescriptor );127            _MTLFX_PRIVATE_DEF_CLS( MTL4FXTemporalScalerDescriptor );128            _MTLFX_PRIVATE_DEF_CLS( MTL4FXFrameInterpolatorDescriptor );129            _MTLFX_PRIVATE_DEF_CLS( MTL4FXTemporalDenoisedScalerDescriptor );130        } // Class131    } // Private132} // MTLFX133134//-------------------------------------------------------------------------------------------------------------------------------------------------------------135136namespace MTLFX137{138    namespace Private139    {140        namespace Protocol141        {142            _MTLFX_PRIVATE_DEF_PRO( MTLFXSpatialScaler );143            _MTLFX_PRIVATE_DEF_PRO( MTLFXTemporalScaler );144        } // Protocol145    } // Private146} // MTLFX147148//-------------------------------------------------------------------------------------------------------------------------------------------------------------149150namespace MTLFX151{152    namespace Private153    {154        namespace Selector155        {156            _MTLFX_PRIVATE_DEF_SEL( aspectRatio,157                                    "aspectRatio" );158            _MTLFX_PRIVATE_DEF_SEL( colorProcessingMode,159                                    "colorProcessingMode" );160            _MTLFX_PRIVATE_DEF_SEL( colorContentOffsetX,161                                    "colorContentOffsetX" );162            _MTLFX_PRIVATE_DEF_SEL( colorContentOffsetY,163                                    "colorContentOffsetY" );164            _MTLFX_PRIVATE_DEF_SEL( colorTexture,165                                    "colorTexture" );166            _MTLFX_PRIVATE_DEF_SEL( colorTextureFormat,167                                    "colorTextureFormat" );168            _MTLFX_PRIVATE_DEF_SEL( colorTextureUsage,169                                    "colorTextureUsage" );170            _MTLFX_PRIVATE_DEF_SEL( contentHeight,171                                    "contentHeight" );172            _MTLFX_PRIVATE_DEF_SEL( contentWidth,173                                    "contentWidth" );174            _MTLFX_PRIVATE_DEF_SEL( deltaTime,175                                    "deltaTime" );176            _MTLFX_PRIVATE_DEF_SEL( denoiseStrengthMaskTexture,177                                    "denoiseStrengthMaskTexture" );178            _MTLFX_PRIVATE_DEF_SEL( denoiseStrengthMaskTextureFormat,179                                    "denoiseStrengthMaskTextureFormat" );180            _MTLFX_PRIVATE_DEF_SEL( denoiseStrengthMaskTextureUsage,181                                    "denoiseStrengthMaskTextureUsage" );182            _MTLFX_PRIVATE_DEF_SEL( depthTexture,183                                    "depthTexture" );184            _MTLFX_PRIVATE_DEF_SEL( depthContentOffsetX,185                                    "depthContentOffsetX" );186            _MTLFX_PRIVATE_DEF_SEL( depthContentOffsetY,187                                    "depthContentOffsetY" );188            _MTLFX_PRIVATE_DEF_SEL( depthTextureFormat,189                                    "depthTextureFormat" );190            _MTLFX_PRIVATE_DEF_SEL( depthTextureUsage,191                                    "depthTextureUsage" );192            _MTLFX_PRIVATE_DEF_SEL( diffuseAlbedoTexture,193                                    "diffuseAlbedoTexture" );194            _MTLFX_PRIVATE_DEF_SEL( diffuseAlbedoTextureFormat,195                                    "diffuseAlbedoTextureFormat" );196            _MTLFX_PRIVATE_DEF_SEL( diffuseAlbedoTextureUsage,197                                    "diffuseAlbedoTextureUsage" );198            _MTLFX_PRIVATE_DEF_SEL( distortionHeight,199                                    "distortionHeight" );200            _MTLFX_PRIVATE_DEF_SEL( distortionOffsetX,201                                    "distortionOffsetX" );202            _MTLFX_PRIVATE_DEF_SEL( distortionOffsetY,203                                    "distortionOffsetY" );204            _MTLFX_PRIVATE_DEF_SEL( distortionTexture,205                                    "distortionTexture" );206            _MTLFX_PRIVATE_DEF_SEL( distortionWidth,207                                    "distortionWidth" );208            _MTLFX_PRIVATE_DEF_SEL( encodeToCommandBuffer_,209                                    "encodeToCommandBuffer:" );210            _MTLFX_PRIVATE_DEF_SEL( exposureTexture,211                                    "exposureTexture" );212            _MTLFX_PRIVATE_DEF_SEL( farPlane,213                                    "farPlane" );214            _MTLFX_PRIVATE_DEF_SEL( fence,215                                    "fence" );216            _MTLFX_PRIVATE_DEF_SEL( fieldOfView,217                                    "fieldOfView" );218            _MTLFX_PRIVATE_DEF_SEL( height,219                                    "height" );220            _MTLFX_PRIVATE_DEF_SEL( inputContentHeight,221                                    "inputContentHeight" );222            _MTLFX_PRIVATE_DEF_SEL( inputContentMaxScale,223                                    "inputContentMaxScale" );224            _MTLFX_PRIVATE_DEF_SEL( inputContentMinScale,225                                    "inputContentMinScale" );226            _MTLFX_PRIVATE_DEF_SEL( inputContentWidth,227                                    "inputContentWidth" );228            _MTLFX_PRIVATE_DEF_SEL( inputHeight,229                                    "inputHeight" );230            _MTLFX_PRIVATE_DEF_SEL( inputWidth,231                                    "inputWidth" );232            _MTLFX_PRIVATE_DEF_SEL( isAutoExposureEnabled,233                                    "isAutoExposureEnabled" );234            _MTLFX_PRIVATE_DEF_SEL( isDenoiseStrengthMaskTextureEnabled,235                                    "isDenoiseStrengthMaskTextureEnabled" );236            _MTLFX_PRIVATE_DEF_SEL( isDepthReversed,237                                    "isDepthReversed" );238            _MTLFX_PRIVATE_DEF_SEL( isDistortionTextureEnabled,239                                    "isDistortionTextureEnabled" );240            _MTLFX_PRIVATE_DEF_SEL( isInputContentPropertiesEnabled,241                                    "isInputContentPropertiesEnabled" );242            _MTLFX_PRIVATE_DEF_SEL( isOutputResolutionMotionVectorsEnabled,243                                    "isOutputResolutionMotionVectorsEnabled" );244            _MTLFX_PRIVATE_DEF_SEL( isTransparencyOverlayTextureEnabled,245                                    "isTransparencyOverlayTextureEnabled" );246            _MTLFX_PRIVATE_DEF_SEL( isReactiveMaskTextureEnabled,247                                    "isReactiveMaskTextureEnabled" );248            _MTLFX_PRIVATE_DEF_SEL( isSpecularHitDistanceTextureEnabled,249                                    "isSpecularHitDistanceTextureEnabled" );250            _MTLFX_PRIVATE_DEF_SEL( isUITextureComposited,251                                    "isUITextureComposited" );252            _MTLFX_PRIVATE_DEF_SEL( jitterOffsetX,253                                    "jitterOffsetX" );254            _MTLFX_PRIVATE_DEF_SEL( jitterOffsetY,255                                    "jitterOffsetY" );256            _MTLFX_PRIVATE_DEF_SEL( maskTexture,257                                    "maskTexture" );258            _MTLFX_PRIVATE_DEF_SEL( maskTextureFormat,259                                    "maskTextureFormat" );260            _MTLFX_PRIVATE_DEF_SEL( maskTextureUsage,261                                    "maskTextureUsage" );262            _MTLFX_PRIVATE_DEF_SEL( motionTexture,263                                    "motionTexture" );264            _MTLFX_PRIVATE_DEF_SEL( motionContentOffsetX,265                                    "motionContentOffsetX" );266            _MTLFX_PRIVATE_DEF_SEL( motionContentOffsetY,267                                    "motionContentOffsetY" );268            _MTLFX_PRIVATE_DEF_SEL( motionTextureFormat,269                                    "motionTextureFormat" );270            _MTLFX_PRIVATE_DEF_SEL( motionTextureUsage,271                                    "motionTextureUsage" );272            _MTLFX_PRIVATE_DEF_SEL( motionVectorScaleX,273                                    "motionVectorScaleX" );274            _MTLFX_PRIVATE_DEF_SEL( motionVectorScaleY,275                                    "motionVectorScaleY" );276            _MTLFX_PRIVATE_DEF_SEL( nearPlane,277                                    "nearPlane" );278            _MTLFX_PRIVATE_DEF_SEL( newFrameInterpolatorWithDevice_,279                                    "newFrameInterpolatorWithDevice:" );280            _MTLFX_PRIVATE_DEF_SEL( newFrameInterpolatorWithDevice_compiler_,281                                    "newFrameInterpolatorWithDevice:compiler:" );282            _MTLFX_PRIVATE_DEF_SEL( newTemporalDenoisedScalerWithDevice_,283                                    "newTemporalDenoisedScalerWithDevice:" );284            _MTLFX_PRIVATE_DEF_SEL( newTemporalDenoisedScalerWithDevice_compiler_,285                                    "newTemporalDenoisedScalerWithDevice:compiler:" );286            _MTLFX_PRIVATE_DEF_SEL( newSpatialScalerWithDevice_,287                                    "newSpatialScalerWithDevice:" );288            _MTLFX_PRIVATE_DEF_SEL( newSpatialScalerWithDevice_compiler_,289                                    "newSpatialScalerWithDevice:compiler:" );290            _MTLFX_PRIVATE_DEF_SEL( newTemporalScalerWithDevice_,291                                    "newTemporalScalerWithDevice:" );292            _MTLFX_PRIVATE_DEF_SEL( newTemporalScalerWithDevice_compiler_,293                                    "newTemporalScalerWithDevice:compiler:" );294            _MTLFX_PRIVATE_DEF_SEL( normalTexture,295                                    "normalTexture" );296            _MTLFX_PRIVATE_DEF_SEL( normalTextureFormat,297                                    "normalTextureFormat" );298            _MTLFX_PRIVATE_DEF_SEL( normalTextureUsage,299                                    "normalTextureUsage" );300            _MTLFX_PRIVATE_DEF_SEL( outputHeight,301                                    "outputHeight" );302            _MTLFX_PRIVATE_DEF_SEL( outputOffsetX,303                                    "outputOffsetX" );304            _MTLFX_PRIVATE_DEF_SEL( outputOffsetY,305                                    "outputOffsetY" );306            _MTLFX_PRIVATE_DEF_SEL( outputTexture,307                                    "outputTexture" );308            _MTLFX_PRIVATE_DEF_SEL( outputTextureFormat,309                                    "outputTextureFormat" );310            _MTLFX_PRIVATE_DEF_SEL( outputTextureUsage,311                                    "outputTextureUsage" );312            _MTLFX_PRIVATE_DEF_SEL( outputWidth,313                                    "outputWidth" );314            _MTLFX_PRIVATE_DEF_SEL( preExposure,315                                    "preExposure" );316            _MTLFX_PRIVATE_DEF_SEL( transparencyOverlayTextureFormat,317                                    "transparencyOverlayTextureFormat" );318            _MTLFX_PRIVATE_DEF_SEL( transparencyOverlayTextureUsage,319                                    "transparencyOverlayTextureUsage" );320            _MTLFX_PRIVATE_DEF_SEL( prevColorTexture,321                                    "prevColorTexture" );322            _MTLFX_PRIVATE_DEF_SEL( reactiveMaskTextureFormat,323                                    "reactiveMaskTextureFormat" );324            _MTLFX_PRIVATE_DEF_SEL( reactiveTextureUsage,325                                    "reactiveTextureUsage" );326            _MTLFX_PRIVATE_DEF_SEL( reactiveMaskTexture,327                                    "reactiveMaskTexture" );328            _MTLFX_PRIVATE_DEF_SEL( reactiveMaskTextureUsage,329                                    "reactiveMaskTextureUsage" );330            _MTLFX_PRIVATE_DEF_SEL( reactiveMaskContentOffsetX,331                                    "reactiveMaskContentOffsetX" );332            _MTLFX_PRIVATE_DEF_SEL( reactiveMaskContentOffsetY,333                                    "reactiveMaskContentOffsetY" );334            _MTLFX_PRIVATE_DEF_SEL( reset,335                                    "reset" );336            _MTLFX_PRIVATE_DEF_SEL( requiresSynchronousInitialization,337                                    "requiresSynchronousInitialization" );338            _MTLFX_PRIVATE_DEF_SEL( roughnessTextureFormat,339                                    "roughnessTextureFormat" );340            _MTLFX_PRIVATE_DEF_SEL( roughnessTextureUsage,341                                    "roughnessTextureUsage" );342            _MTLFX_PRIVATE_DEF_SEL( scaler,343                                    "scaler" );344            _MTLFX_PRIVATE_DEF_SEL( scaler4,345                                    "scaler4" );346            _MTLFX_PRIVATE_DEF_SEL( setAspectRatio_,347                                    "setAspectRatio:" );348            _MTLFX_PRIVATE_DEF_SEL( setAutoExposureEnabled_,349                                    "setAutoExposureEnabled:" );350            _MTLFX_PRIVATE_DEF_SEL( setColorProcessingMode_,351                                    "setColorProcessingMode:" );352            _MTLFX_PRIVATE_DEF_SEL( setColorContentOffsetX_,353                                    "setColorContentOffsetX:" );354            _MTLFX_PRIVATE_DEF_SEL( setColorContentOffsetY_,355                                    "setColorContentOffsetY:" );356            _MTLFX_PRIVATE_DEF_SEL( setColorTexture_,357                                    "setColorTexture:" );358            _MTLFX_PRIVATE_DEF_SEL( setColorTextureFormat_,359                                    "setColorTextureFormat:" );360            _MTLFX_PRIVATE_DEF_SEL( setContentHeight_,361                                    "setContentHeight:" );362            _MTLFX_PRIVATE_DEF_SEL( setContentWidth_,363                                    "setContentWidth:" );364            _MTLFX_PRIVATE_DEF_SEL( setDeltaTime_,365                                    "setDeltaTime:" );366            _MTLFX_PRIVATE_DEF_SEL( setDenoiseStrengthMaskTexture_,367                                    "setDenoiseStrengthMaskTexture:" );368            _MTLFX_PRIVATE_DEF_SEL( setDenoiseStrengthMaskTextureEnabled_,369                                    "setDenoiseStrengthMaskTextureEnabled:" );370            _MTLFX_PRIVATE_DEF_SEL( setDenoiseStrengthMaskTextureFormat_,371                                    "setDenoiseStrengthMaskTextureFormat:" );372            _MTLFX_PRIVATE_DEF_SEL( setDepthInverted_,373                                    "setDepthInverted:" );374            _MTLFX_PRIVATE_DEF_SEL( setDepthContentOffsetX_,375                                    "setDepthContentOffsetX:" );376            _MTLFX_PRIVATE_DEF_SEL( setDepthContentOffsetY_,377                                    "setDepthContentOffsetY:" );378            _MTLFX_PRIVATE_DEF_SEL( setDepthReversed_,379                                    "setDepthReversed:" );380            _MTLFX_PRIVATE_DEF_SEL( setDepthTexture_,381                                    "setDepthTexture:" );382            _MTLFX_PRIVATE_DEF_SEL( setDepthTextureFormat_,383                                    "setDepthTextureFormat:" );384            _MTLFX_PRIVATE_DEF_SEL( setDiffuseAlbedoTexture_,385                                    "setDiffuseAlbedoTexture:" );386            _MTLFX_PRIVATE_DEF_SEL( setDiffuseAlbedoTextureFormat_,387                                    "setDiffuseAlbedoTextureFormat:" );388            _MTLFX_PRIVATE_DEF_SEL( setDistortionHeight_,389                                    "setDistortionHeight:" );390            _MTLFX_PRIVATE_DEF_SEL( setDistortionOffsetX_,391                                    "setDistortionOffsetX:" );392            _MTLFX_PRIVATE_DEF_SEL( setDistortionOffsetY_,393                                    "setDistortionOffsetY:" );394            _MTLFX_PRIVATE_DEF_SEL( setDistortionTexture_,395                                    "setDistortionTexture:" );396            _MTLFX_PRIVATE_DEF_SEL( setDistortionTextureEnabled_,397                                    "setDistortionTextureEnabled:" );398            _MTLFX_PRIVATE_DEF_SEL( setDistortionWidth_,399                                    "setDistortionWidth:" );400            _MTLFX_PRIVATE_DEF_SEL( setExposureTexture_,401                                    "setExposureTexture:" );402            _MTLFX_PRIVATE_DEF_SEL( setFarPlane_,403                                    "setFarPlane:" );404            _MTLFX_PRIVATE_DEF_SEL( setFence_,405                                    "setFence:" );406            _MTLFX_PRIVATE_DEF_SEL( setFieldOfView_,407                                    "setFieldOfView:" );408            _MTLFX_PRIVATE_DEF_SEL( setHeight_,409                                    "setHeight:" );410            _MTLFX_PRIVATE_DEF_SEL( setInputContentHeight_,411                                    "setInputContentHeight:" );412            _MTLFX_PRIVATE_DEF_SEL( setInputContentMaxScale_,413                                    "setInputContentMaxScale:" );414            _MTLFX_PRIVATE_DEF_SEL( setInputContentMinScale_,415                                    "setInputContentMinScale:" );416            _MTLFX_PRIVATE_DEF_SEL( setInputContentPropertiesEnabled_,417                                    "setInputContentPropertiesEnabled:" );418            _MTLFX_PRIVATE_DEF_SEL( setInputContentWidth_,419                                    "setInputContentWidth:" );420            _MTLFX_PRIVATE_DEF_SEL( setInputHeight_,421                                    "setInputHeight:" );422            _MTLFX_PRIVATE_DEF_SEL( setInputWidth_,423                                    "setInputWidth:" );424            _MTLFX_PRIVATE_DEF_SEL( setIsUITextureComposited_,425                                    "setIsUITextureComposited:" );426            _MTLFX_PRIVATE_DEF_SEL( setJitterOffsetX_,427                                    "setJitterOffsetX:" );428            _MTLFX_PRIVATE_DEF_SEL( setJitterOffsetY_,429                                    "setJitterOffsetY:" );430            _MTLFX_PRIVATE_DEF_SEL( setNearPlane_,431                                    "setNearPlane:" );432            _MTLFX_PRIVATE_DEF_SEL( setMaskTexture_,433                                    "setMaskTexture:" );434            _MTLFX_PRIVATE_DEF_SEL( setMaskTextureFormat_,435                                    "setMaskTextureFormat:" );436            _MTLFX_PRIVATE_DEF_SEL( setMotionTexture_,437                                    "setMotionTexture:" );438            _MTLFX_PRIVATE_DEF_SEL( setMotionContentOffsetX_,439                                    "setMotionContentOffsetX:" );440            _MTLFX_PRIVATE_DEF_SEL( setMotionContentOffsetY_,441                                    "setMotionContentOffsetY:" );442            _MTLFX_PRIVATE_DEF_SEL( setMotionTextureFormat_,443                                    "setMotionTextureFormat:" );444            _MTLFX_PRIVATE_DEF_SEL( setMotionVectorScaleX_,445                                    "setMotionVectorScaleX:" );446            _MTLFX_PRIVATE_DEF_SEL( setMotionVectorScaleY_,447                                    "setMotionVectorScaleY:" );448            _MTLFX_PRIVATE_DEF_SEL( setNormalTexture_,449                                    "setNormalTexture:" );450            _MTLFX_PRIVATE_DEF_SEL( setNormalTextureFormat_,451                                    "setNormalTextureFormat:" );452            _MTLFX_PRIVATE_DEF_SEL( setOutputHeight_,453                                    "setOutputHeight:" );454            _MTLFX_PRIVATE_DEF_SEL( setOutputOffsetX_,455                                    "setOutputOffsetX:" );456            _MTLFX_PRIVATE_DEF_SEL( setOutputOffsetY_,457                                    "setOutputOffsetY:" );458            _MTLFX_PRIVATE_DEF_SEL( setOutputResolutionMotionVectorsEnabled_,459                                    "setOutputResolutionMotionVectorsEnabled:" );460            _MTLFX_PRIVATE_DEF_SEL( setOutputTexture_,461                                    "setOutputTexture:" );462            _MTLFX_PRIVATE_DEF_SEL( setOutputTextureFormat_,463                                    "setOutputTextureFormat:" );464            _MTLFX_PRIVATE_DEF_SEL( setOutputWidth_,465                                    "setOutputWidth:" );466            _MTLFX_PRIVATE_DEF_SEL( transparencyOverlayTexture,467                                    "transparencyOverlayTexture" );468            _MTLFX_PRIVATE_DEF_SEL( setTransparencyOverlayTexture_,469                                    "setTransparencyOverlayTexture:" );470            _MTLFX_PRIVATE_DEF_SEL( setTransparencyOverlayTextureEnabled_,471                                    "setTransparencyOverlayTextureEnabled:" );472            _MTLFX_PRIVATE_DEF_SEL( setPreExposure_,473                                    "setPreExposure:" );474            _MTLFX_PRIVATE_DEF_SEL( setTransparencyOverlayTextureFormat_,475                                    "setTransparencyOverlayTextureFormat:" );476            _MTLFX_PRIVATE_DEF_SEL( setPrevColorTexture_,477                                    "setPrevColorTexture:" );478            _MTLFX_PRIVATE_DEF_SEL( setReactiveMaskTexture_,479                                    "setReactiveMaskTexture:" );480            _MTLFX_PRIVATE_DEF_SEL( setReactiveMaskContentOffsetX_,481                                    "setReactiveMaskContentOffsetX:" );482            _MTLFX_PRIVATE_DEF_SEL( setReactiveMaskContentOffsetY_,483                                    "setReactiveMaskContentOffsetY:" );484            _MTLFX_PRIVATE_DEF_SEL( setReactiveMaskTextureEnabled_,485                                    "setReactiveMaskTextureEnabled:" );486            _MTLFX_PRIVATE_DEF_SEL( setReactiveMaskTextureFormat_,487                                    "setReactiveMaskTextureFormat:" );488            _MTLFX_PRIVATE_DEF_SEL( setRequiresSynchronousInitialization_,489                                    "setRequiresSynchronousInitialization:" );490            _MTLFX_PRIVATE_DEF_SEL( setReset_,491                                    "setReset:" );492            _MTLFX_PRIVATE_DEF_SEL( roughnessTexture,493                                    "roughnessTexture" );494            _MTLFX_PRIVATE_DEF_SEL( setRoughnessTexture_,495                                    "setRoughnessTexture:" );496            _MTLFX_PRIVATE_DEF_SEL( setRoughnessTextureFormat_,497                                    "setRoughnessTextureFormat:" );498            _MTLFX_PRIVATE_DEF_SEL( setScaler_,499                                    "setScaler:" );500            _MTLFX_PRIVATE_DEF_SEL( setShouldResetHistory_,501                                    "setShouldResetHistory:" );502            _MTLFX_PRIVATE_DEF_SEL( specularHitDistanceTexture,503                                    "specularHitDistanceTexture" );504            _MTLFX_PRIVATE_DEF_SEL( setSpecularHitDistanceTexture_,505                                    "setSpecularHitDistanceTexture:" );506            _MTLFX_PRIVATE_DEF_SEL( setSpecularHitDistanceTextureEnabled_,507                                    "setSpecularHitDistanceTextureEnabled:" );508            _MTLFX_PRIVATE_DEF_SEL( setSpecularAlbedoTexture_,509                                    "setSpecularAlbedoTexture:" );510            _MTLFX_PRIVATE_DEF_SEL( setSpecularAlbedoTextureFormat_,511                                    "setSpecularAlbedoTextureFormat:" );512            _MTLFX_PRIVATE_DEF_SEL( setSpecularHitDistanceTextureFormat_,513                                    "setSpecularHitDistanceTextureFormat:" );514            _MTLFX_PRIVATE_DEF_SEL( setUITexture_,515                                    "setUITexture:" );516            _MTLFX_PRIVATE_DEF_SEL( setUITextureFormat_,517                                    "setUITextureFormat:" );518            _MTLFX_PRIVATE_DEF_SEL( setViewToClipMatrix_,519                                    "setViewToClipMatrix:" );520            _MTLFX_PRIVATE_DEF_SEL( setWidth_,521                                    "setWidth:" );522            _MTLFX_PRIVATE_DEF_SEL( setWorldToViewMatrix_,523                                    "setWorldToViewMatrix:" );524            _MTLFX_PRIVATE_DEF_SEL( shouldResetHistory,525                                    "shouldResetHistory" );526            _MTLFX_PRIVATE_DEF_SEL( specularAlbedoTexture,527                                    "specularAlbedoTexture" );528            _MTLFX_PRIVATE_DEF_SEL( specularAlbedoTextureFormat,529                                    "specularAlbedoTextureFormat" );530            _MTLFX_PRIVATE_DEF_SEL( specularAlbedoTextureUsage,531                                    "specularAlbedoTextureUsage" );532            _MTLFX_PRIVATE_DEF_SEL( specularHitDistanceTextureFormat,533                                    "specularHitDistanceTextureFormat" );534            _MTLFX_PRIVATE_DEF_SEL( specularHitDistanceTextureUsage,535                                    "specularHitDistanceTextureUsage" );536            _MTLFX_PRIVATE_DEF_SEL( supportedInputContentMaxScaleForDevice_,537                                    "supportedInputContentMaxScaleForDevice:" );538            _MTLFX_PRIVATE_DEF_SEL( supportedInputContentMinScaleForDevice_,539                                    "supportedInputContentMinScaleForDevice:" );540            _MTLFX_PRIVATE_DEF_SEL( supportsDevice_,541                                    "supportsDevice:" );542            _MTLFX_PRIVATE_DEF_SEL( supportsMetal4FX_,543                                    "supportsMetal4FX:" );544            _MTLFX_PRIVATE_DEF_SEL( uiTexture,545                                    "uiTexture" );546            _MTLFX_PRIVATE_DEF_SEL( uiTextureFormat,547                                    "uiTextureFormat" );548            _MTLFX_PRIVATE_DEF_SEL( uiTextureUsage,549                                    "uiTextureFormat" );550            _MTLFX_PRIVATE_DEF_SEL( viewToClipMatrix,551                                    "viewToClipMatrix" );552            _MTLFX_PRIVATE_DEF_SEL( width,553                                    "width" );554            _MTLFX_PRIVATE_DEF_SEL( worldToViewMatrix,555                                    "worldToViewMatrix" );556        } // Selector557    } // Private558} // MTLFX559560//-------------------------------------------------------------------------------------------------------------------------------------------------------------561